Reputation: 323
I'm trying to create a copy trader which will copy all trades from a main account to child account.
I checked Binance API docs but couldn't figure out much from it.
For example, I need to listen to all order updates such as executed, canceled, placed and so on - what would be the proper way to do that? If someone could give me an example I'd appreciate it.
Upvotes: 1
Views: 838
Reputation: 41
Did you have a look at GET /api/v3/allOrders
?
https://binance-docs.github.io/apidocs/spot/en/#all-orders-user_data
It returns all open, cancelled and filled orders for a trading pair. If you use the library python-binance, you can easily call it with :
from binance.client import Client
client = Client(...) # your API keys
orders = client.get_all_orders(symbol='BNBETH')
print(orders)
But you need to provide a trading pair each time.
Upvotes: 1