GeminiGemini
SandboxGet API key
  • Crypto Trading
  • Prediction Markets
Changelog
Gemini Crypto Exchange LogoGemini Crypto Exchange Logo

© 2026 Gemini Space Station, Inc.

Getting StartedAPI Specifications
Maker and Taker Incentives
    Market Maker ProgramMaker Rebate ProgramLiquidity Rewards ProgramTaker Rewards Program
WebSocket
    IntroductionAuthenticationMessage Format
    Streams
      Book TickerL2 Partial DepthL2 Differential DepthTrade StreamOrder EventsBalance UpdatesPosition UpdatesContract Status
    Playground
      OverviewconninfopingtimeSUBSCRIBEUNSUBSCRIBELIST_SUBSCRIPTIONSdepthorder.placeorder.cancelorder.cancel_allorder.cancel_session
REST APIs
    Combos
    Events
    Terms
    Order Management
    Positions
    Rewards
Combo Contracts
    Overview
Combos Request-for-Quote (RFQ)
    OverviewWebSocket StreamsQuote MethodsMaker IntegrationExamples
Tickers
    OverviewCryptoSportsCommoditiesWeather
SchemasAuthenticationMessage Format
Streams
    OverviewBook TickerL2 Partial DepthL2 Differential DepthTrade StreamOrder EventsBalance UpdatesPosition UpdatesContract Status
Utility
    conninfopingtime
Subscriptions
    SUBSCRIBEUNSUBSCRIBELIST_SUBSCRIPTIONS
L2 Data
    depth
Trading
    order.placeorder.cancelorder.cancel_allorder.cancel_session
WebSocket

Message Format

Our WebSocket API uses JSON-formatted messages for all communication.

Request Format

All requests follow a consistent structure:

Code
{ "id": "1", "method": "METHOD_NAME", "params": {...} }
FieldTypeRequiredDescription
idstring | numberYesUnique identifier for matching request/response
methodstringYesThe method to invoke
paramsobject | arrayNoMethod parameters (varies by method)

Response Format

Successful responses include the request ID and result:

Code
{ "id": "1", "status": 200, "result": {...} }
FieldTypeDescription
idstring | numberMatches the request ID
statusnumberHTTP status code
resultanyMethod-specific response data

Error Response

Error responses include error details:

Code
{ "id": "1", "status": 401, "error": { "code": -1002, "msg": "Authentication required" } }
FieldTypeDescription
idstring | numberMatches the request ID
statusnumberHTTP status code
error.codenumberInternal error code
error.msgstringHuman-readable error message

Error Codes

CodeHTTP StatusDescription
-1000500Internal server error
-1002401Authentication required
-1003429Rate limit exceeded
-1013400Invalid parameters
-1020400Unsupported operation
-2010400Order rejected

Event Types

Streaming events carry an e field that identifies the event type, so a single connection can demultiplex every subscription:

e valueStream
depthUpdateL2 differential depth ({symbol}@depth, {symbol}@depth@100ms)
orderUpdateOrder events (orders@account, orders@session)
balanceUpdateBalance updates (balances@account, balances@account@1s)
positionReportPosition updates (positions@account, positions@account@1s)
contractStatusContract status (contractStatus)

The Book Ticker ({symbol}@bookTicker), L2 Partial Depth ({symbol}@depth5 / @depth10 / @depth20), and Trade ({symbol}@trade) payloads do not carry an e field — identify those by the stream you subscribed to.

New event types may be added over time. Treat any e value you do not recognize as a forward-compatible addition and ignore it.

Last modified on July 21, 2026
AuthenticationStreams
JSON
JSON
JSON