Create a builder code
Each QFEX account may have one active builder code. An aggregator normally creates one code for its own account and reuses that same UUID across its end-user Trade WebSocket connections. Do not create one builder code per trader.POST /user/builder-code. HMAC headers are required. A second active create returns 409 Conflict.
Specify both fee shares in basis points:
qfex_fee_share_bps: QFEX’s share of the trading fee. Minimum 5000 (50%).builder_fee_share_bps: the builder’s share of the trading fee. Must be >= 0 and at most 5000 (50%).- The two shares need not sum to 10000, but their sum must be at most 10000.
View your builder code
UseGET /user/builder-code to retrieve the authenticated user’s active builder code and configured fee shares. If the user has not created an active code, the API returns 404.
builder_code UUID in your integration and attach it when authenticating attributed Trade WebSocket connections. Do not put it on individual order messages.
Use a builder code on the Trade WebSocket
The builder code belongs on the Trade WebSocket auth message. It applies to the entire connection.HMAC authentication
Connect with your API public key:builder_code next to the HMAC block:
JWT or OAuth authentication
When authenticating with a QFEX user JWT, including a token obtained through QFEX OAuth, connect with the JWT as the query parameter:account_id on the same auth payload if the session should trade on a subaccount.
Browser WebSocket APIs cannot set custom handshake headers, so params.builder_code is the recommended way to attach the code. Native clients may send x-qfex-builder-code on the WebSocket upgrade instead; if the auth message also includes builder_code, the auth message wins.
The code applies for the life of that connection. Reconnect and send auth again to change or drop it. Orders, stop orders, and TWAPs placed on that connection inherit the builder code automatically.
If the code is missing, empty, inactive, or unknown, no builder rewards are attributed.
See Authenticate for HMAC signing and full client samples, or Builder Integration Guide for the end-to-end OAuth flow.
Builder rewards
Credited builder share is exposed asbuilder_rewards on the builder-code owner’s public user balance.
- Trade WebSocket balances channel
- REST
GET /user/positionsbalance object