gpt4 book ai didi

javascript - 带有 Google 脚本的币安 API

转载 作者:行者123 更新时间:2023-12-01 02:32:54 26 4
gpt4 key购买 nike

我正在尝试将我的交易历史记录从币安(使用签名端点安全性)提取到谷歌表格中,以便我可以使用谷歌脚本保存所有交易的记录。我陷入无法使用 api key 提取数据的困境。以下片段是我根据我对 Binance API 和 UrlFetchApp API 的理解所能得到的。

var data = UrlFetchApp.fetch("https://api.binance.com/api/v3/myTrades", {headers : apiKey})

我还发现了this post .

Binance API Website

最佳答案

您无法在网址栏中添加 header 。

编辑我看到您正在使用 UrlFetchApp。在这种情况下,正确的语法是

var headers = {'X-MBX-APIKEY': apiKey}
UrlFetchApp.fetch("https://api.binance.com/api/v3/myTrades", {'headers': headers})

关于javascript - 带有 Google 脚本的币安 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48178861/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com