$npx -y skills add agiprolabs/claude-trading-skills --skill dexscreener-apiFree, no-auth multi-chain DEX pair data — prices, volume, liquidity, transactions, and token profiles
| 1 | # DexScreener API — Free Multi-Chain DEX Data |
| 2 | |
| 3 | DexScreener provides DEX pair data across 80+ chains with **no API key required**. Prices, volume, liquidity, transaction counts, and token profiles — all free. Best for quick lookups, cross-chain comparison, and lightweight monitoring. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | No authentication needed. Just make requests: |
| 8 | |
| 9 | ```python |
| 10 | import httpx |
| 11 | |
| 12 | # Search for a token |
| 13 | resp = httpx.get("https://api.dexscreener.com/latest/dex/search", params={"q": "BONK"}) |
| 14 | pairs = resp.json()["pairs"] |
| 15 | for p in pairs[:3]: |
| 16 | print(f"{p['baseToken']['symbol']}/{p['quoteToken']['symbol']} on {p['chainId']}: ${p['priceUsd']}") |
| 17 | ``` |
| 18 | |
| 19 | ```bash |
| 20 | # Or with curl |
| 21 | curl "https://api.dexscreener.com/latest/dex/search?q=BONK" |
| 22 | ``` |
| 23 | |
| 24 | ## Base URL |
| 25 | |
| 26 | `https://api.dexscreener.com` |
| 27 | |
| 28 | No API key, no headers required. Rate limits: ~300 req/min for DEX data endpoints, 60 req/min for profile/boost endpoints. |
| 29 | |
| 30 | ## Core Endpoints |
| 31 | |
| 32 | ### Search Pairs |
| 33 | |
| 34 | ```python |
| 35 | # Search by token name, symbol, or address (returns ~30 pairs across all chains) |
| 36 | GET /latest/dex/search?q=BONK |
| 37 | GET /latest/dex/search?q=So11111111111111111111111111111111111111112 |
| 38 | ``` |
| 39 | |
| 40 | ### Get Pairs by Chain + Pair Address |
| 41 | |
| 42 | ```python |
| 43 | # Single pair |
| 44 | GET /latest/dex/pairs/solana/PAIR_ADDRESS |
| 45 | |
| 46 | # Multiple pairs (comma-separated) |
| 47 | GET /latest/dex/pairs/solana/PAIR1,PAIR2,PAIR3 |
| 48 | ``` |
| 49 | |
| 50 | ### Get Pairs by Token Address |
| 51 | |
| 52 | ```python |
| 53 | # All pairs containing this token across all chains |
| 54 | GET /latest/dex/tokens/TOKEN_MINT_ADDRESS |
| 55 | |
| 56 | # Chain-specific (v1) |
| 57 | GET /token-pairs/v1/solana/TOKEN_MINT |
| 58 | |
| 59 | # Multiple tokens on one chain (v1) |
| 60 | GET /tokens/v1/solana/TOKEN1,TOKEN2,TOKEN3 |
| 61 | ``` |
| 62 | |
| 63 | ### Token Profiles & Boosts |
| 64 | |
| 65 | ```python |
| 66 | # Latest token profiles (60 req/min) |
| 67 | GET /token-profiles/latest/v1 |
| 68 | |
| 69 | # Latest boosted tokens |
| 70 | GET /token-boosts/latest/v1 |
| 71 | |
| 72 | # Top boosted tokens (sorted by total boost amount) |
| 73 | GET /token-boosts/top/v1 |
| 74 | |
| 75 | # Token orders (ads, profile claims) |
| 76 | GET /orders/v1/solana/TOKEN_ADDRESS |
| 77 | |
| 78 | # Community takeovers |
| 79 | GET /community-takeovers/latest/v1 |
| 80 | ``` |
| 81 | |
| 82 | ## Pair Response Schema |
| 83 | |
| 84 | ```json |
| 85 | { |
| 86 | "chainId": "solana", |
| 87 | "dexId": "raydium", |
| 88 | "url": "https://dexscreener.com/solana/PAIR_ADDR", |
| 89 | "pairAddress": "3nMFwZX...", |
| 90 | "labels": ["CLMM"], |
| 91 | "baseToken": { "address": "So11...", "name": "Wrapped SOL", "symbol": "SOL" }, |
| 92 | "quoteToken": { "address": "EPjF...", "name": "USD Coin", "symbol": "USDC" }, |
| 93 | "priceNative": "86.08", |
| 94 | "priceUsd": "86.08", |
| 95 | "txns": { |
| 96 | "m5": { "buys": 25, "sells": 18 }, |
| 97 | "h1": { "buys": 916, "sells": 1282 }, |
| 98 | "h6": { "buys": 11309, "sells": 12661 }, |
| 99 | "h24": { "buys": 27974, "sells": 31475 } |
| 100 | }, |
| 101 | "volume": { "m5": 41680, "h1": 6773038, "h6": 71628073, "h24": 167164493 }, |
| 102 | "priceChange": { "m5": -0.01, "h1": -0.36, "h6": 0.82, "h24": 0.25 }, |
| 103 | "liquidity": { "usd": 28168478, "base": 232348, "quote": 8167805 }, |
| 104 | "fdv": 8171740, |
| 105 | "marketCap": 8171740, |
| 106 | "pairCreatedAt": 1688106058000, |
| 107 | "info": { |
| 108 | "imageUrl": "https://cdn.dexscreener.com/...", |
| 109 | "websites": [{ "url": "https://...", "label": "Website" }], |
| 110 | "socials": [{ "url": "https://x.com/...", "type": "twitter" }] |
| 111 | } |
| 112 | } |
| 113 | ``` |
| 114 | |
| 115 | **Key notes:** |
| 116 | - `priceNative` and `priceUsd` are **strings** (preserves precision) |
| 117 | - `pairCreatedAt` is **milliseconds** (divide by 1000 for unix timestamp) |
| 118 | - `labels`: `"CLMM"` (concentrated), `"DLMM"` (dynamic), `"wp"` (whirlpool) |
| 119 | - `info` is optional — only present if the token profile has been claimed |
| 120 | - `fdv`/`marketCap` may be absent for tokens without supply data |
| 121 | |
| 122 | ## Common Patterns |
| 123 | |
| 124 | ### Quick Token Lookup |
| 125 | |
| 126 | ```python |
| 127 | def lookup_token(address: str) -> dict | None: |
| 128 | """Get the best pair for a token by liquidity.""" |
| 129 | resp = httpx.get(f"https://api.dexscreener.com/latest/dex/tokens/{address}") |
| 130 | pairs = resp.json().get("pairs", []) |
| 131 | if not pairs: |
| 132 | return None |
| 133 | # Sort by liquidity (highest first) |
| 134 | pairs.sort(key=lambda p: p.get("liquidity", {}).get("usd", 0), reverse=True) |
| 135 | return pairs[0] |
| 136 | ``` |
| 137 | |
| 138 | ### Cross-Chain Price Check |
| 139 | |
| 140 | ```python |
| 141 | def find_best_price(symbol: str) -> list[dict]: |
| 142 | """Find a token across all chains and compare prices.""" |
| 143 | resp = httpx.get("https://api.dexscreener.com/latest/dex/search", params={"q": symbol}) |
| 144 | pairs = resp.json().get("pairs", []) |
| 145 | results = [] |
| 146 | for p in pairs: |
| 147 | if p["baseToken"]["symbol"].upper() == symbol.upper(): |
| 148 | results.append({ |
| 149 | "chain": p["chainId"], |
| 150 | "dex": p["dexId"], |
| 151 | "price": float(p.get("priceUsd", 0)), |
| 152 | "liquidity": p.get("liquidity", {}).get("usd", 0), |
| 153 | "volume_24h": p.get("volume", {}).get("h24", 0), |
| 154 | }) |
| 155 | return sorted(results, key=lambda x: x["liquidity"], reverse=True) |
| 156 | ``` |
| 157 | |
| 158 | ### Monitor New Tokens via Boosts |
| 159 | |
| 160 | ```python |
| 161 | def get_newly_boosted() -> list[dict]: |
| 162 | """Get tokens that were recently boosted (paid promotion).""" |
| 163 | resp = httpx.get("https://api.dexscreen |