Kline with many USD quote assets returns {'code': -1121, 'msg': 'Invalid symbol.'}

Many trading pairs listed in the exchangeInfo cannot be passed to retrieve kline data. From what I see, most of the failed pairs are those with quote assets of USD. Can anyone point me to docs that describe how to tell which base/quote pairs are acceptable to pass through the klines api?

For example:
https://api.binance.us/api/v3/exchangeInfo lists BTCUSD as a trading pair

But
https://api.binance.com/api/v3/klines?symbol=BTCUSD&interval=1m&limit=1 returns ‘code’: -1121, ‘msg’: ‘Invalid symbol.’

I thought this might be related to the “BREAK” status (Explanation on Symbol Status - #2 by dino), but many of the error-returning pairs (like BTCUSD) do not list a “BREAK” status.

You have to check whether the symbol is listed the exchangeInfo endpoint for us and .com. If the symbol is listed, you will be able to retrieve the kline data from it.

1 Like