Author

Topic: [ann] Bitstamp PHP API (Read 2892 times)

member
Activity: 107
Merit: 10
December 30, 2014, 02:23:58 PM
#7
Dear Bitstamp!
We regularly fetch prices from various exchanges using standard https protocol. So its really sad for us that we have found that you are updating your http api ticker only each 15 or so seconds... Is there any chance that you will update it more often..? You are currently the only exception that publishes old prices. Update per second is industry standard currently. I'm pretty sure that any good IT professional can implement it for you. You can e.g. write the file each second and cache it for 1 second so that any requests in the 1 second time frame gets the cached version. I'm pretty sure it won't impact your server performance.
I'm sure many sites would love it..!
Thank you!
carlos

p.s. I know there is websocket version of api, we just prefer the standard https...
legendary
Activity: 1974
Merit: 1108
Free Free Palestine
November 11, 2014, 06:01:45 PM
#6
Very Useful if it works .

Will wait for updates.

Duke
newbie
Activity: 18
Merit: 0
November 10, 2014, 05:26:15 AM
#5
I get "Invalid nonce" error.
Did anyone actually use this project to access Bitstamp Private API?
sr. member
Activity: 247
Merit: 250
December 23, 2013, 01:09:16 AM
#4
Thank you for the convenience!

Your implementation seems, however, dated in parts.

The ticker() method does not work, perhaps because it cannot be accessed via API calls (there's a public address for it).

The eurusd() method also does not work, again because it is no longer (?) supported by the API.

Otherwise, the code seems kosher. I'll use it. BTC tip address?
sr. member
Activity: 260
Merit: 250
October 19, 2013, 09:16:09 PM
#3
Quote
buyBTC/sellBTC - Buy or Sell BTC at current market price

Huh  AFAIK Bitstamp API doesn't support instant orders. Some artificial limb?

Hi -

You're right, it doesn't.

The buy/sell methods place a limit order at the current ask/bid price. It's assumed that this is as good as a market order.

When they add market order, we will happily incorporate this to the API Cheesy

Cheers!

legendary
Activity: 1372
Merit: 1000
October 18, 2013, 06:13:31 PM
#2
Quote
buyBTC/sellBTC - Buy or Sell BTC at current market price

Huh  AFAIK Bitstamp API doesn't support instant orders. Some artificial limb?
sr. member
Activity: 260
Merit: 250
October 14, 2013, 02:12:22 AM
#1
A bitstamp PHP API

available on https://github.com/willmoss/bitstamp-php-api

The 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!
Jump to: