Empty response to myTrades for one pair

I can get the trades for most of my trades pairs, but at least one keeps on returning an empty list on random occasions. This is in python. I can see that the balance is non-zero for the that pair, and that the web page trading history list lists two trades.
So, on two separate requests one will return an empty list and another the proper result.

Why is this happening? I think I’m not violating the IP limits and such as I’m doing the request manually, one at a time.

I am having the same issue. Sometimes the response comes back as an empty list and sometimes it comes back not empty but missing trades. My trades were executed back in May/June as well.

Hi. Based on the information you provided, this might be due to the incomplete data syncing process. Your API request may occasionally hit the DB server which has not yet included the latest data.

The trades/orders I’m after have long been filled already… for weeks now; they’re not new or active. I guess they would have been in the DB server for a long time. For this particular pair, one trade is pending. No trades happened lately.

Does the overall platform trading activity impact the DB server queries?

Do you still remember when those orders got filled?

It was in May/June this year.

what’s the original request sent that returned the empty list?
If you send the request again, can you see get the result?

>>> len(client.get_my_trades(symbol=symbol))
DEBUG:urllib3.connectionpool:https://api.binance.com:443 "GET /api/v3/myTrades?symbol=LUNAUSDT&timestamp=1627288837235&signature=984f36e185053d233be1633f084546937f50565d97aa47eee29fa5dd7e1d2aa4 HTTP/1.1" 200 2
0
>>> len(client.get_my_trades(symbol=symbol))
DEBUG:urllib3.connectionpool:https://api.binance.com:443 "GET /api/v3/myTrades?symbol=LUNAUSDT&timestamp=1627288838365&signature=de6a26439b7f2061b278f43fab5d15f456219c86f2e3b42dc403f7263b779e48 HTTP/1.1" 200 242
2

I have the same issue… with both the library “request” and the “curl” system… tech support said they will investigate…

I have the same issue. It’s fairly constant on certain pairs. DOTBTC fails 50% of the time for me. It also not always an empty response. For DOTBTC I always get response with data, but one time it would contain 85 trades (wrong) and next time 91 (correct).

really for the very same request, with same params and shortly after?

The MyTrades endpoint is very difficult to use, because of the 24hours limitation, so one should instead use the fromID system, starting from fromID=0 and hangling from id to id.

edit: what I wrote is true for spot trading, not sure if margin trading endpoint works the same, sorry.

Just to clarify. To confirm that this is not an issue in my code I downloaded Binance Postman collection and created simple request with symbol == DOTBTC and other parameters unspecified. And I created one test in postman that verifies if count of returned items is 91 (correct count). And I can run it subsequently getting pass or fail on that test randomly. I don’t see any correlation with how often I send requests. So this is not about hitting limits.

Dear Binance, are there any updates on this topic? Can we expect improved API behavior today?

After spending another day trying to use this API I keep getting an empty result for DOGE, even though the web trade history shows balance. Non zero balance is seen in the reply to ‘/api/v3/account’, too. But, trying to get ‘/api/v3/myTrades’ for DOGE it fails every time. Why?

Can you post a complete request url of your myTrades endpoint (omit sensitive fields) and share the expected response behaviour versus what you get, please?

The request that returns empty list:

https://api.binance.com:443 "GET /api/v3/myTrades?symbol=DOGEUSDT&timestamp=1631605473192&signature=... HTTP/1.1" 200 2
[]

History of transactions (CSV) shows this as the last entry for DOGE:

2021-05-12 07:15:49	Spot	Transaction Related	DOGE	117.7

Hi @hinxx @quadhd @Alessandro_Angelin could you help checking again if it’s still happening?

Hi @ishuen. I can’t reproduce this issue anymore

Thank you!

For all of my requests this works, but still keeps failing for DOGE…

@hinxx Can you post a complete request url of your myTrades endpoint (omit sensitive fields) and share the expected response behaviour versus what you get, please?