Type/to search
0
Follow
1
Followers
Ao executar a função exchange.GetPosition() usando Python, as informações de posição não podem ser obtidas e um erro é exibido
Help
Created 2021-10-16 16:34:40  
 2
 1174

O Python executa a função getposition e mostra o erro da seguinte forma:
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

O programa python é o seguinte:
def main():
exchange.SetContractType("swap")
A = exchange.GetPosition()
log(A)

Parâmetros definidos como BTC_USDT
Onde é que isso vem?

Related Recommendations
Comment
All comments (2)

    Log, 不是log.

    5 years ago

    我用js写的程序就能获取持仓信息,代码如下:
    function main() {
    exchange.SetContractType("swap")
    while (1) {
    var a = exchange.GetPosition()
    var b =a.length
    Log(b)
    Log(a);
    }
    }

    5 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)