Cancel Trade
POST
/ver1/trades/{uuid}/cancelCancels a trade by its UUID.
This endpoint can be used to cancel an open trade that is still in progress. Use the cancelable
attribute in Trade Entity to check if a trade is eligible for cancellation.
Response Parameters
If successful, returns the updated trade object with its cancellation status. See Trade Entity for full attributes.
Example Responses
- 201 Created
- 400 Bad request
- 403 Forbidden
{
"trade":
{
"uuid": "f89e3f34-1db1-47f2-81cc-9b4e5c50d7e1",
"account_id": 32576869,
"pair": "BTC_ETH",
"created_at": 1727871936,
"closed_at": 1727872001,
"order": {
"type": "limit",
"side": "sell",
"strategy": "gtc",
"position_side": "both",
"reduce_only": false
},
"units": {
"value": "1.0000"
},
"price": {
"value": "2100.0"
},
"total": {
"value": "2.1000"
},
"conditional": {
"enabled": false,
"value": null,
"price": {
"value": null,
"type": null
}
},
"trailing": {
"enabled": false,
"value": null,
"percent": null
},
"timeout": {
"enabled": false,
"value": null
},
"leverage": {
"type": null
},
"status": {
"basic_type": "cancelled",
"error": null
},
"filled": {
"units": "0.0000",
"total": "0.0000",
"price": null,
"value": "0.0"
},
"data": {
"cancelable": false
}
}
}
{
"error": "unprocessable_entity",
"error_description": "Trade cannot be cancelled"
}
{
"error": "Forbidden",
"error_description": "Api key not authorized for this action"
}