binance python api通过ID
我需要关闭以前打开的订单:
order_id = "test"
symbol = "BTCUSDT"
direction = "long"
quantity = "0.1"
order = client.futures_create_order(newClientOrderId=order_id, symbol=symbol, side=direction, type=ORDER_TYPE_MARKET, quantity=quantity)
有没有办法说binance以市场价格关闭它,例如:
client.futures_close_order(orderId=order_id)
谢谢您!
I need to close an order previously opened with:
order_id = "test"
symbol = "BTCUSDT"
direction = "long"
quantity = "0.1"
order = client.futures_create_order(newClientOrderId=order_id, symbol=symbol, side=direction, type=ORDER_TYPE_MARKET, quantity=quantity)
Is there a way to say Binance to close it at market price like:
client.futures_close_order(orderId=order_id)
Thank you in advanced!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有一个打开订单(仍在等待填充的订单),则很容易通过Endpoint
delete/fapi/v1/订单
。取消。
如果您指的是职位,则可以下达另一个订单(可以是市场,限制等)以关闭它。
If you have an OPEN order ( an order that is still waiting for filling), it's easy to cancel via endpoint
DELETE /fapi/v1/order
.If you are referring to a position, you can place another order (can be MARKET, LIMIT, etc) to close it.