Agentic Trading
QFEX can be traded directly by AI agents. Agents can read live market data, inspect account state and positions, and place or manage orders using the QFEX CLI. The CLI is designed to work cleanly inside agent workflows: every command returns JSON, commands are stateless from the caller’s perspective, and a background daemon manages the underlying QFEX WebSocket connections. This lets an agent interact with the exchange through simple shell commands rather than implementing exchange connectivity itself.Getting started
Install the CLI:qfex agents init configures Claude Code and Codex so they can use the QFEX CLI without repeatedly prompting for permission. The local mode writes agent instructions into the current project.
Market data can be queried without credentials. To allow an agent to trade or access private account data, log in first:
What an agent can do
An agent using the CLI can, among other things:- query BBOs, order books, trades, candles, mark prices, funding rates and open interest;
- place, modify and cancel orders;
- inspect open orders, positions, balances and leverage;
- watch live market-data, order and fill streams; and
- work with QFEX subaccounts to separate trading strategies or risk.
Developing and testing agents
QFEX provides both production and UAT environments. UAT uses the same interface as production but does not use real funds, making it the appropriate environment for testing agent behaviour and order flow before deploying a strategy to production.Building agentic trading products
Developers can also build trading agents or applications for other QFEX users. Builder Codes are designed to attribute trading activity to an integration and allow the builder to earn a share of the trading fees generated through that application.Builder Codes are not yet released. See the Builder Codes page for the current design and availability status.