POST /api/v1/p2p/orders/{id}/cancel
Cancel a P2P order. Any frozen balance (escrowed USDT) is returned to the seller. Cancellation is only possible before the order has been completed.
Authentication​
Required. The request must include a valid Bearer token in the Authorization header. Only a participant of the order can cancel it.
Request​
| Parameter | Type | In | Description |
|---|---|---|---|
id | integer | path | The P2P order ID. |
No request body is required.
Example​
curl -X POST https://example.com/api/v1/p2p/orders/101/cancel \
-H "Authorization: Bearer <token>"
Response​
200 OK​
Returns a success indicator.
{
"success": true
}
Error Responses​
| Status | Code | Description |
|---|---|---|
| 401 | — | Missing or invalid authentication token. |
| 500 | — | Failed to cancel order (plain text error with details). |