Reputation: 43
I am trying to code a binance Buy function. However the code
from binance.enums import *
order = client.create_order(symbol='DOGEUSDT', side = 'BUY', type = 'MARKET', quantity = 475, timeInForce='GTC')
this code outputs > APIError(code=-1121): Invalid symbol.
Also, for the same symbol,
print(client.get_symbol_info(symbol="DOGEUSDT"))
ouptuts > None
The symbol DOGEUSDT exists is the orderbook. https://api.binance.com/api/v3/ticker/bookTicker I dont know why the same symbol I get from binance is invalid.
Upvotes: 3
Views: 3199
Reputation: 32
two things can happen
in that case change it to
in that case change testnet=False or delete it
Upvotes: 1
Reputation: 56
Are you using the testnet? I had the same error, however when I removed testnet=True from the client initialization the error was resolved.
Upvotes: 3