3 ms·
How do you get all that data? I am super interested in knowing how something like this is built. How do you connect to the bitcoin network and serve the stats v
by khet 14y ago
How do you get all that data? I am super interested in knowing how something like this is built. How do you connect to the bitcoin network and serve the stats via this app. I am butchering my question but I hope it makes atleast some sense.
- tlrobinson 14y agoI'm not sure how this particular site is doing it, but Blockchain.info has some convenient APIs (http://blockchain.info/api http://blockchain.info/api), or you can run a full Bitcoin node and either interact with the JSON-RPC API (https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls...) or parse the block chain (https://github.com/znort987/blockparser https://github.com/znort987/blockparser https://github.com/gavinandresen/bitcointools https://github.com/gavinandresen/bitcointools) For price/trade data most (all?) exchange have APIs (e.x. https://en.bitcoin.it/wiki/MtGox/API https://en.bitcoin.it/wiki/MtGox/API)
- gojomo 14y agoHave you found anyone with a public JSONP API? That'd seem to enable a new level of in-browser apps... though perhaps Blockchain.info/MtGox aren't ready for the accompanying level of traffic.
- MacsHeadroom 14y agohttp://bitcoincharts.com/about/markets-api/ http://bitcoincharts.com/about/markets-api/ has public JSON API for all the popular Bitcoin currency markets. For the other data (non-market transactions etc.) you can run the Bitcoin-qt client on virtually any hardware and then connect to its built in JSON API.
- gojomo 14y agoJSON_P_? http://en.wikipedia.org/wiki/JSONP http://en.wikipedia.org/wiki/JSONP I suppose if the JSON endpoints support CORS that'd be as good... http://en.wikipedia.org/wiki/Cross-origin_resource_sharing http://en.wikipedia.org/wiki/Cross-origin_resource_sharing However, my (unauthenticated) test attempts against blockchain.info and bitcoincharts.com, with the "Origin:" header, didn't give the right "Access-Control-Allow-Origin:" header in response.