Connection
Establishes a WebSocket connection for real-time data streams.
Connection URL
wss://derivatives.api.dlt-finance.com/v1/ws
No authentication is required for public channels. Private channels
(orders, trades, margin) require authentication — see below.
Client → Server Messages
All client messages are JSON objects with an op field.
Subscribe — begin receiving data for one or more topics:
{"op": "subscribe", "args": ["orderbook:BTCUSD_PERP", "orderbook:ETHUSD_PERP"]}
Unsubscribe — stop receiving data for a topic:
{"op": "unsubscribe", "args": ["orderbook:BTCUSD_PERP"]}
Authenticate — authenticate the connection for private channels:
{"op": "authenticate", "public_key": "aabbccdd...", "nonce": "1531816217872000000", "signature": "eeff0011..."}
Ping — check connection liveness:
{"op": "ping"}
Server → Client Messages
Subscribe acknowledgement — sent after each successful subscription:
{"op": "subscribe", "success": true, "args": ["orderbook:BTCUSD_PERP"]}
Authenticate acknowledgement — sent after successful authentication:
{"op": "authenticate", "success": true}
Error — sent when a request cannot be fulfilled:
{
"op": "error",
"code": "UNKNOWN_SYMBOL",
"message": "Unknown symbol: FOOBAR_PERP",
"args": ["orderbook:FOOBAR_PERP"]
}
Error codes: UNKNOWN_SYMBOL, ALREADY_SUBSCRIBED, NOT_SUBSCRIBED, INVALID_MESSAGE,
AUTHENTICATION_REQUIRED, AUTHENTICATION_FAILED.
Pong — response to a client ping:
{"op": "pong"}
Heartbeat — server-initiated every ~10 s when no data has been sent:
{"op": "heartbeat", "timestamp": "2025-06-15T07:30:00Z"}
Behaviour Notes
- One connection supports any number of simultaneous topic subscriptions.
- Subscribing to an already-subscribed topic returns
ALREADY_SUBSCRIBED. - Unsubscribing from a topic not currently subscribed returns
NOT_SUBSCRIBED. - Data begins flowing immediately after a successful subscribe acknowledgement.
- The server closes the connection after 60 s of inactivity (no messages in either direction).
Authentication
Private channels require authentication before subscribing. Authentication uses the same ed25519 signature scheme as the REST API, with a fixed method and path.
Signature construction:
message = GET/v1/derivatives/ws{nonce}
Send the authenticate message with your public key, nonce, and signature:
{"op": "authenticate", "public_key": "aabbccdd...", "nonce": "1531816217872000000", "signature": "eeff0011..."}
On success the server responds with:
{"op": "authenticate", "success": true}
On failure the server responds with an error:
{"op": "error", "code": "AUTHENTICATION_FAILED", "message": "Invalid signature"}
Subscribing to a private channel without authenticating first returns:
{"op": "error", "code": "AUTHENTICATION_REQUIRED", "message": "Authentication required for channel: orders", "args": ["orders"]}
- Authentication applies for the lifetime of the connection.
- Public channels continue to work without authentication.
- Private channels:
orders,trades,margin,liquidations.
📄️ Introduction
REST API for derivatives trading on DLT Markets.
📄️ Connection
Connection
📄️ Orderbook snapshots
Orderbook snapshots
📄️ Ticker
Ticker
📄️ Order updates
Order updates
📄️ Trade updates
Trade updates
📄️ Margin updates
Margin updates
📄️ Liquidation updates
Liquidation updates