I'd like to experiment with bitcoin technology, crypto currency, and encryption. I thought the best way to accomplish that is building my very own bitcoin trading bot.

It seems like a daunting task, but I think I can accomplish this in the following outlined steps:

  1. The bot has to be connected to a wallet. I think I can accomplish this by connecting it to a 3rd party wallet with public API.
  2. My bot has to be connected to an exchange that also provides public API which allows automated buying and selling
  3. My bot has to be able to read the exchange's order book and price.
  4. Create a simple algorithm for trading.

I'd like to know, what is the best way to build a wallet for my bot? And which exchange should I connect my bot to?

I know I am probably missing some key points. So if someone can point me to the right direction, I'd greatly appreciated.


Building trading bots that interact with the exchanges is very similar to interacting with other RESTful APIs. Basically, you make query objects to whichever exchange you like to use. Here is a simple example: https://github.com/AdamCox9/nickelbot/blob/master/adapters/poloniex/poloniex_lib.php

Nickelbot is development platform written in PHP that has all the boilerplate code for interacting with several exchanges. You can write a bot once, like https://github.com/AdamCox9/nickelbot/blob/master/bots/make_min_orders.php that will give you full control and it works with multiple exchanges.

Take a look at all the example code on https://github.com/AdamCox9/nickelbot to see exactly what you need to do.

The key steps you outlined for creating a cryptocurrency trading bot are correct.

As for the daunting tasks you can also take a look at my ccxt library from GitHub. It allows to skip steps 1-3 and proceed directly to step 4 (creating your algorithmic trading strategy). But that depends on your development environment and your technical requirements.

The ccxt code is in JavaScript / Python (2 and 3) / PHP. You can deploy it from PyPI, with npm (for Node.js) or by cloning from GitHub repository. With it you can access market data and trade bitcoin, ether and altcoins with many crypto currency exchanges. It provides quick access to market data for storage, analysis, visualization, indicator development, trading strategy backtesting, bot programming, building trading algorithms on top of it, webshop integration and related software engineering.

The library is under heavy development right now, but already offers a quick-start for trading and technical analysis with many crypto exchange markets out of the box.

You have the basic steps down. You can cut out #1 since your wallet will likely be the on the exchange you are trading on.

#4 is the hardest part, at least if you are trying to make money! Overall your question is pretty broad, but I did do a walk-through video on creating a simple trading bot earlier this year on youtube. https://youtu.be/rky1EnDqmhI?t=15m10s

This goes over using the Bitfinex API to trade (too bad I chose them considering their recent issues) and PHP to write the code. In order to automate the trading process you can create a cron job that runs once every N minutes, hours, etc. The video is over an hour long. This should help you get started in the right direction, but of course will depend on what language you plan on writing your bot in. Hope this helps!

  • 1
    Bitfinex appears to be insolvent. You'd have to be crazy to give them your money. – David Schwartz Aug 18 '16 at 0:43
  • Agreed. As stated too bad I chose them as an example back in January. Easy to say in hindsight. – m1xolyd1an Aug 18 '16 at 1:11

There is a tutorial for a Cryptocurrency Trading Bot written in Python using the Poloniex API.

The author of the bot also has a video about it on YouTube: https://www.youtube.com/watch?v=fpqzXgZjSqM

How about using a RPA tool for the process? RPA are GUI interactive and anything a human can do using a mouse pointer and a monitor, can be achieved by using a RPA. If configured properly, a well-orchestrated system of RPAs can do the trading for you 24x7.

  • 1
    Care to expound on what exactly an "RPA" is? – Max Vernon Dec 13 '17 at 21:02
  • Robotic process Automation. – Sagyban Feb 5 at 9:15

protected by Community Mar 28 at 2:42

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.