Gemini Crypto Exchange Logo

Message Format

The Fast API uses JSON-formatted messages for all communication.

Request Format

All requests follow a consistent structure:

JSONCode
{ "id": "1", "method": "METHOD_NAME", "params": {...} }
FieldTypeRequiredDescription
idstringYesUnique 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:

JSONCode
{ "id": "1", "status": 200, "result": {...} }
FieldTypeDescription
idstringMatches the request ID
statusnumberHTTP status code
resultanyMethod-specific response data

Error Response

Error responses include error details:

JSONCode
{ "id": "1", "status": 401, "error": { "code": -1002, "msg": "Authentication required" } }
FieldTypeDescription
idstringMatches the request ID
statusnumberHTTP status code
error.codestringInternal error code
error.msgstringHuman-readable error message
Last modified on