GeminiGemini
SandboxGet API key
  • Crypto Trading
  • Prediction Markets
Resources
  • Changelog

© 2026 Gemini Space Station, Inc.

Gemini Crypto Exchange LogoGemini Crypto Exchange Logo
Market Makers
    Maker Rebate Program
WebSocket
    AuthenticationMessage Format
    Streams
      Book TickerL2 Partial DepthL2 Differential DepthTrade StreamOrder EventsBalance Updates
    Playground
      Overviewconninfopingtimesubscribeunsubscribelist_subscriptionsdepthorder.placeorder.cancelorder.cancel_allorder.cancel_session
REST APIs
    Order Management
    Positions
    Events
Agentic
Tickers
    OverviewCryptoSportsCommoditiesWeather
Schemas

Stream Reference

Prediction Markets WebSocket streams use the same protocol as the main WebSocket API. Symbols follow the prediction markets format (e.g. GEMI-PRES2028-VANCE).

Book Ticker

SchemaFrequencyDescription
{symbol}@bookTickerReal-timeReal time updates to the best bid/ask price for an order book.
Try ItGEMI-PRES2028-VANCE@bookTicker
disconnected
Code
{ "u": 1751505576085, "E": 1751508438600117161, "s": "GEMI-PRES2028-VANCE", "b": "0.26", "B": "5000", "a": "0.28", "A": "3200" }
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 ItGEMI-PRES2028-VANCE@depth10@100ms
disconnected
Code
{ "lastUpdateId": 12345678, "bids": [ ["0.26", "5000"], ["0.25", "2000"] ], "asks": [ ["0.28", "3200"], ["0.29", "1500"] ] }
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 ItGEMI-PRES2028-VANCE@depth@100ms
disconnected

Quantity zero indicates price level removal.

Code
{ "e": "depthUpdate", "E": 1751508260659505382, "s": "GEMI-PRES2028-VANCE", "U": 12345677, "u": 12345678, "b": [ ["0.26", "5000"], ["0.25", "0.00"] ], "a": [ ["0.28", "3200"] ] }
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 ItGEMI-PRES2028-VANCE@trade
disconnected
Code
{ "E": 1759873803503023900, "s": "GEMI-PRES2028-VANCE", "t": 2840140956529623, "p": "0.27", "q": "10", "m": true }
FieldTypeDescription
EnumberEvent time (nanoseconds)
sstringSymbol
tnumberTrade ID
pstringPrice
qstringQuantity
mbooleanIs buyer the maker

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
Code
# Order Event - New { "E": 1759291847686856569, "s": "GEMI-PRES2028-VANCE", "i": 73797746498585286, "c": "my-first-prediction", "S": "BUY", "o": "LIMIT", "X": "NEW", "O": "YES", "p": "0.27000", "q": "10", "z": "10", "T": 1759291847686856569 } # Order Event - Canceled { "E": 1759291847731455006, "s": "GEMI-PRES2028-VANCE", "i": 73797746498585286, "c": "my-first-prediction", "X": "CANCELED", "T": 1759291847731455006 }
FieldTypeDescription
EnumberEvent time (nanoseconds)
sstringSymbol
inumberOrder ID
cstringClient Order ID
SstringSide, BUY / SELL
ostringType, LIMIT / MARKET
XstringStatus, NEW / OPEN / FILLED / PARTIALLY_FILLED / CANCELED / REJECTED / MODIFIED
OstringEvent outcome, YES / NO
pstringOrder price
qstringOriginal quantity
zstringRemaining quantity
ZstringExecuted quantity. For FILLED / PARTIALLY_FILLED events, this is the quantity filled in the last execution. For CANCELED and other events, this is the cumulative quantity filled over the lifetime of the order.
LstringLast execution price
tnumberTrade ID
rstringRejection reason
TnumberUpdate time (nanoseconds)

Fields with empty or zero values may be omitted from the event.

Rejection Reasons

When an order is REJECTED, the r field contains one of:

ReasonDescription
MarketNotOpenMarket is closed or paused
InsufficientFundsAccount lacks sufficient balance
InvalidPricePrice must be between $0.01–$0.99
LimitPriceOffTickPrice does not align with tick size
InvalidQuantityQuantity below minimum or off increment
InvalidTotalSpendTotal spend calculation error
DuplicateOrderDuplicate client order ID
InsufficientLiquidityNot enough liquidity at price
UnknownInstrumentTrading pair does not exist
TERMS_NOT_ACCEPTEDPrediction Markets terms not accepted in the Gemini Exchange UI

Cancellation Reasons

When an order is CANCELED by the system, the r field contains one of:

ReasonDescription
SelfCrossPreventedSelf-trade prevention triggered
FillOrKillWouldNotFillFOK order could not fill completely
ImmediateOrCancelWouldPostIOC order would post to book
MakerOrCancelWouldTakeMOC order would take liquidity
AuctionCancelledAuction-related cancellation
ExceedsPriceLimitsPrice moved beyond limits

Balance Updates

Requires an authenticated session

SchemaFrequencyDescription
balances@accountReal-timeReal time balance updates for the account associated with the authenticated API key
balances@account@1sPeriodic (1s)Periodic snapshot of all balances every second for the account associated with the authenticated API key

The balances@account stream pushes updates in real time whenever a balance change occurs, and only includes the assets that changed. The balances@account@1s stream sends a complete snapshot of all account balances every second, regardless of whether they changed. On subscribe, balances@account@1s will immediately send the current balances if available.

Code
# Balance Update { "e": "balanceUpdate", "E": 1768250434780, "u": 1768250421600, "B": [ { "a": "USD", "f": "207.39" } ] }
FieldTypeDescription
estringEvent type ("balanceUpdate")
EnumberEvent time (nanoseconds)
unumberTime of the last account update (nanoseconds)
BarrayBalance updates
astringAsset code
fstringAsset balance
Last modified on April 17, 2026
Message FormatOrder Management
On this page
  • Book Ticker
  • L2 Partial Depth Streams
  • L2 Differential Depth Streams
  • Trade Stream
  • Order Events
    • Rejection Reasons
    • Cancellation Reasons
  • Balance Updates
JSON
JSON
JSON
JSON
JSON
JSON