askmike / gekko

A bitcoin trading bot written in node - https://gekko.wizb.it/
MIT License
10.08k stars 3.93k forks source link

Luno: The specified amount contains fractional units #2746

Closed Dario82 closed 5 years ago

Dario82 commented 5 years ago

Note: this is the technical bug tracker, please use other platforms for getting support and starting a (non technical) discussion. See the getting help page for details.

I'm submitting a ... [X] bug report [ ] question about the decisions made in the repository

Action taken (what you did) Advice long from strategy

Expected result (what you hoped would happen) Sell from BTC to EUR (pair XBT:EUR)

Actual result (unexpected outcome) Sell by strategy receive this error: "The specified amount contains fractional units"

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc) I've inserted market pair in luno.js { pair: ['EUR', 'XBT'], minimalOrder: { amount: 0.0005, unit: 'asset' }, precision: 6 }

hiyan commented 5 years ago

It's been a while since i looked at this... If you know the correct fraction, set it at percision. If not, keep reducing until you stop getting the error.

Dario82 commented 5 years ago

I've set precision to 4, it'a all ok.