Private WebSocket
The private WebSocket endpoint is wss://<ws-domain>/api/v1/private/ws.
Private WebSocket uses the same authentication rules as the private HTTP APIs. No subscribe message is required. After authentication succeeds, the server sends connected, then the initial Snapshot, and then later account-scoped business updates.
For credential requirements and signature generation, see the Authentication Guide.
Connect and Authenticate
WebSocket URL
Use the private WebSocket endpoint:
wss://<ws-domain>/api/v1/private/ws
WebSocket Query Parameters
The following query parameters must be included on the private WebSocket connection URL:
accountId(integer, required): EdgeX account identifiertimestamp(integer, required): Current millisecond timestamp
WebSocket Authentication Headers
The following headers must be included in the private WebSocket handshake request:
X-edgeX-Api-Key(string, required): Your API Key obtained from the EdgeX platformX-edgeX-Passphrase(string, required): Your API Passphrase set during API key creationX-edgeX-Timestamp(string, required): Request timestamp in millisecondsX-edgeX-Signature(string, required): HMAC-SHA256 signature of the request
Private WebSocket uses the same HMAC credential set and HMAC-SHA256 signing flow as private REST APIs. This page does not repeat the signing algorithm. Use the Authentication Guide to generate X-edgeX-Signature.
Minimal Connection Request
Heartbeat
The connection uses a bidirectional ping-pong heartbeat.
The server sends
ping.The client should reply with
pongand echo the sametime.The client can also send
pingproactively to measure latency.
Server ping example:
Client pong example:
Initial Snapshot
After authentication succeeds, the server first confirms the session and then pushes the current full account state.
Connection success example from a live session:
Trimmed live snapshot excerpt with representative fields:
Event Updates
All business pushes use the same top-level event envelope.
This page documents the stable envelope and representative business fields only. It does not attempt to enumerate the complete schema of every nested record under account, collateral, position, order, deposit, withdraw, transferIn, or transferOut.
For complete nested record details, use verified responses together with the corresponding gateway model as the source of truth.
Message Envelope
type
string
Top-level message family. Business pushes use trade-event.
content.event
string
Business event name such as Snapshot, ORDER_UPDATE, or TRANSFER_OUT_UPDATE.
content.version
integer
Event version for ordering incremental updates.
content.time
integer
Server timestamp in milliseconds for the business event.
content.accountId
integer
Present in live samples. Current sampled value is 0, so clients should not treat it as the authoritative account identifier.
content.data
object
Business payload grouped by entity type.
sid
string
Present on the connected message, not on trade-event payloads.
time
string
Present on connected, ping, and pong.
Business Category Mapping
Business Category
content.event
Account Snapshot
Snapshot
Trade Updates
ORDER_UPDATE
Asset Updates
DEPOSIT_UPDATE, WITHDRAW_UPDATE, TRANSFER_IN_UPDATE, TRANSFER_OUT_UPDATE
Funding Settlement
FUNDING_SETTLEMENT
Common content.data Groups
account
Account summary records.
collateral
Current collateral balances.
collateralTransaction
Balance movement records.
position
Current position records.
positionTransaction
Position movement records.
deposit
Deposit records.
withdraw
Withdrawal records.
transferIn
Internal transfer-in records.
transferOut
Internal transfer-out records.
order
Order records.
orderFillTransaction
Fill records generated by matched orders.
Not every event populates every group. Unaffected groups may be empty.
Account Snapshot
Trigger Scenario
The server pushes this message immediately after a successful authenticated connection. Clients should also treat the next Snapshot after reconnect as the new local baseline.
Message Mapping
type:trade-eventcontent.event:Snapshot
Common content.data Fields
account
Current account-level status and account settings.
collateral
Current collateral balances and cumulative balance counters.
position
Current open positions.
order
Current open or waiting orders.
Response Example
The example below is a trimmed live snapshot excerpt with representative fields only.
Trade Updates
This page uses one trimmed live ORDER_UPDATE example as the primary trade update example.
Trigger Scenario
The server pushes this category when an order is created, accepted, triggered, canceled, partially filled, or fully filled, and when that order changes positions or collateral.
Message Mapping
type:trade-eventcontent.event:ORDER_UPDATE
Common content.data Fields
order
The updated order record.
orderFillTransaction
Fill records created by matching.
position
Updated position state after the order changes exposure.
positionTransaction
Position movement records related to the order result.
collateral
Updated collateral balances after realized PnL, fees, or margin changes.
collateralTransaction
Collateral movement records related to the order lifecycle.
account
Optional account summary updates.
Response Example
The example below is a trimmed live ORDER_UPDATE excerpt with representative fields only.
Asset Updates
This category groups deposit, withdrawal, and internal transfer state changes under one business-facing section.
Trigger Scenario
The server pushes this category when an asset movement changes account balances or when the related asset-flow record changes status.
Message Mapping
type:trade-eventcontent.event: one ofDEPOSIT_UPDATE,WITHDRAW_UPDATE,TRANSFER_IN_UPDATE, orTRANSFER_OUT_UPDATE
content.event
Business Meaning
Primary Record Group
DEPOSIT_UPDATE
Deposit state or balance change
deposit
WITHDRAW_UPDATE
Withdrawal state or balance change
withdraw
TRANSFER_IN_UPDATE
Internal transfer-in state or balance change
transferIn
TRANSFER_OUT_UPDATE
Internal transfer-out state or balance change
transferOut
Common content.data Fields
deposit
Deposit records when content.event is DEPOSIT_UPDATE.
withdraw
Withdrawal records when content.event is WITHDRAW_UPDATE.
transferIn
Transfer-in records when content.event is TRANSFER_IN_UPDATE.
transferOut
Transfer-out records when content.event is TRANSFER_OUT_UPDATE.
collateral
Updated collateral balances after funds are credited or debited.
collateralTransaction
Balance movement records created by the asset flow.
account
Optional account summary updates.
Response Example
The example below is a trimmed live TRANSFER_OUT_UPDATE excerpt with representative fields only.
Funding Settlement
Funding settlement is a dedicated business category in the private event set.
Trigger Scenario
The server pushes this category when the system settles funding fees for eligible open positions.
Message Mapping
type:trade-eventcontent.event:FUNDING_SETTLEMENT
This page does not attempt to enumerate the nested settlement record model here. Use verified responses and the corresponding gateway model when documenting settlement-specific fields.
Last updated