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.

p
​string

24h absolute price change.

P
​string

24h percentage price change.

w
​string

24h weighted average price.

c
​string

Latest traded price.

o
​string

Opening price at the start of the 24h window.

h
​string

24h high price.

l
​string

24h low price.

v
​string

24h trading volume (base asset).

q
​string

24h trading value (quote asset).

O
​number

Window start time (ms).

C
​number

Window end time (ms).

n
​number

Number of trades in the window.

m
​string

Latest mark price.

i
​string

Latest index price.


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.

t
​number

Candle start time (milliseconds).

T
​number

Candle close time (milliseconds).

s
​string

Trading pair in uppercase.

i
​string

Interval token exactly as subscribed (e.g. 1m).

o
​string

Open price.

c
​string

Close price.

h
​string

High price.

l
​string

Low price.

v
​string

Volume (base asset).

n
​number

Number of trades.

q
​string

Quote asset volume.

V
​string

Taker buy volume.

Q
​string

Taker buy quote volume.


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].

string[]
index[0]
​string

Bid price.

Example: 103435.90
index[1]
​string

Bid quantity at this price level.

Example: 2.10000
​array[]

Changed ask levels [price, size].

string[]
index[0]
​string

Ask price.

Example: 103436.10
index[1]
​string

Ask quantity at this price level.

Example: 1.21500
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.

T
​number

Trade execution time (milliseconds).

t
​number

Trade ID.

p
​string

Trade price.

q
​string

Trade quantity.

v
​string

Trade value (price × quantity).

m
​boolean

Whether the maker side was the seller (true = aggressive sell).