A bitstamp PHP API
available on
https://github.com/willmoss/bitstamp-php-apiThe intention is to make it easier to trade BTC on Bitstamp from PHP scripts.
Included methods:
bitstamp_query - Query any of the Bitstamp API methods
ticker - Get current Bitstamp ticker
eurusd - Get Bitstamp EUR/USD rate
buyBTC/sellBTC - Buy or Sell BTC at current market price
Example:
$bs = new Bitstamp("KEY","SECRET","CLIENT_ID");
print_r($bs->ticker()); // show bid,ask & other price stats
$bs->buyBTC(10); // buy 10 bitcoins at ask price
$bs->bitstamp_query("buy", array('amount'=>'34','price'=>'90')); // place a limit order to buy 34 bitcoin at $90
Directions:
To install, place in your PHP directory and include into your files.
When you construct the method, you include your API_KEY, SECRET and CLIENT_ID, that can be found on the Bitstamp website.
Next steps:
Add more specialized methods for creating limit orders
Add methods for withdrawal, deposit & redeeming bitstamp codes
Add support for Ripple trading
enjoy!