0

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)

4 Answers4

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')

dukkee
  • 1,112
  • 1
  • 9
  • 17
1
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)
subspring
  • 690
  • 2
  • 7
  • 23
DataXPH
  • 21
  • 5
  • 5
    Welcome to Stack Overflow. This question is over a year old and already has three answers, all of which provide an explanation in addition to code. Are you sure this answer wasn't already given? If so, please [edit] it and clearly explain how it is better than what's already here. – ChrisGPT was on strike Apr 25 '22 at 18:44
0

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

bakaDev
  • 367
  • 2
  • 7
0

According to documentation get_exchange_info doesn't take parameters. You can see the method doc and example output there.

maria
  • 494
  • 4
  • 13