Coinlayer API

⭐ Beginner's Pick Cryptocurrency / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Coinlayer delivers real-time and historical exchange rates for over 385 cryptocurrencies, sourced from major exchanges and updated every 60 seconds on paid plans. You request rates in a target fiat currency (USD, EUR, GBP, etc.) and get back a snapshot of all coin prices in one lightweight JSON payload. It is commonly used for portfolio trackers, price alert systems, and crypto payment processors.

💡

Beginner Tip

The free plan only returns rates in USD and limits requests to once per hour. If you need EUR or other currencies, use the `target` query parameter — but this requires a paid plan. Test with USD first to confirm your integration works before upgrading.

Available Data

coin price in USD/EUR
market capitalization
24h price change
trading volume
circulating supply

Example Response

JSON Response
{
  "id": "bitcoin",
  "symbol": "btc",
  "current_price": 65432.1,
  "market_cap": 1280000000000,
  "price_change_24h": 1250.5,
  "price_change_percentage_24h": 1.95,
  "total_volume": 28500000000
}

Field Reference

success True if the request succeeded; false if an error occurred (check the `error` object).
timestamp Unix timestamp indicating when the rates were last updated.
target The fiat currency all rates are expressed in (e.g., "USD").
rates Key-value pairs where each key is a coin symbol (e.g., "BTC") and the value is its current price in the target currency.
rates.BTC Current Bitcoin price in the target currency as a floating-point number.

Implementation Example

const url = "https://coinlayer.com/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

101 No API Key Found The `access_key` query parameter is absent or misspelled.
Append `?access_key=YOUR_KEY` to every request URL — Coinlayer uses query-string auth, not headers.
105 Https Access Restricted The free plan does not support HTTPS; only paid plans allow secure connections.
Either upgrade to a paid plan or use `http://` for local testing (not recommended for production).
201 Invalid target currency The `target` currency code is not recognized or is unavailable on your plan.
Use one of the supported fiat codes listed in the `/list` endpoint response and confirm your plan includes that currency.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Cryptocurrency
Difficulty Intermediate
Verified: 2026-04-04

Alternatives to Coinlayer

Technical alternatives for different use cases.

Much larger free tier with more coin coverage

Better For

Comprehensive crypto data without paid plan

Trade-off

Apilayer ecosystem integration

Deeper historical data and social metrics

Better For

Crypto analytics and historical analysis

Trade-off

Simple price lookups for a few coins

Similar APIs

View All →