使用python运行getposition函数,显示错误如下: Traceback (most recent call last): File “<string>”, line 999, in init_ctx File “<string>”, line 41, in <module> File “<string>”, line 4, in main NameError: name ‘log’ is not defined
python 程序如下: def main(): exchange.SetContractType(“swap”) A = exchange.GetPosition() log(A)
参数设置为币安期货接口,BTC_USDT 请问这个问题出在了哪里?
发明者量化-小小梦 Log, 不是log.
蜜蜂爱吃肉 我用js写的程序就能获取持仓信息,代码如下: function main() { exchange.SetContractType("swap") while (1) { var a = exchange.GetPosition() var b =a.length Log(b) Log(a); } }