JAFX Trading API: connect your own bots and AI agents
The JAFX Trading API lets your own programs read prices and account data. They can also place orders on your own JAFX trading account. The API is live. It is switched on for demo and live accounts.
- Documentation: jafx.com/developers/. It is public and you do not need to log in.
- API keys: you create them in the web trader at terminal.jafx.com, on the Developers page.
What you can connect
| Interface | Address | Use it for |
|---|---|---|
| REST | https://terminal.jafx.com/trading-api/v1 |
Quotes, candles, account, positions and orders |
| Streaming (WebSocket) | wss://terminal.jafx.com/trading-api/v1/stream |
Live quotes, candles, account updates and order events |
| MCP | https://terminal.jafx.com/trading-api/mcp |
AI assistants and agents, with a JAFX sign-in or a key, and the same limits |
To connect an AI app such as Claude or ChatGPT, see Connecting an AI assistant to your JAFX account with MCP.
The documentation gives these examples of what you can build: - trading bots - dashboards and trade journals - AI assistants that propose trades for you to confirm - bots moved over from another platform
What you need
- A JAFX Terminal trading account on the Live Server or the Demo Server.
- The account's master trading password, to create a key or to connect an AI app with a JAFX sign-in. The investor password cannot create keys.
- Your own program or AI client.
The documentation includes:
- examples in curl, Python and TypeScript
- an OpenAPI file (openapi.yaml)
- two example bots to download
Start on a demo account
The documentation tells you to build and test on a demo account first, with virtual money. Demo orders go through the same routing as live ones. You can open a demo account in the portal under Trading Accounts. See Demo accounts: opening, logging in and expiry.
- The Quickstart page shows you how to create a key, read a price, then open and close a demo position.
- There are two example bots: a moving-average crossover bot in Python and one in TypeScript. They refuse to run unless the key belongs to a demo account. They are examples to learn from, not trading advice.
On a live account the Developers page warns: "Real money: orders from trading keys on this account execute for real." API keys for live accounts are switched on. Live keys start with tighter limits. Every order waits for your confirmation until you choose otherwise.
How it works
- Each key belongs to one trading account. It can act only on that account.
- Orders go through the same routing as orders you place in the web trader, through your account's own trading session.
- The same checks apply as in the web trader: instrument, volume step, stop distance, margin and market hours.
- Prices in the API come from one central JAFX reference quote board. They are marked
"price_basis": "raw". - Your account trades at its own prices, which can differ a little from the API prices. A quote is a reference, not a guaranteed fill price.
- Times are in UTC. The broker day starts at midnight Europe/Athens time. Daily candles and the daily loss stop follow the broker day.
- The version is in the address (
v1). Changes within v1 only add things. - A breaking change comes as a new version. It is announced on the Changelog page first.
- The first version is dated 13 October 2026.
Safety built in
- Scoped keys: each key is Read-only, Trading or Proposals. A Proposals key creates proposals. Nothing is placed until you confirm the proposal in the web trader.
- Limits enforced by the server: these limits apply whatever your program or an AI agent sends:
- volume per order
- open positions
- orders per minute
- a daily loss stop
- No double trades: every order request carries an
Idempotency-Key. A retry with the same key is not placed a second time. - Revocation: you can revoke a key at any time. A revoked key stops working.
Not available yet
- Maximum slippage on market orders
- Stop-limit orders
- OCO pairs
- Server-side trailing stops
Risk
The documentation carries this warning: "Automated and AI-driven trading can lose money quickly; nothing in these docs is investment advice." You are responsible for every order your program or AI agent sends. See Margin, margin call, stop-out and risk terms.
Need help?
If you contact support about an API call, quote its request ID. You find it in the X-Request-Id header of the response, or in request_id in an error. Never send us your API key or your password. We never ask for them.
We are available 24/7 via live chat or email (support@jafx.com).
Was this article helpful?
Thank you for telling us.