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)
I started a gekko instance on GDAX (coinbase.pro) on EUR/ETH
Expected result (what you hoped would happen)
Each order must use all money/currency
Actual result (unexpected outcome)
Every order gekko not use all money or currency.
Example: if I have 100€ gekko buy 10 ETH and remain 4€, or if I have 10 ETH gekko buy 100€ and remain 0.12 ETH... Every transaction not use 100% of currency
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc)
The trader is programmed like this.
Each order must use all money/currency
Why?
Gekko will try to buy and sell as much as possible, however how exactly Gekko can buy is a bit tricky:
Gekko will try to do a good trade via a sticky order. Because of this the exact price (rate) of the trade is not known. Imagine the price of ETH is $1 and you have $100 and want to buy ETH. If Gekko tries to buy 100 ETH but because the price jumped the price is now $1.01 Gekko won't be able to buy 100 ETH (since that now requires $101). For that reason only 95% of assets are used (so Gekko can still buy even if the price moves 5%).
For selling this is indeed not a problem as noted by @cuthulino, since if we have 100ETH we are always able to sell 100ETH* regardless of the price.
*Note that some exchanges still have rounding restrictions on amounts (like Binance), it is impossible to sell 1.00001 ETH on their trading markets using the order types Gekko currently uses (not MKT orders).
Ok thanks. I understand the "problem".
Maybe the problem is coinbase pro, beacuse I have the same issue when gekko sell ETH...
If I have 0.2465746 ETH, gekko sell (for example) only 0.22 ETH and I don't undersdtand why.
Thanks in advance.
I am assuming this is fixed, if anyone still experiences this please open a new issue and post all debug logs.
Most helpful comment
Gekko will try to buy and sell as much as possible, however how exactly Gekko can buy is a bit tricky:
Gekko will try to do a good trade via a sticky order. Because of this the exact price (rate) of the trade is not known. Imagine the price of ETH is $1 and you have $100 and want to buy ETH. If Gekko tries to buy 100 ETH but because the price jumped the price is now $1.01 Gekko won't be able to buy 100 ETH (since that now requires $101). For that reason only 95% of assets are used (so Gekko can still buy even if the price moves 5%).
For selling this is indeed not a problem as noted by @cuthulino, since if we have 100ETH we are always able to sell 100ETH* regardless of the price.
*Note that some exchanges still have rounding restrictions on amounts (like Binance), it is impossible to sell 1.00001 ETH on their trading markets using the order types Gekko currently uses (not MKT orders).