[英]Binance futures API to retrieve filled order as signal
i'm trying to get a live trade data feeds from binance futures via python.我正在尝试通过 python 从币安期货获取实时交易数据源。 I'm able to send orders to binance but i would like to receive a signal if the orders been filled so i can set my stop loss, anyone can guide me in the right direction?
我可以向币安发送订单,但如果订单已成交,我想收到一个信号,以便我可以设置止损,有人可以指导我朝正确的方向发展吗?
I've tried request_client.start_user_data_stream() which returns a listenkey , but i'm not sure what i should do with it.我试过request_client.start_user_data_stream()返回一个listenkey ,但我不确定我应该用它做什么。
You need to create a !userData
stream.您需要创建一个
!userData
流。 If an order gets filled its pushed to you immediatly.如果订单被填写,它会立即推送给您。
Here is a lib and an example file to solve this: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/blob/master/example_binance_futures.py这是一个 lib 和一个示例文件来解决这个问题: https : //github.com/oliver-zehentleitner/unicorn-binance-websocket-api/blob/master/example_binance_futures.py
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.