# CoinMarketCap Markets API Documentation

<p><strong>CoinMarketCap Markets API Documentation</strong> List trading pairs for one coin id. Each pair has the exchange, market pair, category, cex or dex type, price with currency, 24h volume, liquidity and score. Non-USD values use a shared daily conversion rate from the USD quote. Pass the id from listings or search. Filter by page, per_page (1 to 250), sort by volume, price or liquidity, and an optional category. An empty answer and every failed request cost no credit. Cost: 1 credit per successful request. Scrappa is an independent service and is not affiliated with or endorsed by CoinMarketCap.</p>

- **Documentation:** [https://scrappa.co/docs/coinmarketcap-api/coinmarketcap_markets](https://scrappa.co/docs/coinmarketcap-api/coinmarketcap_markets)
- **API group:** CoinMarketCap API
- **Endpoint:** `GET https://scrappa.co/api/coinmarketcap/markets`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | Yes | Numeric CoinMarketCap id, e.g. 1. |
| `page` | integer | No | Page number, 1-based. |
| `per_page` | integer | No | Pairs per page, 1 to 250. |
| `sort` | string | No | volume |
| `category` | string | No | Optional market category filter. |
| `currency` | string | No | Quote currency: USD (default), EUR, GBP, BTC or ETH. |

## Example response

```json
{
    "data": {
        "id": 1,
        "markets": [
            {
                "pair": "BTC/USDT",
                "type": "cex",
                "price": 67000.5,
                "score": 9.1,
                "category": "Spot",
                "currency": "USD",
                "exchange": "Binance",
                "liquidity": 850,
                "volume_24h": 1200000000
            }
        ],
        "pagination": {
            "page": 1,
            "total": 3430,
            "has_more": true,
            "per_page": 100,
            "total_pages": 35
        }
    },
    "meta": {
        "source": "coinmarketcap",
        "credits": 1,
        "billable": true,
        "endpoint_family": "markets"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing or invalid. This response is not billable. |
| 503 | Service Unavailable | The upstream data is temporarily unavailable. This response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
