Skip to main content

Base URL

All API requests are made to:
https://api.entityml.com/api/v1
Primary historical data endpoints:
  • GET /polymarket/market/data, GET /polymarket/market/data/range, GET /polymarket/market/orderbook-summary, GET /polymarket/market/list, and GET /polymarket/market/date-range for Polymarket
  • GET /kalshi/market/data, GET /kalshi/market/data/range, GET /kalshi/market/orderbook-summary, GET /kalshi/market/list, and GET /kalshi/market/date-range for Kalshi
  • GET /lookup/slug for resolving a Polymarket slug into one or more condition IDs
  • /keys, /subscriptions, /usage, /user/{user_id}/requests/*, and /stats/* for key management, billing, and usage analytics
  • GET /health for an unauthenticated service health check
  • GET /monitoring/status for infrastructure status used by the public status page
Legacy aliases remain available for existing integrations:
  • GET /market/data as an alias of GET /polymarket/market/data
  • GET /market/data/range as an alias of GET /polymarket/market/data/range
  • GET /market/orderbook-summary as an alias of GET /polymarket/market/orderbook-summary
  • GET /polymarket/lookup/slug as an alias of GET /lookup/slug

Preferred clients

Use the official SDK or CLI for most integrations. They handle base URL conventions, auth headers, and common parameter patterns for you.
python3 -m pip install --upgrade entityml

Authentication

Historical market endpoints require API key authentication via a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Exceptions:
  • GET /health does not require authentication
  • GET /lookup/slug does not require authentication
  • API key management endpoints under /keys do not use Bearer auth; they use the documented user_id and key_id parameters instead
You can create API keys from your Dashboard. See Getting Started for the basic flow. Raw HTTP examples are included throughout the reference, but SDK/CLI examples are the preferred path.

Request format

  • All requests use standard query parameters or path parameters.
  • All responses return JSON.
  • Dates are formatted as YYYY-MM-DD and interpreted in UTC.
  • Polymarket condition_id values are accepted with or without the 0x prefix and are normalized in responses.
  • Kalshi ticker and prefix values are normalized to uppercase.
  • Range endpoints accept Unix seconds or milliseconds and use inclusive start_timestamp and end_timestamp bounds.
  • Date-scoped endpoints use offset pagination and return offset, limit, total_count, and has_more.
  • Range endpoints use cursor pagination and return limit, has_more, and next_cursor.
  • Polymarket orderbook summaries require asset_id because each condition can contain multiple outcome token books.
  • You can find Polymarket asset_id values by reading a small raw data page and collecting the unique asset_id fields.
  • Orderbook summary buckets include close values plus OHLC candles for best_bid, best_ask, mid_price, and spread.
  • Orderbook summary endpoints accept either a UTC date or inclusive start_timestamp / end_timestamp bounds. Choose the bucket size with resolution.

Availability and coverage

Storage coverage is market-specific. The most reliable way to discover availability is to call the corresponding date-range endpoint first.
  • Orderbook data exists for a subset of markets from 2025-09-01 on Polymarket and 2026-02-17 for Kalshi, but coverage is not continuous.
  • Broad Polymarket crypto-related market coverage begins on 2026-02-04. Broad Kalshi crypto-related market coverage begins on 2026-02-25.
  • Broad all-market capture begins on 2026-04-02 for Polymarket and 2026-03-31 for Kalshi, with known Kalshi parser and May 2026 storage-gap exceptions.
  • GET /polymarket/market/date-range tells you which Polymarket UTC dates are present for a condition ID.
  • GET /kalshi/market/date-range tells you which Kalshi UTC dates are present for a ticker.
  • GET /polymarket/market/data currently rejects dates earlier than 2026-02-08, even if older backfilled Polymarket dates exist in storage for some markets.
  • See Data Quality for the Kalshi March 31-April 24 parser issue, the Kalshi May 4-May 11 storage ingestion gap, and the Polymarket April gap notes.

Rate limits

Billable historical market endpoints may return 429 Too Many Requests when a plan usage limit is reached. See Error Responses for the actual payload shape.