Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

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

Open
Pistol-Peet opened this issue Feb 27, 2021 · 2 comments
Open

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

Pistol-Peet opened this issue Feb 27, 2021 · 2 comments
Labels
bug exchange Relating to an exchange

Comments

@Pistol-Peet
Copy link

System information

  • Have I written custom code (as opposed to using zenbot vanilla): No
  • **OS Platform and Distribution: ubuntu 20.04
  • Zenbot version (commit ref, or version): 4.1.0
  • Zenbot branch: unstable
  • NodeJS version: 14.16.0-deb-1
  • Python version (when using a python script): python3.8
  • Exact command to reproduce (include everything): zenbot trade kraken.DAI-EUR --strategie trendline
  • Did I make any changes to conf-sample.js?: yes (minor)

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'

@DeviaVir DeviaVir added exchange Relating to an exchange bug labels Mar 1, 2021
@tommyyama2020
Copy link
Contributor

tommyyama2020 commented Mar 2, 2021

@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
Copy link
Author

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug exchange Relating to an exchange
Projects
None yet
Development

No branches or pull requests

3 participants