Real-time market data and account updates over WebSocket.
Endpoint: wss://api.strade.io/ws
All messages are JSON text frames. The connection supports both public and private streams — no separate endpoints.
Client → Server:
{ "method": "<method>", "args": [{ ... }], "id": "req-1" }
| Field | Type | Required | Description |
|---|---|---|---|
method |
string | ✓ | One of: auth, subscribe, unsubscribe, ping |
args |
array | for auth, subscribe, unsubscribe |
Array with one or more argument objects |
id |
string | — | Client-assigned request ID, echoed verbatim in the response |
Server → Client (response):
{ "id": "req-1", "result": { ... } }
{ "id": "req-1", "error": { "code": "...", "message": "..." } }
Server → Client (push):
{ "channel": "trades", "data": { ... } }
{ "channel": "orders", "data": { ... }, "sub_id": "my-sub" }
sub_id is included only when it was provided at subscribe time.
| Parameter | Value |
|---|---|
| Max subscriptions per connection | 50 |
| Idle timeout (no pong) | 60 seconds |
| Max inbound message size | 8 KB |
| Max connections per user | 10 |
The server sends WebSocket-level ping frames every ~54 seconds. If no pong is received within 60 seconds the connection is closed.
Required once per connection before subscribing to private streams.
Public streams (orderbook, trades, ticker, candles) are available
immediately after connection without authentication.
Signature:
payload = timestamp + "GET" + "/api/v1/ws"
sign = HMAC-SHA256(api_secret, payload).hexdigest
timestamp is current Unix time in milliseconds as a string.
Authentication persists for the lifetime of the connection.
Re-authentication on the same connection is allowed.
If the per-user connection limit (10) is reached, auth returns rate_limited
and the connection stays unauthenticated.
Returned in the error field of a response.
| Code | Description |
|---|---|
invalid_json |
Message is not valid JSON |
unknown_method |
Unknown method name |
invalid_args |
Missing or malformed args |
invalid_channel |
Unknown channel, missing required params, or auth required for private channel |
auth_failed |
API key invalid or signature mismatch |
rate_limited |
Per-user connection limit (10) or per-connection subscription limit (50) exceeded |
Production WebSocket endpoint
Authenticate the connection using an HMAC-signed API key. Must be called before subscribing to private streams. Authentication persists for the lifetime of the connection.
Send auth request
Available only on servers:
Accepts the following message:
{
"method": "auth",
"id": "req-1",
"args": [
{
"api_key": "ak_abc123",
"timestamp": "1741950000000",
"sign": "a1b2c3d4e5f6..."
}
]
}
Authenticate the connection using an HMAC-signed API key. Must be called before subscribing to private streams. Authentication persists for the lifetime of the connection.
Receive auth response
Available only on servers:
Accepts the following message:
{
"id": "req-1",
"result": {
"status": "ok"
}
}
Application-level ping. The server also sends WebSocket-level ping frames every ~54 seconds; standard WebSocket clients respond automatically.
Send ping
Available only on servers:
Accepts the following message:
{
"method": "ping",
"id": "req-5"
}
Application-level ping. The server also sends WebSocket-level ping frames every ~54 seconds; standard WebSocket clients respond automatically.
Receive pong
Available only on servers:
Accepts the following message:
{
"id": "req-5",
"result": {
"status": "pong"
}
}
Subscribe to one or more channels in a single request. Processing stops at the first error — channels before the failing one are still subscribed. Re-subscribing to an already-subscribed channel is idempotent.
Subscribe to channels
Available only on servers:
Accepts the following message:
{
"method": "subscribe",
"id": "req-2",
"args": [
{
"channel": "trades",
"params": {
"symbol": "BTC_USDT"
}
},
{
"channel": "orderbook",
"params": {
"symbol": "BTC_USDT"
}
}
]
}
Subscribe to one or more channels in a single request. Processing stops at the first error — channels before the failing one are still subscribed. Re-subscribing to an already-subscribed channel is idempotent.
Subscription confirmation
Available only on servers:
Accepts the following message:
{
"id": "req-2",
"result": {
"status": "subscribed",
"channels": [
"trades",
"orderbook"
]
}
}
Unsubscribe from one or more channels.
Unsubscribe from channels
Available only on servers:
Accepts the following message:
{
"method": "unsubscribe",
"id": "req-4",
"args": [
{
"channel": "trades",
"params": {
"symbol": "BTC_USDT"
}
},
{
"channel": "orderbook",
"params": {
"symbol": "BTC_USDT"
}
}
]
}
Unsubscribe from one or more channels.
Unsubscription confirmation
Available only on servers:
Accepts the following message:
{
"id": "req-4",
"result": {
"status": "unsubscribed",
"channels": [
"trades",
"orderbook"
]
}
}
Full order book snapshot pushed on every change.
Bids are sorted by price descending; asks by price ascending.
Each precision value is a separate subscription slot.
Subscribe to order book
Available only on servers:
Market symbol, e.g. BTC_USDT
Accepts the following message:
{
"method": "subscribe",
"id": "req-1",
"args": [
{
"channel": "orderbook",
"params": {
"symbol": "BTC_USDT"
}
}
]
}
Full order book snapshot pushed on every change.
Bids are sorted by price descending; asks by price ascending.
Each precision value is a separate subscription slot.
Receive order book snapshots
Available only on servers:
Market symbol, e.g. BTC_USDT
Accepts the following message:
{
"channel": "orderbook",
"data": {
"symbol": "BTC_USDT",
"bids": [
{
"price": "45000.00",
"amount": "1.5",
"total": "67500.00"
},
{
"price": "44999.00",
"amount": "2.3",
"total": "103497.70"
}
],
"asks": [
{
"price": "45001.00",
"amount": "0.8",
"total": "36000.80"
},
{
"price": "45002.00",
"amount": "1.2",
"total": "54002.40"
}
],
"timestamp": 1741950000000
}
}
Individual trades pushed as they occur.
Subscribe to trades
Available only on servers:
Market symbol, e.g. BTC_USDT
Accepts the following message:
{
"method": "subscribe",
"id": "req-1",
"args": [
{
"channel": "trades",
"params": {
"symbol": "BTC_USDT"
}
}
]
}
Individual trades pushed as they occur.
Receive trade events
Available only on servers:
Market symbol, e.g. BTC_USDT
Accepts the following message:
{
"channel": "trades",
"data": {
"symbol": "BTC_USDT",
"uuid": "e3b0c442-98fc-1234-b204-c9fec8a3f3d5",
"price": "45000.00",
"amount": "0.1",
"total": "4500.00",
"taker_side": "buy",
"timestamp": 1741950000000
}
}
Rolling 24-hour statistics.
Subscribe to ticker
Available only on servers:
Market symbol, e.g. BTC_USDT
Accepts the following message:
{
"method": "subscribe",
"id": "req-1",
"args": [
{
"channel": "ticker",
"params": {
"symbol": "BTC_USDT"
}
}
]
}
Rolling 24-hour statistics.
Receive ticker updates
Available only on servers:
Market symbol, e.g. BTC_USDT
Accepts the following message:
{
"channel": "ticker",
"data": {
"symbol": "BTC_USDT",
"last_price": "45000.00",
"open": "44000.00",
"high": "46000.00",
"low": "43500.00",
"base_volume": "12345.67",
"quote_volume": "555000000.00",
"change": "1000.00",
"change_percent": "2.27",
"timestamp": 1741950000000
}
}
Candlestick (OHLCV) data. Each resolution value is a separate
subscription slot. Both named strings and integer seconds are accepted
at subscribe time ("1h" and 3600 are equivalent); push payloads
always use the named string form.
Subscribe to candles
Available only on servers:
Market symbol, e.g. BTC_USDT
Candle resolution — "1m" (60 s), "1h" (3600 s), or "1d" (86400 s)
Accepts the following message:
{
"method": "subscribe",
"id": "req-1",
"args": [
{
"channel": "candles",
"params": {
"symbol": "BTC_USDT",
"resolution": "1h"
}
}
]
}
Candlestick (OHLCV) data. Each resolution value is a separate
subscription slot. Both named strings and integer seconds are accepted
at subscribe time ("1h" and 3600 are equivalent); push payloads
always use the named string form.
Receive candle updates
Available only on servers:
Market symbol, e.g. BTC_USDT
Candle resolution — "1m" (60 s), "1h" (3600 s), or "1d" (86400 s)
Accepts the following message:
{
"channel": "candles",
"data": {
"symbol": "BTC_USDT",
"resolution": "1h",
"open": "44000.00",
"high": "46000.00",
"low": "43500.00",
"close": "45000.00",
"base_volume": "50.0",
"quote_volume": "2250000.00",
"change": "1000.00",
"change_percent": "2.27",
"timestamp": 1741950000000
}
}
Order status updates for the authenticated user. No parameters. Requires authentication before subscribing.
Subscribe to orders
Available only on servers:
Accepts the following message:
{
"method": "subscribe",
"id": "req-1",
"args": [
{
"channel": "orders"
}
]
}
Order status updates for the authenticated user. No parameters. Requires authentication before subscribing.
Receive order updates
Available only on servers:
Accepts the following message:
{
"channel": "orders",
"data": {
"event": "order_filled",
"timestamp": 1741950000000,
"order": {
"uuid": "d4e5f6a7-b8c9-0123-defa-234567890123",
"symbol": "BTC_USDT",
"side": "buy",
"type": "limit",
"status": "filled",
"price": "45000.00",
"stop_price": null,
"amount": "0.1",
"initial_amount": "0.1",
"filled_amount": "0.1",
"total": "4500.00",
"initial_total": "4500.00",
"filled_total": "4500.00",
"time_in_force": "GTC",
"created_at": "2026-03-28T10:00:00Z",
"updated_at": "2026-03-28T10:00:05Z",
"opened_at": "2026-03-28T10:00:00Z",
"triggered_at": null
}
}
}
Balance updates for all assets of the authenticated user. No parameters. Requires authentication before subscribing.
Subscribe to balances
Available only on servers:
Accepts the following message:
{
"method": "subscribe",
"id": "req-1",
"args": [
{
"channel": "balances"
}
]
}
Balance updates for all assets of the authenticated user. No parameters. Requires authentication before subscribing.
Receive balance updates
Available only on servers:
Accepts the following message:
{
"channel": "balances",
"data": {
"event": "balance_updated",
"timestamp": 1741950000000,
"balance": {
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"asset": "BTC",
"balance": "1.5",
"frozen": "0.5",
"available": "1.0"
}
}
}
Deposit events for the authenticated user. No parameters.
Requires authentication before subscribing.
payment.type values on this channel: deposit, internal_deposit.
Subscribe to deposits
Available only on servers:
Accepts the following message:
{
"method": "subscribe",
"id": "req-1",
"args": [
{
"channel": "deposits"
}
]
}
Deposit events for the authenticated user. No parameters.
Requires authentication before subscribing.
payment.type values on this channel: deposit, internal_deposit.
Receive deposit events
Available only on servers:
Accepts the following message:
{
"channel": "deposits",
"data": {
"event": "payment_processed",
"timestamp": 1741950000000,
"payment": {
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"asset": "BTC",
"network": "bitcoin",
"amount": "0.01",
"status": "processed",
"tx_hash": "abc123...",
"source": "bc1q...",
"destination": "bc1q...",
"memo": null,
"type": "deposit",
"created_at": "2026-03-28T10:00:00Z",
"updated_at": "2026-03-28T10:05:00Z"
}
}
}
Withdrawal events for the authenticated user. No parameters.
Requires authentication before subscribing.
payment.type values on this channel: withdrawal, internal_withdrawal.
Subscribe to withdrawals
Available only on servers:
Accepts the following message:
{
"method": "subscribe",
"id": "req-1",
"args": [
{
"channel": "withdrawals"
}
]
}
Withdrawal events for the authenticated user. No parameters.
Requires authentication before subscribing.
payment.type values on this channel: withdrawal, internal_withdrawal.
Receive withdrawal events
Available only on servers:
Accepts the following message:
{
"channel": "withdrawals",
"data": {
"event": "payment_processed",
"timestamp": 1741950000000,
"payment": {
"uuid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"asset": "USDT",
"network": "ethereum",
"amount": "500.00",
"status": "processed",
"tx_hash": "0xabc123...",
"source": "0x1234...",
"destination": "0x5678...",
"memo": null,
"type": "withdrawal",
"created_at": "2026-03-28T10:00:00Z",
"updated_at": "2026-03-28T10:05:00Z"
}
}
}
Internal transfer events for the authenticated user. No parameters. Requires authentication before subscribing.
Subscribe to transfers
Available only on servers:
Accepts the following message:
{
"method": "subscribe",
"id": "req-1",
"args": [
{
"channel": "transfers"
}
]
}
Internal transfer events for the authenticated user. No parameters. Requires authentication before subscribing.
Receive transfer events
Available only on servers:
Accepts the following message:
{
"channel": "transfers",
"data": {
"event": "transfer_processed",
"timestamp": 1741950000000,
"transfer": {
"uuid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"asset": "USDT",
"from_user_uuid": "d4e5f6a7-b8c9-0123-defa-234567890123",
"from_account": "main",
"to_user_uuid": "e5f6a7b8-c9d0-1234-efab-234567890123",
"to_account": "sub",
"amount": "100.00",
"status": "processed",
"created_at": "2026-03-28T10:00:00Z"
}
}
}