Skill: bryan-cmc/cmc-api-onchain-data (version 1.0.1)

--- name: cmc-api-dex description: | API reference for CoinMarketCap DEX endpoints including token lookup, pools, transactions, trending, and security analysis. Use this skill whenever the user mentions DEX API, asks about on-chain token data, wants to look up tokens by contract address, needs security/rug risk checks, or is building DEX integrations. This is the definitive reference for CMC DEX API questions. Trigger: "DEX API", "token by contract address", "CMC security API", "liquidity pool API", "/cmc-api-dex" user-invocable: true allowed-tools: - Bash - Read --- # CoinMarketCap DEX API This skill covers CoinMarketCap's DEX (Decentralized Exchange) APIs for on-chain token data. Unlike CEX endpoints, these APIs fetch data directly from blockchain DEXs like Uniswap, PancakeSwap, and Raydium. ## Authentication All requests require an API key in the header: ```bash curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/platform/list" \ -H "X-CMC_PRO_API_KEY: your-api-key" ``` Get your API key at: https://pro.coinmarketcap.com/login ## Base URL ``` https://pro-api.coinmarketcap.com ``` ## POST vs GET Endpoints Many DEX endpoints use POST for complex queries with body parameters. Always check the method: 1. GET endpoints pass parameters as query strings 2. POST endpoints pass parameters in JSON body with `Content-Type: application/json` ## Common Use Cases See [use-cases.md](references/use-cases.md) for goal-based guidance on which endpoint to use: 1. Get DEX token price by contract address 2. Find a token's contract address by name 3. Get prices for multiple tokens at once 4. Check token security before trading 5. Find liquidity pools for a token 6. Find trending DEX tokens 7. Find today's biggest DEX gainers 8. Find newly launched tokens 9. Detect potential rug pulls (liquidity removal) 10. Get recent trades for a token 11. Get supported networks and DEXs 12. Get meme coins ## API Overview | Endpoint | Method | Description | Reference | |----------|--------|-------------|-----------| | /v1/dex/token | GET | Token details by platform/address | [tokens.md](references/tokens.md) | | /v1/dex/token/price | GET | Latest DEX price for a token | [tokens.md](references/tokens.md) | | /v1/dex/token/price/batch | POST | Batch token prices | [tokens.md](references/tokens.md) | | /v1/dex/token/pools | GET | Liquidity pools for a token | [tokens.md](references/tokens.md) | | /v1/dex/token-liquidity/query | GET | Token liquidity over time | [tokens.md](references/tokens.md) | | /v1/dex/tokens/batch-query | POST | Batch token metadata | [tokens.md](references/tokens.md) | | /v1/dex/tokens/transactions | GET | Recent DEX transactions | [tokens.md](references/tokens.md) | | /v1/dex/tokens/trending/list | POST | Trending DEX tokens | [tokens.md](references/tokens.md) | | /v4/dex/pairs/quotes/latest | GET | Latest DEX pair quotes | [pairs.md](references/pairs.md) | | /v4/dex/spot-pairs/latest | GET | DEX spot pairs listing | [pairs.md](references/pairs.md) | | /v1/dex/platform/list | GET | List supported DEX platforms | [platforms.md](references/platforms.md) | | /v1/dex/platform/detail | GET | Platform details | [platforms.md](references/platforms.md) | | /v1/dex/search | GET | Search DEX tokens/pairs | [platforms.md](references/platforms.md) | | /v1/dex/gainer-loser/list | POST | Top DEX gainers/losers | [discovery.md](references/discovery.md) | | /v1/dex/liquidity-change/list | GET | Tokens with liquidity changes | [discovery.md](references/discovery.md) | | /v1/dex/meme/list | POST | Meme tokens on DEX | [discovery.md](references/discovery.md) | | /v1/dex/new/list | POST | Newly discovered DEX tokens | [discovery.md](references/discovery.md) | | /v1/dex/security/detail | GET | Token security/risk signals | [security.md](references/security.md) | ## Common Workflows ### Get DEX Token Information 1. Search for token: `/v1/dex/search?keyword=PEPE` 2. Get token details: `/v1/dex/token?network_slug=ethereum&contract_address=0x...` 3. Check security risks: `/v1/dex/security/detail?network_slug=ethereum&contract_address=0x...` ### Analyze Token Liquidity 1. Get token pools: `/v1/dex/token/pools?network_slug=ethereum&contract_address=0x...` 2. Get liquidity history: `/v1/dex/token-liquidity/query?network_slug=ethereum&contract_address=0x...` ### Find Trending Tokens 1. Get trending tokens: POST `/v1/dex/tokens/trending/list` with filters 2. Get gainers/losers: POST `/v1/dex/gainer-loser/list` 3. Find new tokens: POST `/v1/dex/new/list` ### Monitor DEX Activity 1. Get recent transactions: `/v1/dex/tokens/transactions?network_slug=ethereum&contract_address=0x...` 2. Get pair quotes: `/v4/dex/pairs/quotes/latest?network_slug=ethereum&contract_address=0x...` ## Key Parameters Most DEX endpoints require: 1. `network_slug` or `platform_crypto_id`: Identifies the blockchain (ethereum, solana, bsc) 2. `contract_address`: The token's on-chain contract address Use `/v1/dex/platform/list` to get valid network slugs and platform IDs. ## Error Handling | Code | Meaning | |------|---------| | 400 | Bad request (invalid parameters) | | 401 | Unauthorized (invalid or missing API key) | | 403 | Forbidden (endpoint not in your plan) | | 429 | Rate limit exceeded | | 500 | Server error | Example error response: ```json { "status": { "error_code": 400, "error_message": "Invalid value for 'contract_address'" } } ``` ## Rate Limits Rate limits depend on your API plan. Check response headers: 1. [REDACTED_SECRET]: Credits left 2. `X-CMC_PRO_API_KEY_CREDITS_RESET`: Reset timestamp ## Response Format All responses follow this structure: ```json { "status": { "timestamp": "2024-01-15T12:00:00.000Z", "error_code": 0, "error_message": null }, "data": { ... } } ```

path: references/discovery.md
content: # DEX Discovery APIs

