100% Free, Fully Automated, Open Sourced Dollar Cost Averaging Bot




I originally wanted to make a post arguing against dollar cost averaging (I still might), but I know for people that have a full time job and have kids or just other life responsibilities, dollar cost averaging is the simplest way to get the best average price in any coin.

I also have been tinkering with Gekko, a cryptocurrency trading bot, for about a year now. I’m not the creator, but it is an awesome open sourced project that is actively maintained and can be easily modded as it is written in Node.JS. I already made some neat modifications like being able to control the bot remotely via Telegram.

Back in April, another pub member (sorry, forgot your name) DMed me about setting up a service that will help people dollar cost average into a coin automatically. My main concern was I’m not comfortable giving someone my exchange API key as even if that person/company is legit, they still become a honeypot for hackers to try and hack their API keys database. So that pretty much ended the conversation.

While thinking of my argument against dollar cost averaging, I remembered that conversation I had back in April and with my current knowledge in Gekko, I wondered, is it possible to modify Gekko from a trading bot into a dollar cost averaging bot? Apparently, Yes! Today, I’m happy to share that I forked the Gekko repo on Github and modified it from a trading bot to a dollar cost averaging bot.

Since you run the bot, you have full control of your exchange API key. As it is open source, you can check my commits to see that I haven’t modify it in any malicious way. I already tested it on Coinbase Pro and I’m pretty certain it will work with any other exchange Gekko supports.

I also made a video about it if you are really interested in the coding process. Honestly, it was a lot easier than I expected. Excluding the dollar cost average strategy, I made changes to less than 0.1% of the code base.

Feel free to ask me any questions!

The Argument Against Dollar Cost Averaging


I just added code so the bot will track each DCA buy and also calculate the DCA price you have paid for your crypto. Check it out when you get a chance.


Great idea! I haven’t tested it yet but what i could already wish for is this:

  • Say i set a price for which i want the bot to sell x% of my position
  1. So basically i do DCA each week or month.
  2. If the price suddenly jumps to x% of current the bot sells my x% of coins available
    3 goto 1) which is DCA


That’s certainly possible. I took out the sell code as I assumed most people would manually sell at a certain time and/or hodl for years. I will let you know I add the code back in (and test it to make sure it works).