---
name: coinapi-market-data
description: Query CoinAPI market data, indexes, and flat files through hosted MCP servers or REST. Use when an agent needs crypto prices, trades, quotes, order books, OHLCV, exchange rates, or historical datasets.
---

# CoinAPI Market Data

CoinAPI provides cryptocurrency market data to AI agents through hosted MCP servers and REST APIs. Authenticate with an API key from https://console.apibricks.io/?link=/apikeys/create

## MCP servers

Send `X-CoinAPI-Key: YOUR_API_KEY` on every request.

- Market Data: `https://mcp.md.coinapi.io/mcp` — assets, symbols, quotes, trades, order books, OHLCV, metadata
- Indexes: `https://mcp.indexes.coinapi.io/mcp` — index values, snapshots, history, weights
- Flat Files: `https://mcp.flatfiles.coinapi.io/mcp` — historical datasets and bulk downloads

Example MCP client config:

```json
{
  "mcpServers": {
    "CoinAPI-Market-Data": {
      "url": "https://mcp.md.coinapi.io/mcp",
      "headers": {
        "X-CoinAPI-Key": "YOUR_API_KEY"
      }
    }
  }
}
```

First Market Data tools to try: `assets_list` with `filter_asset_id` like `BTC;USD`, then `symbols_list` with `filter_exchange_id` and `filter_asset_id`.

## REST

- Market Data: `https://rest.coinapi.io/v1/` — OpenAPI at `https://rest.coinapi.io/swagger/v1/swagger.json`
- Exchange Rates realtime: `https://api-realtime.exrates.coinapi.io/`
- Exchange Rates historical: `https://api-historical.exrates.coinapi.io/`
- Indexes: `https://rest-api.indexes.coinapi.io/`

Preferred auth header: `X-CoinAPI-Key: YOUR_API_KEY`

## Docs

- MCP overview: https://www.coinapi.io/mcp
- Authentication: https://www.coinapi.io/products/market-data-api/docs/authentication
- Site index for agents: https://www.coinapi.io/llms.txt
