I’m not sure if this is where to get help for a programming issue. If this is not the correct place, let me know.
I am trying to write a typescript trading program for the Nash DEX, but am having problems with placing a limit order. The program is able to use the API key to log into the trading account and to retrieve account balances. However, the program has a problem trying to place a limit order.
The offending line is as follows:
const order = await nashClient.placeLimitOrder(
false,
createCurrencyAmount('0.020001', CryptoCurrency.ETH),
OrderBuyOrSell.BUY,
OrderCancellationPolicy.GOOD_TIL_CANCELLED,
createCurrencyPrice('0.01', CryptoCurrency.BTC, CryptoCurrency.ETH),
'eth_btc'
)
I get the following error message:
Could not get nonce set: TypeError: Cannot read property ‘eth’ of undefined
2020-10-26T21:57:02.920Z
Caught error
TypeError: Cannot read property ‘eth_btc’ of undefined
at Client.placeLimitOrder (/home/pi/node_modules/@neon-exchange/api-client-typescript/build/main/client/client.js:1540:92)
at /home/pi/typescript_programs/trade.js:58:49
at step (/home/pi/typescript_programs/trade.js:33:23)
at Object.next (/home/pi/typescript_programs/trade.js:14:53)
at /home/pi/typescript_programs/trade.js:8:71
at new Promise ()
at __awaiter (/home/pi/typescript_programs/trade.js:4:12)
at run (/home/pi/typescript_programs/trade.js:51:32)
at Object. (/home/pi/typescript_programs/trade.js:74:1)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
Any help or suggestions would be greatly appreciated.
Thanks,
Eugene Tsai