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

© 2026 Gemini Space Station, Inc.

Gemini Crypto Exchange LogoGemini Crypto Exchange Logo
IntroductionAuthenticationMessage Format
Streams
    OverviewBook TickerL2 Partial DepthL2 Differential DepthTrade StreamOrder EventsBalance Updates
Utility
    conninfopingtime
Subscriptions
    list_subscriptionssubscribeunsubscribe
L2 Data
    depth
Trading
    order.cancel_allorder.cancel_sessionorder.placeorder.cancel

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 April 17, 2026
JSON
JSON
JSON