WebSocket Channel Reference
Connect to wss://ws.trade8.xyz/v1. Each subscription receives its own acknowledgement, sequence, and data envelope. Public channels carry exchange market data; private channels require a signed session and the scope shown below.
Use the Connection Guide for authentication, heartbeats, reconnects, and session control frames (auth, ping, acknowledgements, and errors). Prices, identifiers, rates, and balances in examples are illustrative.
Download Channel JSON Schemas · REST Reference
The JSON Schema download validates subscription commands and channel data messages.
Jump to a Channel
Ticker and Mark Prices
Best bid and ask, last trade, mark, and index prices for an exchange contract.
| Field | Required | Description |
|---|---|---|
instrument | Yes | Normalized perpetual family. |
venue | Yes | Exchange identifier. |
settlement_asset | Yes | Contract settlement asset. |
On Subscribe. Snapshot, followed by complete ticker replacements.
{
"op": "subscribe",
"id": "subscribe-ticker",
"channel": "ticker",
"instrument": "BTC-PERP",
"venue": "hyperliquid",
"settlement_asset": "USDC"
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_ticker",
"channel": "ticker",
"type": "snapshot",
"sequence": 1,
"previous_sequence": 0,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"instrument": "BTC-PERP",
"venue": "hyperliquid",
"settlement_asset": "USDC",
"bid": "76999",
"ask": "77001",
"last": "77000",
"mark_price": "77000",
"index_price": "76998",
"updated_at": "2026-08-31T12:00:00.000Z"
}
]
}| Field | Type | Description |
|---|---|---|
instrumentRequired | string | Normalized perpetual family, for example BTC-PERP. Select a settlement asset and exchange to identify a contract. |
venueRequired | string | Exchange identifier from GET /v1/venues, such as binance, okx, bybit, hyperliquid, or dydx. |
settlement_assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
bidRequired | string | Best bid price. |
askRequired | string | Best ask price. |
lastRequired | string | Last traded price. |
mark_priceRequired | string | Exchange mark price used for risk calculations. |
index_priceRequired | string | Exchange index price. |
updated_atRequired | string | UTC timestamp in RFC 3339 format. |
Recovery. Resubscribe for a fresh snapshot. REST Reference →
Level 2 Order Book
Price-level depth for Hyperliquid, Binance, OKX, or another enabled exchange. Delta quantities replace the existing size at each price.
| Field | Required | Description |
|---|---|---|
instrument | Yes | Normalized perpetual family. |
venue | Yes | Exchange identifier. |
settlement_asset | Yes | Contract settlement asset. |
depth | No | Levels per side: 10, 20, or 50. Default 20. |
On Subscribe. Full snapshot, then price-level deltas. Zero quantity removes a price level. Each delta includes all changes needed to maintain the requested depth.
{
"op": "subscribe",
"id": "subscribe-orderbook",
"channel": "orderbook",
"instrument": "BTC-PERP",
"venue": "hyperliquid",
"settlement_asset": "USDC",
"depth": 20
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_orderbook",
"channel": "orderbook",
"type": "snapshot",
"sequence": 1,
"previous_sequence": 0,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"instrument": "BTC-PERP",
"venue": "hyperliquid",
"settlement_asset": "USDC",
"book_sequence": 1042,
"bids": [
{
"price": "76999",
"quantity": "1.25000"
}
],
"asks": [
{
"price": "77001",
"quantity": "0.90000"
}
],
"updated_at": "2026-08-31T12:00:00.000Z"
}
]
}| Field | Type | Description |
|---|---|---|
instrumentRequired | string | Normalized perpetual family, for example BTC-PERP. Select a settlement asset and exchange to identify a contract. |
venueRequired | string | Exchange identifier from GET /v1/venues, such as binance, okx, bybit, hyperliquid, or dydx. |
settlement_assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
book_sequenceRequired | integer | Monotonic sequence for this exchange/instrument book. |
bidsRequired | array | Bids, highest price first. |
bids[].priceRequired | string | Price in the contract quote asset. |
bids[].quantityRequired | string | Absolute resting quantity in the contract base unit. Zero removes a level in a delta. |
asksRequired | array | Asks, lowest price first. |
asks[].priceRequired | string | Price in the contract quote asset. |
asks[].quantityRequired | string | Absolute resting quantity in the contract base unit. Zero removes a level in a delta. |
updated_atRequired | string | UTC timestamp in RFC 3339 format. |
Recovery. Pause book-dependent decisions after a gap. Resubscribe and replace the full book with the next snapshot. REST Reference →
Public Market Trades
Executed market trades, grouped by exchange contract. Side identifies the aggressor.
| Field | Required | Description |
|---|---|---|
instrument | Yes | Normalized perpetual family. |
venue | Yes | Exchange identifier. |
settlement_asset | Yes | Contract settlement asset. |
On Subscribe. Live updates after the subscription acknowledgement.
{
"op": "subscribe",
"id": "subscribe-trades",
"channel": "trades",
"instrument": "BTC-PERP",
"venue": "hyperliquid",
"settlement_asset": "USDC"
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_trades",
"channel": "trades",
"type": "update",
"sequence": 2,
"previous_sequence": 1,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"trade_id": "trade_example_01",
"instrument": "BTC-PERP",
"venue": "hyperliquid",
"settlement_asset": "USDC",
"side": "buy",
"price": "77001",
"quantity": "0.01000",
"executed_at": "2026-08-31T12:00:00.000Z"
}
]
}| Field | Type | Description |
|---|---|---|
trade_idRequired | string | Exchange trade identifier; deduplicate with venue. |
instrumentRequired | string | Normalized perpetual family, for example BTC-PERP. Select a settlement asset and exchange to identify a contract. |
venueRequired | string | Exchange identifier from GET /v1/venues, such as binance, okx, bybit, hyperliquid, or dydx. |
settlement_assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
sideRequired | string | Aggressor side. Values: buy, sell. |
priceRequired | string | Execution price in the contract quote asset. |
quantityRequired | string | Base quantity executed. |
executed_atRequired | string | UTC timestamp in RFC 3339 format. |
Recovery. Backfill market trades from the last saved executed_at, then deduplicate by venue and trade_id. REST Reference →
Funding Rate Updates
Indicative rates and the next exchange funding timestamp. Compare rate and interval together.
| Field | Required | Description |
|---|---|---|
instrument | Yes | Normalized perpetual family. |
venue | Yes | Exchange identifier. |
settlement_asset | Yes | Contract settlement asset. |
On Subscribe. Snapshot, followed by complete funding records.
{
"op": "subscribe",
"id": "subscribe-funding",
"channel": "funding",
"instrument": "BTC-PERP",
"venue": "binance",
"settlement_asset": "USDT"
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_funding",
"channel": "funding",
"type": "snapshot",
"sequence": 1,
"previous_sequence": 0,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"instrument": "BTC-PERP",
"venue": "binance",
"settlement_asset": "USDT",
"rate": "0.0001",
"interval_hours": "8",
"next_funding_at": "2026-08-31T16:00:00.000Z",
"type": "indicative"
}
]
}| Field | Type | Description |
|---|---|---|
instrumentRequired | string | Normalized perpetual family, for example BTC-PERP. Select a settlement asset and exchange to identify a contract. |
venueRequired | string | Exchange identifier from GET /v1/venues, such as binance, okx, bybit, hyperliquid, or dydx. |
settlement_assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
rateRequired | string | Decimal funding rate for the stated interval: 0.0001 = 0.01%. |
interval_hoursRequired | string | Hours covered by this rate. |
next_funding_atRequired | string | UTC timestamp in RFC 3339 format. |
typeRequired | string | Indicative rates can change before settlement. Values: indicative, final. |
Recovery. Read the current rate and resubscribe. REST Reference →
Exchange Connectivity
Connection and trading capability changes for Binance, Bybit, Hyperliquid, dYdX, and other integrations.
On Subscribe. Snapshot of all exchanges, then changed exchange records.
{
"op": "subscribe",
"id": "subscribe-venue_status",
"channel": "venue_status"
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_venue_status",
"channel": "venue_status",
"type": "snapshot",
"sequence": 1,
"previous_sequence": 0,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"id": "hyperliquid",
"name": "Hyperliquid",
"type": "decentralized",
"status": "operational",
"order_types": [
"market",
"limit"
],
"margin_modes": [
"cross",
"isolated"
],
"updated_at": "2026-08-31T12:00:00.000Z"
}
]
}| Field | Type | Description |
|---|---|---|
idRequired | string | Exchange identifier from GET /v1/venues, such as binance, okx, bybit, hyperliquid, or dydx. |
nameRequired | string | Exchange display name. |
typeRequired | string | Exchange category. Values: centralized, decentralized. |
statusRequired | string | Connection state in a streaming update. Values: operational, degraded, maintenance, offline. |
order_typesRequired | array | Enabled order types. |
margin_modesRequired | array | Available margin modes. |
updated_atRequired | string | UTC timestamp in RFC 3339 format. |
Recovery. Use the directory for exchange IDs. Resubscribe and wait for a fresh connectivity snapshot before routing. REST Reference →
Order Lifecycle
Parent order changes, including acknowledgements, triggers, fills, amendments, and cancellations.
| Field | Required | Description |
|---|---|---|
account_id | Yes | An account authorized for the authenticated key. |
On Subscribe. Snapshot of open orders, then complete records for changed orders, including terminal states.
{
"op": "subscribe",
"id": "subscribe-orders",
"channel": "orders",
"account_id": "acct_example_main"
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_orders",
"channel": "orders",
"type": "update",
"sequence": 2,
"previous_sequence": 1,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"order_id": "ord_example_01",
"account_id": "acct_example_main",
"client_order_id": "strategy-a-0001",
"instrument": "BTC-PERP",
"settlement_asset": "USDT",
"side": "buy",
"type": "limit",
"status": "partially_filled",
"requested_quantity": "0.100",
"filled_quantity": "0.060",
"remaining_quantity": "0.040",
"cancelled_quantity": "0.000",
"average_fill_price": "77000.00",
"revision": 2,
"created_at": "2026-08-31T12:00:00.000Z",
"updated_at": "2026-08-31T12:00:00.250Z"
}
]
}| Field | Type | Description |
|---|---|---|
order_idRequired | string | Trade8 parent order identifier. |
account_idRequired | string | Trading account identifier within the authorized account grant. |
client_order_idRequired | string | Unique client identifier within the account. Retain it for reconciliation. |
instrumentRequired | string | Normalized perpetual family, for example BTC-PERP. Select a settlement asset and exchange to identify a contract. |
settlement_assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
sideRequired | string | Direction. Values: buy, sell. |
typeRequired | string | Order type. |
statusRequired | string | Current order lifecycle state. Values: pending, accepted, trigger_pending, partially_filled, filled, cancelled, rejected, expired. |
requested_quantityRequired | string | Total requested base quantity. |
filled_quantityRequired | string | Cumulative executed base quantity. |
remaining_quantityRequired | string | Quantity still open or awaiting execution. Zero after a terminal state. |
cancelled_quantityRequired | string | Quantity cancelled, rejected, or expired without a fill. |
average_fill_priceRequired | string | null | Quantity-weighted price of actual fills; null before the first fill. |
revisionRequired | integer | Monotonic order revision. Use for optimistic concurrency and event reconciliation. |
created_atRequired | string | UTC timestamp in RFC 3339 format. |
updated_atRequired | string | UTC timestamp in RFC 3339 format. |
Recovery. Resubscribe for open orders, then reconcile tracked order IDs through REST. Keep the highest revision for each order. REST Reference →
Execution Fills
Individual executions with exchange IDs, liquidity role, and fees. Persist each fill_id once.
| Field | Required | Description |
|---|---|---|
account_id | Yes | An account authorized for the authenticated key. |
On Subscribe. Live updates after the subscription acknowledgement.
{
"op": "subscribe",
"id": "subscribe-fills",
"channel": "fills",
"account_id": "acct_example_main"
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_fills",
"channel": "fills",
"type": "update",
"sequence": 2,
"previous_sequence": 1,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"fill_id": "fill_example_01",
"order_id": "ord_example_01",
"account_id": "acct_example_main",
"instrument": "BTC-PERP",
"venue": "binance",
"venue_order_id": "bn_example_01",
"settlement_asset": "USDT",
"quantity": "0.060",
"price": "77000.00",
"fee": "0.462",
"fee_asset": "USDT",
"liquidity": "maker",
"executed_at": "2026-08-31T12:00:00.250Z"
}
]
}| Field | Type | Description |
|---|---|---|
fill_idRequired | string | Unique Trade8 fill identifier. |
order_idRequired | string | Parent order identifier. |
account_idRequired | string | Trading account identifier within the authorized account grant. |
instrumentRequired | string | Normalized perpetual family, for example BTC-PERP. Select a settlement asset and exchange to identify a contract. |
venueRequired | string | Exchange identifier from GET /v1/venues, such as binance, okx, bybit, hyperliquid, or dydx. |
venue_order_idRequired | string | Native exchange order identifier. |
settlement_assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
quantityRequired | string | Executed base quantity. |
priceRequired | string | Execution price in the quote asset. |
feeRequired | string | Trading charge for this fill; negative indicates a rebate. |
fee_assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
liquidityRequired | string | Liquidity role at execution. Values: maker, taker. |
executed_atRequired | string | UTC timestamp in RFC 3339 format. |
Recovery. Buffer live events while paging GET /v1/fills from the last saved executed_at through the acknowledgement started_at. Deduplicate on fill_id. REST Reference →
Positions and Leverage
Exchange-level position size, P&L, leverage, and margin mode. A zero-quantity update closes a position.
| Field | Required | Description |
|---|---|---|
account_id | Yes | An account authorized for the authenticated key. |
On Subscribe. Snapshot of open positions, then complete changed position records.
{
"op": "subscribe",
"id": "subscribe-positions",
"channel": "positions",
"account_id": "acct_example_main"
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_positions",
"channel": "positions",
"type": "snapshot",
"sequence": 1,
"previous_sequence": 0,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"position_id": "pos_example_01",
"account_id": "acct_example_main",
"instrument": "BTC-PERP",
"venue": "binance",
"settlement_asset": "USDT",
"side": "long",
"quantity": "0.060",
"entry_price": "77000.00",
"mark_price": "77100.00",
"unrealized_pnl": "6.00",
"liquidation_price": "64000.00",
"leverage": "5",
"margin_mode": "isolated",
"updated_at": "2026-08-31T12:00:00.000Z"
}
]
}| Field | Type | Description |
|---|---|---|
position_idRequired | string | Position identifier. |
account_idRequired | string | Trading account identifier within the authorized account grant. |
instrumentRequired | string | Normalized perpetual family, for example BTC-PERP. Select a settlement asset and exchange to identify a contract. |
venueRequired | string | Exchange identifier from GET /v1/venues, such as binance, okx, bybit, hyperliquid, or dydx. |
settlement_assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
sideRequired | string | Position direction. Values: long, short. |
quantityRequired | string | Absolute base quantity; zero marks a closed position update. |
entry_priceRequired | string | Quantity-weighted entry price. |
mark_priceRequired | string | Current exchange mark price. |
unrealized_pnlRequired | string | Unrealized P&L in the settlement asset. |
liquidation_priceRequired | string | null | Estimated exchange liquidation price, or null when unavailable. |
leverageRequired | string | Configured leverage multiplier. |
margin_modeRequired | string | Exchange margin mode. Values: cross, isolated. |
updated_atRequired | string | UTC timestamp in RFC 3339 format. |
Recovery. Replace local open positions from a fresh subscription snapshot. REST Reference →
Account Balances
Per-asset ledger balances and amounts available or committed.
| Field | Required | Description |
|---|---|---|
account_id | Yes | An account authorized for the authenticated key. |
On Subscribe. Snapshot, then complete records for changed assets.
{
"op": "subscribe",
"id": "subscribe-balances",
"channel": "balances",
"account_id": "acct_example_main"
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_balances",
"channel": "balances",
"type": "snapshot",
"sequence": 1,
"previous_sequence": 0,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"account_id": "acct_example_main",
"asset": "USDT",
"total": "10000.00",
"available": "7500.00",
"committed": "2500.00",
"updated_at": "2026-08-31T12:00:00.000Z"
}
]
}| Field | Type | Description |
|---|---|---|
account_idRequired | string | Trading account identifier within the authorized account grant. |
assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
totalRequired | string | Ledger balance in this asset, excluding unrealized P&L. |
availableRequired | string | Uncommitted ledger balance. |
committedRequired | string | Amount allocated or reserved. available + committed = total. |
updated_atRequired | string | UTC timestamp in RFC 3339 format. |
Recovery. Replace local balances from a fresh snapshot and reconcile any pending transfers. REST Reference →
Margin and Risk Alerts
Exchange-level margin headroom and risk state changes.
| Field | Required | Description |
|---|---|---|
account_id | Yes | An account authorized for the authenticated key. |
On Subscribe. Snapshot, then complete changed risk records.
{
"op": "subscribe",
"id": "subscribe-risk",
"channel": "risk",
"account_id": "acct_example_main"
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_risk",
"channel": "risk",
"type": "snapshot",
"sequence": 1,
"previous_sequence": 0,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"account_id": "acct_example_main",
"venue": "binance",
"settlement_asset": "USDT",
"equity": "2506.00",
"initial_margin": "925.20",
"maintenance_margin": "23.13",
"available_margin": "1580.80",
"margin_ratio": "0.009230",
"state": "normal",
"updated_at": "2026-08-31T12:00:00.000Z"
}
]
}| Field | Type | Description |
|---|---|---|
account_idRequired | string | Trading account identifier within the authorized account grant. |
venueRequired | string | Exchange identifier from GET /v1/venues, such as binance, okx, bybit, hyperliquid, or dydx. |
settlement_assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
equityRequired | string | Equity in settlement_asset, including unrealized P&L. |
initial_marginRequired | string | Initial margin requirement. |
maintenance_marginRequired | string | Maintenance margin requirement. |
available_marginRequired | string | Margin available for new positions after reservations. |
margin_ratioRequired | string | Maintenance margin / equity. Rising values indicate less headroom. |
stateRequired | string | Exchange risk state. Values: normal, warning, reduce_only, liquidating. |
updated_atRequired | string | UTC timestamp in RFC 3339 format. |
Recovery. Refresh risk before resuming order submission; resubscribe for subsequent updates. REST Reference →
Custody Collateral
Allocation changes for custody routes such as Ceffu/Binance and Copper/OKX.
| Field | Required | Description |
|---|---|---|
account_id | Yes | An account authorized for the authenticated key. |
On Subscribe. Snapshot of pending, active, and releasing allocations, then all changed allocation records.
{
"op": "subscribe",
"id": "subscribe-collateral",
"channel": "collateral",
"account_id": "acct_example_main"
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_collateral",
"channel": "collateral",
"type": "snapshot",
"sequence": 1,
"previous_sequence": 0,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"allocation_id": "alloc_example_01",
"account_id": "acct_example_main",
"client_allocation_id": "collateral-0001",
"custody_account_id": "cust_example_ceffu",
"custodian": "ceffu",
"venue": "binance",
"asset": "USDT",
"amount": "2500.00",
"status": "active",
"updated_at": "2026-08-31T12:00:00.000Z"
}
]
}| Field | Type | Description |
|---|---|---|
allocation_idRequired | string | Collateral allocation identifier. |
account_idRequired | string | Trading account identifier within the authorized account grant. |
client_allocation_idRequired | string | Unique client identifier within the account. Retain it for reconciliation. |
custody_account_idRequired | string | Source custody account. |
custodianRequired | string | Custodian identifier. |
venueRequired | string | Exchange identifier from GET /v1/venues, such as binance, okx, bybit, hyperliquid, or dydx. |
assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
amountRequired | string | Amount in asset units. |
statusRequired | string | Active means the exchange has acknowledged usable collateral. Values: pending, active, releasing, released, rejected. |
updated_atRequired | string | UTC timestamp in RFC 3339 format. |
Recovery. Refresh allocations and reconcile any request awaiting exchange acknowledgement. REST Reference →
Settlement Events
Settlement processing updates with custodian, exchange, asset, and cycle identifiers.
| Field | Required | Description |
|---|---|---|
account_id | Yes | An account authorized for the authenticated key. |
On Subscribe. Live updates after the subscription acknowledgement.
{
"op": "subscribe",
"id": "subscribe-settlements",
"channel": "settlements",
"account_id": "acct_example_main"
}Message Example and Payload Fields
{
"op": "data",
"subscription_id": "sub_example_settlements",
"channel": "settlements",
"type": "update",
"sequence": 2,
"previous_sequence": 1,
"timestamp": "2026-08-31T12:00:00.000Z",
"data": [
{
"settlement_id": "settle_example_01",
"account_id": "acct_example_main",
"custodian": "copper",
"venue": "okx",
"asset": "USDT",
"amount": "125.50",
"status": "completed",
"cycle_start": "2026-08-31T08:00:00.000Z",
"cycle_end": "2026-08-31T12:00:00.000Z",
"updated_at": "2026-08-31T12:00:00.000Z"
}
]
}| Field | Type | Description |
|---|---|---|
settlement_idRequired | string | Settlement record identifier. |
account_idRequired | string | Trading account identifier within the authorized account grant. |
custodianRequired | string | Custodian identifier. |
venueRequired | string | Exchange identifier from GET /v1/venues, such as binance, okx, bybit, hyperliquid, or dydx. |
assetRequired | string | Asset symbol, such as BTC, USDT, or USDC. |
amountRequired | string | Positive credits the custody account; negative debits it. |
statusRequired | string | Settlement processing state. Values: pending, processing, completed, failed. |
cycle_startRequired | string | UTC timestamp in RFC 3339 format. |
cycle_endRequired | string | UTC timestamp in RFC 3339 format. |
updated_atRequired | string | UTC timestamp in RFC 3339 format. |
Recovery. Page settlement history with an overlapping cycle window; retain the latest updated_at for each settlement_id. REST Reference →