← Chart

Developers

The same data and tools as the app, over HTTP: market data, your alerts and your paper trading account. Use it from scripts, spreadsheets, bots or your own apps. Times are UTC epoch milliseconds, and instrument ids are venue:symbol (for example hyperliquid:BTC).

Base URL: . The full description is OpenAPI 3.1, for code generators and tools like Postman.

Keys

Every request needs an API key, market data included; alerts and paper trading act as you. Make one on the Account page and send it as x-api-key or Authorization: Bearer. A key only reads unless you let it change things when you make it: then it can create and change alerts and paper orders, and its changes count against an hourly allowance. No key reaches your account’s settings, billing or admin. Keep it like a password, and delete it there if it leaks.

Each address can make 600 requests a minute; with a valid key, your plan’s limit applies instead, and a Strategy Lab run or a bulk download counts as 10. GET /v1/me says what your key may do and how much of your plan is used. Answers carry RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset, so a bot can pace itself. Over a limit, the answer is 429 with Retry-After in seconds. Send an Idempotency-Key with a new alert or order: a retry with the same key gets the first answer instead of a second one (for an hour). Errors come as { "error": "…", "code": "…" } with a 4xx status: a request without a key gets 401 api_key_required, and a data source that is throttling gets 503 upstream_busy with retryAfter in seconds.

Guides, with examples in Python and the limits in full: the API, limits and rate limits, live data and bulk downloads.

Try it

curl -H "x-api-key: $OPENTAPEFOLIO_API_KEY" "/v1/bars?instrumentId=hyperliquid:BTC&resolution=1h&limit=3"

curl -H "x-api-key: $OPENTAPEFOLIO_API_KEY" "/v1/alerts"

From TypeScript, with the typed client:

import { createClient } from '@opentapefolio/sdk';

const api = createClient({ baseUrl: '', apiKey: process.env.OPENTAPEFOLIO_API_KEY });
const bars = await api.bars({ instrumentId: 'hyperliquid:BTC', resolution: '1h', limit: 100 });
await api.createAlert({
  instrumentId: 'hyperliquid:BTC',
  resolution: '1h',
  condition: { left: { kind: 'price' }, operator: 'crossing-up', right: { kind: 'value', value: 100000 } },
  frequency: 'once',
  message: 'BTC above 100k',
  expiresAt: null,
  webhookUrl: null,
});

The client retries what’s safe to repeat (honouring Retry-After), sends an Idempotency-Key with each create, pages a date range with barsRange, and reconnects its live stream. It isn’t on npm yet; until it is, any HTTP client works with the description above (and /v1/asyncapi.json for the stream). AI assistants can use the same tools through the MCP server.

Live data

Connect a WebSocket to /v1/stream and send a message per subscription: the current bar as it forms, every trade, or a symbol’s price and 24-hour stats. Each message names an id you choose, and what arrives carries it back. With an API key (in the x-api-key header, from a server) it also streams your alert notices.

→ { "op": "subscribe-bars", "id": "b1", "instrumentId": "hyperliquid:BTC", "resolution": "1m" }
← { "type": "bar", "id": "b1", "bar": { "time": 1791262800000, "open": 85620.1, … } }
→ { "op": "subscribe-trades", "id": "t1", "instrumentId": "hyperliquid:BTC" }
→ { "op": "unsubscribe", "id": "b1" }
const stream = api.stream();
stream.bars('hyperliquid:BTC', '1m', (bar) => console.log(bar.close));
stream.trades('hyperliquid:BTC', (trades) => console.log(trades.length, 'trades'));

Bulk data as Parquet

Add format=parquet to /v1/bars or /v1/trades for an Apache Parquet file instead of JSON, ready for pandas, Polars, DuckDB or Spark. Trades go back 30 days, a million to a file. Paused for now: downloads open as each data source’s licence allows them.

curl -H "x-api-key: $OPENTAPEFOLIO_API_KEY" -o btc-trades.parquet "/v1/trades?instrumentId=hyperliquid:BTC&from=1791172800000&to=1791259200000&limit=1000000&format=parquet"

# Python
import pandas as pd
trades = pd.read_parquet('btc-trades.parquet')

Endpoints

Loading…