4

So I'm trying to learn how to work with an api, and how to get bitcoin historical price data. Ideally, I'd like all of it, and the nice gui that they have on the site for displaying the charts (but I don't suppose I can get the gui?).

Alternatively, I'd like to be able to just see the last 2000 trades, up to an end date, as it seems to say I can here, using http://api.bitcoincharts.com/v1/trades.csv?symbol=SYMBOL[&end=UNIXTIME]. This works fine for UNIXTIME up to a couple days ago, but not further back. Is it possible to retrieve older data? Or are there better ways to go about this?

2

There's a start and an end that can be quoted, and only one is required although both can be used.

If you want US$ per BTC data from a 24th April until now until now, use:

http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&start=1366784293

If you want all US$ per BTC data until now, use:

http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&start=1279424500

If you want all US$ per BTC data until 24th April 2013,:

http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&start=1279424500&end=1366784293

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.