freqtrade / freqtrade

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

Re-opening issue #503 to allow multiple stake currencies in an array #3245

Closed joe-nano closed 4 years ago

joe-nano commented 4 years ago

Hello Team, Below was discussed in 503 but I think for some of us there should be the option

It's necessary to have multiple quote currencies as stake_currencies so that we could develop more strategies on the sell side easier.

For now we only have strategies for the long/buy-side or at least that's what I am experiencing.

Can we have the ability to remove barrier and have an array of stake currencies, as it creates a limitation on quote currencies strictly being BTC?

Also do these limitations extend to the strategy files as well? Is this a CCXT limitation?

Now by changing our stake_currency to an array allowing for more pairs will be great. More choice for pairs. You could have the option to set multiple stake_currencies to facilitate alt-coin sell strategies easily as well as this is currently a limitation myself and a few people are struggling to overcome.

Taking a look at this now in the light of day.

backtesting hardcodes Binance as exchange (making it impossible to use any other exchange while backtesting).

how exactly do you set the config for ccxt branch? For example, GDAX uses an APIKey, Secret, and Passphrase.

I will fix this by pulling exchange from config and adding passphrase to config. Exchange is used in backtesting for getting fees and historical data in live-data mode. Not all exchanges support fetching historical data from their API so perhaps we could find some solution where a default exchange is used if the selected exchange does not support it. But I'll leave that for now.

is there a reason to keep stake_currency limited to ['BTC', 'ETH', 'USDT']?

There is no support yet for making trades in a NANO/BTC market if NANO is your stake currency, for example. It is required that the Quote currency (the last currency in the pair) is the stake currency. Since BTC, ETH, and USDT are available as a quote currency on most exchanges I think I will leave this as it is, to not cause any confusion if someone tries to use a different stake currency. Feels a bit out of scope of this PR as well.

Not my PR, but I think in the beginning we will only support bittrex&binance with ccxt. When we have proven that those work, we can start to support more exchanges.

Yeah this is probably a good idea. Will add limits to config.

xmatthias commented 4 years ago

We do use ccxt (which is what #503 was about). It's been replaced by #603 as that was a more uptodate pull request, however neither of the 2 are related to using multiple stake currencies.

You did misread the comments there though. We did use a fixed list of stake-currencies (limited to 3 in total) back then since only bittrex was supported (so a EUR market would not have worked). This restriction has since been lifted (actually a long time ago).


What you're really asking is something different. You'd want to use multiple stake currencies ('USDT', 'BTC') within the same bot instance, which is not supported (intentionally). To achive this, best run two instances of the bot.

This has been discussed this before (not in the issues you linked though) - and decided against.

The main reason for this is that the same strategy very rarely works well on different markets (a ETH strategy will most likely perform completely different on USDT markets).

It would complicate a lot of calculations and make the bot very difficult to maintain (keep in mind, it's all volunteer work, noone get's paid for maintaining or improving the codebase).


Now we might still accept a Pull request which introduces this in a very clean and simple method (obviously with tests, without breaking current behaviour if possible), so feel free to give it a try if you think this is a must have (and have some coding skills) - however i'll still close this as it's not something we'll invest time in as it can be easily achived by running multiple bots.

hroff-1902 commented 4 years ago

Above is the attempt to mitigate a limitation existing in freqtrade, which currently only allows to trade long. The idea is to trade the BTC/XRP (which has XRP as quote/stake currency) pair in addition to XRP/BTC (with BTC as quote/stake currency). This would allow, trading long for BTC/XRP, emulate trading short for XRP/BTC. The problem here is that there is no the reverse pair BTC/XRP on exchanges. So the idea is wrong (not achievable). Instead, trading short should be added into freqtrade.

I would mark it as "Won't fix" and close, as a feature which cannot be implemented. (ah, already closed...)