I am getting mysterious error when I try to place a market order using node-binance-api by using the following function, any suggestion is greatly appreciated!
const Binance = require('…/node-binance-api');
const binance = new Binance().options({APIKEY: '------', APISECRET: '----------', useServerTime: true});
binance.buy("BNBUSDT", 0.3, 0, "MARKET")
the error I am getting is:
(node:17200) 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().
To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https:
(rejection id: 1)(node:17200) [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.
What I have tried:
I created new APi and I changed the restriction rules.
I modified the code multiple times based on node-binance-api
I used math.floor to remove the decimal for the quantity