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

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

<p><a href="http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&amp;start=1366784293" rel="nofollow">http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&amp;start=1366784293</a></p>

<p>If you want all US$ per BTC data until now, use:</p>

<p><a href="http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&amp;start=1279424500" rel="nofollow">http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&amp;start=1279424500</a></p>

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

<p><a href="http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&amp;start=1279424500&amp;end=1366784293" rel="nofollow">http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&amp;start=1279424500&amp;end=1366784293</a></p>

CC BY-SA 3.0
2013-05-01T06:25:47.063Z
2013-05-01T06:34:28.107Z
2013-05-01T06:34:28.107Z
organofcorti
<p>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 <a href="http://www.bitcoincharts.com/charts/mtgoxUSD#rg60ztgSzm1g10zm2g25zv" rel="nofollow">gui that they have on the site</a> for displaying the charts (but I don't suppose I can get the gui?).  </p>

<p>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 <a href="http://bitcoincharts.com/about/markets-api/" rel="nofollow">here</a>, using http://api.bitcoincharts.com/v1/trades.csv?symbol=SYMBOL[&amp;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?</p>

<api><exchange-rate><charts>
Bitcoin Charts API Data
Ethan
# Bitcoin Charts API Data

(Asked by: username_0 on 2013-04-30)

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](http://www.bitcoincharts.com/charts/mtgoxUSD#rg60ztgSzm1g10zm2g25zv) 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](http://bitcoincharts.com/about/markets-api/), 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?

**Tags:** api, exchange-rate, charts


---

## 1 answers

### Answer by username_1 on 2013-05-01. Score: 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>


---

