# Tilt Hyperliquid Data API — full reference Tilt runs its own Hyperliquid node and turns the whole exchange into structured, queryable data: every open position on every perp on every dex (native and HIP-3) with its size, leverage, liquidation price and PnL; every fill and liquidation as it happens, and every one since the index began; every resting stop and take-profit; and derived views such as the liquidation map. Data is typically under a second behind the chain. Every response says exactly how old it is. **Start here** 1. `POST /v1/keys` with any identifier (an email, a name, a project). A key comes back immediately. It is free. 2. Send it as `Authorization: Bearer ` on every other request. 3. `GET /v1/markets` to see what exists, then `GET /v1/markets/BTC/positions` for the whole book. **Conventions** - One envelope: `{ "data": ..., "as_of": { "block", "time", "lag_ms" }, "next": cursor|null }`. - Sides are `long`/`short` on positions and `buy`/`sell` on orders. Never `A`/`B`. - Units live in field names: `size_coin`, `notional_usd`, `price_usd`, `leverage`, `*_pct` (0–100). - Times are ISO 8601 UTC. Blocks are Hyperliquid L1 block numbers. - Every derived number carries a `definition`. - Cursor pagination: pass `next` back as `?cursor=`. - One error shape: `{ "error": { "code", "message" } }`. Unknown or invalid query parameters are a `400`, never ignored. - Limits (free tier): 300 requests per minute and 20,000 per day per key, 3 stream connections, 1,000,000 stream messages a day. Every response carries `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` (seconds) and `X-Daily-Limit`, `X-Daily-Remaining`, `X-Daily-Reset` (seconds to 00:00 UTC). A `429` adds `Retry-After` and its `code` is `rate_limited` (per minute) or `daily_limit`. More is one request away: `POST /v1/limits/request`. A key turned off for abuse gets `403 key_revoked`. **Coverage** is measured, not assumed: `GET /v1/status` reports our positions against the exchange's published open interest every minute, plus latency and the last spot check against the public API. Base URL: https://api.tilt.markets/v1 ## GET / Machine-readable start page (no key needed) No key needed. Returns what this API is, how to get a key, and every endpoint with one example. Agents should call this first. Example: curl -H "Authorization: Bearer $TILT_KEY" https://api.tilt.markets/v1 ## POST /keys Create an API key (no key needed) Free, instant, no verification. Any identifier works; it is only used so you can find your own keys later. Keep the key private. Example: curl -X POST https://api.tilt.markets/v1/keys -H 'Content-Type: application/json' -d '{"identifier":"you@example.com"}' ## POST /limits/request Ask for higher limits (no key needed) Every key starts on the free tier: 300 requests a minute, 20,000 a day, 3 stream connections with 100 subscriptions each, 1,000,000 stream messages a day. Hit one and the `429` says which. To go past it, send your key, an email and what you are building. A person reads it within minutes and replies to the email, usually within a day, with limits raised on the same key. No form, no account, no card. Example: curl -X POST https://api.tilt.markets/v1/limits/request -H 'Content-Type: application/json' -d '{"identifier":"you@example.com"}' ## GET /markets Every market Every perp on the native dex and on HIP-3 dexes, with live mark, funding, open interest and volume, followed by every spot pair with `type: spot` (id such as `@107`, symbol such as `HYPE/USDC`, supply and volume). Spot pairs have fills and order events under their id; balances are per wallet. Filter with `type`. Example: curl -H "Authorization: Bearer $TILT_KEY" https://api.tilt.markets/v1/markets Parameters: - type (query, string: perp|spot) — Only perps, or only spot pairs. Default is both. ## GET /tokens Every spot token Name, decimals, whether it is a canonical Hyperliquid token, and its HyperEVM contract when it has one. Spot pair ids map to tokens through `/markets?type=spot`. Example: curl -H "Authorization: Bearer $TILT_KEY" https://api.tilt.markets/v1/tokens ## GET /markets/{market} One market, live Mark and mid price, hourly funding, open interest, 24h volume, max leverage and size decimals for one perp; supply and volume for one spot pair. Spot pairs resolve by id (`@107`) or symbol (`HYPE/USDC`). Example: curl -H "Authorization: Bearer $TILT_KEY" https://api.tilt.markets/v1/markets/BTC Parameters: - market (path, required, string) — Market id as listed by `/markets`, e.g. `BTC`, a HIP-3 id like `xyz:XYZ100`, or a spot id like `@107` (a spot symbol like `HYPE/USDC` is accepted too). ## GET /markets/{market}/positions Every open position in a market The whole book for this market, one row per wallet, each within a second of its last fill. Sorted by notional descending by default. Use filters to pull the slice you need: `side=long&max_distance_to_liquidation_pct=5` is "longs that get liquidated on a 5% drop". Add `at=