Welcome to the new WEEX API documentation. Looking for the previous version?Switch to the legacy docs
WEEX
WEEX Futures WebSocket Streams

Public Channels

Endpoint

Market Channel

Streams 24h ticker statistics for a contract, including price change, weighted average price, and the latest trade. Ticker data is pushed whenever upstream metrics change (typically within 100-300 ms).

WSS
{symbol}@ticker
wss://ws-contract.weex.com/v3/ws/public

Market Channel › Stream Parameters

symbol
​string · required

Trading pair. Used in the subscription topic inside params, not appended to the WebSocket URL.

Example: BTCUSDT

Market Channel › Request Parameters

method
​string · required

Use SUBSCRIBE to add, UNSUBSCRIBE to remove subscriptions.

Example: SUBSCRIBE
params
​string[] · required

Each entry uses the format @ticker. Symbols are quoted in base/quote (e.g. BTCUSDT).

Example: ["BTCUSDT@ticker"]
id
​number

Client-defined identifier echoed in the acknowledgement.

Example: 1

Market Channel › Responses

Market Channel

e
​string

Event type (ticker).

E
​number

Event time in milliseconds.

s
​string

Trading pair in uppercase (e.g. BTCUSDT).

​object[]

Ticker statistic objects.


Candlestick Channel

Streams candlestick (K-line) data for a contract. After a successful subscription the server pushes kline updates whenever the requested bar is created or refreshed.

WSS
{symbol}@kline_{interval}_{priceType}
wss://ws-contract.weex.com/v3/ws/public

Candlestick Channel › Stream Parameters

symbol
​string · required

Trading pair. Used in the subscription topic inside params, not appended to the WebSocket URL.

Example: ETHUSDT
interval
​string · enum · required

Candlestick interval; case-sensitive.

Enum values:
1m
5m
15m
30m
1h
2h
4h
6h
Example: 1m
priceType
​string · enum · required

Candlestick price type.

Enum values:
LAST_PRICE
MARK_PRICE
Example: LAST_PRICE

Candlestick Channel › Request Parameters

method
​string · required

SUBSCRIBE or UNSUBSCRIBE.

Example: SUBSCRIBE
params
​string[] · required

@kline__.Examples: BTCUSDT@kline_1m_LAST_PRICE, ETHUSDT@kline_1h_MARK_PRICE.

Example: ["ETHUSDT@kline_1m_LAST_PRICE"]
id
​number

Client identifier echoed in the acknowledgement.

Example: 4

Candlestick Channel › Responses

Candlestick Channel

e
​string

Event type, kline.

E
​number

Event time (milliseconds).

s
​string

Trading pair in uppercase.

p
​string

Price type (e.g. LAST_PRICE).

​object[]

Candle entries, usually containing the currently forming bar.


Depth Channel

Streams merged order book depth change events (depth) for the subscribed trading pair and level.

WSS
{symbol}@depth{level}
wss://ws-contract.weex.com/v3/ws/public

Depth Channel › Stream Parameters

symbol
​string · required

Trading pair. Used in the subscription topic inside params, not appended to the WebSocket URL.

Example: BTCUSDT
level
​integer · enum · required

Number of order book levels to stream.

Enum values:
15
200
Example: 15

Depth Channel › Request Parameters

method
​string · required

SUBSCRIBE to add, UNSUBSCRIBE to remove.

Example: SUBSCRIBE
params
​string[] · required

@depth{level}. Supported levels: 15, 200. Example: BTCUSDT@depth15.

Example: ["BTCUSDT@depth15"]
id
​number

Client-defined identifier echoed in the acknowledgement.

Example: 2

Depth Channel › Responses

Depth Channel

e
​string

Event type, depth.

E
​number

Event time (ms).

s
​string

Trading pair.

U
​number

First update ID for this message.

u
​number

Last update ID for this message.

l
​number

Book depth level.

d
​string

Depth type, CHANGED.

​array[]

Changed bid levels [price, size].

​array[]

Changed ask levels [price, size].

f
​string

Merge factor (present on merged-depth updates only).


Public Trade Channel

Streams recent taker trades for a contract. After subscribing the server delivers real-time trade updates (trade).

WSS
{symbol}@trade
wss://ws-contract.weex.com/v3/ws/public

Public Trade Channel › Stream Parameters

symbol
​string · required

Trading pair. Used in the subscription topic inside params, not appended to the WebSocket URL.

Example: BTCUSDT

Public Trade Channel › Request Parameters

method
​string · required

SUBSCRIBE or UNSUBSCRIBE.

Example: SUBSCRIBE
params
​string[] · required

@trade, e.g. BTCUSDT@trade.

Example: ["BTCUSDT@trade"]
id
​number

Client identifier echoed in the acknowledgement.

Example: 3

Public Trade Channel › Responses

Public Trade Channel

e
​string

Event type, trade.

E
​number

Event time in milliseconds.

s
​string

Trading pair in uppercase (e.g. BTCUSDT).

​object[]

Trade entries, typically containing the latest fills.