API Documentation

Introduction

NOTE FOR API V1 USERS: API V1 will be disabled after 31 December 2021. Read more about migrating to API V2. This is the documentation for API V2, you can still read the documentation for API V1.

Power your projects with the high quality cryptocurrency data coinranking.com provides. We provide data about coins, exchanges, markets & more.

Base url:

https://api.coinranking.com/v2

To get you started, read about why you should use our API and check out our pricing options. We've included a powerful free tier too!

Good luck with building your awesome project! And don't hesitate to reach out to us.

Migrating to V2

After 31 December 2021 we will disable API V1. Before this date you will have to migrate to V2 if you want to keep using our services. If you need to migrate, these are points to consider:

  1. You need a free api key for API V2. Create a free api key which is to be used in requests to our service. Read about authenticating in our docs.
  2. Reorganized responses. You can access all the same data in API V2 as you could in V1, however we had to reorganize it due to performance reasons and ease-of-use. Consult our documentation for both API V1 and API V2.
  3. UUIDs instead of IDs. The biggest change between API V1 and API V2 is the identifier for all our assets. In V1 we used numerical IDs, which we replaced with UUIDs (which are strings). Since IDs are not available in API V2, and UUIDs are not available in API V1, we made a migration endpoint where both types of identifiers are mapped. This endpoint will be available for a month after disabling API V1.
  4. Planned outages for API V1. There will be two brown-outs before we disable API V1. This means API V1 will be down for 24 hours, with a response that will direct your attention to this migration guide. We have decided on these brown-outs because we have no other means of reaching API V1 users. If you still use API V1 these planned outages will result in downtime in your service, but it will give you the necessary time to migrate to API V2 afterwards. The planned dates for these outages are:
    • 12 October 2021 from UTC +03:00
    • 9 November 2021 from UTC +03:00
  5. API V1 no longer available. After 31 December 2021 API V1 will no longer be available. You can use our migration endpoint until February 2022.

Authentication

The Coinranking API uses API keys to authenticate requests.

Authentication to the API is performed via a custom HTTP header. Provide your API key as the value of the X-Access-Token, like x-access-token: coinranking53a...9e4. Create a free account to get an API key.

All API requests must be made over HTTPS. Calls made over plain HTTP will redirect to HTTPS.

Example:

curl https://api.coinranking.com/v2/coins \
  -H x-access-token: 53a0b0a7e4f2fa59519e4

Why would I authenticate?

You can only do a very limited amount of requests without authenticating. Read on to learn more about our rate-limits, or check out our pricing page.

Rate limits

The amount of requests you can do before you run into our rate limit depends on your API key. With our free API key you can make about 10K requests per month. If you need more you can upgrade to the Hobbyist or Pro plan, which you can read more about at our pricing page. Without a key you can still make a very limited amount of requests so you can quickly test if our endpoints fit your needs, or debug a little bit during development. The unauthenticated requests are not guaranteed to work, so we advice you to get a key to not unexpectedly run into the rate limiter.

Types of rate limiting

We have rate limits for several time intervals. We protect against burst requests by limiting the free keys to about five requests per second. Our free key is limited to 10K requests per month. Unauthenticated requests are limited much more per month, and have limits per minute and hour as well. The current unauthenticated rate limits might change in the future to whatever we see fit; for guaranteed rate limits get one of our free keys.

Rate limit response headers

Every request you do returns information about the rate-limit, so your application can adapt before reaching the limit.

HeaderDescription
X-RateLimit-Limit-Second

The maximum amount of requests in a second

X-RateLimit-Limit-Minute

The maximum amount of requests in a minute

X-RateLimit-Limit-Hour

The maximum amount of requests in an hour

X-RateLimit-Limit-Month

The maximum amount of requests in a month

X-RateLimit-Remaining-Second

The amount of requests you can still do in a second

X-RateLimit-Remaining-Minute

The amount of requests you can still do in a minute

X-RateLimit-Remaining-Hour

The amount of requests you can still do in a hour

X-RateLimit-Remaining-Month

The amount of requests you can still do in an hour

RateLimit-Limit

This is the rate-limit that is the first to run out. E.g. when you can still do 10000 requests this month, but only 5 this minute, it will show 5

RateLimit-Reset

This will tell you the amount of seconds remain until the quota of your lowest rate-limit will be restored to its maximum

RateLimit-Remaining

The amount of requests remaining for the lowest remaining limit

Pricing

You can generate a key for free. The free tier will remain free, but it has some limitations such as a more restrained rate limit and it lacks some endpoints. So if you need more than the free tier provide, have a look into our plans on our pricing page.

CORS

If you are developing an application that directly makes requests from the browser to our API, you will run into issues with Cross Origin Resource Sharing (CORS). To prevent this, our API will respond with your custom domain in a CORS header. You can set your custom domain on the settings page. CORS is supported in our Hobbyist plan and above.

Icons

Icon URLs are provided as .svg, for example the logo for Bitcoin is:

https://cdn.coinranking.com/Sy33Krudb/btc.svg

We also support .png on all our coin and exchange logos. If you prefer this, just replace the svg extension with png:

https://cdn.coinranking.com/Sy33Krudb/btc.png

Feedback

We’re constantly trying to improve our API, to provide you with the best possible experience. That is why we would like to hear what you think of it. Help us by answering two short questions.

Older API versions

API v1 is still online, but it will be disabled per January 2022, we strongly advise you to migrate to API v2 before our planned API V1 outages. Read more about migrating in our migrating to API V2 section. You can still read the documentation for API v1.

Other resources

  • Open source JavaScript library to get crypto supplies from block explorers: GitHub, npm
  • Open source JavaScript library from fetching exchange tickers: GitHub, npm