Postman GET 请求到 Binance API [英] Postman GET request to Binance API
问题描述
我正在尝试向 Binance 的 API 发送 GET
请求,但我不完全知道如何发送.这是文档页面:https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#account-information-user_data
I'm trying to send a GET
request to Binance's API, but I don't exactly know how to.
Here is the documentation page: https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md#account-information-user_data
我有一个私有的 apiKey
和 secretKey
.我可以向 Binance 发出一般请求,但无法使用我的私钥获取我的私人数据.
I have a private apiKey
and secretKey
.
I can do a general request to Binance, but I cannot get my private data, using my private keys.
第一次尝试:对于 Postman 中的 GET 请求,我使用以下字符串:https://api.binance.com/api/v3/account?timestamp=1499827319559&signature=here_I_put_my_secret_key
First try:
For the GET request in Postman I use this string:
https://api.binance.com/api/v3/account?timestamp=1499827319559&signature=here_I_put_my_secret_key
我作为 header
传递,因为 Danny 建议使用 apiKey
.
And I pass as a header
as Danny suggested the apiKey
.
但我明白了:
{
"code": -1021,
"msg": "Timestamp for this request is outside of the recvWindow."
}
谢谢.
推荐答案
我使用 Postman 中的 javascript
解决了这个问题,更正了时间.另一个简单的解决方法是使用 ccxt
库:https://github.com/ccxt/ccxt
I solved this correcting the time using javascript
in Postman.
Another easy fix is to use the ccxt
library : https://github.com/ccxt/ccxt
这篇关于Postman GET 请求到 Binance API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!