openapi: 3.2.0 info: title: REST OAuth API description: 'The Gemini Crypto Exchange REST API allows programmatic access to trade cryptocurrencies and manage your account on the Gemini Exchange platform. The API provides both public and private endpoints for market data, order management, and account operations.' version: 1.0.0 contact: name: Gemini Trading Support email: trading@gemini.com servers: - url: https://api.gemini.com description: Production server - url: https://api.sandbox.gemini.com description: Sandbox server for testing tags: - name: OAuth paths: /v1/oauth/revokeByToken: post: x-zudoku-playground-enabled: false tags: - OAuth summary: Revoke OAuth Token operationId: revokeOAuthToken description: 'The `access_token` may be revoked at any time by using `v1/oauth/revokeByToken`. Once a token is revoked or expires, it can no longer be used to make requests. This endpoint is only available using an `access_token` and will revoke the token used to make the request.' parameters: - $ref: '#/components/parameters/apiKeyAuth' - $ref: '#/components/parameters/signatureAuth' - $ref: '#/components/parameters/payloadAuth' - $ref: '#/components/parameters/contentType' - $ref: '#/components/parameters/contentLength' - $ref: '#/components/parameters/cacheControl' security: - apiKeyAuth: [] signatureAuth: [] payloadAuth: [] requestBody: required: true content: application/json: schema: type: object required: - request properties: request: type: string description: The literal string "/v1/oauth/revokeByToken" examples: revokeToken: summary: Revoke Token Request description: JSON payload to revoke an OAuth token value: request: /v1/oauth/revokeByToken responses: '200': description: An object that indicates the access_token has been revoked. content: application/json: schema: type: object properties: message: type: string description: A message that indicates the token has been revoked for the account examples: revokeTokenResponse: summary: Revoke Token Response description: JSON response for a successful token revocation value: message: OAuth tokens and codes have been revoked for 00000000-0000-0000-0000-000000000000 on your account. '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/ApiKeyIpFilteringFailure' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/TooManyRequests' '500': $ref: '#/components/responses/InternalError' components: responses: ApiKeyIpFilteringFailure: description: ApiKey fails IP Filtering Check content: application/json: schema: type: object $ref: '#/components/schemas/ErrorResponse' example: result: error reason: ApiKeyIpFilteringFailure message: ApiKey fails IP Filtering Check for some accounts BadRequest: description: Bad request - malformed request or invalid parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: result: error reason: InvalidSignature message: Invalid signature for this request TooManyRequests: description: Too many requests - you have exceeded the rate limit content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: result: error reason: Too Many Requests message: Too Many Requests NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: result: error reason: EndpointNotFound message: API entry point not found InternalError: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: result: error reason: Internal Server Error message: Unexpected server error occurred. Unauthorized: description: Unauthorized - missing or invalid authentication content: application/json: schema: type: object $ref: '#/components/schemas/ErrorResponse' example: result: error reason: MissingApikeyHeader message: Must provide 'X-GEMINI-APIKEY' header parameters: contentType: name: Content-Type in: header required: false schema: type: string default: text/plain signatureAuth: name: X-GEMINI-SIGNATURE in: header required: true description: HEX-encoded HMAC-SHA384 of payload signed with API secret schema: type: string apiKeyAuth: name: X-GEMINI-APIKEY in: header required: true description: Your API key schema: type: string payloadAuth: name: X-GEMINI-PAYLOAD in: header required: true description: Base64-encoded JSON payload schema: type: string contentLength: name: Content-Length in: header required: false schema: type: string default: '0' cacheControl: name: Cache-Control in: header required: false schema: type: string default: no-cache schemas: ErrorResponse: type: object properties: result: type: string description: Error reason: type: string description: A short description message: type: string description: Detailed error message securitySchemes: apiKeyAuth: type: apiKey in: header name: X-GEMINI-APIKEY description: Your API key payloadAuth: type: apiKey in: header name: X-GEMINI-PAYLOAD description: Base64-encoded JSON payload signatureAuth: type: apiKey in: header name: X-GEMINI-SIGNATURE description: HEX-encoded HMAC-SHA384 of payload signed with API secret