High Availability Setup for WebSocket DS
Configure exchange-specific WebSocket DS endpoints for regional resilience and customer-side failover.
High Availability Setup for WebSocket DS
Overview
WebSocket DS uses exchange-specific endpoint formatting. It is suitable when the customer wants a direct exchange-specific WebSocket data stream.
Default WebSocket DS endpoint format:
wss://lowercase-exchange-name.ws-ds.md.coinapi.io/Example:
wss://coinbase.ws-ds.md.coinapi.io/Regional WebSocket DS endpoint format:
wss://api-emea.coinapi.io/md/ws-ds-lowercase-exchange-name/
wss://api-apac.coinapi.io/md/ws-ds-lowercase-exchange-name/
wss://api-ncsa.coinapi.io/md/ws-ds-lowercase-exchange-name/Example:
wss://api-emea.coinapi.io/md/ws-ds-coinbase/
wss://api-apac.coinapi.io/md/ws-ds-coinbase/
wss://api-ncsa.coinapi.io/md/ws-ds-coinbase/What it is
A WebSocket DS high availability setup means connecting to the same exchange-specific DS feed through more than one regional endpoint.
Example:
Primary feed:
wss://api-emea.coinapi.io/md/ws-ds-coinbase/
Secondary feed:
wss://api-ncsa.coinapi.io/md/ws-ds-coinbase/This gives the customer another regional path for the same exchange-specific feed.
Why do it
This setup can help customers:
- Improve resilience for exchange-specific real-time streaming.
- Reduce dependency on a single region or routing path.
- Keep another connection path available during regional or network issues.
- Design failover behavior around their own infrastructure requirements.
How to do it
Step 1: Choose the exchange-specific DS endpoint
Start with the target exchange name in lowercase.
Example for Coinbase:
Default:
wss://coinbase.ws-ds.md.coinapi.io/Then choose one or more regional alternatives:
EMEA:
wss://api-emea.coinapi.io/md/ws-ds-coinbase/
APAC:
wss://api-apac.coinapi.io/md/ws-ds-coinbase/
NCSA:
wss://api-ncsa.coinapi.io/md/ws-ds-coinbase/Step 2: Choose Active/Active or Active/Passive
Active/Active
In Active/Active, the customer connects to more than one regional DS endpoint at the same time.
Example:
Server A -> wss://api-emea.coinapi.io/md/ws-ds-coinbase/
Server B -> wss://api-ncsa.coinapi.io/md/ws-ds-coinbase/For best resilience, each connection should run on independent customer-side infrastructure, such as separate servers or application paths.
Active/Passive
In Active/Passive, the customer uses one primary DS endpoint and keeps another endpoint configured as fallback.
Example:
Primary:
wss://api-emea.coinapi.io/md/ws-ds-coinbase/
Standby:
wss://api-ncsa.coinapi.io/md/ws-ds-coinbase/The standby endpoint is activated only when the primary feed has an issue.
Step 3: Add connection health checks
The customer should monitor each DS connection independently.
Recommended checks:
- Connection state
- Heartbeat or message availability
- Time since last message
- Reconnect count
- Latency
- Unexpected message gaps
- Error responses or disconnects
Example failover condition:
If the primary DS feed stops receiving valid messages,
route processing to the secondary server or secondary DS connection.Step 4: Add customer-side Active/Active infrastructure
For WebSocket DS, high availability is not only about connecting to multiple CoinAPI regions. The customer should also design their own active/active server infrastructure.
A recommended pattern is:
Customer Server A processes DS feed from Region A.
Customer Server B processes DS feed from Region B.
Customer internal routing decides which server path is used.
Customer monitoring determines when to switch between server paths.The customer should process these feeds independently through their own infrastructure. The exact switching behavior depends on the customer's environment, such as internal routing, load balancing, monitoring, and downstream system design.
Billing impact
Using multiple DS feeds can increase billable usage because the same exchange-specific data may be consumed through more than one connection.
Active/Active usually costs more because multiple feeds are active at the same time.
Active/Passive may reduce cost because the secondary DS feed is activated only when needed.
Under Pay As You Go, higher usage may be billed at lower effective rates as customers move into higher usage tiers, but total cost can still increase if more data is consumed.
Summary
For WebSocket DS high availability:
- Use the default DS endpoint format for exchange-specific streaming.
- Use regional DS endpoints for explicit regional control.
- Connect to the same exchange-specific DS feed through more than one region for better resilience.
- Use Active/Active only when the customer also has independent active infrastructure on their side.
- Use Active/Passive when cost control is preferred and a short failover delay is acceptable.
- Monitor connection state, message flow, reconnects, and latency.
- Handle server switching and failover inside the customer's own infrastructure.
For customers who require dedicated infrastructure, custom deployment architecture, or stricter enterprise-grade availability planning, please contact our Sales Team to discuss Enterprise plan options.
We also recommend subscribing to the CoinAPI status page for updates about incidents, maintenance, and service status changes:
https://status.coinapi.io/Endpoints
WebSocket endpoint provides real-time market data streaming which works in Subscribe-Publish communication model. After establishing a WebSocket connection with us, you will need to send a Hello message documented below.
Hyperliquid L4
HYPERLIQUIDL4-only WebSocket DS feeds for L4 order book, L4 trades, oracle enrichment, TWAP statuses, and raw node events.