What is WebSocket?
The VoxFi WebSocket allows you to receive real-time updates about orders, orderbooks, and trades without needing constant polling. It’s the recommended way to monitor market changes and your orders.Why use WebSocket?
- Real-Time: Receive updates instantly when changes occur;
- Efficiency: Avoid constant polling and reduce the number of HTTP requests;
- Low Latency: Bidirectional communication with minimal latency;
- Resource Savings: Less load on server and client.
WebSocket URL
All WebSocket connections should be made to:Authentication
The WebSocket connection does not require initial authentication, but some channels require authentication when subscribing:- Market and Event Channels: Do not require authentication.
- User Channel: Requires API key (
X-Api-Key) in theauthfield of the subscribe message;
Learn more about authentication and API key management in the Authentication guide.
Available Channels
The WebSocket offers three types of channels:- User Channel - Receive updates about your own orders and transactions;
- Market Channel - Receive updates about specific markets (orderbook and trades);
- Event Channel - Receive updates about specific events (includes all markets in the event).
Update Types
You can filter the type of update you want to receive:- Orderbook: Price and market depth updates;
- Trades: Notifications of new executed trades;
- All: All updates (default).
Documentation
- Connection - How to connect to WebSocket, ping/pong, available channels, use cases and best practices;
- Subscribe and Unsubscribe - How to subscribe and unsubscribe from channels;
- User Channel - Complete user channel documentation;
- Market Channel - Complete market channel documentation;
- Event Channel - Complete event channel documentation;
- Errors - Error handling and error codes.
Getting Started
- Get your API key at Profile → Security (required only for user channel);
- Read the connection documentation to understand how to connect;
- Learn how to subscribe to channels;
- Explore the documentation for the specific channels you need to use;
- Consult the error documentation for proper error handling.