## Gainers and Losers

**Path:** `POST /v1/dex/gainer-loser/list`

**Description:** Get top gaining and losing DEX tokens by price change. Useful for finding momentum trades and market movers.

### Body Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | No | Filter by network |
| platform_crypto_id | integer | No | Alternative network filter |
| type | string | No | Filter type (gainer, loser, all) default: all |
| time_period | string | No | Period for calculation (1h, 24h, 7d) default: 24h |
| sort | string | No | Sort field (percent_change, volume_24h, liquidity) |
| sort_dir | string | No | Sort direction (asc, desc) |
| start | integer | No | Pagination offset |
| limit | integer | No | Results per page (default: 100, max: 500) |
| min_liquidity | number | No | Minimum liquidity in USD |
| min_volume_24h | number | No | Minimum 24h volume in USD |
| min_market_cap | number | No | Minimum market cap in USD |

### Response Fields

| Field | Description |
|-------|-------------|
| tokens | Array of token objects |
| tokens[].id | Token CMC DEX ID |
| tokens[].name | Token name |
| tokens[].symbol | Token symbol |
| tokens[].contract_address | Contract address |
| tokens[].network_slug | Network identifier |
| tokens[].price | Current price |
| tokens[].percent_change_1h | 1-hour change % |
| tokens[].percent_change_24h | 24-hour change % |
| tokens[].percent_change_7d | 7-day change % |
| tokens[].volume_24h | 24-hour volume |
| tokens[].liquidity | Total liquidity |
| tokens[].market_cap | Market cap |
| tokens[].logo | Token logo URL |
| tokens[].type | gainer or loser |
| total_count | Total matching tokens |

### Example

```bash
# Get top 24h gainers with decent liquidity
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/gainer-loser/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "gainer",
    "time_period": "24h",
    "sort": "percent_change",
    "sort_dir": "desc",
    "limit": 20,
    "min_liquidity": 50000,
    "min_volume_24h": 10000
  }'
```

```bash
# Get top losers on Solana
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/gainer-loser/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "network_slug": "solana",
    "type": "loser",
    "time_period": "24h",
    "limit": 10
  }'
```

---

## Liquidity Change List

**Path:** `GET /v1/dex/liquidity-change/list`

**Description:** Get tokens with significant liquidity changes. Useful for detecting liquidity additions (bullish) or removals (potential rug pull).

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | No | Filter by network |
| platform_crypto_id | integer | No | Alternative network filter |
| change_type | string | No | Filter by change (increase, decrease, all) |
| time_period | string | No | Period for calculation (1h, 24h, 7d) |
| sort | string | No | Sort field (liquidity_change, liquidity_change_percent) |
| sort_dir | string | No | Sort direction (asc, desc) |
| start | integer | No | Pagination offset |
| limit | integer | No | Results per page (default: 100, max: 500) |
| min_liquidity | number | No | Minimum current liquidity |
| min_change_percent | number | No | Minimum change percentage (absolute) |

### Response Fields

| Field | Description |
|-------|-------------|
| tokens | Array of token objects |
| tokens[].id | Token CMC DEX ID |
| tokens[].name | Token name |
| tokens[].symbol | Token symbol |
| tokens[].contract_address | Contract address |
| tokens[].network_slug | Network identifier |
| tokens[].price | Current price |
| tokens[].liquidity | Current liquidity |
| tokens[].liquidity_change | Absolute liquidity change |
| tokens[].liquidity_change_percent | Percentage liquidity change |
| tokens[].volume_24h | 24-hour volume |
| tokens[].change_type | increase or decrease |
| tokens[].logo | Token logo URL |
| total_count | Total matching tokens |

### Example

```bash
# Get tokens with biggest liquidity increases
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/liquidity-change/list?change_type=increase&time_period=24h&sort=liquidity_change_percent&sort_dir=desc&limit=20&min_liquidity=10000" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

```bash
# Detect potential rug pulls (large liquidity decreases)
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/liquidity-change/list?change_type=decrease&time_period=1h&sort=liquidity_change_percent&sort_dir=asc&limit=20&min_change_percent=20" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

---

## Meme Tokens List

**Path:** `POST /v1/dex/meme/list`

**Description:** Get a list of meme tokens trading on DEXs. Filtered for tokens tagged as meme coins with social signals.

### Body Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | No | Filter by network |
| platform_crypto_id | integer | No | Alternative network filter |
| sort | string | No | Sort field (volume_24h, price_change_24h, liquidity, trending_score, market_cap) |
| sort_dir | string | No | Sort direction (asc, desc) |
| start | integer | No | Pagination offset |
| limit | integer | No | Results per page (default: 100, max: 500) |
| min_liquidity | number | No | Minimum liquidity in USD |
| min_volume_24h | number | No | Minimum 24h volume in USD |
| min_market_cap | number | No | Minimum market cap |

### Response Fields

| Field | Description |
|-------|-------------|
| tokens | Array of meme token objects |
| tokens[].id | Token CMC DEX ID |
| tokens[].name | Token name |
| tokens[].symbol | Token symbol |
| tokens[].contract_address | Contract address |
| tokens[].network_slug | Network identifier |
| tokens[].price | Current price |
| tokens[].percent_change_1h | 1-hour change % |
| tokens[].percent_change_24h | 24-hour change % |
| tokens[].percent_change_7d | 7-day change % |
| tokens[].volume_24h | 24-hour volume |
| tokens[].liquidity | Total liquidity |
| tokens[].market_cap | Market cap |
| tokens[].holders | Number of holders |
| tokens[].trending_score | Trending/social score |
| tokens[].logo | Token logo URL |
| tokens[].socials | Social media links |
| total_count | Total meme tokens |

### Example

```bash
# Get top meme coins by volume
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/meme/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "sort": "volume_24h",
    "sort_dir": "desc",
    "limit": 50,
    "min_liquidity": 10000
  }'
```

```bash
# Get Solana meme coins sorted by trending score
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/meme/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "network_slug": "solana",
    "sort": "trending_score",
    "sort_dir": "desc",
    "limit": 20
  }'
```

---

## New Tokens List

**Path:** `POST /v1/dex/new/list`

