# SwapHunt x402 API > Crypto market context for trading agents: live prices, funding, volatility and market regime from Hyperliquid perpetuals, the SwapHunt Alt Season Index, Fear & Greed, dip, breakout and FOMO checks, paid per request with x402 in USDC. ## How to call the API - Pay per request with x402: call any endpoint on https://x402.swaphunt.dev without payment, read the exact price from the 402 PAYMENT-REQUIRED header, then repeat the request with a PAYMENT-SIGNATURE header (x402 v2, USDC on Base; Polygon, Arbitrum and Solana are also accepted). No account and no API key. - MCP: the stdio server `uvx swaphunt-mcp` ([PyPI](https://pypi.org/project/swaphunt-mcp/); MCP Registry name io.github.swaphunt/swaphunt-mcp) pays with x402 from your own wallet and is a dry run until X402_PAY=1. Setup for each client: [SwapHunt for AI agents](https://swaphunt.dev/agents). ## Machine-readable - [OpenAPI](https://x402.swaphunt.dev/openapi.json): every endpoint with parameters and response schemas - [/.well-known/x402](https://x402.swaphunt.dev/.well-known/x402): every paid endpoint with price, network, asset and payTo - [Agent card](https://x402.swaphunt.dev/.well-known/agent-card.json) and [mcp.json](https://x402.swaphunt.dev/.well-known/mcp.json) - [API docs and prices](https://swaphunt.dev/api) ## Endpoints Invalid parameter values get 422 before any payment; a missing optional parameter uses its default. - `GET /v1/market/fear-greed` ($0.005): Use when the user asks how fearful or greedy the crypto market is today. Returns the Crypto Fear & Greed Index (0-100), its label (Extreme Fear to Extreme Greed) and the attribution to show with it; daily. For trend use /v1/market/fear-greed/compare. Ex: no parameters - `GET /v1/market/fear-greed/compare` ($0.002): Use when the user asks whether crypto sentiment is improving or worsening. Returns Fear & Greed now with its label, the values yesterday, 7 and 30 days ago, the changes (change_1d, change_7d, change_30d) and the attribution. Ex: no parameters - `GET /v1/market/fear-greed/history` ($0.005): Use when the user wants the Fear & Greed time series to chart, backtest or compare with price. Returns daily value and classification for the last `days` (max 365) or start_date to end_date (YYYY-MM-DD), with attribution. Raw series, no summary. Ex: days=90. Parameters: days (default 30), start_date, end_date - `GET /v1/market/halving` ($0.001): Use when the user asks when the next Bitcoin or Litecoin halving is. Returns current and halving block, blocks and days remaining, estimated date, progress % and block reward before and after. Estimated from block time, not an exact timestamp. Ex: symbol=LTC. Parameters: symbol (default BTC) - `GET /v1/context/weekend-liquidity` ($0.005): Use when the user asks whether crypto liquidity is thin right now, e.g. on a weekend or in off-hours. Returns is_weekend, is_low_liquidity, the session, a 0-100 liquidity score and a verdict, from the UTC clock (no market data). Ex: no parameters - `GET /v1/context/session` ($0.005): Use when the user asks which trading session is active or how volatile this time of day usually is. Returns the session (Asian, London, New York, Off-hours), overlap, minutes left, the next session and its typical volatility multiplier, from the UTC clock. Ex: no parameters - `GET /v1/tools/price` ($0.005): Use when the user asks the current price of one coin. Returns the mark price (or order-book mid with price_type=mid) on Hyperliquid perpetuals in USDC, 24h change % and 24h notional volume; high/low are null. For several coins use /v1/tools/price/multi. Ex: symbol=ETH. Parameters: symbol (default BTC), price_type (mark|mid; default mark) - `GET /v1/tools/price/multi` ($0.003): Use when the user asks the prices of several coins or a portfolio. Returns, keyed by symbol (max 20), the mark or mid price on Hyperliquid perpetuals in USDC, 24h change % and 24h notional volume; unknown symbols are skipped. Works with one symbol too. Ex: symbols=BTC,ETH,SOL. Parameters: symbols (default BTC,ETH), price_type (mark|mid; default mark) - `GET /v1/tools/price/supported` ($0.001): Use when the user asks which coins are supported, or a symbol is uncertain (Hyperliquid names, e.g. kPEPE = 1,000 PEPE). Returns every active Hyperliquid perpetuals market, the count and `covered`: the top 50 by 30-day volume that analysis routes accept. Ex: no parameters - `GET /v1/regime/current` ($0.010): Use when the user asks whether the crypto market (BTC) is bullish, bearish or neutral. Returns the regime from the BTC price on Hyperliquid perpetuals vs its 20-period EMA on 12h candles, with EMA, distance and slope; updates 00:00 and 12:00 UTC. BTC only. Ex: no parameters - `GET /v1/regime/chop-detection` ($0.003): Use when the user asks whether a coin is trending or stuck in a range. Returns is_chop, chop level, ADX, +DI/-DI, trend direction and a verdict on 1h, 4h or 1d candles of Hyperliquid perpetuals. Any active market. Ex: symbol=SOL&timeframe=4h. Parameters: symbol (default BTC), timeframe (1h|4h|1d; default 4h) - `GET /v1/vol/realized` ($0.010): Use when the user asks how volatile a coin has been. Returns daily and annualized realized volatility % over 7d, 14d or 30d of daily candles on Hyperliquid perpetuals, a low/normal/high/extreme level and today's UTC range vs open. Not implied vol. Ex: symbol=BTC&period=30d. Parameters: symbol (default BTC), period (7d|14d|30d; default 7d) - `GET /v1/vol/silence` ($0.002): Use when the user asks whether a coin is unusually quiet. Returns a 0-1 silence score, level and advice from today's volume vs the period average, volatility and 24h change on Hyperliquid perpetuals (7d, 14d, 30d). For a squeeze use /v1/vol/compression-alert. Ex: symbol=ETH&period=14d. Parameters: symbol (default BTC), period (7d|14d|30d; default 7d) - `GET /v1/vol/compression-alert` ($0.003): Use when the user asks whether a coin is in a volatility squeeze before a breakout. Returns is_squeeze, level (extreme, strong, moderate, none), Bollinger width and its percentile on 1h, 4h or 1d candles of Hyperliquid perpetuals. Setup, not direction. Ex: symbol=BTC&timeframe=1d. Parameters: symbol (default BTC), timeframe (1h|4h|1d; default 4h) - `GET /v1/vol/expected-move` ($0.003): Use when the user asks how far a coin may move, or where to put targets and stops. Returns ATR(14)-based 68% and 95% price ranges in USDC around the current price on Hyperliquid perpetuals for the next 4h, 1d or 1w. A statistical range, not a forecast. Ex: symbol=BTC&period=1w. Parameters: symbol (default BTC), period (4h|1d|1w; default 1d) - `GET /v1/derivatives/funding-rates` ($0.015): Use when the user asks the funding rate of specific coins or whether longs or shorts are crowded. Returns per coin (max 20) hourly funding % on Hyperliquid perpetuals, annualized (x 8760), 7d/30d averages, mark price and a crowding signal; positive = longs pay. Ex: symbols=BTC,ETH,SOL. Parameters: symbols (default BTC,ETH,SOL) - `GET /v1/derivatives/funding-rates/top` ($0.003): Use when the user asks which coins have the most extreme funding right now. Returns the top `limit` (1-50) current hourly funding rates across all Hyperliquid perpetuals, annualized (x 8760), sort=highest (crowded longs) or lowest (crowded shorts). Ex: sort=lowest&limit=10. Parameters: limit (default 10), sort (highest|lowest; default highest) - `GET /v1/derivatives/funding-rates/history` ($0.004): Use when the user asks whether a coin's funding is unusual for it. Returns settled hourly funding on Hyperliquid perpetuals for the last `days` (1-365): average, min/max, annualized (x 8760), share of positive hours and the latest rate's percentile. Ex: symbol=ETH&days=90. Parameters: symbol (default BTC), days (default 90) - `GET /v1/market/alt-season` ($0.003): Use when the user asks if it is alt season. Returns the SwapHunt Alt Season Index (0-100, daily): share of the top 100 Hyperliquid perpetuals by 30-day volume beating BTC over 90 days; 75 or above is alt season, 25 or below is bitcoin season. Ex: no parameters - `GET /v1/market/coin-strength` ($0.015): Use when the user asks if a coin is outperforming or lagging BTC. Returns its return minus BTC's over 24h, 7d or 30d, a rating (very_strong to very_weak) and the ratio. Top 50 Hyperliquid perpetuals by 30-day volume (USDC-margined) only: /v1/tools/price/supported. Ex: symbol=SOL&period=7d. Parameters: symbol (default ETH), period (24h|7d|30d; default 24h) - `GET /v1/market/momentum-rank` ($0.015): Use when the user asks which coins are the biggest gainers or losers. Returns coins ranked by 24h, 7d or 30d return: `limit` (1-20) top and bottom, full list, average. Top 50 Hyperliquid perpetuals by 30-day volume (USDC-margined) only: /v1/tools/price/supported. Ex: period=7d&limit=5. Parameters: period (24h|7d|30d; default 24h), limit (default 10) - `GET /v1/market/correlation` ($0.003): Use when the user asks if a coin just tracks BTC. Returns Pearson correlation (-1 to +1) of returns vs BTC over 7d (1h candles) or 30d (4h); no 24h. With strength label. Top 50 Hyperliquid perpetuals by 30-day volume (USDC-margined) only: /v1/tools/price/supported. Ex: symbol=ETH&period=30d. Parameters: symbol (default ETH), period (7d|30d; default 7d) - `GET /v1/sanity/is-this-a-dip` ($0.003): Use when the user asks if a drop is a real dip or noise. Returns is_dip, drop % from the 14-day high, 14-day ATR %, drop/ATR and a verdict on daily candles. Top 50 Hyperliquid perpetuals by 30-day volume (USDC-margined) only: /v1/tools/price/supported. Ex: symbol=SOL. Parameters: symbol (default BTC) - `GET /v1/sanity/is-this-a-breakout` ($0.003): Use when the user asks if a break of a price level is real or a fakeout. Returns is_confirmed, fakeout odds, verdict from volume and 1h closes past the level (USDC, required). Top 50 Hyperliquid perpetuals by 30-day volume (USDC-margined) only: /v1/tools/price/supported. Ex: symbol=BTC&level=100000. Parameters: symbol (default BTC), level (required), direction (up|down; default up) - `GET /v1/sanity/is-this-support` ($0.003): Use when the user asks if a price level is real support. Returns touches within 0.5% over 90 daily candles, recency, bounce quality, verdict. Level in USDC, required. Top 50 Hyperliquid perpetuals by 30-day volume (USDC-margined) only: /v1/tools/price/supported. Ex: symbol=ETH&level=3000. Parameters: symbol (default BTC), level (required) - `GET /v1/sanity/is-this-oversold` ($0.003): Use when the user asks if a coin is oversold. Returns is_oversold, RSI(14) on 1h, 4h and 1d, a weighted RSI (20/30/50%) and a verdict; not a buy signal alone. Top 50 Hyperliquid perpetuals by 30-day volume (USDC-margined) only: /v1/tools/price/supported. Ex: symbol=BTC. Parameters: symbol (default BTC) - `GET /v1/fomo/how-late-am-i` ($0.003): Use when the user asks if they are too late to buy after a run-up. Returns the move from the 4h swing low in % and ATR, its percentile vs past moves, early/middle/late verdict. Top 50 Hyperliquid perpetuals by 30-day volume (USDC-margined) only: /v1/tools/price/supported. Ex: symbol=SOL. Parameters: symbol (default BTC) - `GET /v1/fomo/pump-age` ($0.003): Use when the user asks if a coin is pumping now and how old the move is. Returns is_pumping, start, duration and size vs the average pump in the last 24h of 15m candles. Top 50 Hyperliquid perpetuals by 30-day volume (USDC-margined) only: /v1/tools/price/supported. Ex: symbol=SOL. Parameters: symbol (default BTC) - `GET /v1/fomo/already-extended` ($0.003): Use when the user asks if price is stretched far from its average. Returns distance from MA20 and MA50, Bollinger position, z-score on 4h candles, is_extended and a verdict. Top 50 Hyperliquid perpetuals by 30-day volume (USDC-margined) only: /v1/tools/price/supported. Ex: symbol=ETH. Parameters: symbol (default BTC) - `GET /v1/fomo/green-candles-streak` ($0.003): Use when the user asks how many green candles in a row a coin has. Returns the streak on 1h, 4h or 1d and how often the next candle was green after such streaks. Top 50 Hyperliquid perpetuals by 30-day volume (USDC-margined) only: /v1/tools/price/supported. Ex: symbol=BTC&interval=1d. Parameters: symbol (default BTC), interval (1h|4h|1d; default 4h) - `GET /v1/pm/fees` ($0.005): Use when the user asks the fee for an order on Kalshi, Polymarket US or polymarket.com. Returns fee in USD and % of trade value, break-even exit after both fees, rates version. contracts = USD / price; polymarket needs category. Ex: platform=polymarket&price=0.4&contracts=250&category=Politics. Parameters: platform (kalshi|polymarket-us|polymarket; default kalshi), price (default 0.5), contracts (default 100), side (buy|sell; default buy), tier, maker (default false), multiplier, category (Crypto|Sports|Economics|Culture|Weather|Other|Combos|Finance|Politics|Mentions|Tech|Geopolitics|Crypto (BTC 5m/15m up/down)|Politics (elections); required if platform=polymarket)