This documentation is archived for reference only. These APIs have been replaced by the new WebSocket API. Start new integrations with the new WebSocket API.
Multi Market Data
Multi market data is a public API which allows multiple symbols to be streamed via a single endpoint.
WebSocket Request
wss://api.gemini.com/v1/multimarketdata?symbols=BTCUSD,ETHUSD
URL Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
symbols | Yes | - | Symbols to stream (comma-separated) |
heartbeat | No | false | Set to true for heartbeats every 5 seconds |
top_of_book | No | false | If true, receive top of book only |
bids | No | true | Include bids in change events |
offers | No | true | Include asks in change events |
trades | No | true | Include trade events |
Response
| Field | Type | Description |
|---|---|---|
type | string | heartbeat or update |
socket_sequence | integer | Monotonic increasing sequence number |
Messages of type update also include:
| Field | Type | Description |
|---|---|---|
eventId | integer | Monotonically increasing sequence number |
events | array | Order book changes or trade indications |
timestamp | timestamp | Timestamp in seconds |
timestampms | timestampms | Timestamp in milliseconds |
All elements of events share:
| Field | Type | Description |
|---|---|---|
type | string | trade or change |
symbol | string | Symbol (e.g. BTCUSD, ETHUSD) |
Change Event
| Field | Type | Description |
|---|---|---|
price | decimal | Price of this order book entry |
side | string | bid or ask |
reason | string | place, trade, cancel, or initial |
remaining | decimal | Quantity remaining at this price level |
delta | decimal | Quantity changed |
Trade Event
| Field | Type | Description |
|---|---|---|
price | decimal | Execution price |
amount | decimal | Amount traded |
makerSide | string | bid or ask |
Examples
Code
Trade Event
Code
Last modified on

