I can't get depth for ETHRUB with the websocket api - {"code":-1121,"msg":"Invalid symbol."}

It doesn’t seem to work for symbols with RUB as the quote.
But you can go and see the depth graph in the exchange website.

What output do you see on your side? Please be exact on the steps you’re done.

I can’t reproduce it with:
websocat -v wss://ws-api.binance.com:443/ws-api/v3
and then
{"id": "043a7cf2-bde3-4888-9604-c8ac41fcba4d", "method": "depth", "params": {"symbol": "ETHRUB"}}

I ran a websocket.WebSocketApp on python with the testnet api and sent a request with ws.send:

ws = websocket.WebSocketApp(“wss://testnet.binance.vision/ws-api/v3”, on_message=lambda ws, message: print(message))
// same params

That was the problem, because I tried what you sent me and it works.
Therefore, I can see that it’s the testnet api that doesn’t accept any/all symbols, at least for depth, which I didn’t know. Is that intended?

use exchangeInfo to see which symbols are available on testnet, testnet is only for testing so it doesn’t include all the symbols that’s on the live exchange.

1 Like