**Description:** Get newly discovered DEX tokens. Useful for finding new launches and early opportunities.

### Body Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | No | Filter by network |
| platform_crypto_id | integer | No | Alternative network filter |
| time_period | string | No | How recent (1h, 6h, 24h, 7d) default: 24h |
| sort | string | No | Sort field (date_added, volume_24h, liquidity, price_change_24h) |
| sort_dir | string | No | Sort direction (asc, desc) |
| start | integer | No | Pagination offset |
| limit | integer | No | Results per page (default: 100, max: 500) |
| min_liquidity | number | No | Minimum liquidity in USD |
| min_volume_24h | number | No | Minimum 24h volume in USD |

### Response Fields

| Field | Description |
|-------|-------------|
| tokens | Array of new token objects |
| tokens[].id | Token CMC DEX ID |
| tokens[].name | Token name |
| tokens[].symbol | Token symbol |
| tokens[].contract_address | Contract address |
| tokens[].network_slug | Network identifier |
| tokens[].price | Current price |
| tokens[].percent_change_1h | 1-hour change % |
| tokens[].percent_change_24h | 24-hour change % |
| tokens[].volume_24h | 24-hour volume |
| tokens[].liquidity | Total liquidity |
| tokens[].market_cap | Market cap (if calculable) |
| tokens[].date_added | When first discovered |
| tokens[].age_hours | Hours since discovery |
| tokens[].pool_count | Number of liquidity pools |
| tokens[].logo | Token logo URL |
| total_count | Total new tokens |

### Example

```bash
# Get tokens launched in last 24 hours with decent liquidity
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/new/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "time_period": "24h",
    "sort": "volume_24h",
    "sort_dir": "desc",
    "limit": 30,
    "min_liquidity": 5000
  }'
```

```bash
# Get newest tokens on Base chain
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/new/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "network_slug": "base",
    "time_period": "6h",
    "sort": "date_added",
    "sort_dir": "desc",
    "limit": 20
  }'
```

```bash
# Find promising new launches (volume > liquidity suggests demand)
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/new/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "time_period": "24h",
    "sort": "volume_24h",
    "sort_dir": "desc",
    "limit": 50,
    "min_liquidity": 10000,
    "min_volume_24h": 20000
  }'
```


path: references/platforms.md
content: # DEX Platform APIs

## Platform List

**Path:** `GET /v1/dex/platform/list`

**Description:** Get a list of all supported blockchain platforms/networks for DEX data. Use this to get valid network_slug and platform_crypto_id values for other endpoints.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| start | integer | No | Pagination offset (default: 1) |
| limit | integer | No | Results per page (default: 100, max: 500) |
| sort | string | No | Sort field (name, dex_count) |
| sort_dir | string | No | Sort direction (asc, desc) |

### Response Fields

| Field | Description |
|-------|-------------|
| platforms | Array of platform objects |
| platforms[].id | Platform CMC ID (use as platform_crypto_id) |
| platforms[].name | Platform name (e.g., Ethereum, Solana) |
| platforms[].slug | Platform slug (use as network_slug) |
| platforms[].symbol | Native token symbol (ETH, SOL) |
| platforms[].token_count | Number of tracked tokens |
| platforms[].dex_count | Number of DEXs on platform |
| platforms[].total_liquidity | Total liquidity across all DEXs |
| platforms[].volume_24h | 24-hour volume across all DEXs |
| platforms[].logo | Platform logo URL |
| total_count | Total platforms available |

### Example

```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/platform/list?limit=50&sort=total_liquidity&sort_dir=desc" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

---

## Platform Detail

**Path:** `GET /v1/dex/platform/detail`

**Description:** Get detailed information about a specific blockchain platform including all DEXs operating on it.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | Yes* | Network identifier (e.g., ethereum) |
| platform_crypto_id | integer | Yes* | Alternative to network_slug |

*One of network_slug or platform_crypto_id is required.

### Response Fields

| Field | Description |
|-------|-------------|
| id | Platform CMC ID |
| name | Platform name |
| slug | Platform slug |
| symbol | Native token symbol |
| description | Platform description |
| logo | Platform logo URL |
| website | Official website |
| explorer | Block explorer URL |
| token_count | Number of tracked tokens |
| pair_count | Number of trading pairs |
| total_liquidity | Total liquidity in USD |
| volume_24h | 24-hour trading volume |
| dexes | Array of DEX objects on this platform |
| dexes[].name | DEX name |
| dexes[].slug | DEX slug |
| dexes[].logo | DEX logo |
| dexes[].liquidity | DEX liquidity |
| dexes[].volume_24h | DEX 24h volume |
| dexes[].pair_count | Number of pairs on DEX |
| dexes[].website | DEX website |

### Example

```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/platform/detail?network_slug=ethereum" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/platform/detail?platform_crypto_id=5426" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

---

## Search

**Path:** `GET /v1/dex/search`

**Description:** Search for DEX tokens and trading pairs by keyword. Useful for finding contract addresses when you only know the token name or symbol.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| keyword | string | Yes | Search term (token name, symbol, or partial address) |
| network_slug | string | No | Filter by network |
| platform_crypto_id | integer | No | Alternative network filter |
| search_type | string | No | Filter results (token, pair, all) |
| start | integer | No | Pagination offset (default: 1) |
| limit | integer | No | Results per page (default: 20, max: 100) |

### Response Fields

| Field | Description |
|-------|-------------|
| tokens | Array of matching token objects |
| tokens[].id | Token CMC DEX ID |
| tokens[].name | Token name |
| tokens[].symbol | Token symbol |
| tokens[].contract_address | Contract address |
| tokens[].network_slug | Network identifier |
| tokens[].network_name | Network name |
| tokens[].price | Current price |
| tokens[].volume_24h | 24-hour volume |
| tokens[].liquidity | Total liquidity |
| tokens[].logo | Token logo URL |
| tokens[].verified | Whether token is verified |
| pairs | Array of matching pair objects |
| pairs[].pair_address | Pool contract address |
| pairs[].dex_name | DEX name |
| pairs[].network_slug | Network identifier |
| pairs[].base_token | Base token info |
| pairs[].quote_token | Quote token info |
| pairs[].liquidity | Pair liquidity |
| pairs[].volume_24h | 24-hour volume |
| total_tokens | Total matching tokens |
| total_pairs | Total matching pairs |

