我在 Mac 上开发并得到了这个奇怪的错误
def binance_object_creation():
api_key = 'my api key'
secret = 'my secret no'
binance = ccxt.binance(config={
'apiKey': api_key,
'secret': secret,
'enableRateLimit': True,
'options': {
'defaultType': 'future', # ←-------------- quotes and 'future'
"adjustForTimeDifference": True
}
})
binance.fapiPrivate_post_leverage({
"symbol": "BTCUSDT", # convert a unified CCXT symbol to an exchange-specific market id
# "symbol": "BTCUSDT", # same thing, note there's no slash in the exchange-specific id
"leverage": 3,
})
return(binance)
奇怪的是,如果我删除 fapiPrivate_post_leverage 的东西,那么错误就不会发生。adjustForTimeDifference:True,设置为防止时间戳错误但失败。会有什么问题?