API reference / Models
Models
AccountCreated
AccountCreated fields | Field | Type | Description |
id required | string | |
state required | string | |
AccountFeatures
AccountFeatures fields | Field | Type | Description |
copyFactoryApi | CopyTradingEnable | null | |
riskManagementApiEnabled | boolean | null | |
metastatsApiEnabled | boolean | null | |
reliabilityIncreased | boolean | null | |
allocateDedicatedIp | "ipv4" | "none" | null | |
AccountHealth
The terminal's own health, as last reported. unknown until a report exists.
AccountHealth fields | Field | Type | Description |
status required | string | |
connected required | boolean | null | |
tradingEnabled required | boolean | null | |
reasons required | any[] | |
checkedAt required | string | null | |
error required | string | null | |
ApiBillingUpgradeBody
ApiBillingUpgradeBody fields | Field | Type | Description |
accounts required | integer | |
own_address | boolean | |
Book
The market depth (MT5 only).
Book fields | Field | Type | Description |
symbol required | string | |
time required | string | |
brokerTime required | string | |
book required | BookEntry[] | |
BookEntry
BookEntry fields | Field | Type | Description |
type required | string | BOOK_TYPE_BUY or BOOK_TYPE_SELL. |
price required | number | |
volume required | number | |
Candle
One candle. time is the candle's open time.
Candle fields | Field | Type | Description |
symbol required | string | |
timeframe required | string | |
time required | string | |
brokerTime required | string | |
open required | number | |
high required | number | |
low required | number | |
close required | number | |
tickVolume required | number | |
spread | integer | number | null | |
volume | number | null | |
Capabilities
What this account supports.
Capabilities fields | Field | Type | Description |
platform required | "mt4" | "mt5" | |
marginMode | string | null | |
features required | object | Feature name to true, false or a short note such as per_symbol. |
timeframes required | string[] | |
limits required | object | |
brokerTime | object | null | |
CopyTradingEnable
CopyTradingEnable fields | Field | Type | Description |
copyFactoryRoles required | "PROVIDER" | "SUBSCRIBER"[] | |
copyFactoryResourceSlots | integer | null | |
CreateAccount
CreateAccount fields | Field | Type | Description |
platform | "mt4" | "mt5" | |
server required | string | |
login required | integer | |
password required | string | |
nickname | string | |
trade_ea_symbol | string | |
proxy_address | string | |
proxy_type | string | |
proxy_auth | string | |
proxy_local_port | integer | |
CreatePrivateServer
CreatePrivateServer fields | Field | Type | Description |
slots required | integer | |
region required | string | |
name required | string | |
CreateReadonlyKey
CreateReadonlyKey fields | Field | Type | Description |
name required | string | |
scope | "all" | "selected" | |
account_ids | string[] | |
CreateWebhook
CreateWebhook fields | Field | Type | Description |
url required | string | |
secret | string | null | |
Credentials
Credentials fields | Field | Type | Description |
login | string | integer | null | |
password required | string | |
Deal
A deal from history. Balance, credit and other non-trade deals are included.
Deal fields | Field | Type | Description |
id required | string | |
platform required | "mt4" | "mt5" | |
type required | string | For example DEAL_TYPE_BUY or DEAL_TYPE_BALANCE. |
entryType | string | null | For example DEAL_ENTRY_IN or DEAL_ENTRY_OUT. |
time required | string | |
brokerTime required | string | |
symbol | string | null | |
magic | integer | null | |
volume | number | null | |
price | number | null | |
profit required | number | |
commission | number | null | |
swap | number | null | |
positionId | string | null | |
orderId | string | null | |
reason | string | null | |
comment | string | null | |
clientId | string | null | |
ErrorEnvelope
The error body every control-plane route answers with.
ErrorEnvelope fields | Field | Type | Description |
error required | string | The machine code (not_found). On the account API paths (/users/current/...), the error name (NotFoundError). |
message required | string | A short human-readable explanation. |
code | string | null | The Tickwire machine code, on every surface. |
id | integer | null | Account API paths only: the HTTP status. |
details | any | Validation failures as [{parameter, message}], or more context for the error. |
requestId | string | null | The request id, to quote to support. |
docUrl | string | null | The error's page in the docs. |
Health
The truthful health snapshot. The same body comes with 200 and 503.
Health fields | Field | Type | Description |
status required | "healthy" | "degraded" | "stale" | "disconnected" | "down" | |
connected required | boolean | |
read_only | boolean | null | |
trading_enabled | boolean | null | |
reasons required | any[] | |
reason_codes | string[] | null | |
checked_at | string | null | |
broker_time | string | null | |
cached | boolean | null | |
evidence_age_s | number | null | |
fx_status required | string | |
healthStatus required | HealthView | The account's health in camelCase. |
HealthView
The account's health in camelCase.
HealthView fields | Field | Type | Description |
connected required | boolean | |
connectedToBroker | boolean | null | |
quoteStreamingHealthy | boolean | null | |
synchronized | boolean | null | |
healthy required | boolean | |
status required | string | |
reasonCodes required | string[] | |
message | string | null | |
KeyBody
KeyBody fields | Field | Type | Description |
name | string | |
LinkedAccount
A linked trading account. The broker password is never returned.
LinkedAccount fields | Field | Type | Description |
id required | string | |
nickname required | string | |
platform required | "mt4" | "mt5" | |
server required | string | |
login required | integer | null | |
status required | string | connecting, connected, disconnected, error or provisioning. |
error required | string | The last error, or an empty string. |
rest_url required | string | null | null until the terminal is placed. |
ws_url | string | null | |
proxy_address required | string | |
proxy_type required | string | |
proxy_local_port required | integer | |
trade_ea_symbol required | string | |
ip_mode required | "shared" | "dedicated" | dedicated when the account is on a private server. |
created_at required | string | |
sandbox | boolean | null | true for a simulated sandbox account. |
MoveAccounts
MoveAccounts fields | Field | Type | Description |
account_ids required | string[] | |
NewProfile
NewProfile fields | Field | Type | Description |
name required | string | |
version required | 4 | 5 | |
brokerTimezone required | string | |
brokerDSTSwitchTimezone required | string | |
type | "mtTerminal" | "managerApi" | |
managerLogin | string | null | |
managerPassword | string | null | |
managerServer | string | null | |
NewToken
NewToken fields | Field | Type | Description |
name | string | |
kind | "api" | "account" | |
applications | string[] | null | |
roles | string[] | null | |
accountIds | string[] | null | |
readOnly | boolean | |
ttlInHours | number | null | |
ipAllowlist | string[] | null | |
NewTradingAccount
NewTradingAccount fields | Field | Type | Description |
name required | string | |
server required | string | |
login | string | integer | null | |
password | string | null | |
platform | "mt4" | "mt5" | null | |
provisioningProfileId | string | null | |
magic | integer | |
manualTrades | boolean | |
slippage | number | null | |
quoteStreamingIntervalInSeconds | number | |
tags | string[] | |
metadata | object | null | |
reliability | "regular" | "high" | |
resourceSlots | integer | |
copyFactoryResourceSlots | integer | |
region | string | null | |
type | "cloud" | "cloud-g1" | "cloud-g2" | |
symbol | string | null | |
baseCurrency | string | null | |
copyFactoryRoles | "PROVIDER" | "SUBSCRIBER"[] | |
riskManagementApiEnabled | boolean | |
metastatsApiEnabled | boolean | |
allocateDedicatedIp | "ipv4" | "none" | null | |
keywords | string[] | |
serverAddress | string | null | |
Order
A pending order, or an order from history.
Order fields | Field | Type | Description |
id required | string | |
platform required | "mt4" | "mt5" | |
type required | string | For example ORDER_TYPE_BUY_LIMIT. |
state required | string | For example ORDER_STATE_PLACED or ORDER_STATE_FILLED. |
symbol required | string | |
magic required | integer | |
time required | string | Setup time, ISO-8601 UTC. |
brokerTime required | string | |
openPrice | number | null | |
currentPrice | number | null | Pending orders only. |
volume required | number | |
currentVolume required | number | |
doneTime | string | null | History orders only. |
doneBrokerTime | string | null | |
positionId | string | null | |
stopLoss | number | null | |
takeProfit | number | null | |
stopLimitPrice | number | null | |
fillingMode | string | null | |
expirationType | string | null | |
expirationTime | string | null | |
reason | string | null | |
comment | string | null | |
clientId | string | null | |
PatchAccount
PatchAccount fields | Field | Type | Description |
trade_ea_symbol | string | null | |
PatchEndpoint
PatchEndpoint fields | Field | Type | Description |
enabledEvents | string[] | null | |
url | string | null | |
description | string | null | |
PatchPrivateServer
PatchPrivateServer fields | Field | Type | Description |
slots required | integer | |
PatchReadonlyKey
PatchReadonlyKey fields | Field | Type | Description |
name | string | null | |
scope | "all" | "selected" | null | |
account_ids | string[] | null | |
PatchToken
PatchToken fields | Field | Type | Description |
name | string | null | |
ipAllowlist | string[] | null | |
PinBody
PinBody fields | Field | Type | Description |
apiVersion required | string | |
Position
An open position.
Position fields | Field | Type | Description |
id required | string | The position identifier. It stays the same across adds and partial closes on netting accounts. |
platform required | "mt4" | "mt5" | |
type required | string | POSITION_TYPE_BUY or POSITION_TYPE_SELL. |
symbol required | string | |
magic required | integer | |
time required | string | Open time, ISO-8601 UTC. |
brokerTime required | string | Open time on the broker's clock. |
updateTime | string | null | |
openPrice required | number | |
currentPrice | number | null | |
currentTickValue | number | null | |
volume required | number | Lots. |
swap required | number | |
commission required | number | |
profit required | number | Unrealized plus realized profit, swap and commission. |
unrealizedProfit required | number | |
realizedProfit required | number | |
stopLoss | number | null | |
takeProfit | number | null | |
reason | string | null | |
comment | string | null | |
clientId | string | null | |
brokerComment | string | null | |
Price
The current bid and ask.
Price fields | Field | Type | Description |
symbol required | string | |
bid required | number | |
ask required | number | |
profitTickValue | number | null | |
lossTickValue | number | null | |
time required | string | |
brokerTime required | string | |
PrivateServer
A private server: a dedicated address for its own accounts.
PrivateServer fields | Field | Type | Description |
id required | string | |
name required | string | |
status required | string | For example provisioning, ready or expired. |
region required | string | |
ip required | string | null | |
purchased_slots required | integer | |
used_slots required | integer | |
period_end required | string | |
accounts required | LinkedAccount[] | |
PrivateServerAddAccount
PrivateServerAddAccount fields | Field | Type | Description |
platform | "mt4" | "mt5" | |
server required | string | |
login required | integer | |
password required | string | |
nickname | string | |
trade_ea_symbol | string | |
ReadonlyKey
A read-only key. key is the value, shown once on create and rotate.
Every other answer has key: null.
ReadonlyKey fields | Field | Type | Description |
id required | string | |
name required | string | |
key required | string | null | |
key_preview required | string | |
scope required | "all" | "selected" | |
accounts required | string[] | |
created_at required | string | |
last_used_at required | string | null | |
key_notice | string | null | Present when key is shown, or when a replay no longer shows it. |
Region
Region fields | Field | Type | Description |
code required | string | |
label required | string | |
Regions
Where private servers can run, and what they cost.
Regions fields | Field | Type | Description |
enabled required | boolean | |
regions required | Region[] | |
max_slots required | integer | |
max_servers required | integer | |
first_slot_eur_cents required | integer | |
additional_slot_eur_cents required | integer | |
RotateSecret
RotateSecret fields | Field | Type | Description |
secret | string | null | |
overlapHours | number | |
SandboxSignupBody
SandboxSignupBody fields | Field | Type | Description |
platform | "mt4" | "mt5" | |
SeatDetail
SeatDetail fields | Field | Type | Description |
id required | string | |
account_id required | string | |
paid_until required | string | null | |
status required | "active" | "inactive" | "unknown" | |
Seats
Seats fields | Field | Type | Description |
total required | integer | |
used required | integer | |
ServerTime
The current time on both clocks, and the detected broker time zone.
ServerTime fields | Field | Type | Description |
time required | string | Now, ISO-8601 UTC. |
brokerTime required | string | Now, on the broker's clock. |
lastQuoteTime | string | null | |
lastQuoteBrokerTime | string | null | |
brokerUtcOffsetMinutes required | integer | null | null while the offset is unknown. It is never guessed. |
brokerTimezone | string | null | |
brokerDSTSwitchTimezone | string | null | |
dstRule | string | null | us, eu, none or unknown. |
offsetSource | string | null | |
confidence | string | null | |
Subscription
The plan and its real billing state. status is unknown and
paid_access is null when billing cannot be read.
Subscription fields | Field | Type | Description |
plan required | string | |
status required | string | |
paid_access required | boolean | null | |
billing_provider required | string | |
cancel_at_period_end required | boolean | |
seats required | Seats | |
seat_details required | SeatDetail[] | |
current_period_end required | string | null | |
grace_ends_at required | string | null | |
wallet required | SubscriptionWallet | |
SubscriptionWallet
SubscriptionWallet fields | Field | Type | Description |
balance_eur_cents required | integer | |
next_charge_eur_cents required | integer | |
next_charge_at required | string | null | |
covers_next_charge required | boolean | |
note required | string | |
SymbolSpecification
The symbol's trading rules.
SymbolSpecification fields | Field | Type | Description |
symbol required | string | |
tickSize | number | null | |
minVolume required | number | |
maxVolume required | number | |
volumeStep required | number | |
contractSize | number | null | |
baseCurrency | string | null | |
profitCurrency | string | null | |
marginCurrency | string | null | |
digits required | integer | |
point | number | null | |
description | string | null | |
fillingModes | string[] | null | |
tradeMode | string | null | |
quoteSessions | object | null | |
tradeSessions | object | null | |
swapLong | number | null | |
swapShort | number | null | |
pipSize | number | null | |
stopsLevel | integer | null | |
freezeLevel | integer | null | |
Tick
One tick.
Tick fields | Field | Type | Description |
symbol required | string | |
time required | string | |
brokerTime required | string | |
bid | number | null | |
ask | number | null | |
last | number | null | |
volume | number | null | |
TradeResult
The trade's result. It comes with HTTP 200 even when the broker rejects the trade.
TradeResult fields | Field | Type | Description |
numericCode required | integer | 0, 10008, 10009, 10010 and 10025 mean success. |
stringCode required | string | |
message required | string | |
orderId | string | null | |
positionId | string | null | |
outcome required | "applied" | "no_change" | "partial" | "rejected" | "unknown" | unknown means the order may have executed. Check positions and orders before you retry. |
isEffective | boolean | null | |
retcode | integer | null | The terminal's own code. |
replayed required | boolean | true when this is the stored result of an earlier request with the same key. |
positions | object[] | null | POSITIONS_CLOSE_SYMBOL only. |
TradingAccount
A trading account on the account API, with Tickwire extras.
TradingAccount fields | Field | Type | Description |
_id required | string | |
name required | string | |
login required | string | null | null for a DRAFT account with no credentials yet. |
server required | string | |
platform required | "mt4" | "mt5" | |
version required | 4 | 5 | |
type required | string | |
state required | string | For example CREATED, DEPLOYING, DEPLOYED or UNDEPLOYED. |
connectionStatus required | string | CONNECTED, DISCONNECTED or DISCONNECTED_FROM_BROKER. |
magic required | integer | |
manualTrades required | boolean | |
reliability required | string | |
region required | string | |
tags required | string[] | |
createdAt required | string | |
stateChangedAt required | string | |
ipMode required | "shared" | "dedicated" | |
instances required | integer | Terminals serving the account right now. |
health required | AccountHealth | The terminal's own health, as last reported. unknown until a report exists. |
TradingAccountPage
The list with api-version: 2.
TradingAccountPage fields | Field | Type | Description |
count required | integer | |
items required | TradingAccount[] | |
TriggerBody
TriggerBody fields | Field | Type | Description |
type required | string | |
accountId | string | null | |
UpdateProfile
UpdateProfile fields | Field | Type | Description |
name | string | null | |
brokerTimezone | string | null | |
brokerDSTSwitchTimezone | string | null | |
managerLogin | string | null | |
managerPassword | string | null | |
managerServer | string | null | |
UpdateTradingAccount
UpdateTradingAccount fields | Field | Type | Description |
name | string | null | |
password | string | null | |
server | string | null | |
magic | integer | null | |
manualTrades | boolean | null | |
slippage | number | null | |
quoteStreamingIntervalInSeconds | number | null | |
tags | string[] | null | |
metadata | object | null | |
copyFactoryRoles | "PROVIDER" | "SUBSCRIBER"[] | null | |
resourceSlots | integer | null | |
copyFactoryResourceSlots | integer | null | |
metastatsApiEnabled | boolean | null | |
allocateDedicatedIp | "ipv4" | "none" | null | |
serverAddress | string | null | |
Wallet
The prepaid balance, used for private servers.
Wallet fields | Field | Type | Description |
balance_eur_cents required | integer | |
currency required | string | |
Webhook
A webhook endpoint. secret signs every delivery.
Webhook fields | Field | Type | Description |
id required | string | |
url required | string | |
secret required | string | |
active required | boolean | |
created_at required | string | |