### Example

```bash
# Search for PEPE token
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/search?keyword=PEPE&limit=10" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

```bash
# Search for tokens on Solana only
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/search?keyword=bonk&network_slug=solana&search_type=token" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

```bash
# Search by partial contract address
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/search?keyword=0x6982508&network_slug=ethereum" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```


path: references/tokens.md
content: # DEX Token APIs

## Table of Contents

1. [Token Details](#token-details)
2. [Token Price](#token-price)
3. [Batch Token Prices](#batch-token-prices)
4. [Token Pools](#token-pools)
5. [Token Liquidity Query](#token-liquidity-query)
6. [Batch Token Query](#batch-token-query)
7. [Token Transactions](#token-transactions)
8. [Trending Tokens](#trending-tokens)

---

## Token Details

**Path:** `GET /v1/dex/token`

**Description:** Get detailed information about a specific DEX token by its contract address and network.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | Yes* | Network identifier (e.g., ethereum, solana, bsc) |
| platform_crypto_id | integer | Yes* | Alternative to network_slug, use platform's CMC ID |
| contract_address | string | Yes | Token's contract address on the network |

*One of network_slug or platform_crypto_id is required.

### Response Fields

| Field | Description |
|-------|-------------|
| id | CMC DEX token ID |
| name | Token name |
| symbol | Token ticker symbol |
| contract_address | On-chain contract address |
| platform | Network/blockchain info |
| total_supply | Total token supply |
| circulating_supply | Circulating supply |
| market_cap | Market capitalization |
| fully_diluted_market_cap | FDV based on total supply |
| price | Current price in USD |
| volume_24h | 24-hour trading volume |
| percent_change_1h | 1-hour price change % |
| percent_change_24h | 24-hour price change % |
| percent_change_7d | 7-day price change % |
| logo | Token logo URL |
| description | Token description |
| date_added | When token was first tracked |

### Example

```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/token?network_slug=ethereum&contract_address=0x6982508145454Ce325dDbE47a25d4ec3d2311933" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

---

## Token Price

**Path:** `GET /v1/dex/token/price`

**Description:** Get the latest DEX price for a specific token. Faster than full token details when you only need price.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | Yes* | Network identifier |
| platform_crypto_id | integer | Yes* | Alternative to network_slug |
| contract_address | string | Yes | Token's contract address |

### Response Fields

| Field | Description |
|-------|-------------|
| price | Current USD price |
| price_quote | Price in quote token (if applicable) |
| percent_change_1h | 1-hour change % |
| percent_change_24h | 24-hour change % |
| percent_change_7d | 7-day change % |
| volume_24h | 24-hour volume |
| last_updated | Timestamp of last update |

### Example

```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/token/price?network_slug=solana&contract_address=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

---

## Batch Token Prices

**Path:** `POST /v1/dex/token/price/batch`

**Description:** Get prices for multiple tokens in a single request. More efficient than multiple single calls.

### Body Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| tokens | array | Yes | Array of token objects |
| tokens[].network_slug | string | Yes* | Network identifier |
| tokens[].platform_crypto_id | integer | Yes* | Alternative to network_slug |
| tokens[].contract_address | string | Yes | Token's contract address |

### Response Fields

| Field | Description |
|-------|-------------|
| prices | Array of price objects for each requested token |
| prices[].contract_address | Token address |
| prices[].network_slug | Network of the token |
| prices[].price | Current USD price |
| prices[].percent_change_24h | 24-hour change % |
| prices[].volume_24h | 24-hour volume |

### Example

```bash
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/token/price/batch" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "tokens": [
      {"network_slug": "ethereum", "contract_address": [REDACTED_SECRET]},
      {"network_slug": "solana", "contract_address": [REDACTED_SECRET]}
    ]
  }'
```

---

## Token Pools

**Path:** `GET /v1/dex/token/pools`

**Description:** Get all liquidity pools that include a specific token. Useful for finding trading venues and liquidity depth.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | Yes* | Network identifier |
| platform_crypto_id | integer | Yes* | Alternative to network_slug |
| contract_address | string | Yes | Token's contract address |
| start | integer | No | Pagination offset (default: 1) |
| limit | integer | No | Results per page (default: 100, max: 1000) |
| sort | string | No | Sort field (liquidity, volume_24h) |
| sort_dir | string | No | Sort direction (asc, desc) |

### Response Fields

| Field | Description |
|-------|-------------|
| pools | Array of liquidity pool objects |
| pools[].pool_address | Pool contract address |
| pools[].dex_name | DEX name (Uniswap, Raydium, etc.) |
| pools[].dex_slug | DEX identifier |
| pools[].base_token | Base token info |
| pools[].quote_token | Quote token info |
| pools[].liquidity | Total liquidity in USD |
| pools[].volume_24h | 24-hour volume |
| pools[].fee_tier | Pool fee percentage |
| pools[].price | Current price |
| total_count | Total pools available |

### Example

```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/token/pools?network_slug=ethereum&contract_address=0x6982508145454Ce325dDbE47a25d4ec3d2311933&sort=liquidity&sort_dir=desc&limit=10" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

---

## Token Liquidity Query

**Path:** `GET /v1/dex/token-liquidity/query`

**Description:** Get historical liquidity data for a token over time. Useful for analyzing liquidity trends.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | Yes* | Network identifier |
| platform_crypto_id | integer | Yes* | Alternative to network_slug |
| contract_address | string | Yes | Token's contract address |
| time_period | string | No | Time range (1h, 24h, 7d, 30d, 90d, 1y) |
| interval | string | No | Data interval (5m, 1h, 1d) |

### Response Fields

| Field | Description |
|-------|-------------|
| liquidity_history | Array of liquidity data points |
| liquidity_history[].timestamp | Data point timestamp |
| liquidity_history[].liquidity | Total liquidity in USD |
| liquidity_history[].liquidity_change | Change from previous period |
| current_liquidity | Current total liquidity |
| liquidity_change_24h | 24-hour liquidity change % |

### Example

```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/token-liquidity/query?network_slug=ethereum&contract_address=0x6982508145454Ce325dDbE47a25d4ec3d2311933&time_period=7d&interval=1h" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

---

## Batch Token Query

**Path:** `POST /v1/dex/tokens/batch-query`

**Description:** Get metadata for multiple tokens in a single request. Returns full token details, not just prices.

### Body Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| tokens | array | Yes | Array of token identifiers |
| tokens[].network_slug | string | Yes* | Network identifier |
| tokens[].platform_crypto_id | integer | Yes* | Alternative to network_slug |
| tokens[].contract_address | string | Yes | Token's contract address |

### Response Fields

| Field | Description |
|-------|-------------|
| tokens | Array of full token objects |
| tokens[].id | CMC DEX token ID |
| tokens[].name | Token name |
| tokens[].symbol | Token symbol |
| tokens[].contract_address | Contract address |
| tokens[].platform | Network info |
| tokens[].price | Current price |
| tokens[].market_cap | Market cap |
| tokens[].volume_24h | 24-hour volume |
| tokens[].total_supply | Total supply |
| tokens[].logo | Logo URL |

### Example

```bash
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/tokens/batch-query" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "tokens": [
      {"network_slug": "ethereum", "contract_address": [REDACTED_SECRET]},
      {"network_slug": "ethereum", "contract_address": [REDACTED_SECRET]}
    ]
  }'
```

---

## Token Transactions

**Path:** `GET /v1/dex/tokens/transactions`

**Description:** Get recent DEX transactions for a specific token. Shows buys, sells, and swaps.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | Yes* | Network identifier |
| platform_crypto_id | integer | Yes* | Alternative to network_slug |
| contract_address | string | Yes | Token's contract address |
| start | integer | No | Pagination offset (default: 1) |
| limit | integer | No | Results per page (default: 100, max: 500) |
| tx_type | string | No | Filter by type (buy, sell, all) |

### Response Fields

| Field | Description |
|-------|-------------|
| transactions | Array of transaction objects |
| transactions[].tx_hash | Transaction hash |
| transactions[].block_number | Block number |
| transactions[].timestamp | Transaction timestamp |
| transactions[].tx_type | Transaction type (buy/sell) |
| transactions[].maker_address | Wallet that initiated |
| transactions[].token_amount | Amount of tokens traded |
| transactions[].quote_amount | Amount in quote currency |
| transactions[].price | Price at transaction |
| transactions[].usd_value | USD value of transaction |
| transactions[].dex_name | DEX where trade occurred |
| transactions[].pool_address | Pool used for trade |
| total_count | Total transactions available |

### Example

```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/tokens/transactions?network_slug=solana&contract_address=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263&limit=50&tx_type=all" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

---

## Trending Tokens

**Path:** `POST /v1/dex/tokens/trending/list`

**Description:** Get trending DEX tokens based on various metrics like volume, price change, or social activity.

### Body Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | No | Filter by network |
| platform_crypto_id | integer | No | Alternative network filter |
| time_period | string | No | Trending period (1h, 6h, 24h) |
| sort | string | No | Sort by (volume_24h, price_change, trending_score) |
| sort_dir | string | No | Sort direction (asc, desc) |
| start | integer | No | Pagination offset |
| limit | integer | No | Results per page (default: 100, max: 500) |
| min_liquidity | number | No | Minimum liquidity filter |
| min_volume_24h | number | No | Minimum 24h volume filter |

### Response Fields

| Field | Description |
|-------|-------------|
| tokens | Array of trending token objects |
| tokens[].id | CMC DEX token ID |
| tokens[].name | Token name |
| tokens[].symbol | Token symbol |
| tokens[].contract_address | Contract address |
| tokens[].network_slug | Network identifier |
| tokens[].price | Current price |
| tokens[].percent_change_1h | 1-hour change % |
| tokens[].percent_change_24h | 24-hour change % |
| tokens[].volume_24h | 24-hour volume |
| tokens[].liquidity | Total liquidity |
| tokens[].trending_score | Trending score |
| tokens[].market_cap | Market cap |
| tokens[].logo | Logo URL |
| total_count | Total trending tokens |

### Example

```bash
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/tokens/trending/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "network_slug": "solana",
    "time_period": "24h",
    "sort": "volume_24h",
    "sort_dir": "desc",
    "limit": 20,
    "min_liquidity": 10000
  }'
```


path: references/pairs.md
content: # DEX Pairs APIs

## Pairs Quotes Latest

**Path:** `GET /v4/dex/pairs/quotes/latest`

**Description:** Get the latest quote data for a specific DEX trading pair. Returns price, volume, liquidity, and recent price changes.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | Yes* | Network identifier (e.g., ethereum, solana, bsc) |
| platform_crypto_id | integer | Yes* | Alternative to network_slug, use platform's CMC ID |
| contract_address | string | Yes | Pool/pair contract address |
| base_address | string | No | Base token address (for direction) |
| quote_address | string | No | Quote token address (for direction) |

*One of network_slug or platform_crypto_id is required.

### Response Fields

| Field | Description |
|-------|-------------|
| pair_address | Pool/pair contract address |
| dex_name | DEX name (Uniswap V3, Raydium, etc.) |
| dex_slug | DEX identifier |
| network_slug | Network of the pair |
| base_token | Base token information |
| base_token.name | Base token name |
| base_token.symbol | Base token symbol |
| base_token.address | Base token contract address |
| quote_token | Quote token information |
| quote_token.name | Quote token name |
| quote_token.symbol | Quote token symbol |
| quote_token.address | Quote token contract address |
| price | Current price (base in terms of quote) |
| price_usd | Price in USD |
| price_quote | Price in quote token |
| percent_change_1h | 1-hour price change % |
| percent_change_24h | 24-hour price change % |
| percent_change_7d | 7-day price change % |
| volume_24h | 24-hour trading volume in USD |
| volume_24h_base | 24-hour volume in base token |
| volume_24h_quote | 24-hour volume in quote token |
| liquidity | Total liquidity in USD |
| liquidity_base | Liquidity in base token |
| liquidity_quote | Liquidity in quote token |
| fee_tier | Pool fee percentage (e.g., 0.3%) |
| txns_24h | Number of transactions in 24h |
| buys_24h | Number of buy transactions |
| sells_24h | Number of sell transactions |
| makers_24h | Unique makers in 24h |
| last_updated | Timestamp of last update |

### Example

```bash
curl -X GET "https://pro-api.coinmarketcap.com/v4/dex/pairs/quotes/latest?network_slug=ethereum&contract_address=0x11b815efb8f581194ae79006d24e0d814b7697f6" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

---

## Spot Pairs Latest

**Path:** `GET /v4/dex/spot-pairs/latest`

**Description:** Get a listing of DEX spot trading pairs with filtering and sorting options. Useful for discovering trading pairs on specific DEXs or networks.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | No | Filter by network |
| platform_crypto_id | integer | No | Alternative network filter |
| dex_slug | string | No | Filter by DEX (uniswap-v3, raydium, pancakeswap) |
| base_address | string | No | Filter pairs with this base token |
| quote_address | string | No | Filter pairs with this quote token |
| start | integer | No | Pagination offset (default: 1) |
| limit | integer | No | Results per page (default: 100, max: 1000) |
| sort | string | No | Sort field (volume_24h, liquidity, price_change_24h) |
| sort_dir | string | No | Sort direction (asc, desc) |
| min_liquidity | number | No | Minimum liquidity in USD |
| min_volume_24h | number | No | Minimum 24h volume in USD |

### Response Fields

| Field | Description |
|-------|-------------|
| pairs | Array of trading pair objects |
| pairs[].pair_address | Pool/pair contract address |
| pairs[].dex_name | DEX name |
| pairs[].dex_slug | DEX identifier |
| pairs[].network_slug | Network identifier |
| pairs[].base_token | Base token info (name, symbol, address) |
| pairs[].quote_token | Quote token info (name, symbol, address) |
| pairs[].price | Current price |
| pairs[].price_usd | USD price |
| pairs[].percent_change_24h | 24-hour change % |
| pairs[].volume_24h | 24-hour volume |
| pairs[].liquidity | Total liquidity |
| pairs[].fee_tier | Pool fee % |
| pairs[].created_at | Pair creation timestamp |
| total_count | Total pairs matching filters |

### Example

```bash
# Get top Uniswap V3 pairs by volume
curl -X GET "https://pro-api.coinmarketcap.com/v4/dex/spot-pairs/latest?network_slug=ethereum&dex_slug=uniswap-v3&sort=volume_24h&sort_dir=desc&limit=20" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

```bash
# Get all pairs for a specific token
curl -X GET "https://pro-api.coinmarketcap.com/v4/dex/spot-pairs/latest?network_slug=ethereum&base_address=0x6982508145454Ce325dDbE47a25d4ec3d2311933&min_liquidity=10000" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

```bash
# Get Solana Raydium pairs
curl -X GET "https://pro-api.coinmarketcap.com/v4/dex/spot-pairs/latest?network_slug=solana&dex_slug=raydium&sort=liquidity&sort_dir=desc&limit=50" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```


path: references/use-cases.md
content: # Common Use Cases

This guide helps you choose the right endpoint and parameters for common DEX data goals.

## 1. Get DEX Token Price by Contract Address

**Goal:** Fetch the current price for a token using its contract address.

**Endpoint:** `GET /v1/dex/token/price`

**Steps:**
1. You need the network slug and contract address
2. Call the price endpoint directly

**Example:**
```bash
# Get PEPE price on Ethereum
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/token/price?network_slug=ethereum&contract_address=0x6982508145454Ce325dDbE47a25d4ec3d2311933" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

**Key parameters:** `network_slug`, `contract_address`

---

## 2. Find a Token's Contract Address by Name

**Goal:** Look up a token's contract address when you only know its name or symbol.

**Endpoint:** `GET /v1/dex/search`

**Steps:**
1. Search by keyword (name or symbol)
2. Filter by network if needed
3. Get the contract_address from results

**Example:**
```bash
# Search for BONK token on Solana
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/search?keyword=BONK&network_slug=solana&search_type=token" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

**Key parameters:** `keyword`, `network_slug`, `search_type`

**Watch out:** Multiple tokens may share the same name or symbol. Verify by checking liquidity and volume.

---

## 3. Get Prices for Multiple Tokens at Once

**Goal:** Fetch prices for several tokens in a single API call.

**Endpoint:** `POST /v1/dex/token/price/batch`

**Steps:**
1. Build an array of token objects with network and address
2. POST the request with JSON body

**Example:**
```bash
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/token/price/batch" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "tokens": [
      {"network_slug": "ethereum", "contract_address": [REDACTED_SECRET]},
      {"network_slug": "solana", "contract_address": [REDACTED_SECRET]}
    ]
  }'
```

**Key parameters:** `tokens` array with `network_slug` and `contract_address`

---

## 4. Check Token Security Before Trading

**Goal:** Get risk analysis and security signals for a token.

**Endpoint:** `GET /v1/dex/security/detail`

**Steps:**
1. Call with network and contract address
2. Check `overall_risk_score` and `risk_level`
3. Review specific flags (honeypot, taxes, ownership)

**Example:**
```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/security/detail?network_slug=ethereum&contract_address=0x6982508145454Ce325dDbE47a25d4ec3d2311933" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

**Key checks:**
- `has_honeypot_risk`: If true, do not buy
- `buy_tax_percent` / `sell_tax_percent`: High taxes eat into profits
- `liquidity_lock.is_locked`: Locked liquidity is safer
- `ownership.is_renounced`: Renounced ownership reduces rug risk
- `top_10_percent`: High concentration is risky

---

## 5. Find Liquidity Pools for a Token

**Goal:** See which pools a token trades in and their liquidity.

**Endpoint:** `GET /v1/dex/token/pools`

**Steps:**
1. Call with network and contract address
2. Sort by liquidity or volume
3. Use for finding best trading venues

**Example:**
```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/token/pools?network_slug=ethereum&contract_address=0x6982508145454Ce325dDbE47a25d4ec3d2311933&sort=liquidity&sort_dir=desc&limit=10" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

**Key parameters:** `sort` (liquidity, volume_24h), `sort_dir`, `limit`

---

## 6. Find Trending DEX Tokens

**Goal:** Discover tokens gaining attention on DEXs.

**Endpoint:** `POST /v1/dex/tokens/trending/list`

**Steps:**
1. Optionally filter by network
2. Set minimum liquidity to filter out dust
3. Sort by volume or trending score

**Example:**
```bash
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/tokens/trending/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "time_period": "24h",
    "sort": "volume_24h",
    "sort_dir": "desc",
    "limit": 20,
    "min_liquidity": 50000
  }'
```

**Key parameters:** `time_period`, `min_liquidity`, `min_volume_24h`

---

## 7. Find Today's Biggest DEX Gainers

**Goal:** Identify tokens with the highest price increase.

**Endpoint:** `POST /v1/dex/gainer-loser/list`

**Steps:**
1. Set `type: "gainer"` for gainers
2. Use `min_liquidity` to filter scams
3. Set time period (1h, 24h, 7d)

**Example:**
```bash
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/gainer-loser/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "gainer",
    "time_period": "24h",
    "sort": "percent_change",
    "sort_dir": "desc",
    "limit": 20,
    "min_liquidity": 50000,
    "min_volume_24h": 10000
  }'
```

**Key parameters:** `type` (gainer, loser), `time_period`, `min_liquidity`

---

## 8. Find Newly Launched Tokens

**Goal:** Discover tokens recently added to DEXs.

**Endpoint:** `POST /v1/dex/new/list`

**Steps:**
1. Set time period for how recent (1h, 6h, 24h, 7d)
2. Filter by minimum liquidity
3. Sort by volume to find active ones

**Example:**
```bash
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/new/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "time_period": "24h",
    "sort": "volume_24h",
    "sort_dir": "desc",
    "limit": 30,
    "min_liquidity": 10000
  }'
```

**Key parameters:** `time_period`, `min_liquidity`, `min_volume_24h`

---

## 9. Detect Potential Rug Pulls (Liquidity Removal)

**Goal:** Find tokens with significant liquidity decreases.

**Endpoint:** `GET /v1/dex/liquidity-change/list`

**Steps:**
1. Set `change_type: "decrease"`
2. Use short time period (1h) for early detection
3. Set minimum change percentage

**Example:**
```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/liquidity-change/list?change_type=decrease&time_period=1h&sort=liquidity_change_percent&sort_dir=asc&limit=20&min_change_percent=20" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

**Key parameters:** `change_type`, `time_period`, `min_change_percent`

---

## 10. Get Recent Trades for a Token

**Goal:** See real-time buy/sell activity.

**Endpoint:** `GET /v1/dex/tokens/transactions`

**Steps:**
1. Call with network and contract address
2. Optionally filter by transaction type (buy, sell)

**Example:**
```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/tokens/transactions?network_slug=solana&contract_address=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263&limit=50&tx_type=all" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

**Key parameters:** `tx_type` (buy, sell, all), `limit`

---

## 11. Get Supported Networks and DEXs

**Goal:** Find valid network slugs and see what DEXs are tracked.

**Endpoint:** `GET /v1/dex/platform/list`

**Steps:**
1. Call to get all supported platforms
2. Use returned `slug` values as `network_slug` in other calls
3. Use returned `id` values as `platform_crypto_id`

**Example:**
```bash
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/platform/list?sort=total_liquidity&sort_dir=desc&limit=20" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

**Common network slugs:** `ethereum`, `solana`, `bsc`, `arbitrum`, `base`, `polygon`

---

## 12. Get Meme Coins

**Goal:** List meme tokens trading on DEXs.

**Endpoint:** `POST /v1/dex/meme/list`

**Steps:**
1. Optionally filter by network
2. Sort by volume or trending score
3. Set minimum liquidity

**Example:**
```bash
curl -X POST "https://pro-api.coinmarketcap.com/v1/dex/meme/list" \
  -H "X-CMC_PRO_API_KEY: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "network_slug": "solana",
    "sort": "trending_score",
    "sort_dir": "desc",
    "limit": 20,
    "min_liquidity": 10000
  }'
```

**Key parameters:** `network_slug`, `sort`, `min_liquidity`

---

## Quick Reference

| Goal | Endpoint | Method | Key Parameter |
|------|----------|--------|---------------|
| Token price by address | `/v1/dex/token/price` | GET | `contract_address` |
| Find token by name | `/v1/dex/search` | GET | `keyword` |
| Batch prices | `/v1/dex/token/price/batch` | POST | `tokens` array |
| Security check | `/v1/dex/security/detail` | GET | `contract_address` |
| Token pools | `/v1/dex/token/pools` | GET | `contract_address` |
| Trending tokens | `/v1/dex/tokens/trending/list` | POST | `min_liquidity` |
| Gainers/losers | `/v1/dex/gainer-loser/list` | POST | `type`, `time_period` |
| New tokens | `/v1/dex/new/list` | POST | `time_period` |
| Liquidity changes | `/v1/dex/liquidity-change/list` | GET | `change_type` |
| Recent trades | `/v1/dex/tokens/transactions` | GET | `tx_type` |
| Supported networks | `/v1/dex/platform/list` | GET | - |
| Meme coins | `/v1/dex/meme/list` | POST | `network_slug` |


path: references/security.md
content: # DEX Security API

## Security Detail

**Path:** `GET /v1/dex/security/detail`

**Description:** Get security and risk analysis for a DEX token. Returns contract audit status, risk signals, holder concentration, and potential red flags. Critical for due diligence before trading.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| network_slug | string | Yes* | Network identifier (e.g., ethereum, solana, bsc) |
| platform_crypto_id | integer | Yes* | Alternative to network_slug, use platform's CMC ID |
| contract_address | string | Yes | Token's contract address |

*One of network_slug or platform_crypto_id is required.

### Response Fields

| Field | Description |
|-------|-------------|
| contract_address | Token contract address |
| network_slug | Network identifier |
| overall_risk_score | Aggregate risk score (0-100, higher = riskier) |
| risk_level | Risk category (low, medium, high, critical) |
| contract_verified | Whether contract source is verified |
| contract_audit | Audit information |
| contract_audit.audited | Whether contract has been audited |
| contract_audit.auditor | Auditing firm name |
| contract_audit.audit_date | Date of audit |
| contract_audit.audit_url | Link to audit report |
| ownership | Contract ownership info |
| ownership.owner_address | Owner wallet address |
| ownership.is_renounced | Whether ownership is renounced |
| ownership.can_mint | Whether owner can mint new tokens |
| ownership.can_pause | Whether owner can pause trading |
| ownership.can_blacklist | Whether owner can blacklist addresses |
| ownership.can_modify_fees | Whether owner can change fees |
| liquidity_lock | Liquidity lock information |
| liquidity_lock.is_locked | Whether liquidity is locked |
| liquidity_lock.locked_percent | Percentage of liquidity locked |
| liquidity_lock.unlock_date | When liquidity unlocks |
| liquidity_lock.lock_platform | Locking platform (UniCrypt, PinkLock, etc.) |
| holder_analysis | Token holder distribution |
| holder_analysis.total_holders | Total number of holders |
| holder_analysis.top_10_percent | % held by top 10 wallets |
| holder_analysis.top_100_percent | % held by top 100 wallets |
| holder_analysis.creator_holding_percent | % held by token creator |
| trading_flags | Trading-related red flags |
| trading_flags.has_honeypot_risk | Potential honeypot (can't sell) |
| trading_flags.has_high_tax | High buy/sell tax (>10%) |
| trading_flags.buy_tax_percent | Buy tax percentage |
| trading_flags.sell_tax_percent | Sell tax percentage |
| trading_flags.has_transfer_cooldown | Cooldown between transfers |
| trading_flags.has_max_transaction | Maximum transaction limit |
| trading_flags.has_anti_whale | Anti-whale mechanisms |
| contract_flags | Contract-related red flags |
| contract_flags.is_proxy | Uses proxy contract (upgradeable) |
| contract_flags.has_external_calls | Makes external contract calls |
| contract_flags.has_hidden_owner | Hidden owner functions |
| contract_flags.has_self_destruct | Can self-destruct |
| social_signals | Social presence indicators |
| social_signals.has_website | Whether project has website |
| social_signals.has_social_media | Whether project has socials |
| social_signals.has_whitepaper | Whether whitepaper exists |
| warnings | Array of specific warning messages |
| last_updated | When security data was last updated |

### Risk Level Interpretation

| Level | Score | Meaning |
|-------|-------|---------|
| low | 0-25 | Generally safe, standard risks |
| medium | 26-50 | Some concerns, proceed with caution |
| high | 51-75 | Significant risks, high caution advised |
| critical | 76-100 | Major red flags, avoid or extreme caution |

### Common Warning Types

1. **Honeypot**: Token may not be sellable
2. **High Tax**: Buy/sell taxes exceed normal levels
3. **Concentrated Holdings**: Top wallets hold excessive supply
4. **Unverified Contract**: Source code not verified
5. **Unlocked Liquidity**: LP tokens not locked
6. **Mintable**: Owner can create unlimited tokens
7. **Proxy Contract**: Code can be changed
8. **No Audit**: Contract has not been audited

### Example

```bash
# Check security for a token
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/security/detail?network_slug=ethereum&contract_address=0x6982508145454Ce325dDbE47a25d4ec3d2311933" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

```bash
# Check Solana token security
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/security/detail?network_slug=solana&contract_address=DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

```bash
# Check BSC token security using platform ID
curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/security/detail?platform_crypto_id=1839&contract_address=0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c" \
  -H "X-CMC_PRO_API_KEY: your-api-key"
```

### Security Check Workflow

Before trading any DEX token:

1. Get token address from search or discovery endpoints
2. Call security/detail to get risk analysis
3. Check overall_risk_score and risk_level
4. Review specific flags:
   - `has_honeypot_risk` - Critical, do not buy if true
   - `buy_tax_percent` / `sell_tax_percent` - Ensure acceptable
   - `liquidity_lock.is_locked` - Prefer locked liquidity
   - `ownership.is_renounced` - Safer if renounced
   - `holder_analysis.top_10_percent` - Watch for concentration
5. Review warnings array for specific concerns
6. Make informed decision based on risk tolerance

### Example Response Structure

```json
{
  "status": {
    "timestamp": "2024-01-15T12:00:00.000Z",
    "error_code": 0,
    "error_message": null
  },
  "data": {
    "contract_address": [REDACTED_SECRET],
    "network_slug": "ethereum",
    "overall_risk_score": 35,
    "risk_level": "medium",
    "contract_verified": true,
    "contract_audit": {
      "audited": false,
      "auditor": null,
      "audit_date": null,
      "audit_url": null
    },
    "ownership": {
      "owner_address": "0x0000000000000000000000000000000000000000",
      "is_renounced": true,
      "can_mint": false,
      "can_pause": false,
      "can_blacklist": false,
      "can_modify_fees": false
    },
    "liquidity_lock": {
      "is_locked": true,
      "locked_percent": 85,
      "unlock_date": "2025-06-15T00:00:00.000Z",
      "lock_platform": "UniCrypt"
    },
    "holder_analysis": {
      "total_holders": 150000,
      "top_10_percent": 25.5,
      "top_100_percent": 45.2,
      "creator_holding_percent": 0
    },
    "trading_flags": {
      "has_honeypot_risk": false,
      "has_high_tax": false,
      "buy_tax_percent": 0,
      "sell_tax_percent": 0,
      "has_transfer_cooldown": false,
      "has_max_transaction": false,
      "has_anti_whale": false
    },
    "contract_flags": {
      "is_proxy": false,
      "has_external_calls": false,
      "has_hidden_owner": false,
      "has_self_destruct": false
    },
    "social_signals": {
      "has_website": true,
      "has_social_media": true,
      "has_whitepaper": false
    },
    "warnings": [
      "Contract has not been audited",
      "Top 10 holders control 25% of supply"
    ],
    "last_updated": "2024-01-15T11:30:00.000Z"
  }
}
```


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)