如何转换 html 表格中的 2 个数据列表
我试图在Python的Binance上获得所有未来的空缺位置,这是我的代码 -
from binance.client import Client
client = Client("api key", "secret key")
import pandas as pd
import html
pos_info = client.futures_position_information()
for b in pos_info:
if float(b['positionAmt']) > 0:
print(b)
我将其作为输出
{'symbol': 'ETHUSDT', 'positionAmt': '0.283', 'entryPrice': '3520.15', 'markPrice': '3473.53457777', 'unRealizedProfit': '-13.19216449', 'liquidationPrice': '3184.27536722', 'leverage': '10', 'maxNotionalValue': '4000000', 'marginType': 'isolated', 'isolatedMargin': '86.36610623', 'isAutoAddMargin': 'false', 'positionSide': 'BOTH', 'notional': '983.01028550', 'isolatedWallet': '99.55827072', 'updateTime': 1648860967577}
{'symbol': 'SANDUSDT', 'positionAmt': '274', 'entryPrice': '3.642445620438', 'markPrice': '3.63380000', 'unRealizedProfit': '-2.36889988', 'liquidationPrice': '3.31094684', 'leverage': '10', 'maxNotionalValue': '250000', 'marginType': 'isolated', 'isolatedMargin': '97.53375892', 'isAutoAddMargin': 'false', 'positionSide': 'BOTH', 'notional': '995.66120000', 'isolatedWallet': '99.90265880', 'updateTime': 1648864488900}
现在如何在HTML Table 中获得这些值
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用pandas函数。
Output table:
You could use the Pandas function
to_html
.Output table: