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

KRAKEN API rejecting orders with prices value >5 decimals #2661

Open Pistol-Peet opened 3 years ago

Pistol-Peet commented 3 years ago

System information

Describe the problem

When running trades through KrakenAPI ordeers with a pricedecimal >5 are being rejected

Source code / Error logs

image // cleartext Unhandeld AddOrder error: Error: Order:Invalid price:DAIEUR price can only be specified up to 5 decimals. at rawRequest (/root/zenbot/node_modules/kraken-api/kraken.js:54:9) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5)

Error: order rejected at /root/zenbot/lib/engine.js:301:15 at /root/zenbot/extensions/exchanges/kraken/exchange.js:283:20 at /root/zenbot/node_modules/kraken-api/kraken.js:176:23 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) { order: { id: null, status: 'rejected', price: '0.8577943000', size: '13.88920844', created_at: 1614420044429, filled_size: '0', post_only: false, reject_reason: 'Order:Invalid price:DAIEUR price can only be specified up to 5 decimals.' }, desc: 'could not execute sell: error placing order'

tommyyama2020 commented 3 years ago

@Pistol-Peet Just out of curiosity, you can not use a currency with five decimal places for the asset pair? I am" just" curious. Public API says so. image

Pistol-Peet commented 3 years ago

According to the screenshot I couldn´t. The order came out like this image So that might have triggered the warning. Hence caused the rejection. Question is, when defining the pair decimals as you show in your screenshot, does zenbot consider it for the calculation of orders?