| Blocks | 237553 |
| Total BTC | 11.189M |
| Difficulty | 11187257 |
| Estimated | 12029254 in 335 blks |
| Network total | 106.621 Thash/s |
| Blocks/hour | 7.99 / 451 s |
To integrate with bitcoincharts you need to provide complete trade history and orderbook. JSON is preferred. It's best to provide trade and orderbook data at seperate urls (e.g. /api/trades.json and /api/orderbook.json). Bitcoincharts will query those URLs every few seconds so make sure to cache them heavily.
If your markets supports multiple currencies it's best to provide data for each currency at separate URLs. E.g. /api/USD/trades.json, /api/EUR/trades.json
Once you have implemented your API send me an email at info@bitcoincharts.com and I'll add your exchange.
This file contains an JSON array of trades. It will receive a GET parameter called "since" with a trade ID as it's argument. Your API must return all trades with higher trade IDs than this.
[{"date": UNIXTIME, "price": PRICE, "amount": AMOUNT, "tid": TRADE_ID}, ...]
[{"date":1306148860,"price":6.87,"amount":1,"tid":"82771"},{"date":1306149340,"price":6.86001,"amount":1,"tid":"82772"}]
This file contains the complete orderbook (or market depth). It is an JSON dictionary with two keys ("asks" and "bids"). Each key holds an array of arrays with price/amount pairs.
{"asks": [[PRICE, AMOUNT], ...], "bids": [[PRICE, AMOUNT], ...]}
PRICE is the amount of e.g. USD one Bitcoin costs. AMOUNT is the number of Bitcoins in that order.
Don't use floats! You may add quotes around PRICE and AMOUNT.
{"asks":[[7.449,1],[7.4499,6.711]],"bids":[[7.40001,5],[7.3325,27.449]]}