Gemini Crypto Exchange Logo
Version 2

Level 2 Data

Subscribe

Field NameTypeValues
typestringsubscribe
subscriptionsarray
-- namestringl2
-- symbolsarray["BTCUSD", "ETHBTC", ...]

Level 2 Update Response

Field NameTypeValues
typestringl2_updates
symbolstringBTCUSD, etc.
changesarray of arraysChanges to order book
--stringBuy or Sell
--stringPrice Level
--stringQuantity

Trade Response

Field NameTypeValues
typestringtrade
symbolstringBTCUSD, etc
event_idlongEvent ID of the trade
timestamplongTime of the trade in milliseconds
pricestringPrice of the trade
quantitystringQuantity traded
sidestringSide of the taker in the trade. buy or sell
tidlongTrade ID of the trade

Examples

Initial JSON response for l2 subscription

{
  "type": "l2_updates",
  "symbol": "BTCUSD",
  "changes": [
    [
      "buy",
      "9122.04",
      "0.00121425"
    ],
    ...,
    [
      "sell",
      "9122.07",
      "0.98942292"
    ]
    ...
  ],
  "trades": [
      {
          "type": "trade",
          "symbol": "BTCUSD",
          "eventid": 169841458,
          "timestamp": 1560976400428,
          "price": "9122.04",
          "quantity": "0.0073173",
          "side": "sell",
          "tid": 2840140800042677
      },
      ...
  ],
}
json

JSON response for l2 update

{
  "type": "l2_updates",
  "symbol": "BTCUSD",
  "changes": [["sell", "9160.20", "0.1921229751"]]
}
json

JSON response for trade execution

{
  "type": "trade",
  "symbol": "BTCUSD",
  "event_id": 3575573053,
  "timestamp": 151231241,
  "price": "9004.21000000",
  "quantity": "0.09110000",
  "side": "buy",
  "tid": 2840140800042677
}
json