Binance Future api:APIError(code=-2015):无效的 API 密钥、IP 或操作权限,请求 ip [英] Binance Future api : APIError(code=-2015): Invalid API-key, IP, or permissions for action, request ip
问题描述
我在我的算法交易机器人中使用了 Binance Python api,但是当我使用 future market api 时出现错误.'''BinanceAPIException: APIError(code=-2015): 无效的 API 密钥、IP 或操作权限,请求 ip'''我确定我的 API 密钥是真的,并且我在设置中启用了 Future api 权限.仅当我将其用于未来市场时才会出现此错误.它非常适合现货市场.我该怎么做才能解决这个问题?
I used Binance Python api in my algotrading bot, but I get an error when I use future market api. ''' BinanceAPIException: APIError(code=-2015): Invalid API-key, IP, or permissions for action, request ip ''' I am sure that my API-key is true and I enabled Future api permissions in setting. I get this error only when I used that for future market. It was perfectly work for spot Market. what should I do to fix this?
推荐答案
在我的代码中,我有一个客户端"变量:
In my code, I have a "client" variable:
client = Client(config.API_KEY, config.API_SECRET, tld='us')
还有,事情是这样的:
如果您使用的是非美国版本的 Binance,并且您尚未在美国网站上注册您的帐户,请删除 tld='us'
if you are using a non-US version of Binance, and you have not registered your account on the US website, then remove tld='us'
反之亦然!
这篇关于Binance Future api:APIError(code=-2015):无效的 API 密钥、IP 或操作权限,请求 ip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!