Skip to main content

Copier Update

The /user/copier/update endpoint allows an authenticated user to update stop loss and take profit configuration for their copier bot. Only the owner of the copier can perform this action.

Method

POST /user/copier/update

Request Body

Important!! if you don't wish to update a value do not add it on the json body, not even nulls or undefined. Only add the fields you wish to update.

To clear stop loss or take profit, send "0" (as a string).

{
"id": "0123198321",
"stop_loss": "500",
"take_profit": "1200",
"is_inverse": true,
"is_mirror": false
}

Fields

  • id (string, required): UUID of the copier to update.
  • stop_loss (string, optional): Stop loss threshold in absolute value. Must be a positive number or "0" to clear it.
  • take_profit (string, optional): Take profit threshold in absolute value. Must be a positive number or "0" to clear it.
  • is_inverse (boolean, optional): Send true if you want to change to reverse trading, false if you want to direct. Don't send if you don't want to update anything.
  • is_mirror (boolean, optional): Send true if you want to change to mirror trading, false if you want to direct. Don't send if you don't want to update anything.

Response

{
"status": 200,
"data": {
"success": true
}
}

Errors

  • 400 Bad Request: Invalid parameters (e.g. missing required fields, non-numeric thresholds, negative values).
  • 401 Unauthorized: User is not the owner of the copier.
  • 500 Internal Server Error: Failed to update the copier (e.g. internal or NATS error).