Skip to main content
Live market data over WebSocket: candles, volume footprint profiles and order books. Subscription parameters go in the query string of the connection URL, and the server pushes JSON text frames until you disconnect. The client sends nothing after the handshake.
Base URL: wss://public-api.takeprofit.com/api/v1/marketdata. History is a separate protocol — see the REST API.

Streams

Candles

The latest candle, then live updates of the forming one.

Volume footprint

An optional historical snapshot, then complete profile replacements.

Order book

One snapshot of the top levels per side, then incremental updates.

The handshake

The API key goes in the x-api-key header of the upgrade request, exactly as in REST. One header value is required; duplicate or comma-combined values are rejected. A failed handshake answers with a regular HTTP response and a JSON body: Unknown query parameters and repeated scalar parameters are rejected, and historical range parameters such as from, to and limit are not accepted: use REST for history.

Parameters the streams share

Frames

Every frame carries a type and a meta echo of the normalized subscription parameters. Order book levels are keyed by numeric price, so "1.5" and "1.50" are the same level. An upstream resync is absorbed into a regular update, so you never see a second snapshot. Error frames carry a stable code: canceled, invalid_argument, unauthenticated, permission_denied, not_found, conflict, resource_exhausted, deadline_exceeded, unimplemented, unavailable or upstream_error.

Credits

A subscription is charged once when upstream data confirms it is active, not per frame. A stream that dies on a terminal upstream error before that is not charged. The handshake needs the full subscription price in remaining credits, otherwise it is rejected with 429.