PHP Cryptocurrency Client

Two winters ago as an exercise to get better at PHP, I started a web app that connected to cryptocurrency trading sites. Over the following months, directories sprawled across my projects folders as the project took different directions – trading, charting, arbitrage.

PHP isn’t the most appropriate language to code trading robots in as it doesn’t have a mechanism to talk back and forth in an ongoing manner. I’ve since started noodling around with the same ideas in NodeJS.

Rather than abandoning the PHP work I decided to extract small but completely functional parts in ways that might be useful to myself or someone else.

Here’s a GitHub repo containing a group of files that together,

  • Fetch and record current prices of currency pairs from Bter‘s API (EDIT 3/17/2015 – Due to recent problems at Bter, I added support for the Cryptsy exchange and made it the default)
  • Display a chart (using Highcharts) the price of one of the currency pairs – as an example here, BTC/CNY (Bitcoin/China Renminbi)

Here’s a screenshot of the example output,

btc/cny example

View project on GitHub.