我在 postman 中的 api-rest 有问题,我想在请求的参数中使用我的 {{sellPrice}}。每次写 400 bad request img 时,当我使用正常整数时,它运行良好,但使用我的变量 {{sellPrice}} 时出现此错误。我尝试将此变量保存到全局/环境/集合。它确实有效:(.my params。 感谢您的帮助。
这是我的 environment setup + 我的 globals variables。我使用 GET https://api.binance.com/api/v3/ticker/price?symbol=ETHBUSD 来刷新实际价格,并使用脚本将价格设置为全局变量for set price to global variables。这个数字也重新写入我的变量。添加重写脚本的 console.log。
我想在 POST https://api.binance.com/api/v3/order?symbol=ETHBUSD&price={{sellPrice}}&side=SELL&type=LIMIT&timeInForce=GTC&quantity=0.01&newClientOrderId=my_order_id_1&signature={{signature}}×tamp={{timestamp}} 中使用的变量 sellPrice,其中 sellPrice 是 globalVariable。
也许在集合的预请求脚本中可能有问题?