Limit cap is too low for trades and aggregated trades endpoints

Hey, I’m developing a bot which requires trades history data for technical analysis and unfortunately there is a 1000 entry limit for the Aggregated Trades endpoint and historical data archives on data.binance.vision are only updated after full day passes in UTC timezone, and as you know these archives sometimes amount to hundreds of thousands of records for a single day.

Given the API limit mentioned above, say my bot starts analyzing a market which had 200,000 trades today until this hour, this would require 200 API calls each carrying 1000 records and it would take so much waiting time and use a significant amount of my allowed weight requests per minute!

I was wondering if you could raise the limit just for the trades and the agg_trades endpoint maybe to 10,000 or even 100,000 while keeping the weight at 1?

Thank you!

Another solution is to receive aggTrade or trade from the websocket stream, please find the API documents from:

https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams

Thanks for the reply, but that only streams data from the connection time onward I need all of today’s data (which will not be available on data.binance.vision until midnight 00:00 UTC).

Take for example the trades archive for BTCUSDT on 10/06/2023, it has a hefty record of 1,328,512 rows which is almost impossible with this limit cap!

Clients have to follow the request limit for sending restful API, it is not possible to raise the limit.

That is the most absurd thing I’ve read in software field! This post had a feature_requests tag, I’m not sure what is the point in providing it considering your above statement! Nevertheless forget it!

You can still use streams, but the trading bot will have some startup delay if you need complete coverage with per-trade precision.

  1. Connect to aggTrade stream, start saving live trades.
  2. Fetch historical data from data.binance.vision if you’re missing a lot.
  3. Slowly fetch historical data via /api/v3/aggTrade respecting rate limits.

Eventually you’ll get complete coverage.

Alternatively, you can use kline data for price & volume information. With 1-second klines you’re looking at 86400 klines per day, easily doable within rate limits. The precision will be lower though, since klines aggregate all trades in 1-second period.

1 Like