【问题标题】:kraken cURL REST API cannot send order saying invalid argumentskraken cURL REST API 无法发送说无效参数的命令
【发布时间】:2018-01-18 18:58:00
【问题描述】:

我可以通过如下代码调用私有用户 API:

curl -X POST -H "Accept: application/json" -H "API-Key: mykey" -H "API-Sign: mysign" -d "nonce=123" https://api.kraken.com/0/private/Balance

反馈告诉我我的账户中还剩下多少美元和 ETH。

但是当我切换到这个试图发送订单时:

curl -X POST -H "Accept: application/json" -H "API-Key: mykey" -H "API-Sign: mysign" -d "nonce=123" 'https://api.kraken.com/0/private/AddOrder?pair=XXBTZUSD&type=buy&ordertype=market&volume=0.01'

它说 {"error":["EGeneral:Invalid arguments"]},我该如何解决?

【问题讨论】:

    标签: rest curl http-post libcurl gitkraken


    【解决方案1】:

    您似乎需要将 Content-Type 标头设置为任何内容。在这种情况下application/x-www-form-urlencoded。有点奇怪,它不在文档中。

    【讨论】:

      猜你喜欢
      • 2023-03-12
      • 1970-01-01
      • 2015-11-11
      • 1970-01-01
      • 2016-08-10
      • 1970-01-01
      • 2012-06-17
      • 1970-01-01
      • 2016-03-25
      相关资源
      最近更新 更多