Skip to content

UpdateCopyTradeSubscription

Endpoint

PUT /copytrade/subscription/{id}

Authorization

Requires SESSION_CUSTOMER.

Description

Updates a subscription owned by the authenticated customer through its follower account.

If master_login or follower_login changes, the server first revalidates the subscription, account ownership, master visibility and follower mode policy. The update is rejected with HTTP 400 RET_ERR_PARAMS if the new master and follower logins are the same. It is rejected with HTTP 409 RET_ERR_DUPLICATE if another subscription already has the resulting master/follower pair; the subscription being updated is excluded from this check. Existing records whose logins are unchanged remain editable, including historical records that would fail the new-pair checks.

If the resulting subscription has copy_existing_positions = 1, the backend queues replay of currently open master positions. Pending orders are included when copy_pending_orders = 1; already linked master 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.

Request

{
  "enabled": 1,
  "status": 0,
  "risk_multiplier": 0.5,
  "copy_sl": 1,
  "copy_tp": 1
}

Response

Returns the updated subscription object. created_time and updated_time are saved timestamps:

{
  "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
}

Changing master_login or follower_login is rejected with HTTP 409 RET_USR_HAS_TRADES while an order copied through the existing subscription is unsettled; the update is not applied.

Errors

HTTP Error Description
409 RET_ERR_DUPLICATE Subscription already exists for the new master/follower pair
400 RET_ERR_PARAMS The resulting master and follower logins are the same
409 RET_USR_HAS_TRADES Changing master/follower login is blocked while copied orders are unsettled

| 409 | RET_TRADE_LIMIT_REACHED | Active distinct-master limit would be exceeded | | 400 | INVALID_DATA | Request validation failed | | 403 | PERMISSION_DENIED | Subscription is not owned through follower account | | 403 | INVALID_FOLLOWER_ACCOUNT | Follower login does not belong to customer | | 403 | MASTER_NOT_FOUND | Master profile was not found | | 403 | MASTER_NOT_AVAILABLE | Master is not available | | 403 | FOLLOWER_NOT_FOUND | Follower profile was not found | | 403 | FOLLOWER_MODE_NOT_ALLOWED | Master does not allow follower account mode | | 404 | RET_ERR_NOTFOUND | Subscription was not found |