CreateCopyTradeMaster¶
Endpoint¶
POST /copytrade/master
Authorization¶
Requires SESSION_CUSTOMER.
Description¶
Creates a master strategy profile for a customer-owned REAL account. DEMO accounts cannot become masters.
The request must include reward_policy; the server creates the reward policy immediately after creating the master profile.
Request¶
{
"login": 100001,
"enabled": 1,
"strategy_name": "Conservative FX",
"description": "Low risk major pairs strategy",
"visibility": "public",
"allowed_follower_modes": 2,
"reward_policy": {
"reward_type": 1,
"billing_period": "monthly",
"fee_percent": 20,
"hwm_enabled": 1
}
}
Request Fields¶
| Name | Type | Required | Description |
|---|---|---|---|
login |
int | Yes | Customer-owned REAL account login |
strategy_name |
string | Yes | Strategy display name |
enabled |
int | No | 1 enabled, 0 disabled |
description |
string | No | Strategy description |
visibility |
string | No | private or public marker |
allowed_follower_modes |
int | No | 0 real only, 1 demo only, 2 real and demo |
reward_policy |
object | Yes | Initial reward policy |
reward_policy¶
| Name | Type | Required | Description |
|---|---|---|---|
reward_type |
int | Yes | Reward model |
enabled |
int | No | 1 enabled, 0 disabled |
billing_period |
string | No | Billing period marker |
fee_amount |
double | No | Fixed fee amount |
fee_percent |
double | No | Percent fee |
currency |
string | No | Defaults to master account group currency |
payout_account_login |
int | No | Defaults to master login; must belong to customer if provided |
hwm_enabled |
int | No | High-water mark flag |
Reward UI Behavior¶
The interface should first ask the user to choose reward_type, then show only the fields relevant to that model.
0 - SUBSCRIPTION_FEE¶
Fixed recurring or one-time access fee for following the master.
Show:
| Field | UI behavior |
|---|---|
billing_period |
Required. Suggested values: monthly, weekly, one_time |
fee_amount |
Required. Fixed amount paid by follower |
currency |
Optional. Defaults to master account group currency |
payout_account_login |
Optional. Defaults to master login |
Hide or set default:
| Field | Value |
|---|---|
fee_percent |
0 |
hwm_enabled |
0 |
1 - PERFORMANCE_FEE_HWM¶
Percent fee from follower profit above the high-water mark.
Show:
| Field | UI behavior |
|---|---|
billing_period |
Required. Suggested values: monthly, quarterly |
fee_percent |
Required. Percent of profit |
hwm_enabled |
Required. Should be 1 for this model |
currency |
Optional. Defaults to master account group currency |
payout_account_login |
Optional. Defaults to master login |
Hide or set default:
| Field | Value |
|---|---|
fee_amount |
0 |
2 - VOLUME_REBATE¶
Reward based on copied trading volume.
Show:
| Field | UI behavior |
|---|---|
billing_period |
Required. Suggested values: daily, weekly, monthly |
fee_amount |
Required. Rebate amount per configured volume unit |
currency |
Optional. Defaults to master account group currency |
payout_account_login |
Optional. Defaults to master login |
Hide or set default:
| Field | Value |
|---|---|
fee_percent |
0 |
hwm_enabled |
0 |
3 - PROFIT_SHARE_PER_TRADE¶
Percent fee from profitable copied trades.
Show:
| Field | UI behavior |
|---|---|
fee_percent |
Required. Percent of profitable trade PnL |
billing_period |
Optional. Suggested value: per_trade |
currency |
Optional. Defaults to master account group currency |
payout_account_login |
Optional. Defaults to master login |
Hide or set default:
| Field | Value |
|---|---|
fee_amount |
0 |
hwm_enabled |
0 |
4 - MANAGEMENT_FEE¶
Fixed management fee for using the strategy.
Show:
| Field | UI behavior |
|---|---|
billing_period |
Required. Suggested values: monthly, quarterly |
fee_amount |
Required. Fixed management fee |
currency |
Optional. Defaults to master account group currency |
payout_account_login |
Optional. Defaults to master login |
Hide or set default:
| Field | Value |
|---|---|
fee_percent |
0 |
hwm_enabled |
0 |
For all reward types, the UI should submit numeric fields as numbers, not strings. If payout_account_login is shown, it should be selected from customer-owned accounts only.
Response¶
Returns the created master object with reward_policy.
Errors¶
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
Request validation failed |
400 |
ACCOUNT_NOT_FOUND |
Account or group was not found |
400 |
MASTER_ACCOUNT_MUST_BE_REAL |
Master login belongs to a DEMO group |
400 |
REWARD_POLICY_REQUIRED |
reward_policy is missing |
400 |
INVALID_REWARD_POLICY |
Reward policy payload is invalid |
400 |
INVALID_PAYOUT_ACCOUNT |
Payout account is invalid |
403 |
INVALID_ACCOUNT |
Login does not belong to the customer |