Gemini Crypto Exchange Logo
Overview

Introduction

Gemini offers two WebSocket APIs for streaming data:

  1. a private Order Events API
  2. a public Market Data API

Advantages

Using WebSockets provides several advantages:

  • Receive notifications in real time
  • Reduce the amount of data you have to transfer over the network
  • Reduce latency introduced by polling interval

For example, to keep track of your orders, you might be requesting the Get Active Orders endpoint every five seconds:

  1. Request /v1/orders
  2. Bring back HTTP header data and a response body
  3. Parse the JSON in the response body
  4. Compare the latest response against the previous response to see what has changed

Using the private Order Events API, you would subscribe once and receive real time notifications of all order activity.


WebSocket Protocol Resources

For general information about how the WebSocket protocol works, refer to: