stellar-deprecated / kelp

Kelp is a free and open-source trading bot for the Stellar DEX and 100+ centralized exchanges
https://kelpbot.io
Other
1.09k stars 263 forks source link

Control management UI for bots #346

Open taalhach opened 4 years ago

taalhach commented 4 years ago

I have extended kelp for an exchange software now i want to have some kind of control management where i can start new bots by providing configs and stop bots from admin portal my question is what is the best way to run bots on the fly with provided configs or how can i automate it ? container manipulation, direct command from go code or any other way you suggest

nikhilsaraf commented 4 years ago

@taalhach Kelp has a dockerfile that you can find here. Commands using docker can be run like this: docker run -it <kelp-image> trade -c ..... You should host your own image for now on something like dockerhub. If there's more demand for the docker image then I can maintain an official version.

Additionally, you can play around with the kelp GUI by compiling the master branch and using the server command like so: ./kelp server Note that this is still buggy and should under no circumstances be used to trade real money or cryptocurrency as it is still experimental. This will only work on the SDEX test network for now.

If you want to run this GUI on the public network or on your own exchange then you should wait for v1.0 to be released, which is a few months away from now.

taalhach commented 4 years ago

@nikhilsaraf thanks for replying i am inspecting code and i have found backend server and i want to add more handlers for adding bots and strategies for now i don't need GUI i just need backend functionality if i make handlers for adding bot with strategies like in /autogenerate is done will i be able to control it from my custom frontend pages (frontend team will develop it) ? other question is that how can i run the bot to run its backend only not the frontend ? and can't wait for month i have to do something in next week

nikhilsaraf commented 4 years ago

@taalhach Yes with that then you should be able to control it with these custom pages. In fact you can probably control it (start/stop) from the main page too since that is independent of strategy used -- only the config page is dependent on strategy.

Over the next few months I will be working on a new strategy API that will allow you to do the following: 1) add tags to your custom strategy config files 2) have these tags automatically show up in the config UI (like you see for the single buysell strategy in the UI) 3) have a sample config file be automatically generated using these tags.

Having this framework will make things easier when deploying custom strategies -- that's the primary intention of this approach. Once your team is more familiar with the way that the Kelp GUI code and backend works would you be interested in getting on a call to see if we can collaborate to make it easier for you to develop the frontend pages for your strategies?


other question is that how can i run the bot to run its backend only not the frontend ?

that capability existed but I removed it when I added the electron frontend. will add back. for now you can run it in dev mode on your remote server by passing in the --dev command and this will not open up the frontend.


and can't wait for month i have to do something in next week

Since you are time-bound then I'd suggest using the example of the buysell strategy impl. for the frontend as a reference to create custom frontend pages.

taalhach commented 4 years ago

@nikhilsaraf i analysed code and it will take a huge time so i am withdrawing from the idea of creating bot of all strategies probably i will go with manual. thanks for all help and i am waiting for only backeend feature.

nikhilsaraf commented 4 years ago

@taalhach once you have created your bot config files you can just hit the /startBot API endpoint of the GUI backend server and it will kickoff the bot which can be fully managed by the frontend (start, stop, etc.). You will need your custom GUI pages to edit/create new strategy configs.

Integrating additional strategies into the GUI will take more time than a week, but will be easier than writing a custom GUI to manage the bots.