sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.88k stars 2.2k forks source link

BinanceAPIException: APIError(code=-1121): Invalid symbol for certain pairs #1289

Open monta444 opened 1 year ago

monta444 commented 1 year ago

I'm using binance futures i always get invalid symbol error only for pairs that contain numbers like: 1000SHIBUSDT LUNA2USDT 1000LUNCUSDT 1INCHUSDT and for the rest of pairs that does not contain numbers everything works fine.

sirfrank commented 1 year ago

i put all symbols starting with a digit, not a letter on my blacklist. I had the same issue.

monta444 @.***> ezt írta (időpont: 2023. febr. 14., K, 3:21):

I'm using binance futures i always get invalid symbol error only for pairs that contain numbers like: 1000SHIBUSDT LUNA2USDT 1000LUNCUSDT 1INCHUSDT and for the rest of pairs that does not contain numbers everything works fine.

— Reply to this email directly, view it on GitHub https://github.com/sammchardy/python-binance/issues/1289, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVKGM42QTVDULSDODYUWYTWXLT3FANCNFSM6AAAAAAU27XQLY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

sirfrank commented 1 year ago

C98 works fine for me , so it has the be the first letter being a number.

SharinganTrader commented 1 year ago

you guys are trying to mistakenly accessing the spot market data not futures as intended. ticker1 = await client.get_ticker(symbol = "1000SHIBUSDTPERP") The above wont work because this doesn't exist on spot market ticker =client.futures_historical_klines(symbol=symbol, interval=KLINE_INTERVAL_1MINUTE, limit=1) The above IS correct

Spent hours trying to figure out what was wrong. Pin and share. Hope it helps

kimcuong88 commented 1 month ago

I'm also having the same problem as you Monta444. I would like to ask Monta444 how did you fix it? Can you tell me? or if anyone has the same error, please help Thank you.