Problem with response (Chunked response)

Good day.
I use python and aiohttp library for sending request to
Endpoint - ACCOUNT_BALANCE = ‘/fapi/v2/balance’ and ACCOUNT_INFORMATION_V2 = /fapi/v2/account’.
Type - GET.
My headers:
‘Content-Type’: ‘application/json;charset=utf-8’,
‘X-MBX-APIKEY’: “public_key”

I have a problem. When I send 4 reqeust for different account, time to time I getting not full answer with “Chunked” parametr in accept headers. (from time to time I get full responses, and sometimes 1-2 of the requests are returned with the chunked status)

My question is how to handle chunked responses?

tried the following code:

   async with aiohttp.ClientSession() as sess:
       async with sess.get ('url', headers=self.headers) as response:
          while True:
             chunk = await
             if not chunk:

but still the answer is correct and does not arrive in full volume. Out of 2500 bytes, only 100-200 bytes arrive, and then it feels like the connection is broken.

I googled this question and studied the documentation, unfortunately I could not find an answer.

The same endpoint on works well!

We observed some issue with these two endpoints on testnet. Working on it

1 Like

Should be good now. If you still have problem, please share the whole code with confidential information masked

1 Like

Thanks! It’s solved. Working well right now.