Skip to content

MngUpdateCopySubscription

Updates a Copy Trading subscription.

If the resulting subscription has copy_existing_positions = 1, CopyTradeManager queues replay of currently open master positions. Pending orders are included when copy_pending_orders = 1; already linked orders are skipped.

Runtime notes:

  • volume_mode = 0 uses fixed_volume.
  • volume_mode = 1 uses master_volume * risk_multiplier.
  • volume_mode = 2 uses follower/master equity ratio.
  • volume_mode = 3 uses follower/master balance ratio.
  • reverse_direction = 1 opens 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.

When master_login or follower_login changes, the server first checks manager access, account ownership/scope, master visibility and follower mode. The update is rejected with RET_ERR_PARAMS if the resulting master and follower logins are the same. It returns RET_ERR_DUPLICATE if another subscription already has the resulting pair; the subscription being updated is excluded from this check. Existing records with unchanged logins remain editable, including historical records that would fail these checks if relinked.

Relinking master_login or follower_login is also rejected while copied orders for the subscription are unsettled. Enabling/resuming a subscription beyond the follower active distinct-master limit is rejected.

Request Parameters

Name Type Required Description
id int Yes Subscription id
master_login int No Copy master login
follower_login int No 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
min_volume int No Minimum volume
max_positions int No Maximum positions
symbols_mode int No 0 all, 1 include, 2 exclude
symbols string No Symbol filter payload

Response Data

Returns the saved object; updated_time is the timestamp of this update:

{
  "id": 10,
  "master_login": 100001,
  "follower_login": 100002,
  "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": 1780838401
}

Conflict Return Codes

Possible error codes: RET_ERR_PARAMS (resulting master and follower logins are the same); RET_ERR_DUPLICATE (another subscription already has the resulting master/follower pair); RET_USR_HAS_TRADES (Account has open trades) for unsettled copied orders; RET_TRADE_LIMIT_REACHED (Trades limit reached) when an active distinct-master limit would be exceeded.