Trade from your own code, or with an AI agent
The JAFX Trading API gives your programs access to your own JAFX trading account: live prices, account data and order execution, through the same broker routing as the web terminal. AI assistants connect through the JAFX MCP server, with the same keys and the same limits.
https://terminal.jafx.com/trading-api/v1
WebSocketStreamingLive quotes, candles, account updates and order events.wss://terminal.jafx.com/trading-api/v1/stream
MCPAI agentsCursor, Claude, OpenAI, VS Code and other MCP clients.https://terminal.jafx.com/trading-api/mcp
What you can build
- Trading bots that read prices and candles, open and manage positions, and react to fills as they happen.
- Dashboards and journals built on your balance, equity, open positions and closed trades.
- AI assistants that analyse the market and your account, and propose trades you confirm with one click.
- Bots from another platform. Strategy tags, idempotent orders and a separate budget for stop changes keep the habits of an existing bot (porting notes).
How it works
Each key belongs to one trading account and can only act on that account. Market data comes from the central JAFX quote board. Orders are decided by the broker at your account's own prices.
Safety built in
- Scoped keys. Read-only, trading or proposals: give each program only what it needs. See API keys & security.
- Limits enforced by the server. Volume per order, open positions, orders per minute and a daily loss stop apply whatever your code, or an AI, sends. See Limits.
- Proposals. An agent can prepare trades that execute only after you confirm them in the web terminal.
- No double trades. Every write carries an
Idempotency-Key, so a retry never trades twice. See Idempotency. - Fast revocation. Revoke a key in the web terminal and it stops working within 5 seconds, open streams included.
Availability
Every JAFX Terminal account on the Live Server or the Demo Server can create keys, in the web terminal under Developers. Build and test with virtual money on a demo account first: demo orders go through the same routing as live. Live keys start with tight limits and confirm mode on; you set each key's limits when you create it.
Start here
- Quickstart: create a key and place your first demo order in about five minutes.
- Orders & positions: how orders, changes and closes work, and what each answer means.
- AI agents (MCP): connect your AI assistant in a couple of minutes.