Pro
Developers

Start in under a minute.

One cURL command. No API key needed for basic testing. Public endpoints with IP-based rate limits are ready to go.

~ / live demo · GET /api/v1/rates
curl "https://api.bitcompare.net/api/v1/rates?symbol=BTC&category=lending"
// HTTP/2 200 · 92ms · cache HIT
[
  {
    "symbol": "BTC",
    "category": "lending",
    "provider": "earnpark",
    "rate": 15.00
  },
  // + more
]
Quickstart

Three steps to live data.

From zero to production in minutes, not hours.

01 / Get an API key

Get an API key

Sign up for a free key to unlock higher rate limits and commercial use. No credit card required.

02 / Make a request

Make a request

Test immediately with cURL, your browser, or any HTTP client. Public endpoints are ready to go.

03 / Build your product

Build your product

Rates from 85+ providers, stablecoin analytics — everything you need from a single integration.

Code examples

Works with every language.

REST-based API with examples in JavaScript, Python, cURL, and more.

Example 1 · GET /api/v1/rates

Query rates across providers

Lending, staking, and borrowing rates from 85+ CeFi and DeFi providers. Compare APYs across platforms in a single request.

rates.js
const res = await fetch(
  "https://api.bitcompare.net/api/v1/rates?symbol=BTC&category=lending",
  { headers: { Authorization: `Bearer ${process.env.BC_KEY}` } },
);
const rates = (await res.json()).data.rates;
rates
  .sort((a, b) => b.rate - a.rate)
  .forEach(r => console.log(`${r.provider}: ${r.rate%`));
Example 2 · GET /api/v1/stablecoins/peg-stability

Stablecoin peg stability

Bitcompare’s proprietary stability scores for 14 major stablecoins. Track peg deviation, recovery speed, and chain distribution over time.

stability.py
import os
import requests
r = requests.get(
    "https://api.bitcompare.net/api/v1/stablecoins/peg-stability",
    params={"symbol": "USDC", "period": "30d"},
    headers={"Authorization": f"Bearer {os.environ['BC_KEY']}"},
)
score = r.json()["data"]["score"]
print(f"USDC grade={score['grade']} score={score['score']:.1f}")
Example 3 · WSS /api/v1/prices/ws

WebSocket price streams

Subscribe to real-time price feeds with ~1 second update frequency. Available on the Growth plan and above.

stream.js
const ws = new WebSocket(
  `wss://api.bitcompare.net/api/v1/prices/ws
    ?apiKey=${process.env.BC_KEY}`
);
ws.onopen = () => {
  ws.send(JSON.stringify(({
    type: "subscribe",
    symbols: ["BTC", "ETH"],
  }));
};
ws.onmessage = ({ data }) => {
  const { type, data: ticks } = JSON.parse(data);
  if (type !== "price_update") return;
  ticks.forEach(({ symbol, last }) =>
    console.log(`${symbol}: $${last.toLocaleString()}`));
};
By the numbers

The data behind the API.

Comprehensive coverage for every crypto use case.

85+

CeFi and DeFi rate providers

14

Stablecoins with proprietary stability scoring

3

Rate categories: lending, staking, and borrowing

Dive into the full documentation.

Comprehensive guides, code examples, and endpoint reference.