BitBotFactory / MikaLendingBot

Automated lending on Cryptocurrency exchanges Poloniex and Bitfinex
http://poloniexlendingbot.readthedocs.io/en/latest/index.html
MIT License
1.11k stars 344 forks source link

[Feature Request] Bitfinex and Poloniex both at the same time #503

Open jasoncharles opened 7 years ago

jasoncharles commented 7 years ago

Hi, Is it possible to run a single instance of poloniexlendingbot to manage lending for both Poloniex and Bitfinex at the same time? As I tried entering both API keys in the default.cfg file but only saw Bitfinex on the bot's web page.

Thanks for you help Jason

rnevet commented 7 years ago

No, that's not supported at this time.

utdrmac commented 7 years ago

I've been thinking about this for a long time. We need to introduce a true threading model where each exchange is Thread'd off and runs on it's own. We can serialize/synchronize access to the botlog so that both can write to it. Will probably have to nest the bot log 1 level deeper and keep 'exchange' at the top level.

lendingbot.js can do .each('exchange') and create a tab-style interface for each exchange.

rnevet commented 7 years ago

I've been also thinking about it, and I think it's way to complicated to make it a priority for development. Things like Market Analysis, Lending History which are db based need to be also separated for example.

In the end merging them just so they run in different threads doesn't bring much...

utdrmac commented 7 years ago

It would bring an easier user experience. Wouldn't have to run two bots in two different screen sessions on two different web ports.

utdrmac commented 7 years ago

Separating the databases is easy, just prepend the exchange name to each file.

utdrmac commented 7 years ago

"easy" :D

rnevet commented 7 years ago

Well, that can be handled on web side, could link to bots.. without running in one instance. Could even use one webserver.

rnevet commented 7 years ago

We could create a plug-in for multi-purpose, only telling the JS where to read the JSON from.

JCBauza commented 7 years ago

I agree that for now there are more important features/issues and running two bots in two screen sessions is tolerable. But perhaps start designing with this feature in mind (like the db segregation that was brought up) so there is not a lot of re-work. Thank you guys!

rnevet commented 7 years ago

I think having a good UI for a "Main/Others bots" scenario is much easier to achieve and would actually be the main benefit. Some people are running multiple bots for multiple accounts, not necessarily different exchanges.

JCBauza commented 7 years ago

that's very true, good point

laxdog commented 7 years ago

My latest PR simplifies multiple bots. You get a docker container for each bot and an nginx proxy that automatically points to the web interface of the bot.

You can start as many as you like.

https://github.com/BitBotFactory/poloniexlendingbot/pull/515

I would however also like to see multiple exchanges in one bot. I actually want to be able to Tx funds between exchanges. Not a big deal for BTC, but it's massive for some of the alts.