Gemini Crypto Exchange Logo

Stream Reference

Fast API provides multiple data streams for various exchange data:

  • L2 Order Book Data
  • Trade Events
  • Per Account Order Events

Book Ticker

SchemaFrequencyDescription
{symbol}@bookTickerReal-timeReal time updates to the best bid/ask price for an order book.
Try Itbtcusd@bookTicker
disconnected
JSONCode
{ "u": 1751505576085, "E": 1751508438600117161, "s": "btcusd", "b": "45000.50", "B": "1.25000000", "a": "45001.00", "A": "0.75000000" }
FieldTypeDescription
unumberUpdate ID
EnumberEvent time (nanoseconds)
sstringSymbol
bstringBest bid price
BstringBest bid quantity
astringBest ask price
AstringBest ask quantity

L2 Partial Depth Streams

SchemaFrequencyDescription
{symbol}@depth5Periodic (1s)Periodic snapshot of the top 5 levels once per second
{symbol}@depth10Periodic (1s)Top 10 levels
{symbol}@depth20Periodic (1s)Top 20 levels
{symbol}@depth5@100msPeriodic (100ms)Top 5 levels every 100 milliseconds
{symbol}@depth10@100msPeriodic (100ms)Top 10 levels
{symbol}@depth20@100msPeriodic (100ms)Top 20 levels
Try Itbtcusd@depth10@100ms
disconnected
JSONCode
{ "lastUpdateId": 12345678, "bids": [ ["45000.50", "1.25000000"], ["45000.25", "0.50000000"] ], "asks": [ ["45001.00", "0.75000000"], ["45001.25", "2.00000000"] ] }
FieldTypeDescription
lastUpdateIdnumberLast update ID
bidsarrayArray of [price, quantity]
asksarrayArray of [price, quantity]

L2 Differential Depth Streams

SchemaFrequencyDescription
{symbol}@depthPeriodic (1s)List of all changed price levels in the last second
{symbol}@depth@100msPeriodic (100ms)In the last 100 milliseconds
Try Itbtcusd@depth@100ms
disconnected

Quantity zero indicates price level removal.

JSONCode
{ "e": "depthUpdate", "E": 1751508260659505382, "s": "btcusd", "U": 12345677, "u": 12345678, "b": [ ["45000.50", "1.25000000"], ["45000.25", "0.00000000"] ], "a": [ ["45001.00", "0.75000000"] ] }
FieldTypeDescription
estringEvent type ("depthUpdate")
EnumberEvent time (nanoseconds)
sstringSymbol
UnumberFirst update ID in this event
unumberLast update ID in this event
barrayBid updates [price, quantity]
aarrayAsk updates [price, quantity]

Trade Stream

SchemaFrequencyDescription
{symbol}@tradeReal-timeReal time trade executions
Try Itbtcusd@trade
disconnected
JSONCode
{ "E": 1751508260659505382, "s": "btcusd", "t": 12345678, "p": "45000.50", "q": "0.25000000", "i": 88500001, "T": 1751508260659505382, "m": true, "S": "BUY" }
FieldTypeDescription
EnumberEvent time
sstringSymbol
tnumberTrade ID
pstringPrice
qstringQuantity
inumberOrder ID
TnumberTrade time
mbooleanIs buyer the maker
SstringSide ("BUY" or "SELL")

Order Events

Requires an authenticated session

SchemaFrequencyDescription
orders@accountReal-timeReal time order activity for the account associated with the authenticated API key
orders@sessionReal-timeReal time order activity for the authenticated API key
JSONCode
# Order Event - New { "E":1759291847686856569, "s":"BTCUSD", "i":73797746498585286, "c":"my-order-1759291847503", "S":"BUY", "o":"LIMIT", "X":"NEW", "p":"1.00000", "q":"0.0000100000", "z":"0.0000100000", "T":1759291847686856569 } # Order Event - Canceled { "E":1759291847731455006, "s":"BTCUSD", "i":73797746498585286, "c":"my-order-1759291847503", "X":"CANCELED", "T":1759291847731455006 }
FieldTypeDescription
EnumberEvent time
sstringSymbol
inumberOrder ID
cstringClient Order ID
SstringSide, BUY / SELL
ostringType, LIMIT / MARKET
XstringStatus, NEW / FILLED / PARTIALLY_FILLED / CANCELED / REJECTED
pstringOrder price
qstringOriginal quantity
zstringRemaining quantity
ZstringExecuted quantity
LstringLast execution price
tnumberTrade ID
rstringRejection reason
TnumberUpdate time
Last modified on