Query account trades

My goal is to query all the account’s trades, I can use the api/v3/exchangeInfo endpoint to receive the symbols list and query for each one of them, but it takes a lot of time.

Is there a workaround for that?

Thanks ahead!

Unfortunately you will need to loop over each symbol. However you could subscribe to USER_DATA stream to get latest trades.

1 Like

it really doesn’t. You get the trades at startup and update trades in stream. Use streams which is the most effective way.

Is there a way to query all the orders? Or only the trades opened in the last 90 days?

GET /api/v3/openOrders for open orders and GET /api/v3/allOrders for all orders.

Check the docs here

Note that this is for SPOT account.