Author

Topic: Poloniex api - one exchange only? (Read 974 times)

sr. member
Activity: 503
Merit: 286
March 06, 2017, 02:22:55 PM
#4
Thanks, very helpful.

Does anyone know why the returns differ so much from each site? Eg, NEM, I believe all of the following are 24 hour returns in USD:

World coin index: -2.37%
Credio: +2.20%
alt19 poloniex: +11.42%
alt19 bittrex: +23.64%

in bitcoin:
Poloniex: +3.65% (but should be similar, as not much change in BTC in last 24 hours)


legendary
Activity: 2772
Merit: 2846
March 05, 2017, 07:07:53 PM
#3

I am looking for total historical volume data per 24-hour period, for all exchanges. Coinmarketcap reports this on a daily basis, but there does not seem to be historical commands (https://coinmarketcap.com/api/).

Look at the bottom of the page at this link.

http://alt19.com/

There is a facility to download altcoin charts and altcoin historical data in a CSV format. It has data at 15 minute, 1 hour, and 1 day increments.


Also, gjhiggins explains how to scrape historical data from coinmarketcap in this post.

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. 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

staff
Activity: 3458
Merit: 6793
Just writing some code
March 05, 2017, 05:45:04 PM
#2
What an exchange reports through their API is solely for their exchange only. Exchanges don't pull the data from other exchanges to display to their users, that is what aggregate sites like Coinmarketcap do.
sr. member
Activity: 503
Merit: 286
March 05, 2017, 05:24:38 PM
#1
I ran this code from Poloniex api (https://poloniex.com/support/api/):

return24hVolume()

which returns all currency pairs and totals for the major cryptocurrencies. However, I noticed the numbers differ significantly from coinmarketcap, both for pairs and totals. Eg 24 hour volume for bitcoin:

Poloniex:
totalBTC': '15682.41737700'  (~= $19,822,048)

Coinmarketcap:
bitcoin: $133,264,000


Is all of the data from the poloniex api for what was traded on the poloniex exchange only? And if this is the case, presumably it is the case for the other commands as well, such as returnChartData?

I am looking for total historical volume data per 24-hour period, for all exchanges. Coinmarketcap reports this on a daily basis, but there does not seem to be historical commands (https://coinmarketcap.com/api/).
Jump to: