Create trade copier .

POST

Request

/copiers

Body

{
    "lead_id": 6159,
    "follower_id": 6167,
    "risk_type": "risk_multiplier_by_balance",
    "risk_value": 1
}

Response

{
    "result": "success",
    "status": 200,
    "data": {
        "id": 189,
        "created_at": "2021-06-17T12:26:56.000000Z",
        "updated_at": "2021-06-17T12:26:56.000000Z",
        "lead_id": 185,
        "follower_id": 11,
        "mode": "off",
        "reverse": "no",
        "risk_type": "risk_multiplier_by_balance",
        "risk_value": 1,
        "force_min": "no",
        "max_lot": 50,
        "slippage": 5,
        "copy_pending": "no",
        "copy_sl": "no",
        "fixed_sl": null,
        "copy_tp": "no",
        "fixed_tp": null,
        "comment": null
    }
}

Attributes

Field Required Accepted Description
lead_id yes integer Lead account ID
follower_id yes integer Follower account ID
risk_type yes string A valid risk type. See risk_type below
risk_value yes double A risk value for the risk type
copy_existing no yes or no Copy existing lead account trades
reverse no yes or no Reverse direction of trades
force_min no yes or no Round up the lot size if less than the minimum
max_lot no double Round down the lot size if it is greater than the max lot
slippage no double An acceptable difference between the lead open price
copy_pending no yes or no Copy pending orders
copy_sl no yes, no or fixed Copy stop loss
fixed_sl no double A fixed stop loss if using copy_sl fixed
copy_tp no yes, no or fixed Copy take profit
fixed_tp no double A fixed take profit if using copy_tp fixed
comment no string Append a string to the MT trade comment

risk_type

Value Description
risk_multiplier_by_balance The copier will consider the balance of accounts to calculate a proportional lot size
risk_multiplier_by_equity The copier will consider the equity values of accounts to calculate a proportional lot size
lot_multiplier The lot size is calculated by taking the Copy From lot size and multiplying by the Multiplier value
fixed_lot All trades will be copied to the Send To account at the defined Fixed Lot value
percentage_risk_per_trade_by_balance The copier will consider the balance of the accounts to calculate the percentage risk per trade (must enable copy stop loss on copier)
percentage_risk_per_trade_by_equity The copier will consider the equity values of the accounts to calculate the percentage risk per trade (must enable copy stop loss on copier)
risk_amount_per_trade A fixed monetary amount for the risk per trade, there must be a stop loss on the master account with this risk type

Fail codes

Code Status Description
validation_failed 422 Lead and follower ID are the same
lead_does_not_exist 422 Lead account does not exist
follower_does_not_exist 422 Follower account does not exist
invalid_account_combination 422 Follower already copying the lead
fixed_stop_loss_required 422 Fixed stop loss required
fixed_take_profit_required 422 Fixed take profit required
infinite_loop 422 This copier will create an infinite loop

Stay in the loop..

Sign up to our newsletter to keep up-to-date.