Time SeventeenDocs

Market data

Read markets, order books, trades and candles from Time Seventeen with REST snapshots and WebSocket pushes, and keep a local book in sync.

Snapshots over REST

DataRequest
Markets, terms, touch and last priceGET /v2/markets
Order book (L2) and best bid/offerGET /v2/book/{market} with x-t17-depth: N
Order book by order (MBO)GET /v2/mbo/{market}
Catalog: events, titles, settlement rulesGET https://testnet.timeseventeen.com/api/catalog
24-hour statistics of every marketGET …/api/markets/summary
CandlesGET …/api/markets/{slug}/bars?resolution=1&from=&to=
Recent trades with aggressor sideGET …/api/markets/{slug}/trades?limit=60

Prices in gateway responses are integer ticks (1 tick = $0.000001). The site endpoints (/api/…) return dollars.

Pushes over WebSocket

Subscribe once and receive every change as it is committed:

{"op": "subscribe", "markets": [1, 2], "channels": ["trades", "l2", "bbo"]}

Each push is {"type": "md", "events": [...]} with level, bbo and trade events. Every event carries its market’s public seq.

Keeping a local book

  1. Subscribe first, then request a snapshot: {"op": "book", "market": 1, "depth": 100, "view": "l2"}. The reply carries md_seq.
  2. Apply only events with seq > md_seq. A level event gives the absolute quantity at a price; quantity 0 removes the level.
  3. On reconnect, send resume with the last seq you hold per market. If the server no longer has that history it answers RESNAPSHOT and you start again from step 1.

The order book never crosses: if your local best bid is ever at or above your best ask, you have missed events — re-snapshot.

Full message reference: WebSocket.