Quote:
Originally Posted by Tdinoz
Bitcoin for dummies (or whoever) a question
Previous Close BTC/USD end of month (Sept)
?
Writes note to self to check on Oct 1.. How far off I and whoever was.
|
Do you mean August end? Or September 2010?
If you want history, bitcoincharts has a database you can query.
instructions here;
http://bitcoincharts.com/about/markets-api/
example from the instructions; (not a real link)
hxxp://bitcoincharts.com/t/trades.csv?symbol=SYMBOL[&start=UNIXTIME][&end=UNIXTIME]
You can use a simple calculation to get the unix time. There are web page based calculators, the unix date command, php functions etc.
we can use this;
http://www.csgnetwork.com/time2unixdscalc.html
Sept 30 2010 was unixtime 1285804800
24 hrs later was 1285891200
You are looking for USD exchange sales as reported by Mt. Gox. Because aberrant trades, that might be very tiny, will skew your point of view, it's better to get prices over a time range, then average them to get a realistic report.
We can construct a query in the form of a URL and read the result with a browser
http://bitcoincharts.com/t/trades.cs...end=1285891200
which results in all the sales to USD reported by Mt. Gox from Sept 30 2010 0:00 GMT until Oct 01 2010
It's much easier to read, as a human, by viewing the source. Look to your browser for a menu option to "view source" or "view page source".
1285809341,0.061741000000,32.000000000000
1285809915,0.061880000000,16.000000000000
1285809915,0.061900000000,3.000000000000
1285836639,0.061900000000,0.000000000000
1285844021,0.061900000000,561.000000000000
1285855748,0.061700000000,102.000000000000
1285866838,0.061630000000,102.000000000000
1285866838,0.061610000000,102.000000000000
...
The first comma separated value (CSV) is the unix time of the sale. The second is the USD rate and the third is the number of btc traded.
You can crunch those number to get an average over the time period, or just look them over to estimate the price. In this case, close to 0.0616 USD per bitcoin, a bit more than six cents each.
Programmers can make use of this data further, they can draw graphs or direct trading bots decisions but it's also a cool way for ordinary humans to get history with only a browser.