Issues during gathering data for Volume Profile

Hi,

I want to get a Volume Profile data for a specific trading pair on Binance Futures (USD-M). I have two options:

  • to get it either by gathering data on all trades and populate the amount of each trade on each price ticker (pipe) by using such an endoints: (a) GET /fapi/v1/aggTrades; or (b) GET /fapi/v1/historicalTrades; OR
  • or by downloading data on trades from csv files from here: Binance Data Collection

The second option looks workable but more complicated. That is why I got started with the first one. And everything is quite simple: I just call the endpoint in the loop and process the obtained data (of course, without exceeding the rate limits). But the only issue is that I get the “Internal error: 1” very often, which seriously blocks my data gathering. This error occurs completely unexpectedly. For the same range of trades’ IDs, API can return this error multiple amount of times in a row (the exact amount differs each time), but for the N-attempt it may return the requested data finally.

Is this something temporary on the Binance’s API side or am I doing something wrong?

Have you noticed this error only on /fapi/v1/historicalTrades ?

Thank you, we’ll report back.

Update:
This error can be related with search timeout, so adding a limit parameter to your requests can be helpful.

Also on /fapi/v1/aggTrades