<p>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: <a href="https://github.com/AdamCox9/nickelbot/blob/master/adapters/poloniex/poloniex_lib.php" rel="noreferrer">https://github.com/AdamCox9/nickelbot/blob/master/adapters/poloniex/poloniex_lib.php</a></p>

<p>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 <a href="https://github.com/AdamCox9/nickelbot/blob/master/bots/make_min_orders.php" rel="noreferrer">https://github.com/AdamCox9/nickelbot/blob/master/bots/make_min_orders.php</a> that will give you full control and it works with multiple exchanges.</p>

<p>Take a look at all the example code on <a href="https://github.com/AdamCox9/nickelbot" rel="noreferrer">https://github.com/AdamCox9/nickelbot</a> to see exactly what you need to do.</p>

CC BY-SA 3.0
2017-08-31T11:16:09.390Z
2017-08-31T11:16:09.390Z
Adam Cox
<p>The key steps you outlined for creating a cryptocurrency trading bot are correct.</p>

<p>As for the daunting tasks you can also take a look at my <a href="https://github.com/kroitor/ccxt" rel="nofollow noreferrer">ccxt library from GitHub</a>. 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.</p>

<p>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.</p>

<p>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.</p>

CC BY-SA 3.0
2017-07-03T20:44:28.070Z
2017-07-03T20:44:28.070Z
Igor Kroitor
<p>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.   </p>

<p>#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. <a href="https://youtu.be/rky1EnDqmhI?t=15m10s" rel="nofollow">https://youtu.be/rky1EnDqmhI?t=15m10s</a>        </p>

<p>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!</p>

CC BY-SA 3.0
2016-08-18T00:43:38.930Z
Bitfinex appears to be insolvent. You'd have to be crazy to give them your money.
David Schwartz
CC BY-SA 3.0
2016-08-18T01:11:28.730Z
Agreed. As stated too bad I chose them as an example back in January. Easy to say in hindsight.
m1xolyd1an
CC BY-SA 3.0
2016-08-18T00:31:11.170Z
2016-08-18T00:31:11.170Z
m1xolyd1an
<p>There is a tutorial for a <a href="https://github.com/bwentzloff/trading-bot" rel="nofollow noreferrer">Cryptocurrency Trading Bot</a> written in Python using the <a href="https://poloniex.com/support/api/" rel="nofollow noreferrer">Poloniex API</a>.</p>

<p>The author of the bot also has a video about it on YouTube: <a href="https://www.youtube.com/watch?v=fpqzXgZjSqM" rel="nofollow noreferrer">https://www.youtube.com/watch?v=fpqzXgZjSqM</a></p>

CC BY-SA 3.0
2017-11-27T00:03:34.637Z
2017-11-27T00:03:34.637Z
Benny Code
<p>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. </p>

CC BY-SA 3.0
2018-02-05T09:15:12.037Z
Robotic process Automation.
Sagyban
CC BY-SA 3.0
2017-12-13T21:02:47.327Z
Care to expound on what exactly an "RPA" is?
Hannah Vernon
CC BY-SA 3.0
2017-12-13T19:05:50.940Z
2017-12-13T19:05:50.940Z
Sagyban
<p>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.</p>

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

<ol>
<li>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. </li>
<li>My bot has to be connected to an exchange that also provides public
API which allows automated buying and selling  </li>
<li>My bot has to be able to read the exchange's order book and price.</li>
<li>Create a simple algorithm for trading.</li>
</ol>

<p>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? </p>

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

<p>Thanks</p>

<api><algorithms><bots>
How to build a bitcoin trading bot
Wei
# How to build a bitcoin trading bot

(Asked by: username_0 on 2016-08-17)

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.

Thanks

**Tags:** api, algorithms, bots


---

## 5 answers

### Answer by username_1 on 2017-08-31. Score: 10

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.


---

### Answer by username_2 on 2017-07-03. Score: 3

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](https://github.com/username_2/ccxt). 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.


---

### Answer by username_3 on 2016-08-18. Score: 2

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!

> **Comments:**
> **username_4**: Bitfinex appears to be insolvent. You'd have to be crazy to give them your money.  
> **username_3**: Agreed. As stated too bad I chose them as an example back in January. Easy to say in hindsight.  

---

### Answer by username_5 on 2017-11-27. Score: 1

There is a tutorial for a [Cryptocurrency Trading Bot](https://github.com/bwentzloff/trading-bot) written in Python using the [Poloniex API](https://poloniex.com/support/api/).

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


---

### Answer by username_6 on 2017-12-13. Score: 1

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.

> **Comments:**
> **username_7**: Care to expound on what exactly an "RPA" is?  
> **username_6**: Robotic process Automation.  

---

