【问题标题】:Python Error: get_exchange_info() takes 1 positional argument but 2 were givenPython 错误:get_exchange_info() 采用 1 个位置参数,但给出了 2 个
【发布时间】:2021-01-25 15:36:23
【问题描述】:

出现错误“TypeError:get_exchange_info() 采用 1 个位置参数,但给出了 2 个” 参考: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)

【问题讨论】:

    标签: python binance


    【解决方案1】:

    形成我们拥有的源代码

    def get_exchange_info(self):
        """Return rate limits and list of symbols
    

    这意味着 get_exchange_info 不接受任何输入

    【讨论】:

      【解决方案2】:

      根据documentation get_exchange_info 不带参数。您可以在那里查看方法文档和示例输出。

      【讨论】:

        【解决方案3】:

        由于此方法不接受任何输入参数,请查看文档:https://python-binance.readthedocs.io/en/latest/general.html#id4

        也许你想用这个:info = client.get_symbol_info('BNBBTC')

        【讨论】:

        • 哦,哈哈,我用的是'exchange'而不是'symbol',哈哈我的坏xD
        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-01-06
        • 2022-10-06
        • 2023-03-15
        • 2019-04-25
        • 2021-01-08
        • 1970-01-01
        相关资源
        最近更新 更多