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

© 2026 Gemini Space Station, Inc.

REST APIs
    Orders
    Market Data
    Derivatives
    Margin Trading
    Staking
    Clearing
    Instant Orders
    Fund Management
WebSocket
    IntroductionAuthenticationMessage Format
    Streams
      Book TickerL2 Partial DepthL2 Differential DepthTrade StreamOrder EventsBalance Updates
    Playground
      conninfopingtimesubscribeunsubscribelist_subscriptionsdepthorder.placeorder.cancelorder.cancel_allorder.cancel_session
Agentic
FIX
AuthenticationMessage Format
Streams
    OverviewBook TickerL2 Partial DepthL2 Differential DepthTrade StreamOrder EventsBalance Updates
Utility
    timeconninfoping
Subscriptions
    subscribeunsubscribelist_subscriptions
L2 Data
    depth
Trading
    order.cancel_allorder.placeorder.cancel_sessionorder.cancel
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
Last modified on June 2, 2026
AuthenticationStreams
JSON
JSON
JSON