Getting started
API at a glance
curl "https://api.lane.markets/v1/quote?in=HYPE&out=0x7D29d8047B905000459c0E80c34a26CeedcB47b2&amount=1000000000000000000&recipient=0xYourAddress"One call returns the best route, the exact expected output, minOut, and a simulated transaction to sign.
Base URL and versioning
| Base URL | https://api.lane.markets/v1 (local: http://localhost:3000/v1) |
| Live testnet instance | https://api-production-7070.up.railway.app/v1 (Railway; /quote and orders answer 503 until the contracts are deployed) |
| Version | v1, in the path. Breaking changes go to /v2; /v1 keeps working |
| Unversioned paths | /quote, /tokens, … are aliases of /v1/.... Integrations should use /v1 |
| Spec | openapi.yaml, also served live at GET /v1/openapi.yaml |
| Format | JSON over HTTPS GET; WebSocket for live prices |
| CORS | Configurable (CORS_ORIGINS), GET only; x-request-id and retry-after are exposed to browsers |
Endpoints
| Endpoint | What it does | Needs |
|---|---|---|
GET /v1/quote | Best route + exact quote + simulated swap tx | Executor deployed |
GET /v1/price | Spot USDC price of up to 100 tokens | — |
GET /v1/tokens | Searchable token list with trust info | — |
GET /v1/tokens/{address} | One token: metadata, price, honeypot/tax probe | — |
GET /v1/orders | Open limit/DCA orders | OrderBook deployed |
GET /v1/orders/create | Simulated tx to place a limit order or DCA | OrderBook deployed |
GET /v1/orders/cancel | Tx to cancel an order | OrderBook deployed |
GET /v1/portfolio | Balances valued in USD | — |
GET /v1/history | Swaps and order events of an address | Executor deployed |
WS /v1/ws/prices | Live price pushes | — |
GET /v1/pools, /v1/pools/stats, /v1/pools/{id}, /chart, /activity | Pools page and pool detail | — |
GET /v1/activity, WS /v1/ws/activity | Live swaps, adds, removes | — |
GET /v1/candles | Price chart (OHLC) | — |
GET /v1/stats | Analytics and landing numbers | — |
GET /v1/portfolio/pnl, /v1/portfolio/transfers | PnL, positions, transfers | — |
GET /v1/notifications, WS /v1/ws/account | Order notifications | — |
GET /v1/keys/challenge, POST /v1/keys, GET/DELETE /v1/keys/me | Self-serve API keys | — |
GET /v1/share/... | Share cards (PNG) and share pages | — |
GET /v1/health | Readiness, last block, pool counts | — |
GET /v1/config | Chain id, public RPC, explorer | — |
GET /v1/openapi.yaml | OpenAPI 3.1 spec | — |
Full details: API reference.
Capability matrix
| Capability | Public (no key) | Partner key |
|---|---|---|
| Quotes and swap transactions | ✅ | ✅ |
| Prices, tokens, token probe | ✅ | ✅ |
| Limit orders and DCA | ✅ | ✅ |
| Portfolio and history | ✅ | ✅ |
| Live prices (WebSocket) | ✅ | ✅ |
| Rate limit | RATE_LIMIT_PER_MIN per IP (default 120/min) | Per key (default 10× the public limit) |
| Rate-limit bucket | Client IP | The key, from any IP |
Every endpoint is open on the public tier; a key only changes the rate limit. See Access.
Conventions
| Topic | Rule |
|---|---|
| Amounts | Decimal strings in base units (wei). 1 HYPE = "1000000000000000000", 1 USDC = "1000000" |
| Native HYPE | HYPE (case-insensitive). Also accepted: native, 0x0000…0000, 0xEeee…EEeE |
| Addresses | Any case on input; checksummed on output |
| Basis points | bps, 1 bp = 0.01%. slippageBps=50 = 0.5% |
| Pool fee | In hundredths of a bp, Uniswap style: 3000 = 0.3%, 10000 = 1% |
| Prices | JSON numbers, USDC per whole token |
| Errors | { "error": "...", "requestId": "..." } with a 4xx/5xx status |
| Request id | Every response has x-request-id. Send your own ([A-Za-z0-9_.-]{1,64}) to correlate logs |
| Block | block in a quote = the indexer's last processed block when the quote was made |
Network
| Testnet | Mainnet | |
|---|---|---|
| Chain | Elysium testnet | Elysium |
| Chain id | 99801 | 99901 |
| Gas token | HYPE | HYPE |
| Config file | api/networks/elysium-testnet.json | api/networks/elysium-mainnet.json (filled on launch day) |
One API instance serves one network (NETWORK env). GET /v1/config tells clients which.
Next: Access and rate limits