knowm / XChange

XChange is a Java library providing a streamlined API for interacting with 60+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.
http://knowm.org/open-source/xchange/
MIT License
3.87k stars 1.94k forks source link

Bitcoin Charts API Broken #199

Closed timmolter closed 10 years ago

timmolter commented 11 years ago

http://bitcoincharts.com/about/markets-api/

It looks like they changed their ticker API url and took away the charts API url.

timmolter commented 11 years ago

I fixed the ticker url, but the charts API endpoint seems to be gone for good.

timmolter commented 11 years ago

I fixed the chart API too, by guessing the url. Use latest snapshots for this hotfix.

timmolter commented 11 years ago

charts API actually not fixed. Sorry.

timmolter commented 11 years ago

@deveth0 Do you know the working charts API endpoint URL? Also, in XChange there exists no sample app for this API endpoint. Would you be interested in creating one?

deveth0 commented 11 years ago

Hi,

the Chart API can be found here: http://bitcoincharts.com/charts/chart.json

I build a quick example, hope this helps.

timmolter commented 11 years ago

@deveth0 I won't be around today, but I'll take a closer look at this issue tonight.

deveth0 commented 11 years ago

Yeah no problem, I did a very dirty fix in my app ( use two static methods in the factory, one with the api URL and one with the chart URL). This only works if you don't want to reuse the same object for both calls. On Nov 7, 2013 6:59 AM, "Tim Molter" notifications@github.com wrote:

@deveth0 https://github.com/deveth0 I won't be around today, but I'll take a closer look at this issue tonight.

— Reply to this email directly or view it on GitHubhttps://github.com/timmolter/XChange/issues/199#issuecomment-27939612 .

timmolter commented 11 years ago

Cool. I'll take my time then. :)

timmolter commented 11 years ago

Your dirty fix is really the only way to handle this situation. I did find however that by taking of the subdomain api part of the url, both API calls actually work. I've pushed this change.

veken0m commented 10 years ago

Seem the subdomain "api" is now required...

Getting 405 Not Allowed without it: http://bitcoincharts.com/v1/markets.json Works fine with: http://api.bitcoincharts.com/v1/markets.json

timmolter commented 10 years ago

OK, I changed it. It seems like the other endpoint we had: charts/chart.json is now broken. My guess is that they simply took it away.

deveth0 commented 10 years ago

I contacted bitcoincharts.com, hopefully there is a fallback for the chart.json.

deveth0 commented 10 years ago

I got a response: the chart.json has been removed as it has not been a part of the the official api. It might be available in the future as a premium service :(

timmolter commented 10 years ago

Oh bummer. Well, I guess I'll remove it then.

@deveth0 Can you take a look at my message to you in this tread please: https://github.com/timmolter/XChange/issues/135

deveth0 commented 10 years ago

See pull request #224 :)