UpdateCopyTradeMaster¶
Endpoint¶
PUT /copytrade/master/{id}
Authorization¶
Requires SESSION_CUSTOMER.
Description¶
Updates a customer-owned master profile. If login is changed, the new login must belong to the customer and must be a REAL account.
This method updates the master profile only. Reward policy changes are handled by manager reward policy methods.
Request¶
{
"strategy_name": "Conservative FX v2",
"enabled": 1,
"visibility": "public",
"allowed_follower_modes": 0,
"show_trade_history": 1,
"show_followers": 1
}
Request Fields¶
All fields are optional.
| Name | Type | Description |
| login | int | New customer-owned REAL account login |
| enabled | int | 1 enabled, 0 disabled |
| strategy_name | string | Strategy display name |
| description | string | Strategy description |
| visibility | string | private or public marker |
| allowed_follower_modes | int | 0 real only, 1 demo only, 2 real and demo |
| show_trade_history | int | 1 allows public viewing of this master's trade history, 0 keeps it private |
| show_followers | int | 1 allows public viewing of masked followers and their copied-trading statistics under this master, 0 keeps them private |
Response¶
Returns the saved master object, including show_trade_history, show_followers and timestamps:
{
"id": 7,
"login": 100001,
"enabled": 1,
"strategy_name": "Conservative FX v2",
"description": "Low risk major pairs strategy",
"visibility": "public",
"allowed_follower_modes": 2,
"show_trade_history": 1,
"show_followers": 1,
"created_time": 1780838400,
"updated_time": 1780838401
}
Changing login is rejected with HTTP 409 RET_USR_HAS_TRADES while an order copied through the existing profile is unsettled; the update is not applied.
Errors¶
| HTTP | Error | Description |
|---|---|---|
409 |
RET_ERR_DUPLICATE |
A master already exists for the new login |
409 |
RET_USR_HAS_TRADES |
Changing login is blocked while copied orders are unsettled |
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
Request validation failed |
400 |
ACCOUNT_NOT_FOUND |
New account or group was not found |
400 |
MASTER_ACCOUNT_MUST_BE_REAL |
New login belongs to a DEMO group |
403 |
PERMISSION_DENIED |
Master is not owned by the customer |
403 |
INVALID_ACCOUNT |
New login does not belong to the customer |
404 |
RET_ERR_NOTFOUND |
Master was not found |