curl 从Windows 10中的CoinGlass获取资金利率数据

nbnkbykc  于 2022-11-13  发布在  Windows
关注(0)|答案(1)|浏览(165)

我是使用API的新手,不太清楚如何使用CoinGlass API检索数据。
根据文档,它支持使用curl命令

curl --location --request GET 'https://open-api.coinglass.com/api/pro/v1/futures/funding_rates_chart?symbol=BTC&type=C' \
--header 'coinglassSecret: fabe11b61f5a4963a4227f4ac2cbcf2f'

https://coinglass.github.io/API-Reference/#liquidation-chart
但是,当我试图在Windows 10的命令提示符中运行它时,它给了我下面的错误。

C:\Users\User1>curl --request GET 'https://open-api.coinglass.com/api/pro/v1/futures/funding_rates_chart?symbol=BTC&type=C' --header 'coinglassSecret: fabe11b61f5a4963a4227f4ac2cbcf2f'
curl: (3) URL using bad/illegal format or missing URL

请给我指个方向,万分感谢!

tvokkenx

tvokkenx1#

我删除了URL周围的单引号。在Win10CMD提示符下执行,得到了这个

curl --request GET https://open-api.coinglass.com/api/pro/v1/futures/funding_rates_chart?symbol=BTC&type=C  --header 'coinglassSecret: fabe11b61f5a4963a4227f4ac2cbcf2f'

{"code":"30001","msg":"secret invalid","success":false}

The system cannot find the file specified.
Error occurred while processing: C.
The system cannot find the file specified.
Error occurred while processing: --header.
The filename, directory name, or volume label syntax is incorrect.

相关问题