MngCreateCopySubscription¶
Creates a subscription between an existing copy master and a trading account.
The account must be available to the manager session. A follower profile does
not need to be created first: if none exists, the server creates a default
profile (enabled = 1, manual_trading_mode = 1 / allow non-copied orders,
max_master_count = 1) in the same transaction as the subscription. An
existing enabled profile is reused without changing its settings; a disabled
profile is rejected. The returned wire object remains the complete subscription
record, with no additional response fields.
Profile creation and subscription persistence are atomic. Validation, duplicate
subscription, active-master limit, or persistence failures leave no newly
created follower profile behind. The standalone MngCreateCopyFollower command
remains available for configuring a follower before any subscription.
If copy_existing_positions = 1, CopyTradeManager queues replay of currently
open master positions after creation. Pending orders are included when
copy_pending_orders = 1; already linked orders are skipped.
Runtime notes:
volume_mode = 0usesfixed_volume.volume_mode = 1usesmaster_volume * risk_multiplier.volume_mode = 2uses follower/master equity ratio.volume_mode = 3uses follower/master balance ratio.reverse_direction = 1opens the opposite market direction and swaps copied SL/TP meaning.
Runtime behavior, synchronization modes and follower write restrictions are detailed in the Copy Trading API overview.
Access¶
SESSION_MANAGER, SESSION_ADMIN, SESSION_DEALER, SESSION_CRM_MANAGER, SESSION_CRM_ADMIN.
Non-admin manager access requires access_backoffice or access_crm plus set_copy_subscriptions.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
master_login |
int | Yes | Existing copy master login |
follower_login |
int | Yes | Existing copy follower login |
enabled |
int | No | 1 enabled, 0 disabled |
status |
int | No | 0 active, 1 paused, 2 disabled |
copy_mode |
int | No | 0 full sync, 1 open only, 2 close only |
volume_mode |
int | No | 0 fixed, 1 multiplier, 2 equity ratio, 3 balance ratio |
risk_multiplier |
double | No | Volume multiplier |
fixed_volume |
int | No | Fixed follower volume |
copy_sl |
int | No | Copy stop loss flag |
copy_tp |
int | No | Copy take profit flag |
copy_partial_close |
int | No | Copy partial close flag |
copy_pending_orders |
int | No | Copy pending orders flag |
copy_existing_positions |
int | No | Copy existing positions flag |
reverse_direction |
int | No | Reverse direction flag |
max_volume |
int | No | Maximum volume, 0 means not configured |
min_volume |
int | No | Minimum volume, 0 means not configured |
max_positions |
int | No | Maximum positions, 0 means not configured |
symbols_mode |
int | No | 0 all, 1 include, 2 exclude |
symbols |
string | No | Symbol filter payload |
Possible Return Codes¶
| Code | Meaning |
|---|---|
RET_ERR_DUPLICATE |
The master/account subscription already exists; existing follower settings are not overwritten |
RET_TRADE_DISABLE |
The account has an existing disabled follower profile |
RET_TRADE_LIMIT_REACHED |
The active distinct-master limit would be exceeded |
RET_TECH_PROBLEM |
The follower profile and subscription could not be persisted |
Response Data¶
Returns the created subscription object. The returned object includes its saved timestamps:
{
"id": 10,
"master_login": 2000001,
"follower_login": 2000002,
"enabled": 1,
"status": 0,
"copy_mode": 0,
"volume_mode": 1,
"risk_multiplier": 1.0,
"fixed_volume": 0,
"copy_sl": 1,
"copy_tp": 1,
"copy_partial_close": 1,
"copy_pending_orders": 1,
"copy_existing_positions": 0,
"reverse_direction": 0,
"max_volume": 0,
"min_volume": 0,
"max_positions": 0,
"symbols_mode": 0,
"symbols": "",
"created_time": 1780838400,
"updated_time": 1780838400
}