Ability to monitor top 24h coins and auto choose one to start trading
#1
Question 
I'm surprised I wasn't able to find anything on this topic, maybe I'm blind or it's so obvious that it's embarrassing to ask, either way it's the internet so here goes: 

I'm looking for Gekko to monitor the top 3 performers on Binance (highest 24 hour rise in price). If one of the coins meets my requirements (very simple requirements), Gekko will auto start my trading strategy for that coin, otherwise it will remain idle and continue to monitor. 

Is this possible? and if so could you point me in the right direction. I don't mind a challenge if it will be difficult to achieve. 

Thanks so much for your development. Gordon would be proud Tongue
  Reply
#2
Gekko by itself is focussed on trading on one market. So this functionality is not part of Gekko.

Quote:Is this possible? and if so could you point me in the right direction. I don't mind a challenge if it will be difficult to achieve.

You can definitely do this but you need get your hands dirty. Gekko comes with a CLI interface and a REST server so you can easily start and stop a Gekko on a specific market. See here: https://gekko.wizb.it/docs/internals/ser...startGekko

However:

> monitor the top 3 performers on Binance (highest 24 hour rise in price). If one of the coins meets my requirements (very simple requirements), Gekko will auto start my trading strategy for that coin, otherwise it will remain idle and continue to monitor.

This functionality doesn't exist so you would need to script that yourself. Very simply said you can create a little script that does:

- check all binance markets
- figure out top markets (however you want to calculate that is up to you)
- figure out what gekkos you want to run
- stop all the other ones, start the ones you want via the API described above.
  Reply
#3
Thanks so much for taking the time to respond. 

I've been researching for most of today based around your reply in hopes that I don't waste much of your time. I know a bit of JS, but am new to Node.js and enjoy learning.  Please forgive me for my questions.

From what I've found, the easiest solution would be to use node-binance-api library in conjunction with gekko, as it has a 24 hour price change setup built right into it. It seems like Node.js makes it pretty easy for libraries to talk to each other, although correct me if it would be too difficult to accomplish with gekko. In my head it seems I would only need to write one script that is always searching for a coin that matches my prerequisites, when it finds one, it will fire up a CLI gekko strategy.

Is this the best way to accomplish it for a motivated noobie?.. or should I skip the node-binance-api library all together and just write a script that taps directly into the binance websocket?

Thanks again.

P.S. sorry if I butchered some of the terminology.
  Reply
#4
Quote:Is this the best way to accomplish it for a motivated noobie?.. or should I skip the node-binance-api library all together and just write a script that taps directly into the binance websocket?

You definitely don't need websocket, I would recommend using the normal (REST) api as it probably be easier to implement.

Quote:In my head it seems I would only need to write one script that is always searching for a coin that matches my prerequisites, when it finds one, it will fire up a CLI gekko strategy.

Yea that's basically what needs to happen.

Quote:It seems like Node.js makes it pretty easy for libraries to talk to each other, although correct me if it would be too difficult to accomplish with gekko.

Gekko is quite a big software project, usually when programming it's the easiest to only work with APIs of other software: that allows you to control things and get information without having to understand the complete software. So Gekko has a REST api similar to binance that let's you start and stop Gekkos. This means that you can easily write your script in python/c#/javascript/whatever since the communication between your script and Gekko happens via a REST api (and websocket if you want to).

Quote:I've been researching for most of today based around your reply in hopes that I don't waste much of your time. I know a bit of JS, but am new to Node.js and enjoy learning.

This won't be easy as you actually need to sit down and program a script that talks to two different APIs (one for Binance and one for Gekko). On top of that keep the following limitations in mind:

- Usually Gekko strategies are optimized for a specific market, if you make one that works well on BTC/USDT I doubt it will also work well on BNB/MCO. So if you want to run Gekko strats on random markets you need to figure something out.
- The smaller the market (less volume), the harder it is to make money on it trading by using a tool like Gekko. That has to do with costs of trading (not just fees but slippage & spread). See this video for more info: https://youtu.be/r0yc1sonYvo
- Keep in mind that Gekko currently has limitations when running multiple Gekkos. It's NOT recommanded to run more than 1 live Gekko on the same account, but for binance you should probably be fine with a few. But running multiple bots on markets with an overlapping coin will NOT work, for example if you run a gekko over BTC/USDT and ETH/BTC you will face problems as this is not supported by Gekko.
  Reply
#5
I took your advice and went with the REST api. Spent all day tinkering and figuring it out... proud to say I have the first part of it working exactly how I wanted. It finds the top 3 coins and sees if they match my requirements. Now I'm on to getting the CLI going. It seems pretty straight forward, although I'm not sure of the URL for the CLI gekko. Is it just my local host and I would set it up much of the same way that I set up the binance api? 

For example to start gekko it would just call "http://localhost:PORT/api/startGekko" or is there more to it? 

My goal is to have it fluidly switch back and forth between -- looking for a coin to trade  &  trading that coin --. So it ends up being a fully automated dance of finding a coin, trading that coin, rinse repeat. Is this possible to do with just the one script and one CLI? Or would I need a separate CLI gekko server running in parallel? 

Honestly I'm sure you are busy working on gekko pro (which looks fantastic), so feel free to ignore these questions. I'm sure I can figure it out on my own, it just might take a while longer haha. Thanks either way!
  Reply
#6
Quote:For example to start gekko it would just call "http://localhost:PORT/api/startGekko" or is there more to it?

That's it: you need to call that with a POST request and pass a gekko config in JSON as config.

Quote:My goal is to have it fluidly switch back and forth between -- looking for a coin to trade & trading that coin --. So it ends up being a fully automated dance of finding a coin, trading that coin, rinse repeat. Is this possible to do with just the one script and one CLI? Or would I need a separate CLI gekko server running in parallel?

My advice would be to start a single gekko server in one terminal, and start your script on a second terminal. Keep in mind that when you start the bot on BTC/USD and shut it down 5 hours later your coins might be in USD or in BTC depending on the position of the gekko bot when you stopped it.
  Reply
#7
Welp, that's every question answered. Thank you so much Mike. I didn't expect this level of help from an open source project. You've been added to my list of people to support/donate to when I am able. Thanks again and enjoy the rest of your 2018!
  Reply
#8
Dear crypto mates, dear Mike, I wish you a nice christmas and a wonderful year 2019.

The strategy contest was a great idea and nice to see. Are there any figures from the participating strategies showing backtest results / roundtrips for the whole year 2018? This will be awesome to see.

I like the topic of this thread, there are probably several passionate gekko users thinking about the same ways to perform intelligent "coin hopping" to catch best opportunities. I made some architectural thoughts to implement such an use case. Are there any extensions out there / pull requests starting into this direction? Best wishes, Mark
  Reply
#9
Nice post
  Reply


Forum Jump:


Users browsing this thread: