Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: altsheets on March 27, 2016, 04:50:31 PM



Title: historical data of AltCoin prices
Post by: altsheets on March 27, 2016, 04:50:31 PM
Could anyone please provide me with historical data of

* HZ / BTC
* NXT / BTC

Plus (even thought I can probably find that elsewhere)
* USD / BTC
* EUR / USD or EUR / BTC

... back to early 2015.  Daily precision is fine.


I need to calculate 2015 income positions, to pay dividends.

And to look up tons of old prices manually ... sounds really boring.

Thanks a lot!

:-)

EDIT: Of course, to avoid the manual ordeal,  I want a table of data or an API access. Anything that I can feed a dozens of DATEs into, and get PRICEs out of.  ;)


Title: Re: historical data of (alt)coin prices
Post by: alyssa85 on March 27, 2016, 04:55:14 PM
Try the following site:

http://www.cryptocoincharts.info/

I think their charts go back to at least 2013


Title: Re: historical data of (alt)coin prices
Post by: altsheets on March 27, 2016, 05:12:01 PM
Try the following site:

http://www.cryptocoincharts.info/

I think their charts go back to at least 2013

Yes, I can get current data (http://api.cryptocoincharts.info/tradingPair/hz_btc) there, but

I do not see historical data access anywhere (http://www.cryptocoincharts.info/tools/api) .

Thanks anyways.


Title: Re: historical data of (alt)coin prices
Post by: Nxtblg on March 27, 2016, 05:37:46 PM
Try the following site:

http://www.cryptocoincharts.info/

I think their charts go back to at least 2013

Yes, I can get current data (http://api.cryptocoincharts.info/tradingPair/hz_btc) there, but

I do not see historical data access anywhere (http://www.cryptocoincharts.info/tools/api) .

Thanks anyways.

I'd like to see some historical data too: preferably, raw trade records. Those records do exist for bitcoin trades.


Title: Re: historical data of AltCoin prices
Post by: gjhiggins on March 28, 2016, 01:54:06 PM
Could anyone please provide me with historical data of

* HZ / BTC
* NXT / BTC

... back to early 2015.  Daily precision is fine.

https://coinmarketcap.com/historical/

Weekly precision.

It's pages of HTML tables, so you'll need to roll your own processing which is trivially easy to do with pandas (https://en.wikipedia.org/wiki/Pandas_%28software%29). The defaults returns prices in USD, from which BTC price can be derived by using df.iloc[0, 4] (assuming Bitcoin occupies the first row).

Code:
$ python
Python 3.4.3 (default, Jul 28 2015, 18:20:59)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pandas.io.html import read_html
>>> df = read_html('https://coinmarketcap.com/historical/20151101/')[0]
>>> btcusd = float(df.iloc[0, 4].split(' ')[1])
>>> for il in range(0, len(df)):
...     if df.iloc[il, 2] in ['NXT', 'HZ']:
...         print("{name} {symbol} {btcprice:02.8f}".format(
...             name=df.iloc[il, 1],
...             symbol=df.iloc[il, 2],
...             btcprice=(float(df.iloc[il, 4].split(' ')[1]) / btcusd)))
...
Nxt NXT 0.00002371
Horizon HZ 0.00000041

Close enough for government work, I'd say.

Cheers

Graham

Edit: added pandas url


Title: Re: historical data of (alt)coin prices
Post by: alyssa85 on March 28, 2016, 01:57:49 PM
Try the following site:

http://www.cryptocoincharts.info/

I think their charts go back to at least 2013

Yes, I can get current data (http://api.cryptocoincharts.info/tradingPair/hz_btc) there, but

I do not see historical data access anywhere (http://www.cryptocoincharts.info/tools/api) .

Thanks anyways.

Some exchanges have graphs - you could try logging into one and seeing if they go back to 2013. Bitstamp definitely existed in 2013 so they should have the info on BTC/USD as should BTC-E. 


Title: Re: historical data of (alt)coin prices
Post by: altsheets on March 28, 2016, 03:02:26 PM
Try the following site:

http://www.cryptocoincharts.info/

I think their charts go back to at least 2013

Yes, I can get current data (http://api.cryptocoincharts.info/tradingPair/hz_btc) there, but

I do not see historical data access anywhere (http://www.cryptocoincharts.info/tools/api) .

Thanks anyways.

Some exchanges have graphs - you could try logging into one and seeing if they go back to 2013. Bitstamp definitely existed in 2013 so they should have the info on BTC/USD as should BTC-E.  

Thanks a lot, alyssa85. But what I meant is not manually extracting 2 times 49 datapoints for all the dates I have, but automatic extraction. So if an exchange offers a graph of past data (they all do), that is not what I am looking for.

Thanks anyways.



Title: Re: historical data of AltCoin prices
Post by: altsheets on March 28, 2016, 03:12:03 PM
WOW!

Grrrrreat Graham Gjhiggins

Brute force approach, just downloading all 49 pages - but hey, as long as it gets there ... very cool!

Weekly precision - fine, then just needs a preparational and a final step, to quantize the wanted dates to that grid.


Even though I had now already solved it myself (actually paying a 3rd party for the HZ data - which is fine he is providing a great website), and actually also using panda ...

... your new solution is much much appreciated. Might help a lot, in the future. Thanks!

I have just tried out your script ...

Code:
pip install html5lib pandas

then it works like a charm.

Could anyone please provide me with historical data of
* HZ / BTC
* NXT / BTC
... back to early 2015.  Daily precision is fine.

https://coinmarketcap.com/historical/

Weekly precision.

It's pages of HTML tables, so you'll need to roll your own processing which is trivially easy to do with pandas (https://en.wikipedia.org/wiki/Pandas_%28software%29). The defaults returns prices in USD, from which BTC price can be derived by using df.iloc[0, 4] (assuming Bitcoin occupies the first row).

Code:
$ python
Python 3.4.3 (default, Jul 28 2015, 18:20:59)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pandas.io.html import read_html
>>> df = read_html('https://coinmarketcap.com/historical/20151101/')[0]
>>> btcusd = float(df.iloc[0, 4].split(' ')[1])
>>> for il in range(0, len(df)):
...     if df.iloc[il, 2] in ['NXT', 'HZ']:
...         print("{name} {symbol} {btcprice:02.8f}".format(
...             name=df.iloc[il, 1],
...             symbol=df.iloc[il, 2],
...             btcprice=(float(df.iloc[il, 4].split(' ')[1]) / btcusd)))
...
Nxt NXT 0.00002371
Horizon HZ 0.00000041

Close enough for government work, I'd say.

Cheers

Graham

Edit: added pandas url


Great solution.

Thank you gjhiggins - happy Easter!



Title: Re: historical data of AltCoin prices
Post by: alyssa85 on March 28, 2016, 03:12:31 PM
OK try the following chart:

http://bitcoincharts.com/charts/bitstampUSD#tgSzm1g10zm2g25zv


Title: Re: historical data of AltCoin prices
Post by: altsheets on March 28, 2016, 03:15:19 PM
OK try the following chart:

http://bitcoincharts.com/charts/bitstampUSD#tgSzm1g10zm2g25zv

YES. That's it, the "Load raw data" below the chart would have helped.


The BTC/fiat is the easy part, there is an abundance of sources.
I had actually used http://www.investing.com/currencies/btc-eur-historical-data now.


Thanks a lot for your help!



Title: Re: historical data of AltCoin prices
Post by: altsheets on March 28, 2016, 03:35:46 PM
Ready.

49 times 3 prices

https://i.imgur.com/zZVfxLy.png

Now I can calculate the dividends (https://bitcointalk.org/index.php?topic=981128.msg14337983#msg14337983), finally

 ;)


Title: Re: historical data of AltCoin prices
Post by: altsheets on March 28, 2016, 03:51:15 PM
P.S.: PM me your HZ addresses, both of you - then I can say 'thank you' in the form of my asset.  ;)


Title: Re: historical data of AltCoin prices
Post by: altsheets on March 30, 2016, 08:50:24 AM
On the basis of all those insights ...

--> Paying dividends - done (https://bitcointalk.org/index.php?topic=981128.msg14356451#msg14356451).

Thanks a bunch for your help.