TidePerp API
Versioned REST under /v1 and a WebSocket stream at /v1/ws. Decimal strings for every financial value, ISO-8601 UTC timestamps, and provenance on every time-sensitive value. The OpenAPI document is served by the API itself.
Quick start: BTC market data in four requests
1Find the instrument. Search returns markets, protocols and assets; the
idis stable across symbol changes.curl "https://api.tideperp.tech/v1/search?q=BTC&limit=3"2Read the market: current metrics, specification, fee schedule and provenance in one document.
curl "https://api.tideperp.tech/v1/markets/{id}"3Pull history: candles, funding, open interest, trades, liquidity.
curl "https://api.tideperp.tech/v1/markets/{id}/candles?interval=1h&limit=168" curl "https://api.tideperp.tech/v1/markets/{id}/funding?limit=168" curl "https://api.tideperp.tech/v1/markets/{id}/open-interest?bucket=1h&limit=168"4Stream it. Subscribe per channel and instrument; every event carries a sequence per (channel, instrument), its observation time and quality status.
const ws = new WebSocket("wss://api.tideperp.tech/v1/ws"); ws.onopen = () => ws.send(JSON.stringify({ action: "subscribe", channel: "market.ticker", instrument_ids: ["{id}"] })); ws.onmessage = (m) => { const e = JSON.parse(m.data); if (e.type === "event") console.log(e.sequence, e.quality_status, e.data.mark_price); };
Authentication
Public market data needs no credentials. Account features (watchlists, alerts, keys) use the browser session cookie with a CSRF token, or an API key:
curl -H "Authorization: Bearer tp_live_xxxxxxxx_…" "https://api.tideperp.tech/v1/watchlists"- Keys are created at API keys, shown once, stored as a peppered hash, and sent only in the
Authorizationheader (never in a query string). - Scopes:
readfor REST,streamto raise WebSocket subscription limits with anauthmessage. - Keys can expire; revoking is immediate.
Rate limits
| Principal | REST requests / minute | WebSocket subscriptions |
|---|---|---|
| Anonymous (per address) | 60 | 50 per connection |
| Developer plan | 300 | 200 |
| Professional plan | 1,200 | 800 |
Endpoints
WebSocket channels
| Channel | Payload |
|---|---|
| market.ticker | Mark, mid, oracle, funding, open interest and 24h volume per instrument, on every source update. |
| market.trades | Observed trades for the subscribed instruments (demand-driven on the source). |
| market.orderbook | Top-of-book snapshots with up to 20 levels per side. |
| market.funding | Funding observations as they are recorded. |
| market.open_interest | Open interest observations. |
| protocol.metrics | Reserved for venue-level aggregates; no publisher in this version. |
| intelligence.alerts | Detector signals as they are detected. |
| chain.blocks | Indexed Elysium blocks. |
| system.health | Source health transitions. |
Error reference
| Code | Meaning |
|---|---|
| INVALID_PARAMETER | A query, path or body value failed validation; details name the field. |
| MARKET_NOT_FOUND | No instrument with that id or canonical code. |
| VENUE_NOT_FOUND | No venue with that id or code. |
| PROTOCOL_NOT_FOUND | No protocol with that slug. |
| NOT_FOUND | The resource does not exist or is not yours. |
| NON_COMPARABLE_MARKETS | The instruments are not in one comparison group; they cannot be ranked together. |
| INSUFFICIENT_DEPTH | The visible order book cannot fill the requested size; nothing is extrapolated. |
| STALE_MARKET_DATA | The latest snapshot is older than max_snapshot_age_ms; raise it or wait for a fresh book. |
| SOURCE_UNAVAILABLE | An upstream source is down or the platform has no observation yet. |
| RATE_LIMIT_EXCEEDED | Too many requests for this key, session or address; details carry retry_after_ms. |
| UNAUTHORIZED | Missing, invalid, expired or revoked credentials. |
| FORBIDDEN | Authenticated but not allowed: wrong scope, missing CSRF token or missing role. |
| CONFLICT | The request conflicts with existing state (for example a duplicate email). |
| INTERNAL_ERROR | The platform failed; the request_id lets operators find the trace. |
Data methodology
Formulas, detector parameters, quality states and source limits are published at GET /v1/methodology and rendered on the methodology page. Quality status values: LIVE, DELAYED, STALE, ESTIMATED, RECONSTRUCTED, MISSING, UNAVAILABLE, INVALID.
Changelog
- 2026-11-07 · Initial public API: markets, protocols, overview aggregates, compare and funding opportunities, intelligence, chain telemetry, accounts, watchlists, alerts, API keys, methodology; WebSocket stream.
Status
Platform and source health: system status, or GET /v1/health (exempt from rate limits). OpenAPI document: GET /v1/openapi.json.