Author

Topic: http://bitcoincharts.com/t/trades.csv changed behaviour (Read 2225 times)

legendary
Activity: 1974
Merit: 1029
Seems fixed.
legendary
Activity: 1974
Merit: 1029
This morning I noticed that bitcoincharts.com/t/trades.csv now returns the last trades in reverse order and completely ignores the "start" and "end" parameters:

Code:
$ date -d "2013-04-11 03:00:00 UTC" +%s
1365649200
$ date -d "2013-04-11 03:05:00 UTC" +%s
1365649500
$ wget -O usd 'http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&start=1365649200&end=1365649500'
--2013-04-11 13:35:01--  http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&start=1365649200&end=1365649500
Resolving bitcoincharts.com... 176.9.79.196, 2a01:4f8:151:13c3::2
Connecting to bitcoincharts.com|176.9.79.196|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `usd'

    [  <=>                                                                                                                 ] 86,202       394K/s   in 0.2s    

2013-04-11 13:35:02 (394 KB/s) - `usd' saved [86202]
$ wc -l usd
1999 usd
$ head -n 1 usd; tail -n 1 usd
1365679186,152.998470000000,1.000000000000
1365671249,162.041020000000,0.010000000000
$ date -d @1365679186
Thu Apr 11 13:19:46 CEST 2013
$ date -d @1365671249
Thu Apr 11 11:07:29 CEST 2013

So I asked for the trades between 3:00 and 3:05 UTC last night and I got from 11:07 to 13:19 in reverse order. Ie last 2000 trades up to 15 minutes ago. With this change, bitcoincharts has completely broken this API. The documentation at http://bitcoincharts.com/about/markets-api/ hasn't changed.
Jump to: