Every endpoint of the JAFX Trading API v1, generated from the OpenAPI 3.1 specification. Base URL https://terminal.jafx.com/trading-api/v1. Send your key on every request as Authorization: Bearer <key>; every write also needs an Idempotency-Key header (see Conventions).
Instruments, quotes, candles, JAFX's market alerts, JAFX AI's Live Scan and the stock exchanges' sessions, from the central JAFX quote board, and quotes at your account's own prices.
The central board's prices by default (price_basis=raw). With price_basis=account, your account's own: its server's prices with its account type's markup, the bid and ask your account trades at, read from that server at most once a second. While they can't be read the answer is 503 broker_unavailable, and the raw board still answers.
Scope: market:read
Parameters
Name
In
Type
Description
symbols
query
string
Comma-separated, at most 50. All instruments when omitted.
price_basis
query
string
raw (default): the central JAFX quote board, the same for every key. account: your account's own prices. One of raw, account. Default "raw".
The symbols asked for that have no quote: unknown, or, with price_basis=account, not priced or not shown for your account. Empty when no symbols are asked for.
The newest limit bars that opened between from and to (default: up to now), oldest first. To read further back, ask again with to just before the oldest bar you got, until a page comes back empty. How far back: M1, M5, M15 and M30 from about March 2, 2026 (shares from early February 2026), H1 and H4 from about November 2025 (shares from January 2025), D1 and W1 from 2018 (cryptocurrencies from 2020), as JAFX's price history holds each instrument. A bar is only ever the timeframe's own: where the history is coarser, there are no bars. A page never holds a bar twice and has no gap the market didn't have.
Scope: market:read
Parameters
Name
In
Type
Description
symbolrequired
path
string
As GET /symbols lists it, in any case (USOil or usoil).
timeframe
query
string
One of M1, M5, M15, M30, H1, H4, D1, W1. Default "M1".
from
query
string (date-time) | integer
Bars opened at or after this time: ISO-8601 (UTC), or epoch milliseconds. A value that reads as neither answers 422.
to
query
string (date-time) | integer
Bars opened at or before this time: ISO-8601 (UTC), or epoch milliseconds. A value that reads as neither answers 422.
JAFX's market alerts (sharp price moves), newest first
The sharp moves JAFX's central price feed flagged, the alerts JAFX Terminal's Alerts tab shows: a market that moved at least 5 times its usual 15- or 60-minute move, and by a good share of its typical daily range. The same for every key. Information about past price moves, not trading signals or advice.
The last 24 hours unless since says otherwise; alerts are kept, so since reads back as far as you like, a page at a time. To poll for new alerts and new legs, pass updated_since with the newest updated_at you have seen and keep each alert by its id (one changed at that same millisecond comes again). The stream's alerts channel pushes them instead.
Scope: market:read
Parameters
Name
In
Type
Description
symbols
query
string
Comma-separated instruments, at most 50, in any case. Names JAFX doesn't list come back in missing.
since
query
string (date-time) | integer
Alerts fired at or after this time. Default: 24 hours ago.
after_id
query
integer
Only alerts with a larger id, which fired after the one you last saw. Must be ≥ 0.
updated_since
query
string (date-time) | integer
Only alerts that changed at or after this time (fired, extended by a new leg, or followed up).
Which markets and timeframes JAFX AI's Live Scan covers, and how fresh each scan is
JAFX AI keeps a Live Scan (its read of a market on a chart timeframe, as JAFX Terminal shows it beside the price) for EURUSD, GBPUSD, USDJPY, USDCHF, USDCAD, AUDUSD, NZDUSD, XAUUSD, XAGUSD and BTCUSD on M15, H1, H4, D1 and W1, written a few minutes after each bar of that timeframe closes while forex trades. The API serves only those and never makes one. General market information, not financial advice.
The scan JAFX Terminal shows for the market and timeframe: its bias, trend and structure, patterns, levels, indicators, chart lines and what would change the read, with when it was written. Fresh until the bar it was written in closes (fresh_until); after that the same scan is served with fresh: false until the next is written. JAFX AI's sentences come in untrusted_content. Every scan carries its disclaimer: show it wherever you show the scan. A scan is not a signal, a forecast or a recommendation.
404 live_scan_not_available: the market or timeframe isn't covered (details lists those that are). 503 live_scan_not_ready with Retry-After: covered, but no scan is there now (none made yet, or the last attempt failed); details.retry_at is the bar close after which the next is written.
Scope: market:read
Parameters
Name
In
Type
Description
symbolrequired
path
string
The market, in any case (EURUSD, eurusd, EUR/USD).
timeframe
query
string
The chart timeframe. One of M15, H1, H4, D1, W1. Default "H1".
Whether the Tokyo, London and New York stock exchanges are open
The exchanges' sessions as JAFX Terminal's top bar shows them: open, lunch break (Tokyo), closed or holiday, when each opened or opens next and when it closes, today's holiday or early close, and its next holiday. These are the exchanges' own cash-market hours, not an instrument's: JAFX's instruments trade on their own hours, often longer (trading_hours in GET /symbols).
Scope: market:read
Parameters
Name
In
Type
Description
symbol
query
string
A market: the answer then names exchange_for_symbol, the exchange whose hours matter for it.
Responses
200 The three exchanges, in the order Tokyo, London, New York
nyse for US indices and shares, lse for UK100, tse for JP225, null for currencies, metals, energies and crypto (only with symbol). One of tse, lse, nyse, null.
The picture JAFX Terminal's Share button makes: the market, long or short with the leverage its margin was charged at, the return on that margin (ROI), the entry and the market price now (your account's own), the date, and DEMO on a demo account, beside the market's real candles since the position opened, their size set by how long that is, with its entry and price now marked (one opened about a minute ago: the market's last one-minute candles). Never your name, account number or balance; the P&L amount only with show_amount=true. Every figure is read from your account. A ticket your account has no open position with is 404 order_not_found. At most 10 pictures a minute per key, 5 at once, REST and MCP together (429 rate_limited).
Scope: account:read
Parameters
Name
In
Type
Description
accountrequired
path
integer
ticketrequired
path
integer
Must be ≥ 1.
size
query
string
portrait 1080 × 1350 (a post), story 1080 × 1920 or landscape 1200 × 675. One of portrait, story, landscape. Default "portrait".
show_amount
query
boolean
The P&L in the account's currency under the ROI. Default false.
utc_offset
query
integer
Minutes east of UTC the date is written in (120 for UTC+2). Default 0. Must be ≥ -720 and ≤ 840.
Responses
200 The picture, a PNG of the size asked; Cache-Control: no-store, and Content-Disposition names it as the terminal does (jafx-EURUSD-2026-11-14.png)
The picture JAFX Terminal's Share button makes of a closed trade, as for an open position, with its close price and the day it closed, and its chart ending with the candle it closed in. A trade older than the price history kept for its length has no chart. The ticket is one GET /accounts/{account}/trades lists: a ticket your account's history has no closed trade with is 404 trade_not_found.
Scope: account:read
Parameters
Name
In
Type
Description
accountrequired
path
integer
ticketrequired
path
integer
Must be ≥ 1.
size
query
string
portrait 1080 × 1350 (a post), story 1080 × 1920 or landscape 1200 × 675. One of portrait, story, landscape. Default "portrait".
show_amount
query
boolean
The P&L in the account's currency under the ROI. Default false.
utc_offset
query
integer
Minutes east of UTC the date is written in (120 for UTC+2). Default 0. Must be ≥ -720 and ≤ 840.
Responses
200 The picture, a PNG of the size asked; Cache-Control: no-store, and Content-Disposition names it as the terminal does (jafx-EURUSD-2026-11-14.png)
201 executed or placed · 202 pending (broker still deciding), awaiting_confirmation (confirm-mode key) or outcome_unknown (poll the request; never resend under a new key) · 4xx problem.
Outside the instrument's trading hours (trading_hours on GET /symbols/{symbol}) the broker refuses it with 422 market_closed, whose details.opens_at says when it opens again; nothing is traded, and the order goes again with a new Idempotency-Key once it opens.
Scope: trade or trade:proposeIdempotency-Key: required
Parameters
Name
In
Type
Description
accountrequired
path
integer
wait
query
number
Seconds to wait for a held broker decision before answering 202. Default 5. Must be ≥ 0 and ≤ 10.
Request body
Field
Type
Description
symbolrequired
string
siderequired
string
One of buy, sell.
type
string
One of market, limit, stop. Default "market".
volumerequired
decimal string
price
number
Required for limit and stop. Must be > 0.
stop_loss
number
Must be > 0.
take_profit
number
Must be > 0.
expires_at
string (date-time) | integer
Limit and stop only: a future time, ISO-8601 (UTC) or epoch milliseconds, after which the order is removed.
comment
string
Up to 200 characters.
client_tag
string
Stored with the trade (e.g. an MT magic number as "magic:42"). Pattern ^[A-Za-z0-9._:-]{1,32}$.
Orders go through each account's own session: an account's keys trade for 24 hours after its owner signs in to JAFX Terminal, or around the clock when the owner switches that on in Developers.
What needs the account owner's sign-in in the last 24 hours on this server: always trading; account data too where nothing else serves it (account_data). Items: trading, account_data.
ready: up; each account's session opens when its keys are used. connected: up, with a standing connection. disabled: not available on that server right now (503 broker_unavailable).
The account's trading session that its keys trade through. It lasts 24 hours from the owner's last sign-in to JAFX Terminal (or Renew on its Developers page), whether or not the terminal stays open. With around-the-clock trading on, JAFX signs it in again by itself before it ends, or at the next request after it ended.
Field
Type
Description
active
boolean
renews_automatically
boolean
The owner switched on Keep my bots trading around the clock in Developers: JAFX signs this session in again by itself, so the keys keep trading past expires_at.
signed_in_at
string (date-time) | null
expires_at
string (date-time) | null
Until when this sign-in lasts (present while active). With renews_automatically, the next one follows by itself.
ended_at
string (date-time) | null
ended_reason
string | null
stopped: the owner pressed Stop API trading. expired: 24 hours passed. ended_by_broker, resume_refused: the session ended at the broker (a sign-out of it, a password change). no_active_key: the account's last key went. password_refused: around-the-clock trading stopped because the trading account refused the saved password (for example after a password change); the owner switches it on again in Developers. One of stopped, expired, ended_by_broker, resume_refused, no_active_key, not_master, unreadable, password_refused, null.
The server the account is on: Live Server or Demo Server. Account numbers are per server. One of live, demo.
mode
string
The key's mode, which follows its account: demo keys (jafx_demo_…) for Demo Server accounts, live keys (jafx_live_…) for Live Server accounts. One of demo, live.
profile
string
client for every key made on the Developers page or by an app the client connected. strategy is kept for keys a JAFX service would hold to run a strategy for the client; none exist today. One of client, strategy.
Whether JAFX has switched on trading live accounts through the API, for every key. While false, an order on a live account answers 403 live_trading_disabled; demo keys trade either way.
True on demo keys: the key can only ever trade a Demo Server account (a demo key never trades a live one). It follows the key's mode and can't be changed.
max_volume_per_order
decimal string
max_open_positions
integer
orders_per_minute
integer
modifications_per_minute
integer
daily_loss_limit
null | object
The daily loss stop: new positions are refused once the day's loss reaches it, until the next broker day. The Developers page sets it as a percentage of the day's starting equity, or none (null). amount (a sum in the account currency) appears only on keys JAFX sets up.
symbols
array of string | null
ip_allowlist
array of string | null
The key's IP lock: up to 20 IP addresses or CIDR ranges it may be used from (any other answers 403 ip_not_allowed); null when the owner left it open to any IP address.
What one tick (tick_size) moves the profit of one lot, in profit_currency: contract_size × tick_size. A lot is contract_size units, which differs by instrument (EURUSD 100,000 euros, BTCUSD 10 bitcoins).
profit_currency
string | null
The currency profit is counted in on the key's server: a pair's second currency (EURUSD: USD, USDJPY: JPY). Null when that server's instruments aren't known right now.
stops_level
integer
The least distance, in points (1 point = 10^-digits), between the price and a stop loss, a take profit or a pending order's price. 0: no minimum, which is what JAFX's servers set today; a stop must still be on the correct side of the price the position would close at (the bid for a buy, the ask for a sell), or the order answers 422 invalid_stops. Must be ≥ 0.
When this instrument trades on the key's own server, whose clock decides when its orders are taken. Null when that server's hours aren't known right now. An order outside them answers 422 market_closed.
An instrument's trading hours from its server's weekly schedule, in UTC. Holidays and early closes the weekly schedule doesn't show still answer 422 market_closed.
Field
Type
Description
open_now
boolean
Whether the instrument is in a trading session now.
next_open
string (date-time) | null
When it next opens (after the current session, when it is open now); null when it doesn't within a week, or never closes.
next_close
string (date-time) | null
When it next closes; null when it doesn't within a week (open around the clock).
Its trading sessions over the next 7 days, oldest first; back-to-back sessions are one, and one already open starts now. Empty when it doesn't trade in that time.
A sharp move JAFX's central feed flagged (see the developer guide's Market alerts page). Prices are the feed's bid (price_basis raw). Information, not advice.
Field
Type
Description
id
integer
Ids only grow, in the order alerts fire.
symbol
string
asset_class
string
The instrument's group, as /symbols names it (group there).
direction
string
One of up, down.
pct
number
The move in percent from start_price to price, negative when down.
window_minutes
integer
The window the first leg was measured over: a 15-minute alert belongs on M15, a 60-minute one on H1. One of 15, 60.
times_usual
number
How many times the market's usual move over the same window (the median of the last 7 days) it was: at least 5. For several legs, the sharpest.
share_of_day
number
The move as a share of the market's typical daily range (the median of its last 20 trading days): 0.65 is 65% of a typical day.
tier
string
strong: a big move, at least 12 times usual, or half again the market's size bar and at least half a typical day. One of normal, strong.
start_price
number
The price at window_start, where the move started.
price
number
The price at the latest leg.
window_start
string (date-time)
fired_at
string (date-time)
The close of the minute that confirmed the move.
legs
integer
Sharp legs of the move so far: each new one in the same direction, within 2 hours of the last, updates the alert. Must be ≥ 1.
last_leg_at
string (date-time)
updated_at
string (date-time)
The last change: a new leg, or the follow-up.
group_id
integer
Alerts that fire within 15 minutes and share a driver share a group, named by its first alert's id; an alert on its own is its own group.
group_size
integer
How many alerts the group had when the answer was made. Must be ≥ 1.
group_label
string | null
What the group shares, such as "USD strengthening"; null for an alert on its own.
What the price did in the 4 hours after the latest leg; a new leg restarts it.
Field
Type
Description
until
string (date-time)
4 hours after the latest leg.
peak_price
number | null
The furthest price in the move's direction since the alert fired.
peak_at
string (date-time) | null
worst_price
number | null
The furthest price against the move since the latest leg.
price_1h
number | null
The price 1 hour after the latest leg; null until then.
price_4h
number | null
The price 4 hours after the latest leg; null until then.
outcome
string | null
Set 4 hours after the latest leg, from where the move started: kept_going (20% or more beyond the move at the alert), held (half or more kept), faded (less than half), reversed (back past the start). One of kept_going, held, faded, reversed, null.
One of api, web, mobile, dealer, expert, signal, client, other.
client_tag
string | null
from_ticket
integer | null
Original ticket of a partial-close remainder.
type
string
One of market, buy_limit, sell_limit, buy_stop, sell_stop.
close_price
number | null
close_time
string (date-time)
state
string
One of closed, closed_partial, closed_by, cancelled, expired.
close_reason
string | null
What closed a position: its stop loss, its take profit, a stop out (the margin level fell to the stop-out level), or client: an order closed it, from JAFX Terminal or the API. Null for a pending order that left the book. The platform's [sl] / [tp] / [so: …] at the end of comment stays as it writes it. One of stop_loss, take_profit, stop_out, client, null.
stop_out
null | object
A stop out's own figures: the account's margin level (percent), equity and margin in use when the platform's stop out closed this position, as the platform recorded them on it (the [so: margin level%/equity/margin] at the end of comment). Null for every other close, and for a stop out it recorded no figures for; never worked out from anything else.
Stable error code (see the developer guide's error table).
detail
string
request_id
string
details
any
Automated and AI-driven trading can lose money quickly; nothing in these docs is investment advice.
JAFX (PTY) LTD · FSCA FSP No. 52058 · Trading leveraged derivatives with JAFX carries a high risk of losing money rapidly. It is not suitable for everyone.