我在调用https://api.kraken.com/0/private/AddOrder终结点时收到{"error":["EAPI:Invalid nonce"]}。
以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());
使用上述逻辑生成随机数。你知道我哪里错了吗?
https://stackoverflow.com/questions/47587017
复制相似问题