Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

QFEX Trade WebSocket

Multiplexed WebSocket gateway for QFEX order entry and account streams: add / modify / cancel orders, stop orders, TWAPs, close position, leverage, balances, positions, fills and order responses. Requires HMAC-SHA256 authentication within one minute of connecting. Documented as AsyncAPI 3.0.

This event API exposes 0 operations across 1 channel, and defines 76 schemas. It is described by AsyncAPI 3.0.0, at version 1.0.0.

The API connects through a single server, trade.qfex.com (wss).

0 operations 1 channels 76 schemas

Metadata

The identity and technical contract details declared by the specification.

Specification
AsyncAPI 3.0.0
API Version
1.0.0
Base URL
wss://trade.qfex.com

Messages & Schemas 76

The contract defines 76 schemas that model the data carried by its messages. The most detailed are FillResponse (19 properties), OrderResponse (15 properties), TwapResponse (14 properties), PositionPayload (13 properties). Each schema is shown below with its type and property counts.

AuthenticateCommand
message
Authenticate to the WebSocket gateway. Required before any other commands.
SubscribeOrdersCommand
message
Subscribe to user orders. Receive live updates on current orders.
SubscribePositionsCommand
message
Subscribe to user positions. Receive 1s pulsed updates on current positions.
SubscribeBalanceCommand
message
Subscribe to user balance. Receive 1s pulsed updates on current balance.
SubscribeFillsCommand
message
Subscribe to user fills. Receive live updates for executed trades.
SetLeverageCommand
message
Set leverage level for a symbol
GetLeverageCommand
message
Get current leverage levels per symbol
GetAvailableLeverageCommand
message
Get available leverage levels per symbol
AddOrderCommand
message
Add order.
CancelOrderCommand
message
Cancel order.
ModifyOrderCommand
message
Modify order.
UnsubscribeCommand
message
Unsubscribe from channels.
GetOrderCommand
message
Get order details by orderid or clientorderid.
GetUserOrdersCommand
message
Get active orders for the user.
CancelOnDisconnectCommand
message
Enable or disable cancel-on-disconnect feature for this connection.
ClosePositionCommand
message
Close an open position.
AddTwapCommand
message
Create a TWAP order.
GetUserTradesCommand
message
Get user trade history.
CancelStopOrderCommand
message
Cancel a stop order.
ModifyStopOrderCommand
message
Modify a stop order.
CancelAllOrdersCommand
message
Cancel all orders.
BalanceUpdate
message
User balance updates
PositionUpdate
message
User position updates
OrderResponse
message
Response containing a single order.
FillResponse
message
Response containing a single fill.
AllOrdersResponse
message
Response containing a list of orders.
AuthenticatedResponse
message
Response indicating authentication success.
TwapResponse
message
Response containing a TWAP.
UserTradesResponse
message
Response containing user trades.
UserLeverageResponse
message
Response containing user leverage settings.
AvailableLeverageLevelsResponse
message
Response containing available leverage levels.
SubscribedResponse
message
Confirmation of subscription.
UnsubscribedResponse
message
Confirmation of unsubscription.
StopOrderResponse
message
Response containing a stop order.
PositionResponse
message
Response containing a position.
BalanceResponse
message
Response containing a balance.
AckResponse
message
General acknowledgment.
ErrorResponse
message
Error response.
MessageEnvelope
object
5 properties 3 required
SubscribeOrdersCommand
object
2 properties 2 required
SubscribePositionsCommand
object
2 properties 2 required
SubscribeBalanceCommand
object
2 properties 2 required
SubscribeFillsCommand
object
2 properties 2 required
SetLeverageCommand
object
2 properties 2 required
GetLeverageCommand
object
2 properties 2 required
GetAvailableLeverageCommand
object
2 properties 2 required
AuthenticateCommand
object
2 properties 2 required
GetOrderCommand
object
2 properties 2 required
GetUserOrdersCommand
object
2 properties 2 required
CancelOnDisconnectCommand
object
2 properties 2 required
ClosePositionCommand
object
2 properties 2 required
AddTwapCommand
object
2 properties 2 required
GetUserTradesCommand
object
2 properties 2 required
CancelStopOrderCommand
object
2 properties 2 required
ModifyStopOrderCommand
object
2 properties 2 required
UnsubscribeCommand
object
2 properties 2 required
AddOrderCommand
object
2 properties 2 required
CancelOrderCommand
object
2 properties 2 required
ModifyOrderCommand
object
2 properties 2 required
CancelAllOrdersCommand
object
2 properties 2 required
BalanceUpdate
object
PositionUpdate
object
BboPayload
object
5 properties
OrderBookPayload
object
2 properties
TradePayload
object
9 properties
FillResponse
object
19 properties
BalancePayload
object
11 properties
PositionPayload
object
13 properties
OrderResponse
object
15 properties
AllOrdersResponse
object
2 properties
TwapResponse
object
14 properties
ErrResponse
object
3 properties 1 required
LeveragePublic
object
6 properties
StopOrder
object
9 properties
AckResponse
object
1 property
PnlEntryPayload
object
3 properties

Specification

The full machine-readable AsyncAPI contract behind this narrative.

Source

qfex-trade-asyncapi.yml Raw ↑