This page lists the Bitcoinium webservice's endpoints and API specifications. Please contact us at contact@bitcoinium.com for pricing. We will work with you to come up with an economically viable agreement. We're happy to give out test API keys too!

API

The API is 100% polling-based. There is not streaming API. It is recommended that the client first perform a ticker history call followed by ticker update calls. The newest ticker is piggy-backed onto the order book JSON.

The base API url is http://bitcoinium.com/

All data is cached on the server for 10 seconds, so calling more often than that is a waste.

Common Parameters

Every API call requires the following HTTP header:
NameTypeDescriptionExample
X-BITCOINIUM-API-KEY String the api key for accessing the API abcd1234

Ticker History (/tickerhistory)

Requesting the ticker history returns a "condensed" history. This means that given a time window, about 600 data points are returned, as opposed to every single available data point available over that time window.

Example

https://bitcoinium.com/tickerhistory?pair=BTC_BITSTAMP_USD&historytimewindow=TWENTY_FOUR_HOURS

Parameters

NameTypeDescriptionExample
pair String the currency pair
  • {{pair}}
historytimewindow String the time window of historical ticker data
  • {{historytimewindow}}

Returns

NameTypeDescription
condensedTickers object array an array containing the condensed tickers (see Ticker. missing bid and ask.)
ticker object the most current non-condensed ticker (see Ticker.)

{
   "condensedTickers":[
      {
         "t":1407705295100,
         "h":588.57,
         "lo":586.0,
         "l":586.69,
         "v":156.10376,
         "tr":174
      },
      {
         "t":1407709622270,
         "h":587.0,
         "lo":586.34,
         "l":586.5,
         "v":24.291012,
         "tr":132
      },
      ...
      {
         "t":1410292555934,
         "h":472.58,
         "lo":465.21,
         "l":469.72,
         "v":2494.7256,
         "tr":1296
      }
   ],
   "ticker":{
      "l":466.83,
      "b":466.62,
      "a":468.92,
      "h":472.58,
      "lo":459.18,
      "v":7837,
      "t":1410293464042
   }
}
            

Ticker (/ticker)

LastBidAskHighLowVolumeTimestamp 
{{ticker.l}} {{ticker.b}} {{ticker.a}} {{ticker.h}} {{ticker.lo}} {{ticker.v}} {{ticker.t}}

The ticker update simple returns the most up-to-date ticker value the server has. This value most likely comes from the streaming trades that the server is subscribed to as it's much more up to date than polled ticker objects.

Example

https://bitcoinium.com/tickerupdate?pair=BTC_BITSTAMP_USD

Parameters

NameTypeDescriptionExample
pair String the currency pair
  • {{pair}}

Returns

NameTypeDescription
l float the last traded price
b float the current bid
a float the current ask
h float 24 hour high
lo float 24 hour low
v int 24 hour volume
t float the time in epoch seconds

            {
               "l":133.22803,
               "b":133.22792,
               "a":133.22803,
               "h":135.0,
               "lo":132.0,
               "v":4154,
               "t":1379956283221
            }
            

OrderBook

Example (/orderbook)

The order book API call returns an already accumulated order book ready for direct plotting. Note that the current ticker is piggy-backed onto the orderbook response.

https://bitcoinium.com/orderbook?pair=BTC_BITSTAMP_USD&orderbookwindow=TEN_PERCENT

Parameters

NameTypeDescriptionExample
pair String the currency pair
  • {{pair}}
orderbookwindow String the width of the order book as a percentage based on the current price
  • {{orderbookWindow}}

Returns

NameTypeDescription
bids object array an array containing the bids. Each bid is an array containing price and accumulated volume.
asks object array an array containing the bids. Each bid is an array containing price and accumulated volume.
ticker object the most current non-condensed ticker (see Ticker.)

{
   "bids":[
      {
         "p":466.76,
         "v":0.905
      },
      {
         "p":466.16,
         "v":54.95
      },
      {
         "p":465.66,
         "v":59.67
      },
      ...
      {
         "p":420.0,
         "v":6236.93
      }
   ],
   "asks":[
      {
         "p":468.98,
         "v":13.5
      },
      {
         "p":469.51,
         "v":74.9
      },
      ...
      {
         "p":515.53,
         "v":6643.08
      },
      {
         "p":516.0,
         "v":6725.68
      }
   ],
   "ticker":{
      "l":468.99,
      "b":466.72,
      "a":468.99,
      "h":472.58,
      "lo":459.18,
      "v":7831,
      "t":1410293230000
   }
}