Root Models
ManagerApiAccount
Represents a trading account associated with a specific trader. Contains key information about balances, margin, leverage, group, and configuration parameters. Used in responses like get_accounts
.
JSON structure
Field reference
id
string
Unique identifier of the account.
trader_id
string
Identifier of the trader owning this account.
currency
string
Currency code (e.g. USD, EUR) for account balance.
balance
number
Current balance of the account.
equity
number
Total equity (balance adjusted by open P&L).
margin
number
Total used margin.
free_margin
number
Available margin (equity - used margin).
margin_level
number
Ratio of equity to margin. Used to monitor risk.
leverage
number
Leverage ratio (e.g. 100 = 1:100).
trading_group
string
Identifier of the group this account belongs to.
last_update_date
integer
(timestamp)
Last time the account was updated (milliseconds since epoch, UTC).
metadata
object
Key-value metadata associated with this account.
status
int
See ManagerApiAccountStatus
enum below.
hedge_mode
int
See ManagerApiAccountHedgeMode
enum below.
ManagerApiAccountStatus
0
Active
Account is active and can be used for trading.
1
Disabled
Account is disabled and cannot be used.
ManagerApiAccountHedgeMode
0
Hedge
Allows multiple independent positions on the same instrument.
1
Netting
Positions are merged into a net position.
ManagerApiAccountBalanceUpdateOperation
Description
Represents a single operation that affected a trading account's balance — such as a trade, deposit, withdrawal, commission charge, or internal correction. This object is part of the ManagerApiAccountBalanceUpdate
structure and provides audit-level detail about the change.
JSON Structure
Field Reference
id
string
Unique identifier for this operation.
trader_id
string
ID of the trader who owns the affected account.
account_id
string
ID of the account that was modified.
reason
string
enum
Type of operation: trading
, deposit
, withdrawal
, transfer
, etc.
process_id
string | null
Optional identifier of the process that performed the update.
delta
float
The amount the balance was adjusted by (positive or negative).
date
integer
(timestamp)
Timestamp of when the operation occurred (UNIX epoch, milliseconds).
comment
string | null
Optional comment or metadata.
reference_operation_id
string | null
ID of another operation this one refers to, if linked.
ManagerApiAccountBalanceUpdate
Description
This structure wraps a balance update event for a trading account. It includes the current state of the account after the change, as well as an optional reference to the balance-changing operation that triggered the update. This object is used inside YftServerMessageType<ManagerApiAccountBalanceUpdate>
responses or updates.
JSON Structure
Field Reference
account
ManagerApiAccount
The updated account snapshot after the balance modification.
operation
[ManagerApiAccountBalanceUpdateOperation
] | null
The operation that caused the balance update, or null
if unknown.
ManagerApiDayOffProfile
Defines a profile used to restrict trading on recurring weekly intervals. Each profile contains one or more "day-off" time windows during which trading is disabled. Typically used to configure trading breaks per instrument or group.
JSON structure
Field reference
id
string
Unique identifier of the day-off profile.
name
string
Human-readable name of the profile.
is_disabled
boolean
If true, the profile is inactive and not enforced.
days_off
array
A list of time windows representing when trading is restricted. See ManagerApiDayOffWindow
.
ManagerApiDayOffWindow
Represents a specific time window within a week when trading is blocked. These windows can span across multiple days.
JSON structure
Field reference
dow_from
int
Start day of the restriction (0 = Sunday, 1 = Monday, ..., 6 = Saturday).
time_from
string
Start time of the restriction in HH:MM:SS
format.
dow_to
int
End day of the restriction.
time_to
string
End time of the restriction in HH:MM:SS
format.
ManagerApiMarkupProfile
Defines a markup configuration profile that maps trading instruments to specific bid/ask markups and optional spread restrictions. Used to apply price modifications for particular clients or trading groups.
JSON structure
Field reference
id
string
Unique identifier for the markup profile.
name
string
Descriptive name of the profile.
disabled
boolean
If true, the profile is not applied.
instruments
object<string, ManagerApiMarkupInstrument>
Map of instrument IDs to their specific markup settings.
ManagerApiMarkupInstrument
Describes the markup and spread restrictions for a specific trading instrument within a markup profile.
JSON structure
Field reference
instrument_id
string
ID of the trading instrument.
markup_bid
int
Adjustment to the bid price. Negative values reduce the bid.
markup_ask
int
Adjustment to the ask price. Negative values reduce the ask.
min_spread
float (opt)
Optional minimum allowed spread. If null
, no restriction is enforced.
max_spread
float (opt)
Optional maximum allowed spread. If null
, no restriction is enforced.
ManagerApiBidAsk
Represents a real-time snapshot of bid and ask prices for a specific trading instrument at a given moment. This model is used in price-related server messages to communicate current market conditions.
JSON structure
Field reference
id
string
Identifier of the instrument or price feed (e.g. "EURUSD").
bid
float
Current bid price.
ask
float
Current ask price.
date
integer
(timestamp)
When the snapshot was taken (in milliseconds since UNIX epoch, UTC)
base
string
Base currency of the instrument (e.g. "EUR").
quote
string
Quote currency of the instrument (e.g. "USD").
ManagerApiSwapModel
Each swap represents an overnight adjustment applied to the position.
JSON structure
Field reference
delta
float
Swap amount (positive or negative).
date
integer
(timestamp)
When the swap was applied (in milliseconds since UNIX epoch, UTC)
ManagerApiPosition
Represents a trading position (open or closed) managed by the Manager API. This structure is used for both active and closed positions, making it a unified data model for all position-related data. It includes information such as order metadata, bid/ask prices used in different contexts, and applied swap charges.
JSON structure
Field reference
id
string
Unique identifier of the position.
trader_id
string
ID of the trader who owns the position.
account_id
string
ID of the account associated with the position.
asset_pair
string
Traded asset pair (e.g. "EURUSD").
collateral
string
Collateral currency used (e.g. "USD").
lots_amount
float
Total number of lots.
is_buy
bool
true
if this is a buy position, otherwise false
.
sl_price
float
(opt)
Stop-loss price, if set.
tp_price
float
(opt)
Take-profit price, if set.
metadata
object
Arbitrary key-value data.
order_id
string
Identifier of the opening order.
margin_bidask
ManagerApiBidAsk
Bid/ask used for margin calculation.
open_bidask
ManagerApiBidAsk
Price when the position was opened.
profit_bidask
ManagerApiBidAsk
Price used for PnL calculation.
active_bidask
ManagerApiBidAsk
Most recent bid/ask price.
commission
float
Total commission paid.
swaps
array
List of swap entries applied.
create_date
integer
(timestamp)
Timestamp in milliseconds since epoch (position created)
update_date
integer
(timestamp)
Timestamp in milliseconds since epoch (last update)
ManagerApiTrade
Represents a completed trade execution recorded by the Manager API. Each trade corresponds to a single execution event and contains details about the trader, account, instrument, and execution metrics such as price, volume, and fees.
JSON Structure
Field Reference
id
string
Unique identifier of the trade.
trader_id
string
Identifier of the trader who executed the trade.
account_id
string
Identifier of the trading account used for the trade.
asset_pair
string
Identifier of the traded asset pair (e.g. "ETHUSD"
).
order_id
string
Identifier of the order that triggered this trade.
position_id
string
(opt)
Identifier of the associated position, if applicable.
price
number
Executed price of the trade.
pl
number
Realized profit or loss (PL) from this trade.
fee
number
Commission or fee charged for this trade.
lots_amount
number
Number of lots traded.
create_date
integer
(timestamp)
Execution timestamp in milliseconds since UNIX epoch (UTC)
create_process_id
string
Identifier of the internal process that recorded this trade.
is_buy
boolean
true
if buy trade, false
if sell.
ManagerApiTradingGroup
Represents a group of trading accounts logically grouped under a shared configuration. Each trading group references several configuration profiles that define how trading conditions, swaps, and market data apply to its members.
JSON Structure
Field Reference
id
string
Unique identifier of the trading group.
name
string
Human-readable display name of the trading group.
trading_profile_id
string
ID of the associated trading profile that defines leverage, allowed instruments, etc.
swap_profile_id
string
ID of the swap profile defining overnight charge rules.
mde_profile_id
string
ID of the Market Data Engine profile used for price feeds and aggregation.
trading_disabled
bool
Indicates if trading is currently disabled for all accounts in this group.
ManagerApiTradingInstrument
Defines the full configuration for a tradable instrument in the system. This includes its pricing structure, tick precision, trading constraints, and schedule-related settings.
JSON Structure
Field Reference
id
string
Unique identifier or symbol of the trading instrument.
name
string
Full descriptive name of the instrument.
digits
u32
Number of decimal digits for price precision.
base
string
Base asset in the trading pair.
quote
string
Quote currency used to price the instrument.
tick_size
f64
Minimum increment between prices.
swap_schedule_id
string (opt)
Optional ID of the swap schedule for overnight fees.
group_id
string
Identifier of the trading group/category this instrument belongs to.
weight
u64
Sorting index used in UI views.
day_timeout
u64
Trade timeout in seconds during the day session.
night_timeout
u64
Trade timeout in seconds during the night session.
trading_disabled
bool
Flag indicating if trading is disabled for this instrument.
lot_size
u64
Default size of one trading lot.
day_off_profiles_id
array[string]
List of IDs for day-off profiles restricting trade hours.
ManagerApiTradingProfile
Defines the complete trading constraints and defaults used by a trading group or account. This includes leverage options, collateral rules, and per-instrument configuration.
JSON Structure
Field Reference
id
string
Unique identifier of the trading profile.
name
string
Descriptive name of the profile.
stop_out_percent
f64
Percentage of margin level at which stop-out occurs.
is_a_book
bool
Execution model: true = A-Book, false = B-Book.
margin_call_percent
f64
Threshold margin percentage triggering margin call.
instruments
array<object>
List of instrument-specific constraints.
leverages
array<f64>
Allowed leverage values for accounts.
default_leverage
f64
Default leverage assigned to new accounts.
collateral_currencies
array<string>
Supported collateral currencies.
initial_deposit
f64
Minimum deposit requirement.
hedge_margin_coefficient
f64
Margin multiplier used for hedged positions.
commission_per_lot
f64
Default commission per lot if not overridden.
ManagerApiTradingProfileInstrument
Specifies operational and risk constraints for a single instrument under a trading profile.
Json Structure
Field Reference
id
string
Identifier or symbol of the instrument.
min_operation_volume
f64
Minimum volume for a trade.
max_operation_volume
f64
Maximum volume allowed per trade.
max_position_volume
f64
Max volume of all open positions per instrument.
open_position_min_delay_ms
u64
Minimum allowed delay between opens (in ms).
open_position_max_delay_ms
u64
Maximum allowed delay between opens (in ms).
instrument_max_leverage
u64
Max leverage allowed for this instrument.
commission_per_lot
f64 (opt)
Optional override of default commission per traded lot.
ManagerApiOrder
Represents a trading order submitted by a trader, including its type, status, and execution parameters.
JSON Structure
Field Descriptions
id
string
Unique identifier of the order.
trader_id
string
Identifier of the trader who created the order.
account_id
string
Identifier of the account associated with the order.
asset_pair
string
Identifier of the traded asset pair (e.g. "EURUSD").
collateral
string
Collateral currency for the order (e.g. "USD").
lots_amount
number (f64)
Number of lots requested in the order.
is_buy
boolean
Indicates if the order is for buying (true
) or selling (false
).
sl_price
number (f64)
Optional stop-loss price.
tp_price
number (f64)
Optional take-profit price.
metadata
object
Arbitrary key-value metadata associated with the order.
order_type
string (enum)
Type of the order: market
, stop
, or limit
.
create_date
integer (timestamp)
Timestamp when the order was created (milliseconds since epoch)
update_date
integer (timestamp)
Timestamp of the most recent update (milliseconds since epoch)
desired_price
number (f64)
Desired price for execution (used for limit
or stop
orders only).
Last updated