--- name: dexscreener-token description: Look up a token's live market data on DexScreener by chain and contract address - price in USD, price change over 5m/1h/6h/24h, 24h volume, buys and sells, liquidity, market cap, FDV and the most liquid trading pair. Use when the user asks for a token's price, chart stats or liquidity. --- # Token market check Read-only, free, no API key. Works for any chain DexScreener tracks. ## Run ```bash node scripts/token.mjs node scripts/token.mjs solana JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN ``` Chain ids are DexScreener's: `solana`, `base`, `ethereum`, `bsc`, `arbitrum`, ... ## Output JSON on stdout: `{ chainId, address, symbol, name, priceUsd, change: { m5, h1, h6, h24 }, volume24hUsd, txns24h: { buys, sells }, liquidityUsd, marketCapUsd, fdvUsd, pairCount, bestPair: { dexId, pairAddress, quoteSymbol, url, createdAt } }`. If DexScreener has no pair for the token the script exits with code 1 and prints `{ "error": "No trading pairs found ..." }`. Say that plainly to the user. ## Notes for the agent - The numbers come from the single most liquid pair; `pairCount` says how many pairs exist. - Low liquidity (under a few thousand USD) means quoted prices move a lot on small trades.