Перейти к основному содержимому

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

ParameterTypeInDescription
idintegerpathThe 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

StatusCodeDescription
401Missing or invalid authentication token.
500Failed to cancel order (plain text error with details).