Kucoin / kucoin-node-sdk

KuCoin API SDK for Node.js language.
Apache License 2.0
106 stars 53 forks source link

Getting empty data for orders list api #41

Closed libinthomas-kv closed 3 months ago

libinthomas-kv commented 2 years ago

I'm able to pull the deposit and withdrawal transactions. When trying to pull the orders list, Im getting empty data

/** Require SDK */
const API = require('kucoin-node-sdk');

/** Init Configure */
API.init({
    "baseUrl": "https://api.kucoin.com",
    "apiAuth": {
      "key": "key", // KC-API-KEY
      "secret": "secret", // API-Secret
      "passphrase": passphrase", // KC-API-PASSPHRASE
    },
    "authVersion": 2, // KC-API-KEY-VERSION. Notice: for v2 API-KEY, not required for v1 version.
  });

/** API use */
const main = async () => {
  const getTimestampRl = await API.rest.Others.getTimestamp();
  console.log(getTimestampRl.data);
  const orders =  await API.rest.Trade.Orders.getOrdersList('TRADE')
  console.log(JSON.stringify(orders))
};

/** Run Demo */
main();
ISAAC-XXYYZZ commented 3 months ago

Please refer to our documentation: https://www.kucoin.com/docs/rest/spot-trading/orders/get-order-list. When no other parameters are passed, only orders with a status of “done” are retrieved by default