'Python Error: get_exchange_info() takes 1 positional argument but 2 were given [closed]
Getting error "TypeError: get_exchange_info() takes 1 positional argument but 2 were given" reference: https://python-binance.readthedocs.io/en/latest/general.html#id5
from binance.client import Client
import config
client = Client(config.apiKey,config.apiSecurity)
print("logged in")
info = client.get_exchange_info('LINKUSDT')
print(info)
Solution 1:[1]
Because this method doesn't accept any input params, check the docs: https://python-binance.readthedocs.io/en/latest/general.html#id4
Maybe you want to use this one: info = client.get_symbol_info('BNBBTC')
Solution 2:[2]
form the source code we have
def get_exchange_info(self):
"""Return rate limits and list of symbols
that mean get_exchange_info doesn't take any input
Solution 3:[3]
According to documentation get_exchange_info
doesn't take parameters. You can see the method doc and example output there.
Solution 4:[4]
from binance.client import Client
import config
client = Client(config.BINANCE_API_KEY,config.BINANCE_SECRET_KEY)
print("logged in")
info = client.get_exchange_info()
print(info)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | dukkee |
Solution 2 | bakaDev |
Solution 3 | maria |
Solution 4 | subspring |