šŸš€ Metrics API V2 Live:

Complete Market Intelligence - CEX + DeFi Data in One API
backgroundbackground

Stream real-time market prices into your app in minutes

With just a few lines of code, you can pull live BTC/USD rates, or any of thousands of crypto and fiat pairs, directly into your trading bot, dashboard, or analytics tool.

  • image

    Instant access to aggregated data from hundreds of exchanges

  • image

    Ultra-low latency and enterprise-grade reliability

  • image

    Flexible formats (JSON, CSV, XML) and multiple protocols (REST, WebSocket, FIX)

  • image

    Developer-first: simple authentication, rich metadata, and consistent symbology

CoinAPI’s Market Data API delivers normalized, high-quality market data you can trust.

See documentation

1import requests
2
3url = "https://rest.coinapi.io/v1/exchangerate/BTC/USD"
4headers = {"X-CoinAPI-Key": "YOUR_API_KEY"}
5
6response = requests.get(url, headers=headers)
7data = response.json()
8
9print(f"Time: {data['time']}")
10print(f"Base: {data['asset_id_base']}")
11print(f"Quote: {data['asset_id_quote']}")
12print(f"Rate: {data['rate']}")
13