[英]How do i get the orderId of an order with python-binance?
I have recently started looking at python-binance
.我最近开始研究python-binance
。 I have read through the entire API and spent a frustratingly long time on Google, trying to find out how to get an orderId
.我已经阅读了整个 API 并在 Google 上花费了令人沮丧的很长时间,试图找出如何获取orderId
。
The API frequently states that you need the orderId
for certain functions, but never how to actually get the orderId
of an order. API 经常声明您需要orderId
来执行某些功能,但从未声明如何实际获取订单的orderId
。
Can anyone help me please?任何人都可以帮助我吗?
You need to create an order first and you will get the orderId in the response:您需要先创建一个订单,然后您将在响应中获得 orderId:
{
"symbol": "BTCUSDT",
"orderId": 28,
"clientOrderId": "6gCrw2kRUAF9CvJDGP16IP",
"transactTime": 1507725176595,
"price": "0.00000000",
"origQty": "10.00000000",
"executedQty": "10.00000000",
"status": "FILLED",
"timeInForce": "GTC",
"type": "MARKET",
"side": "SELL"
}
See here https://python-binance.readthedocs.io/en/latest/binance.html?highlight=create_order#binance.client.Client.create_order请参阅此处https://python-binance.readthedocs.io/en/latest/binance.html?highlight=create_order#binance.client.Client.create_order
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.