Summary of APIs available
API Overview
Zodia Markets provides REST API for viewing balance, transactions and limits and WebSocket for real-time price streaming and order execution. Clients may also register a Webhook to retrieve real time transaction notifications.
API use cases
| Use Case | API |
|---|---|
| Real-time price updates | WebSocket |
| Trade execution on live prices | WebSocket |
| Specify beneficiary for crypto delivery on trade execution | WebSocket |
| Query account balances | REST |
| Historical transaction data requests | REST |
| Query Credit Limits | REST |
| Retrieve beneficiary and wallet information | REST |
| Transfer funds between trading and withdrawal accounts | REST |
| Retrieve list of available pairs | REST |
| Realtime trade, deposit, withdrawal and settlement status | Webhook |
REST API
Technical Details
| Detail | Value |
|---|---|
| Protocol | HTTPS |
| Authentication | API Key + HMAC signature |
| Request Format | JSON |
| Response Format | JSON |
| Rate Limit | 30 requests per second for each IP |
| Versioning | URI path (/3/) |
Key Endpoints
POST /api/3/account # Get account balances
POST /api/3/transfer/list # List of internal balance transfers
POST /api/3/transaction/list # List transaction history
POST /api/3/beneficiaries # List beneficiaries
POST /api/3/user/limit # Get credit limits
View full REST API reference →
WebSocket API
Technical Details
| Detail | Value |
|---|---|
| Protocol | WSS (WebSocket Secure) |
| Authentication | API Key + token exchange |
| Message Format | JSON |
| Rate limit | 30 messages per second for each account |
| Max updates | 4 updates per second for each active connection |
Authentication
WebSocket connections require:
- Initial HTTPS authentication to obtain session token (REST)
- Token sent in connection handshake
- Periodic token refresh for long-lived connections
View WebSocket authentication guide →
Webhook
Webhooks can be registered via the Customer Portal when creating the API key. Zodia Markets provides realtime transaction information on the webhook which will include:
- Transaction legs
- Crypto and fiat deposits
- Crypto and fiat withdrawals
API Feature Comparison
| Feature | REST API | WebSocket API | Webhook |
|---|---|---|---|
| Brokerage - RFS (Request for Stream) | ❌ Not available | ✅ Real-time streaming | ❌ Not available |
| Order execution | ❌ Not available | ✅ On streamed prices | ❌ Not available |
| Beneficiary delivery instructions | ❌ Not available | ✅ On streamed prices | ❌ Not available |
| Account balances | ✅ Query via POST | ❌ Use REST | ❌ Not available |
| Transaction history | ✅ With pagination | ❌ Use REST or Websocket | ✅ Real time changes |
| Initiate internal balance transfers | ✅ POST requests | ❌ Use REST | ❌ Not available |
| Manage and view beneficiaries | ✅ POST operations | ❌ Use REST | ❌ Not available |
| View credit limits | ✅ POST requests | ❌ Use REST | ❌ Not available |
Additional Requirements
IP Whitelisting
IP whitelisting is generally not required although there may be exception. Contact your sales representative for restriction details.
Best Practices
REST API
- Implement exponential backoff for retries
- Cache balance queries when appropriate (don't poll excessively)
- Use pagination for large transaction lists
- Handle rate limits gracefully with 429 responses
WebSocket API
- Implement automatic reconnection logic with exponential backoff
- Handle heartbeat timeouts (reconnect if no pong received)
- Maintain subscription state across reconnections
- Validate price timestamps and quoteID before order submission
- Set reasonable price expiry tolerances
Rate Limits & Throttling
| API Type | Limit | Window | Per | Update Frequency |
|---|---|---|---|---|
| REST API | 30 | Second | IP connected | N/A |
| WebSocket | 30 | messages | Account | 4 updates per second |
| WebSocket (order) | 1 order | 250 ms | Account | N/A |
| Webhook | N/A | N/A | N/A | 1 update per second |