【发布时间】:2020-07-23 03:10:28
【问题描述】:
我正在尝试向 Binance 的 API 发送一个GET 请求,但我不知道该怎么做。
这是文档页面:https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#account-information-user_data
我有一个私人apiKey 和secretKey。
我可以向 Binance 提出一般性请求,但我无法使用我的私钥获取我的私人数据。
第一次尝试:
对于 Postman 中的 GET 请求,我使用以下字符串:
https://api.binance.com/api/v3/account?timestamp=1499827319559&signature=here_I_put_my_secret_key
我作为 header 传递,因为 Danny 建议使用 apiKey。
但我明白了:
{
"code": -1021,
"msg": "Timestamp for this request is outside of the recvWindow."
}
谢谢。
【问题讨论】:
-
嗯,文档中提到了大约 28 次
recvWindow,所以这是一个很好的起点。 "建议使用5000以下的小recvWindow!最大不能超过60000!" -
我认为阅读文档会对您有所帮助 - github.com/binance-exchange/binance-official-api-docs/blob/…
-
感谢您的回复,我已经尝试设置 recvWindow=3000 或 50000 但它仍然会产生错误..
-
我也尝试更改时间戳值,但没有任何改变..
标签: post get request postman binance