freqtrade / freqtrade

Free, open source crypto trading bot
https://www.freqtrade.io
GNU General Public License v3.0
28.08k stars 6.02k forks source link

Cannot run out of the box on bittrex #2880

Closed hroff-1902 closed 4 years ago

hroff-1902 commented 4 years ago

Our config.json.example is used as a sample config for Bittrex (as config_bittrex.json.example, but with other name). And it's used by setup.sh to create new config, with Bittrex as default choice.

If we populate SampleStrategy into user_data or create a new strategy with new-strategy, freqtrade will fail:

$ freqtrade trade --dry -s SampleStrategy
...
2020-02-07 23:03:08,661 - freqtrade - ERROR - Exchange Bittrex does not support market orders.

That's because config.json.example does not redefinr "order_types" and order_types['stoploss'] == 'market'.

And this is with all default options (default choices in setup.sh, and with SampleStrategy) chosen by a new user, which produces bad user experience.

Possible solutions:

There is no good and quick solution for this... :(

xmatthias commented 4 years ago

Well, if you look at #2831 you'll see that it contains the solution (well at least for the most part).

It removes the "question" part from setup.sh - and moves that into freqtrade code. Since that's not a shell script anymore, it allows us to run this on windows too (and provides more flexibility as well). This allows to select the exchange - not prefering any exchange (they should be sorted alphabetically), and a few other things. i've intentionally kept it simple for now - but future improvements could include an "advanced" section where many more questions are asked.

Now it won't fix this issue 100% - as the "stoploss" problem still remains, however in combination with moving "stoploss" to a limit order in the sample strategy (which makes sense - on binance you "should" use stoploss-on-exchange - so the "stoploss" key does not matter) it should work out of the box again.

xmatthias commented 4 years ago

do we consider this as fixed by #2831 and #2890?

hroff-1902 commented 4 years ago

not yet, I'm preparing a PR which would close it. (the complete order_types dict should be added into the config template for Bittrex)