kucoin-node-sdk icon indicating copy to clipboard operation
kucoin-node-sdk copied to clipboard

Getting empty data for orders list api

Open libinthomas-kv opened this issue 2 years ago • 0 comments

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();

libinthomas-kv avatar Sep 29 '22 06:09 libinthomas-kv