我正在{"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());
使用上述逻辑生成随机数。知道我哪里出错了吗?