Skip to main content

Message Types Overview

The QuantCite WebSocket API uses JSON messages for all communication. Each message has a type field that identifies the message category.

Message Categories

Authentication

Session authentication and user verification

Subscriptions

Subscribe to real-time orderbook data

Data Retrieval

Get current snapshots and information

Connection Management

Ping/pong and connection health

Authentication Messages

1. Authenticate

Authenticate your WebSocket session with API key.

Request

Success Response

Error Response

Subscription Messages

2. Subscribe to Aggregated Orderbook

Subscribe to real-time orderbook updates from multiple exchanges.

Request (Specific Exchanges)

Request (All Exchanges)

Success Response

Error Response

3. Unsubscribe from Symbol

Stop receiving orderbook updates for a symbol.

Request

Response

Real-time Data Messages

4. Orderbook Update

Real-time orderbook updates after subscription.

Update Message

Data Retrieval Messages

5. Get Current Orderbook

Get current orderbook snapshot without subscription.

Request

Response

6. Get Supported Exchanges

Retrieve list of all supported exchanges.

Request

Response

7. Get Trading Pairs

Retrieve available trading pairs for exchanges.

Request (All Exchanges)

Request (Specific Exchange)

Response (All Exchanges)

Response (Specific Exchange)

Connection Management

8. Ping/Pong

Health check and connection maintenance.

Request

Response

Error Messages

Rate Limit Exceeded

Invalid Symbol

Exchange Not Available

Data Limit Exceeded

Usage Notifications

Data Limit Warning

Rate Limit Warning

Message Flow Examples

Basic Subscription Flow

1

Connect and Authenticate

2

Subscribe to Data

3

Receive Updates

Error Handling Flow

1

Invalid Request

2

Handle Rate Limits

Always implement proper error handling in your WebSocket clients to handle network issues, rate limits, and invalid requests gracefully.