crypto-crawler / crypto-client

An unified client for all cryptocurrency exchanges.
Apache License 2.0
7 stars 9 forks source link

cannot place order on newdex, #1

Open jamhuery opened 4 years ago

jamhuery commented 4 years ago

(node:8672) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

assert_1.default.ok(config_1.USER_CONFIG.KRAKEN_API_KEY)

at privateMethod (/home/cyber/node_modules/crypto-client/dist/exchanges/kraken.js:31:22)
at Object.queryAllBalances (/home/cyber/node_modules/crypto-client/dist/exchanges/kraken.js:116:28)
at queryAllBalances (/home/cyber/node_modules/crypto-client/dist/index.js:308:35)
at Object.queryBalance (/home/cyber/node_modules/crypto-client/dist/index.js:339:28)
at testKraken (/home/cyber/node_modules/crypto-client/dist/cli.js:190:32)
at /home/cyber/node_modules/crypto-client/dist/cli.js:210:11
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at findNodeScript.then.existing (/home/cyber/.nvm/versions/node/v10.15.1/lib/node_modules/npm/node_modules/libnpx/index.js:268:14)

(node:8672) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) (node:8672) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. ![Screenshot from 2020-02-26 18-59-33](https://user-images.githubusercontent.com/31106916/75343097-47d4fc00-58ca-11ea-8a10-d2392de2c3fe.png)

soulmachine commented 4 years ago

You need to call

CryptoClient.init({
  KRAKEN_API_KEY: 'you api key', 
  KRAKEN_PRIVATE_KEY:'you private key'
});

first, then call CryptoClient.placeOder()