# TrendlineLabs API - [TrendlineLabs API](https://platform.trendlinelabs.ai/index.md): Prediction-market data from every venue, one API: REST for reads and history, a WebSocket stream for live books and trades. - [Getting started](https://platform.trendlinelabs.ai/guides/getting-started.md) - [Authentication](https://platform.trendlinelabs.ai/guides/authentication.md) - [Rate limits](https://platform.trendlinelabs.ai/guides/rate-limits.md) - [Errors](https://platform.trendlinelabs.ai/guides/errors.md) - [Pagination](https://platform.trendlinelabs.ai/guides/pagination.md) - [Freshness](https://platform.trendlinelabs.ai/guides/freshness.md) - [Finding markets](https://platform.trendlinelabs.ai/guides/finding-markets.md) - [Venues](https://platform.trendlinelabs.ai/guides/venues.md) - [Versioning](https://platform.trendlinelabs.ai/guides/versioning.md) - [List active events](https://platform.trendlinelabs.ai/api-reference/events/list-active-events.md): Active cross-venue events in a stable id order, paged with next_cursor (keyset; a cursor binds the filters it was minted under). Liveness: every 200 carries universe_last_seen_at and universe_age_s. An event that becomes active or resolves mid-walk may or may not appear; an event whose id is longer… - [Get one event with its markets](https://platform.trendlinelabs.ai/api-reference/events/get-one-event-with-its-markets.md): One event with its markets; 404 for an unknown id, 503 when event data is unavailable. - [Search events by title](https://platform.trendlinelabs.ai/api-reference/events/search-events-by-title.md): Title search over the published corpus; 503 when no corpus is readable or it is older than its bound. - [Get the calling key](https://platform.trendlinelabs.ai/api-reference/your-key/get-the-calling-key.md): The calling key: id, name, scopes, tier, limit and expiry — never the secret. Needs a valid key and no scope. - [Get a market's price history bars](https://platform.trendlinelabs.ai/api-reference/markets/get-a-markets-price-history-bars.md): Price history bars at 1m to 1d for a stated window: start and end in unix milliseconds, inclusive, spanning fewer than 1000 bars. OHLC in 0..1, volume_usd null where the venue has no trade tape, basis per venue. Liveness: as_of_ms and cached; last_bar_ts_ms is information, not a liveness signal (a q… - [Get a market's order book on one venue](https://platform.trendlinelabs.ai/api-reference/markets/get-a-markets-order-book-on-one-venue.md): A market's live L2 book on one venue: YES and NO ladders at most `depth` levels a side, prices 0..1, sizes in contracts. NO is the venue's own NO book when live (no_source book), else derived as 1 - YES (no_source derived; approximate on Polymarket, whose YES and NO are two real books). Liveness: ts… - [Get a market's newest trades](https://platform.trendlinelabs.ai/api-reference/markets/get-a-markets-newest-trades.md): The newest trades on a Kalshi, Polymarket or Limitless leg, newest first, each exactly ts_ms, outcome and notional_usd (a finite USD amount >= 0 with no upper cap: a large trade is real). Liveness: tape_ts_ms, newest_trade_ts_ms and as_of_ms; the tape is written only on a trade, so a quiet live mark… - [List live cross-venue opportunities](https://platform.trendlinelabs.ai/api-reference/opportunities/list-live-cross-venue-opportunities.md): Live cross-venue opportunities with the feed's age; 503 when the feed is unreadable, never published or stale. - [Get current prices for a set of markets](https://platform.trendlinelabs.ai/api-reference/prices/get-current-prices-for-a-set-of-markets.md): Current per-venue prices for up to 50 markets, each leg with its source and age, and whether the closed-leg gate ran. - [WebSocket stream](https://platform.trendlinelabs.ai/stream/overview.md) - [Changelog](https://platform.trendlinelabs.ai/changelog.md) ## OpenAPI Specs - [openapi](/openapi.json) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.