REST API reference
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 ).
# Status and keyService status and the calling key's scopes, limits and trading state.
# GET /statusService status (no key needed)
Scope: No key needed
Responses Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/status" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"status" : "ok" ,
"api_version" : "v1" ,
"time" : "2026-10-13T09:30:00.000Z" ,
"market_data" : {
"connected" : true ,
"symbols" : 39 ,
"last_tick_age_ms" : 180
},
"broker" : {
"state" : "connected"
},
"live_trading_enabled" : false
}# GET /meThe calling key, its limits and the trading state
Scope: Any valid key
Responses Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/me" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"key_id" : "k7mx2v9qr4tz8w1b6nfa" ,
"name" : "breakout bot" ,
"account" : 123456 ,
"mode" : "demo" ,
"profile" : "client" ,
"scopes" : [
"market:read" ,
"account:read" ,
"trade"
],
"constraints" : {
"demo_only" : true ,
"max_volume_per_order" : "1.00" ,
"max_open_positions" : 20 ,
"orders_per_minute" : 30 ,
"modifications_per_minute" : 60 ,
"daily_loss_limit" : {
"type" : "percent" ,
"value" : "10"
},
"symbols" : null ,
"ip_allowlist" : null ,
"confirm_mode" : false ,
"mcp_enabled" : true
},
"expires_at" : "2027-01-11T09:30:00.000Z" ,
"trading" : {
"mode" : "on" ,
"level" : "env" ,
"reason" : null
},
"live_trading_enabled" : false
}# Market dataInstruments, quotes and candles from the central JAFX quote board.
# GET /symbolsTradable instruments
Scope: market:read
Responses Field Type Description dataarray of Symbol
Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/symbols" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"data" : [
{
"symbol" : "EURUSD" ,
"description" : "Euro vs US Dollar" ,
"group" : "Forex" ,
"digits" : 5 ,
"contract_size" : 100000 ,
"tick_size" : 0.00001 ,
"volume_min" : "0.01" ,
"volume_max" : "100" ,
"volume_step" : "0.01" ,
"trade_mode" : "full" ,
"long_only" : false
},
{
"symbol" : "GBPUSD" ,
"description" : "Great Britain Pound vs US Dollar" ,
"group" : "Forex" ,
"digits" : 5 ,
"contract_size" : 100000 ,
"tick_size" : 0.00001 ,
"volume_min" : "0.01" ,
"volume_max" : "100" ,
"volume_step" : "0.01" ,
"trade_mode" : "full" ,
"long_only" : false
}
]
}# GET /symbols/{symbol}One instrument
Scope: market:read
Parameters Name In Type Description symbol required path string
Responses Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/symbols/EURUSD" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"symbol" : "EURUSD" ,
"description" : "Euro vs US Dollar" ,
"group" : "Forex" ,
"digits" : 5 ,
"contract_size" : 100000 ,
"tick_size" : 0.00001 ,
"volume_min" : "0.01" ,
"volume_max" : "100" ,
"volume_step" : "0.01" ,
"trade_mode" : "full" ,
"long_only" : false
}# GET /quotesCurrent quotes
Scope: market:read
Parameters Name In Type Description symbolsquery string Comma-separated, at most 50. All instruments when omitted.
Responses Field Type Description dataarray of Quote missingarray of string
Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/quotes?symbols=EURUSD,XAUUSD" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"data" : [
{
"symbol" : "EURUSD" ,
"bid" : 1.11554 ,
"ask" : 1.11555 ,
"time" : "2026-10-13T09:30:01.242Z" ,
"price_basis" : "raw"
},
{
"symbol" : "XAUUSD" ,
"bid" : 4170.05 ,
"ask" : 4170.72 ,
"time" : "2026-10-13T09:30:01.834Z" ,
"price_basis" : "raw"
}
],
"missing" : []
}# GET /candles/{symbol}OHLC candles (the last one may still be forming)
Scope: market:read
Parameters Name In Type Description symbol required path string timeframequery string One of M1, M5, M15, M30, H1, H4, D1, W1. Default "M1". fromquery string (date-time) toquery string (date-time) limitquery integer Default 500. Must be ≥ 1 and ≤ 2000.
Responses Field Type Description symbolstring timeframestring price_basisstring One of raw. dataarray of Candle
Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/candles/EURUSD?timeframe=M5&limit=3" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"symbol" : "EURUSD" ,
"timeframe" : "M5" ,
"price_basis" : "raw" ,
"data" : [
{
"time" : "2026-10-13T09:20:00.000Z" ,
"open" : 1.11511 ,
"high" : 1.11528 ,
"low" : 1.11507 ,
"close" : 1.11524 ,
"tick_volume" : 412 ,
"complete" : true
},
{
"time" : "2026-10-13T09:25:00.000Z" ,
"open" : 1.11524 ,
"high" : 1.11561 ,
"low" : 1.11519 ,
"close" : 1.11549 ,
"tick_volume" : 388 ,
"complete" : true
},
{
"time" : "2026-10-13T09:30:00.000Z" ,
"open" : 1.11549 ,
"high" : 1.11558 ,
"low" : 1.11546 ,
"close" : 1.11554 ,
"tick_volume" : 41 ,
"complete" : false
}
]
}# AccountThe key's trading account — summary, positions, pending orders, history.
# GET /accountsThe key's account (a list of one)
Scope: account:read
Responses Field Type Description dataarray of Account
Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/accounts" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"data" : [
{
"account" : 123456 ,
"group" : "demo-usd" ,
"mode" : "demo" ,
"currency" : "USD" ,
"leverage" : 100 ,
"balance" : "10000.00" ,
"credit" : "0.00" ,
"equity" : "10003.20" ,
"margin" : "223.11" ,
"free_margin" : "9780.09" ,
"floating_profit" : "3.20" ,
"margin_level" : 4483.53 ,
"as_of" : "2026-10-13T09:30:02.114Z"
}
]
}# GET /accounts/{account}Account summary
Scope: account:read
Parameters Name In Type Description account required path integer
Responses Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/accounts/123456" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"account" : 123456 ,
"group" : "demo-usd" ,
"mode" : "demo" ,
"currency" : "USD" ,
"leverage" : 100 ,
"balance" : "10000.00" ,
"credit" : "0.00" ,
"equity" : "10003.20" ,
"margin" : "223.11" ,
"free_margin" : "9780.09" ,
"floating_profit" : "3.20" ,
"margin_level" : 4483.53 ,
"as_of" : "2026-10-13T09:30:02.114Z"
}# GET /accounts/{account}/positionsOpen positions
Scope: account:read
Parameters Name In Type Description account required path integer client_tagquery string Pattern ^[A-Za-z0-9._:-]{1,32}$.
Responses Field Type Description dataarray of Position
Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/accounts/123456/positions?client_tag=breakout-v2" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"data" : [
{
"ticket" : 5001 ,
"symbol" : "EURUSD" ,
"side" : "buy" ,
"volume" : "0.02" ,
"open_price" : 1.11555 ,
"open_time" : "2026-10-13T09:29:47.512Z" ,
"stop_loss" : 1.11 ,
"take_profit" : null ,
"swap" : "0.00" ,
"commission" : "0.00" ,
"taxes" : "0.00" ,
"profit" : "-0.02" ,
"comment" : "" ,
"origin" : "api" ,
"client_tag" : "breakout-v2" ,
"from_ticket" : null
}
]
}# GET /accounts/{account}/ordersPending orders
Scope: account:read
Parameters Name In Type Description account required path integer client_tagquery string Pattern ^[A-Za-z0-9._:-]{1,32}$.
Responses Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/accounts/123456/orders" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"data" : [
{
"ticket" : 5003 ,
"symbol" : "EURUSD" ,
"type" : "buy_limit" ,
"volume" : "0.10" ,
"price" : 1.108 ,
"stop_loss" : 1.104 ,
"take_profit" : 1.118 ,
"expires_at" : "2026-10-20T00:00:00.000Z" ,
"placed_at" : "2026-10-13T09:31:12.003Z" ,
"comment" : "" ,
"origin" : "api" ,
"client_tag" : "breakout-v2"
}
]
}# GET /accounts/{account}/tradesTrades closed in a window (by close time), newest first
Scope: account:read
Parameters Name In Type Description account required path integer fromquery string (date-time) Default: 7 days before to. toquery string (date-time) Default: now. The window may span 90 days. client_tagquery string Pattern ^[A-Za-z0-9._:-]{1,32}$. cursorquery string limitquery integer Default 100. Must be ≥ 1 and ≤ 1000.
Responses Field Type Description dataarray of ClosedTrade next_cursorstring | null fromstring (date-time) tostring (date-time)
Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/accounts/123456/trades?from=2026-10-06T00:00:00Z&client_tag=breakout-v2" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"data" : [
{
"ticket" : 5002 ,
"symbol" : "EURUSD" ,
"side" : "buy" ,
"type" : "market" ,
"volume" : "0.01" ,
"open_price" : 1.11555 ,
"open_time" : "2026-10-13T09:29:47.512Z" ,
"close_price" : 1.11602 ,
"close_time" : "2026-10-13T10:02:15.880Z" ,
"stop_loss" : 1.1105 ,
"take_profit" : null ,
"swap" : "0.00" ,
"commission" : "0.00" ,
"taxes" : "0.00" ,
"profit" : "0.47" ,
"state" : "closed" ,
"comment" : "" ,
"origin" : "api" ,
"client_tag" : "breakout-v2"
},
{
"ticket" : 5001 ,
"symbol" : "EURUSD" ,
"side" : "buy" ,
"type" : "market" ,
"volume" : "0.01" ,
"open_price" : 1.11555 ,
"open_time" : "2026-10-13T09:29:47.512Z" ,
"close_price" : 1.11564 ,
"close_time" : "2026-10-13T09:33:40.101Z" ,
"stop_loss" : 1.1105 ,
"take_profit" : null ,
"swap" : "0.00" ,
"commission" : "0.00" ,
"taxes" : "0.00" ,
"profit" : "0.09" ,
"state" : "closed_partial" ,
"comment" : "" ,
"origin" : "api" ,
"client_tag" : "breakout-v2"
}
],
"next_cursor" : null ,
"from" : "2026-10-06T00:00:00.000Z" ,
"to" : "2026-10-13T10:05:00.000Z"
}# GET /accounts/{account}/transactionsBalance and credit operations
Scope: account:read
Parameters Name In Type Description account required path integer fromquery string (date-time) toquery string (date-time) cursorquery string limitquery integer Default 100. Must be ≥ 1 and ≤ 1000.
Responses Field Type Description dataarray of Transaction next_cursorstring | null
Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/accounts/123456/transactions" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"data" : [
{
"ticket" : 4001 ,
"type" : "balance" ,
"amount" : "10000.00" ,
"time" : "2026-10-01T08:00:00.000Z" ,
"comment" : "Demo deposit"
}
],
"next_cursor" : null
}# TradingOrders, changes and closes. Every write needs an Idempotency-Key header.
# PATCH /accounts/{account}/positions/{ticket}Change stop loss / take profit (null removes one; an omitted one is kept)
Scope: trade or trade:propose Idempotency-Key: required
Parameters Name In Type Description account required path integer ticket required path integer Must be ≥ 1. waitquery number Seconds to wait for a held broker decision before answering 202. Default 5. Must be ≥ 0 and ≤ 10.
Request body Field Type Description stop_lossnumber | null Must be > 0. take_profitnumber | null Must be > 0.
Responses Request
curl Copy
curl -X PATCH "https://terminal.jafx.com/trading-api/v1/accounts/123456/positions/5001" \
-H "Authorization: Bearer $JAFX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"stop_loss":1.1105}' Response 200
JSON Copy
{
"request_id" : "01JQ8ZC4M7Q2X9T5RN3VW8KH1A" ,
"kind" : "modify_position" ,
"status" : "placed" ,
"ticket" : 5001 ,
"broker_status" : "dc-answered" ,
"failure" : null ,
"client_tag" : null ,
"position" : {
"ticket" : 5001 ,
"symbol" : "EURUSD" ,
"side" : "buy" ,
"volume" : "0.02" ,
"open_price" : 1.11555 ,
"open_time" : "2026-10-13T09:29:47.512Z" ,
"stop_loss" : 1.1105 ,
"take_profit" : null ,
"swap" : "0.00" ,
"commission" : "0.00" ,
"taxes" : "0.00" ,
"profit" : "0.18" ,
"comment" : "" ,
"origin" : "api" ,
"client_tag" : "breakout-v2" ,
"from_ticket" : null
}
}# POST /accounts/{account}/positions/{ticket}/closeClose a position, wholly or partly
Scope: trade or trade:propose Idempotency-Key: required
Parameters Name In Type Description account required path integer ticket required path integer Must be ≥ 1. waitquery number Seconds to wait for a held broker decision before answering 202. Default 5. Must be ≥ 0 and ≤ 10.
Request body (optional) Field Type Description volumedecimal string
Responses Request
curl Copy
curl -X POST "https://terminal.jafx.com/trading-api/v1/accounts/123456/positions/5001/close" \
-H "Authorization: Bearer $JAFX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"volume":"0.01"}' Response 200
JSON Copy
{
"request_id" : "01JQ8ZD9R2K6W4T8NB1XQ5VH3M" ,
"kind" : "close" ,
"status" : "filled" ,
"ticket" : 5002 ,
"broker_status" : "dc-answered" ,
"failure" : null ,
"client_tag" : null ,
"position" : {
"ticket" : 5002 ,
"symbol" : "EURUSD" ,
"side" : "buy" ,
"volume" : "0.01" ,
"open_price" : 1.11555 ,
"open_time" : "2026-10-13T09:29:47.512Z" ,
"stop_loss" : 1.1105 ,
"take_profit" : null ,
"swap" : "0.00" ,
"commission" : "0.00" ,
"taxes" : "0.00" ,
"profit" : "0.09" ,
"comment" : "" ,
"origin" : "api" ,
"client_tag" : "breakout-v2" ,
"from_ticket" : 5001
}
}# POST /accounts/{account}/ordersPlace a market or pending order
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.
Scope: trade or trade:propose Idempotency-Key: required
Parameters Name In Type Description account required path integer waitquery number Seconds to wait for a held broker decision before answering 202. Default 5. Must be ≥ 0 and ≤ 10.
Request body Field Type Description symbol required string side required string One of buy, sell. typestring One of market, limit, stop. Default "market". volume required decimal string pricenumber Required for limit and stop. Must be > 0. stop_lossnumber Must be > 0. take_profitnumber Must be > 0. expires_atstring (date-time) Limit and stop only. commentstring Up to 200 characters. client_tagstring Stored with the trade (e.g. an MT magic number as "magic:42"). Pattern ^[A-Za-z0-9._:-]{1,32}$.
Responses Request
curl Copy
curl -X POST "https://terminal.jafx.com/trading-api/v1/accounts/123456/orders" \
-H "Authorization: Bearer $JAFX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"symbol":"EURUSD","side":"buy","type":"market","volume":"0.02","stop_loss":1.11,"client_tag":"breakout-v2"}' Response 201
JSON Copy
{
"request_id" : "01JQ8Z6M3S4X7T2N9CKV5W0HRB" ,
"kind" : "market" ,
"status" : "filled" ,
"ticket" : 5001 ,
"broker_status" : "dc-answered" ,
"failure" : null ,
"client_tag" : "breakout-v2" ,
"position" : {
"ticket" : 5001 ,
"symbol" : "EURUSD" ,
"side" : "buy" ,
"volume" : "0.02" ,
"open_price" : 1.11555 ,
"open_time" : "2026-10-13T09:29:47.512Z" ,
"stop_loss" : 1.11 ,
"take_profit" : null ,
"swap" : "0.00" ,
"commission" : "0.00" ,
"taxes" : "0.00" ,
"profit" : "-0.02" ,
"comment" : "" ,
"origin" : "api" ,
"client_tag" : "breakout-v2" ,
"from_ticket" : null
}
}# PATCH /accounts/{account}/orders/{ticket}Change a pending order (omitted fields are kept; null removes a stop or the expiry)
Scope: trade or trade:propose Idempotency-Key: required
Parameters Name In Type Description account required path integer ticket required path integer Must be ≥ 1. waitquery number Seconds to wait for a held broker decision before answering 202. Default 5. Must be ≥ 0 and ≤ 10.
Request body Field Type Description pricenumber Must be > 0. stop_lossnumber | null Must be > 0. take_profitnumber | null Must be > 0. expires_atstring (date-time) | null
Responses Request
curl Copy
curl -X PATCH "https://terminal.jafx.com/trading-api/v1/accounts/123456/orders/5001" \
-H "Authorization: Bearer $JAFX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"price":1.1075,"take_profit":null}' Response 200
JSON Copy
{
"request_id" : "01JQ8ZF2T6N8V1X4KR7QW3MB9C" ,
"kind" : "modify_order" ,
"status" : "placed" ,
"ticket" : 5003 ,
"broker_status" : "dc-answered" ,
"failure" : null ,
"client_tag" : null ,
"order" : {
"ticket" : 5003 ,
"symbol" : "EURUSD" ,
"type" : "buy_limit" ,
"volume" : "0.10" ,
"price" : 1.1075 ,
"stop_loss" : 1.104 ,
"take_profit" : null ,
"expires_at" : "2026-10-20T00:00:00.000Z" ,
"placed_at" : "2026-10-13T09:31:12.003Z" ,
"comment" : "" ,
"origin" : "api" ,
"client_tag" : "breakout-v2"
}
}# DELETE /accounts/{account}/orders/{ticket}Cancel a pending order
Scope: trade or trade:propose Idempotency-Key: required
Parameters Name In Type Description account required path integer ticket required path integer Must be ≥ 1. waitquery number Seconds to wait for a held broker decision before answering 202. Default 5. Must be ≥ 0 and ≤ 10.
Responses Request
curl Copy
curl -X DELETE "https://terminal.jafx.com/trading-api/v1/accounts/123456/orders/5001" \
-H "Authorization: Bearer $JAFX_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" Response 200
JSON Copy
{
"request_id" : "01JQ8ZG7W3R5M9T2XN6KQ1VB4D" ,
"kind" : "cancel" ,
"status" : "placed" ,
"ticket" : 5003 ,
"broker_status" : "dc-answered" ,
"failure" : null ,
"client_tag" : null
}# GET /accounts/{account}/requests/{request_id}Where an order request stands
Scope: account:read
Parameters Name In Type Description account required path integer request_id required path string
Responses Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/accounts/123456/requests/01JQ8Z6M3S4X7T2N9CKV5W0HRB" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"request_id" : "01JQ8Z6M3S4X7T2N9CKV5W0HRB" ,
"kind" : "market" ,
"status" : "filled" ,
"ticket" : 5001 ,
"failure" : null ,
"client_tag" : "breakout-v2" ,
"created_at" : "2026-10-13T09:29:47.301Z" ,
"decided_at" : "2026-10-13T09:29:47.512Z"
}# GET /accounts/{account}/proposalsProposals created by this key (confirm mode)
Scope: trade or trade:propose
Parameters Name In Type Description account required path integer
Responses Request
curl Copy
curl "https://terminal.jafx.com/trading-api/v1/accounts/123456/proposals" \
-H "Authorization: Bearer $JAFX_API_KEY" Response 200
JSON Copy
{
"data" : [
{
"proposal_id" : "01JQ8ZB0Y4D2PQ7RS1VW3XHN6E" ,
"status" : "pending" ,
"summary" : "BUY 0.01 EURUSD market" ,
"created_at" : "2026-10-13T09:40:00.000Z" ,
"expires_at" : "2026-10-13T09:50:00.000Z" ,
"decided_at" : null ,
"result" : null
}
]
}# SchemasObjects returned and accepted by the endpoints above. Money and volume are decimal strings; prices are numbers.
# StatusField Type Description statusstring One of ok, degraded. api_versionstring timestring (date-time) market_dataobject brokerobject How account data and trading reach the broker, per server. state is the worst of them. broker.stateBrokerState broker.serversobject broker.servers.liveServerStatus broker.servers.demoServerStatus broker.notestring 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. live_trading_enabledboolean
# ServerStatusField Type Description stateBrokerState sign_in_needed_forarray of string 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.
# BrokerStateready: 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).
string
# SessionThe 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 activeboolean renews_automaticallyboolean 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_atstring (date-time) | null expires_atstring (date-time) | null Until when this sign-in lasts (present while active). With renews_automatically, the next one follows by itself. ended_atstring (date-time) | null ended_reasonstring | 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.notestring
Field Type Description key_idstring namestring accountinteger serverstring The server the account is on: Live Server or Demo Server. Account numbers are per server. One of live, demo. modestring One of demo, live. profilestring One of client, strategy. scopesarray of string Items: market:read, account:read, trade, trade:propose. constraintsConstraints expires_atstring (date-time) tradingobject trading.modestring One of on, close_only, off. trading.levelstring trading.reasonstring | null sessionSession live_trading_enabledboolean
# ConstraintsField Type Description demo_onlyboolean max_volume_per_orderdecimal string max_open_positionsinteger orders_per_minuteinteger modifications_per_minuteinteger daily_loss_limitnull | object symbolsarray of string | null ip_allowlistarray 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. confirm_modeboolean mcp_enabledboolean
# SymbolField Type Description symbolstring descriptionstring groupstring digitsinteger contract_sizenumber tick_sizenumber volume_mindecimal string volume_maxdecimal string volume_stepdecimal string trade_modestring One of full, disabled. long_onlyboolean
# QuoteField Type Description symbolstring bidnumber asknumber timestring (date-time) price_basisstring One of raw, group.
# CandleField Type Description timestring (date-time) Bar open time. opennumber highnumber lownumber closenumber tick_volumeinteger completeboolean
# AccountField Type Description accountinteger groupstring modestring One of demo, live. currencystring leverageinteger balancedecimal string creditdecimal string equitydecimal string margindecimal string free_margindecimal string floating_profitdecimal string margin_levelnumber | null as_ofstring (date-time)
# PositionField Type Description ticketinteger symbolstring sidestring One of buy, sell. volumedecimal string open_pricenumber open_timestring (date-time) stop_lossnumber | null take_profitnumber | null swapdecimal string commissiondecimal string taxesdecimal string profitdecimal string commentstring originstring One of api, web, mobile, dealer, expert, signal, client, other. client_tagstring | null from_ticketinteger | null Original ticket of a partial-close remainder.
# PendingOrderField Type Description ticketinteger symbolstring typestring One of buy_limit, sell_limit, buy_stop, sell_stop. volumedecimal string pricenumber stop_lossnumber | null take_profitnumber | null expires_atstring (date-time) | null placed_atstring (date-time) commentstring originstring client_tagstring | null
# ClosedTradeField Type Description ticketinteger symbolstring sidestring One of buy, sell. volumedecimal string open_pricenumber open_timestring (date-time) stop_lossnumber | null take_profitnumber | null swapdecimal string commissiondecimal string taxesdecimal string profitdecimal string commentstring originstring One of api, web, mobile, dealer, expert, signal, client, other. client_tagstring | null from_ticketinteger | null Original ticket of a partial-close remainder. typestring One of market, buy_limit, sell_limit, buy_stop, sell_stop. close_pricenumber | null close_timestring (date-time) statestring One of closed, closed_partial, closed_by, cancelled, expired.
# TransactionField Type Description ticketinteger typestring One of balance, credit. amountdecimal string timestring (date-time) commentstring
# OrderRequestField Type Description symbol required string side required string One of buy, sell. typestring One of market, limit, stop. Default "market". volume required decimal string pricenumber Required for limit and stop. Must be > 0. stop_lossnumber Must be > 0. take_profitnumber Must be > 0. expires_atstring (date-time) Limit and stop only. commentstring Up to 200 characters. client_tagstring Stored with the trade (e.g. an MT magic number as "magic:42"). Pattern ^[A-Za-z0-9._:-]{1,32}$.
# OrderResultField Type Description request_idstring kindstring One of market, pending, modify_position, modify_order, cancel, close. statusstring One of filled, placed, pending, rejected, outcome_unknown, awaiting_confirmation. ticketinteger | null broker_statusstring | null failurestring | null client_tagstring | null positionPosition orderPendingOrder proposal_idstring expires_atstring (date-time) notestring
# RequestStatusField Type Description request_idstring kindstring statusstring One of received, sent, filled, placed, pending, rejected, outcome_unknown, refused, refused_by_broker, not_sent, proposed. ticketinteger | null failurestring | null client_tagstring | null created_atstring (date-time) decided_atstring (date-time) | null
# ProblemField Type Description type required string (uri) title required string status required integer code required string Stable error code (see the developer guide's error table). detailstring request_idstring detailsany