Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/bullish-exchange/api-docs/llms.txt

Use this file to discover all available pages before exploring further.

Bullish Exchange provides four unauthenticated WebSocket streams for real-time market data. No authentication is required to connect — simply open a connection to the relevant endpoint and subscribe to the topics you need. All streams are accessible at the base URL wss://api.exchange.bullish.com/trading-api/v1/.
Unauthenticated WebSocket connections are subject to a limit of 100 open connections per IP address. New connection requests are rejected once this limit is reached.

Available Streams

Multi-OrderBook WebSocket

Route: /trading-api/v1/market-data/orderbookSubscribe to L1 and L2 order book updates for multiple markets simultaneously over a single connection. This stream also provides a heartbeat topic that sends a heartbeat every ~30 seconds as an indicator of platform health — see the heartbeat overview for details.The publishedAtTimestamp field in each update denotes the time the message was broadcast to connected WebSocket clients.

Subscription Parameters

ParameterTypeDescription
topicStringl1Orderbook — L1 order book
l2Orderbook — L2 order book
heartbeat — heartbeat updates
symbolStringMarket symbol (e.g. BTCUSD)

Subscription Messages

{
  "jsonrpc": "2.0",
  "type": "command",
  "method": "subscribe",
  "params": {
    "topic": "l1Orderbook",
    "symbol": "BTCUSD"
  },
  "id": "1611082473000"
}

Response Examples

L1 Update Response
FieldTypeDescription
sequenceNumberStringIncrementing unique unsigned integer identifying a state of the L1 order book
symbolStringMarket symbol
timestampStringTime the update was created by the engine
datetimeStringISO 8601 time the update was created by the engine
bidArrayNested array [price, quantity] of the highest bid
askArrayNested array [price, quantity] of the lowest ask
{
  "type": "update",
  "dataType": "V1TALevel1",
  "data": {
    "symbol": "BTCUSD",
    "bid": ["5199.5000", "61.95995262"],
    "ask": ["5199.6000", "96.59626782"],
    "sequenceNumber": "8",
    "datetime": "2020-06-29T06:28:55.500Z",
    "timestamp": "1593412135500"
  }
}
L2 Snapshot Response
FieldTypeDescription
symbolStringMarket symbol
bidsArrayArray of up to 200 elements — even indices are prices, odd indices are absolute quantities
asksArrayArray of up to 200 elements — even indices are prices, odd indices are absolute quantities
sequenceNumberRangeArrayTwo-element array [lowerBound, upperBound] of sequence numbers; equal for initial snapshot
datetimeStringISO 8601 time the update was created by the engine
timestampStringEpoch millisecond time the update was created
publishedAtTimestampStringTime the update was broadcast to connected WebSocket clients
{
  "type": "snapshot",
  "dataType": "V1TALevel2",
  "data": {
    "symbol": "BTCUSDC",
    "bids": [
      "5199.5000", "110.92467647",
      "5199.4000", "20.92470365",
      "5199.3000", "0.92473034"
    ],
    "asks": [
      "5199.6000", "96.37848193",
      "5199.7000", "0.92465082",
      "5199.8000", "11.04464563"
    ],
    "sequenceNumberRange": [1370055970, 1370055970],
    "datetime": "2025-02-14T07:15:33.797Z",
    "timestamp": "1739517333797",
    "publishedAtTimestamp": "1739517333798"
  }
}
See the multi-orderbook Python example for a complete working script.

Build docs developers (and LLMs) love