# QFEX API Documentation - [About QFEX](https://docs.qfex.com/qfex/about.md): How Markets Should Be - [Market Makers](https://docs.qfex.com/qfex/market-makers.md): Institutional connectivity enquiries - [FAQ](https://docs.qfex.com/qfex/faq.md): Frequently Asked Questions - [Bank Transfer](https://docs.qfex.com/qfex/bank-transfer.md): Pay via Bank Transfer - [Stablecoins](https://docs.qfex.com/qfex/stablecoins.md): Pay via Stablecoins - [Builder Codes](https://docs.qfex.com/qfex/builder-code.md): Create a builder code, integrate QFEX trading, and earn builder rewards - [QFEX Referral Program](https://docs.qfex.com/qfex/referral.md): Earn Cash Rewards - [Managed Account Strategy](https://docs.qfex.com/qfex/managed-account.md): Invite-only systematic market-neutral trading for eligible high-volume QFEX traders. - [Agentic Trading](https://docs.qfex.com/qfex/agentic-trading.md): Use AI agents to research markets, manage positions, and trade on QFEX. - [Definitions and Formulae](https://docs.qfex.com/qfex/definitions.md): Common Terms Used in the Rulebook - [Exchange](https://docs.qfex.com/qfex/architecture.md): Technical Description of the Exchange - [Order Entry](https://docs.qfex.com/qfex/order-types.md): Supported Order Types and Times in Force - [Contract Specifications](https://docs.qfex.com/qfex/contract-specifications.md): Perpetual Futures Adapted for Traditional Assets - [Pre-IPO Stock Perpetuals](https://docs.qfex.com/qfex/pre-ipo-stocks.md): How QFEX prices, funds, and adjusts perpetuals referencing companies before an IPO. - [Specification Index](https://docs.qfex.com/qfex/specification-index.md): A consolidated view of active QFEX production contract, execution, session, and risk parameters. - [Roll Schedules](https://docs.qfex.com/qfex/roll-schedules.md): Published dated-futures contracts and roll boundaries used by QFEX oracle pricing. - [Funding](https://docs.qfex.com/qfex/funding.md): When funding is active, why it can be zero, and how rates are computed. - [Risk Limits](https://docs.qfex.com/qfex/risk-limits.md): Stay Safe - [Margin and Liquidations](https://docs.qfex.com/qfex/liquidation-margin-call.md): A Detailed Description of the Liquidation Cascade - [Corporate Actions](https://docs.qfex.com/qfex/corporate-actions.md): QFEX Policy on Equity Corporate Actions - [Fees](https://docs.qfex.com/qfex/fees.md) - [Subaccounts](https://docs.qfex.com/qfex/subaccounts.md): Separate your margin and risk - [Blocked Countries and Restrictions](https://docs.qfex.com/qfex/prohibited-jurisdictions.md) - [Introduction](https://docs.qfex.com/api-reference/introduction.md) - [API Keys](https://docs.qfex.com/api-reference/api-keys.md): Create and securely use account-scoped API keys with granular permissions. - [Wallet authentication](https://docs.qfex.com/api-reference/wallet-authentication.md): Sign up or sign in to QFEX programmatically with an Ethereum wallet and use the resulting session. - [Programmatic deposits and withdrawals](https://docs.qfex.com/api-reference/programmatic-funding.md): Fund a QFEX account and request crypto or USD withdrawals with the REST API. - [CLI](https://docs.qfex.com/api-reference/cli.md): JSON-native command-line access to QFEX market data, trading, and account state. - [Enums](https://docs.qfex.com/api-reference/enums.md) - [Errors](https://docs.qfex.com/websocket/errors.md) - [API Rate Limits](https://docs.qfex.com/websocket/rate.md): This page explains how request throttling works on our **WebSocket trading API**. If you’re writing a client, read this to avoid `RateLimited` errors. - [REST API changelog](https://docs.qfex.com/api-reference/rest-changelog.md): Public REST API changes released to production. - [Changelog](https://docs.qfex.com/websocket/changelog.md): Product updates and announcements - [Builder Integration Guide](https://docs.qfex.com/api-reference/builder-integration.md): Choose OAuth or wallet-signed trading keys to onboard users and attribute their trading to your builder code - [Builder wallet registration](https://docs.qfex.com/api-reference/builder-wallet-registration.md): Use a wallet signature to create a main-account trading key for a builder's users. - [Builder Codes API](https://docs.qfex.com/api-reference/builder-codes.md): Create and retrieve builder codes, attach them to Trade WebSocket sessions, and read builder rewards - [Generate a wallet user's main-account trading key](https://docs.qfex.com/api-reference/rest/builder/generate-a-wallet-users-main-account-trading-key.md): Requires the builder's existing API key with register_user. The signed wallet message must authorize the caller's active builder code and be issued within ten minutes. Replaces the wallet user's previous builder-{builder-username} key by deleting the previous key. The key permits trading, account an… - [Get the wallet message for a builder trading key](https://docs.qfex.com/api-reference/rest/builder/get-the-wallet-message-for-a-builder-trading-key.md): Public endpoint. Pass address and builder_code as query parameters. Returns a SIWE message with the supplied wallet address and the supplied builder code, a random nonce, and a ten-minute validity window. Sign the returned message unchanged and submit it to /builder/web3/api-key. - [Candles](https://docs.qfex.com/api-reference/rest/market-data/candles.md): Return OHLCV candles for a symbol over a time range. - [DefiLlama Metrics](https://docs.qfex.com/api-reference/rest/market-data/defillama-metrics.md): Return QFEX aggregate volume and USD open interest metrics for DefiLlama. - [Funding Historic](https://docs.qfex.com/api-reference/rest/market-data/funding-historic.md): Return historic funding rates for a symbol over a time range with forward filling. - [Contracts](https://docs.qfex.com/api-reference/rest/market-data/contracts.md): Return mandatory contract metadata and current market data for all symbols. - [Order Book](https://docs.qfex.com/api-reference/rest/market-data/order-book.md): Return current order book depth for a ticker. - [Open Interest Historic](https://docs.qfex.com/api-reference/rest/market-data/open-interest-historic.md): Return historic open interest for a symbol over a time range with forward filling. - [Refdata](https://docs.qfex.com/api-reference/rest/market-data/refdata.md): Return symbol reference data. - [Settlement Calendar](https://docs.qfex.com/api-reference/rest/market-data/settlement-calendar.md): Return the settlement calendar entry for a symbol at a given time, based on active_until. - [Settlement Prices](https://docs.qfex.com/api-reference/rest/market-data/settlement-prices.md): Return current and historic settlement prices and ratios. - [Symbol Long Short Historic](https://docs.qfex.com/api-reference/rest/market-data/symbol-long-short-historic.md): Return historic long and short user counts for a symbol over a time range. - [Taker Volume Historic](https://docs.qfex.com/api-reference/rest/market-data/taker-volume-historic.md): Return historic taker volume metrics for a symbol over a time range. - [Underlier Historic](https://docs.qfex.com/api-reference/rest/market-data/underlier-historic.md): Return historic underlier OHLC data for a symbol over a time range. - [Executions](https://docs.qfex.com/api-reference/rest/user/executions.md): Return executions (funding, deposits, withdrawals, referral rewards, fee rebates) for the authenticated account, globally sorted by created_at. - [Stream Historic Orders CSV](https://docs.qfex.com/api-reference/rest/user/stream-historic-orders-csv.md): Stream a CSV of all historic orders for the authenticated user. - [Stream Historic TWAPs CSV](https://docs.qfex.com/api-reference/rest/user/stream-historic-twaps-csv.md): Stream a CSV of all historic TWAPs for the authenticated user. - [Redeem Invitation Code](https://docs.qfex.com/api-reference/rest/user/redeem-invitation-code.md): Redeem a valid invitation code for the authenticated user, create the referral link, and enable user access. - [Stream Trades CSV](https://docs.qfex.com/api-reference/rest/user/stream-trades-csv.md): Stream a CSV of all trades for the authenticated user. - [Account Equity](https://docs.qfex.com/api-reference/rest/user/account-equity.md): Return total account equity over time for preset durations. - [Builder Code Details](https://docs.qfex.com/api-reference/rest/user/builder-code-details.md): Return the authenticated user's most recently created active builder code and configured QFEX/builder fee shares. - [Create Builder Code](https://docs.qfex.com/api-reference/rest/user/create-builder-code.md): Create the authenticated user's builder code. The code is generated server-side as a UUID and stored with active=true. Specify both QFEX and builder fee shares in basis points; they need not sum to 10000. QFEX share must be at least 5000 (50%), builder share must be >= 0, and their sum must be at mo… - [User Fees](https://docs.qfex.com/api-reference/rest/user/user-fees.md): Return the fee schedule for the authenticated user. Fees are user-level and do not change when a subaccount is selected. - [User Flat Funding](https://docs.qfex.com/api-reference/rest/user/user-flat-funding.md): Return per-symbol net funding from the most recent snapshot where the authenticated account's position was flat. - [Historic Orders](https://docs.qfex.com/api-reference/rest/user/historic-orders.md): Return historic orders (filled or terminally closed) for the authenticated user. - [Historic User PnL](https://docs.qfex.com/api-reference/rest/user/historic-user-pnl.md): Return historic user pnl change over preset durations. Supports number and percent units, and optional comma-separated symbol filters. - [Historic TWAPs](https://docs.qfex.com/api-reference/rest/user/historic-twaps.md): Return historic TWAPs (cancelled or completed) for the authenticated user. - [Reconcile Invitation Codes (Legacy Path)](https://docs.qfex.com/api-reference/rest/user/reconcile-invitation-codes-legacy-path.md): Immediately reconciles invitation-code rewards for the authenticated user. - [Set User Leverage](https://docs.qfex.com/api-reference/rest/user/set-user-leverage.md): Set the leverage for the authenticated user. - [User Positions](https://docs.qfex.com/api-reference/rest/user/user-positions.md): Return current positions for the authenticated user. - [User Referral Rewards](https://docs.qfex.com/api-reference/rest/user/user-referral-rewards.md): Return daily referral rewards for the authenticated user. - [User Referral Notional Volume](https://docs.qfex.com/api-reference/rest/user/user-referral-notional-volume.md): Return rolling 14-day and lifetime notional volume for the authenticated user and their direct referrals. - [List Subaccounts](https://docs.qfex.com/api-reference/rest/user/list-subaccounts.md): Returns secondary account IDs for the authenticated user (accounts except the primary row where account_id equals user_id). - [Create Subaccount](https://docs.qfex.com/api-reference/rest/user/create-subaccount.md): Allocates a new subaccount UUID for the authenticated user and returns it in the response body. - [List Account Balances](https://docs.qfex.com/api-reference/rest/user/list-account-balances.md): Returns the authenticated user's primary account and each secondary account together with current account equity and available balance from the latest user position balance snapshot. - [List Account Equities](https://docs.qfex.com/api-reference/rest/user/list-account-equities.md): Returns the authenticated user's primary account and each secondary account together with current account equity from the latest user position balance snapshot. - [User Trades](https://docs.qfex.com/api-reference/rest/user/user-trades.md): Return trades for the authenticated user. - [Transfer Balance](https://docs.qfex.com/api-reference/rest/user/transfer-balance.md): Transfer balance between two of the authenticated user's accounts (parent account or subaccounts). - [User Volume](https://docs.qfex.com/api-reference/rest/user/user-volume.md): Return daily user notional volume for one of: 1w, 1m, ytd, or all time. Supports optional comma-separated symbol filters. - [Hourly PnL (approx. first position per hour)](https://docs.qfex.com/api-reference/rest/pnl/hourly-pnl-approx-first-position-per-hour.md): Return approximate first position per symbol per hour for the user, including realised/unrealised pnl, net_funding, fees, quantity, and cost. - [Public Leaderboard](https://docs.qfex.com/api-reference/rest/public/public-leaderboard.md): Return the global top 100 participating master accounts by trading PnL or cash-flow-adjusted time-weighted return. Username filtering only reduces that selected top 100. Return can be null when no positive-equity subperiod exists; positive dollar PnL and negative TWR can coexist. - [Get a crypto deposit address](https://docs.qfex.com/api-reference/funding/funding/get-a-crypto-deposit-address.md): API keys require view_balance. Returns the existing deposit address or provisions one on the first call without rotating an existing address. ARBITRUM_ONE deposits USDC; TRON deposits USDT. POST /address/rotate requires deposit_withdraw. - [List registered crypto withdrawal addresses](https://docs.qfex.com/api-reference/funding/funding/list-registered-crypto-withdrawal-addresses.md): API keys require view_balance. Returns all crypto withdrawal addresses registered by the authenticated user across networks. The user is resolved from authentication; no user-ID query parameter is used. This endpoint does not register, change, or delete addresses. - [Request a crypto withdrawal to a registered address](https://docs.qfex.com/api-reference/funding/funding/request-a-crypto-withdrawal-to-a-registered-address.md): Standard API keys require deposit_withdraw. Keys issued or replaced through POST /builder/web3/api-key also support crypto withdrawals to registered destinations when the user owns the selected account. This builder access is not selectable in Developer Settings. Every withdrawal, including all API… - [Websocket Overview](https://docs.qfex.com/websocket/main.md) - [Trade Playground](https://docs.qfex.com/websocket/trade.md): Single channel for order commands, positions, balances, fills - [MDS Playground](https://docs.qfex.com/websocket/mds.md): Single channel for orderbook, trades, candles - [Reference Data](https://docs.qfex.com/websocket/channels/mds/refdata.md) - [Pulsed Order Book](https://docs.qfex.com/websocket/channels/mds/orderbook.md) - [Public Trades](https://docs.qfex.com/websocket/channels/mds/trades.md) - [Pulsed BBO](https://docs.qfex.com/websocket/channels/mds/bbo.md) - [Underlier Price](https://docs.qfex.com/websocket/channels/mds/underlier.md) - [Funding Rate](https://docs.qfex.com/websocket/channels/mds/funding_rate.md) - [Mark Price](https://docs.qfex.com/websocket/channels/mds/mark_price.md) - [Open Interest](https://docs.qfex.com/websocket/channels/mds/open_interest.md) - [Minmax Price](https://docs.qfex.com/websocket/channels/mds/minmax_price.md) - [Market Stats](https://docs.qfex.com/websocket/channels/mds/market_stats.md) - [Authenticate](https://docs.qfex.com/websocket/channels/trade/authenticate.md) - [Subscribe — Order Responses](https://docs.qfex.com/websocket/channels/trade/order.md) - [Subscribe — Fills](https://docs.qfex.com/websocket/channels/trade/fills.md) - [Order Entry — Add Order](https://docs.qfex.com/websocket/channels/trade/add_order.md) - [Order Entry — Cancel Order](https://docs.qfex.com/websocket/channels/trade/cancel_order.md) - [Order Entry — Modify Order](https://docs.qfex.com/websocket/channels/trade/modify_order.md) - [Cancel All Orders](https://docs.qfex.com/websocket/channels/trade/cancel_all_orders.md) - [Order Entry — Close Position](https://docs.qfex.com/websocket/channels/trade/close_position.md) - [Order Entry — Add TWAP](https://docs.qfex.com/websocket/channels/trade/add_twap.md) - [Get User Orders](https://docs.qfex.com/websocket/channels/trade/get_user_orders.md) - [Get Order](https://docs.qfex.com/websocket/channels/trade/get_order.md) - [Get User Trades](https://docs.qfex.com/websocket/channels/trade/get_user_trades.md) - [Subscribe — Balances](https://docs.qfex.com/websocket/channels/trade/balance.md) - [Subscribe — Positions](https://docs.qfex.com/websocket/channels/trade/positions.md) - [Get Leverage Levels](https://docs.qfex.com/websocket/channels/trade/get_leverage.md) - [Get Available Leverage Levels](https://docs.qfex.com/websocket/channels/trade/get_available_leverage.md) - [Set Leverage](https://docs.qfex.com/websocket/channels/trade/set_leverage.md) - [Cancel On Disconnect](https://docs.qfex.com/websocket/channels/trade/cancel_on_disconnect.md) - [Order Entry — Add Stop Order](https://docs.qfex.com/websocket/channels/trade/stop_add_order.md) - [Order Entry — Cancel Stop Order](https://docs.qfex.com/websocket/channels/trade/stop_cancel_order.md) - [Order Entry — Modify Stop Order](https://docs.qfex.com/websocket/channels/trade/stop_modify_order.md) - [Terms of Use](https://docs.qfex.com/legal/client-agreement.md): Last Updated: 6 October 2026 - [Privacy Policy](https://docs.qfex.com/legal/privacy-policy.md): Last Updated: 6 October 2026 - [Cookie Policy](https://docs.qfex.com/legal/cookie-policy.md): Last Updated: 28 November 2025 - [Bug Bounty](https://docs.qfex.com/legal/bug-bounty.md) ## OpenAPI Specs - [funding-openapi](/api-reference/funding-openapi.yaml) - [openapi](https://api.qfex.com/openapi.yaml) ## AsyncAPI Specs - [asyncapi](/docs/websocket/asyncapi.yaml) - [mds](/docs/websocket/mds.yaml) - [trade](/docs/websocket/trade.yaml) - [mds](/websocket/mds.yaml) - [trade](/websocket/trade.yaml) ## Optional - [Status](https://status.qfex.com) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.