DeviaVir / zenbot

Zenbot is a command-line cryptocurrency trading bot using Node.js and MongoDB.
MIT License
8.22k stars 2.04k forks source link

Update exchange.js #2599

Closed xwolfyxNL closed 3 years ago

xwolfyxNL commented 3 years ago

Fixes zenbot for not being able to place buy/sell orders while using the 'taker' mode. The binance api requires a price else it returns with an error:

An error occurred { InvalidOrder: binance createOrder method requires a price argument for a limit order at binance.createOrder (/home/papi/Desktop/zenbot/node_modules/ccxt/js/binance.js:1724:23) constructor: [Function: InvalidOrder], name: 'InvalidOrder' }

Binance API is down! unable to call buy, retrying in 20s [ { size: '1985.55367709', fee: null, orig_size: '1985.55367709', remaining_size: '1985.55367709', orig_price: '0.00000026', cancel_after: 'day', product_id: 'DOGE-BTC', type: 'limit', side: 'buy', post_only: true } ]