1

我正在{"error":["EAPI:Invalid nonce"]}调用https://api.kraken.com/0/private/AddOrder端点。

以 json 的形式传递以下参数:

JSONObject jsonObject = new JSONObject();
            jsonObject.accumulate("pair", "XXBT");
            jsonObject.accumulate("type ", "sell");
            jsonObject.accumulate("ordertype ", "market");
            jsonObject.accumulate("price", "2");
            jsonObject.accumulate("volume", "1");

同时设置 API-Key 和 API-Sign。

nonce = String.valueOf(System.nanoTime());

使用上述逻辑生成随机数。知道我哪里出错了吗?

4

1 回答 1

1

尝试将选项Nonce Window增加到 5000-10000。您可以在此处找到此选项。

于 2018-04-20T10:04:09.477 回答