BINANCE SAPI · C2C

Check If Allowed Cancel Order API

Pre-validate whether an active peer-to-peer (C2C) trade order can be safely cancelled without violating trading rules or penalty limits.

ENDPOINT
POST /sapi/v1/c2c/orderMatch/checkIfAllowedCancelOrder
Authentication USER_DATA / SIGNED
API Group C2C / Order Match
Method POST
Response JSON

Overview

This endpoint checks the cancellation eligibility for a specific Binance C2C (P2P) order prior to submitting a formal cancel request. It evaluates whether the current order lifecycle stage, counterparty status, and payment confirmation state permit a valid cancellation.

Trading bots and user interface dashboards use this endpoint as a safety pre-check before calling the cancel execution endpoint, preventing unnecessary API errors and avoiding unintended counterparty dispute escalations.

01

Request Parameters

Parameters accepted in Body and HTTP Headers.

Parameter In Type Required Description
clientType Header STRING Required Client Device Type initiating the request (e.g., WEB, APP).
orderNumber Body STRING Required Unique C2C order number to evaluate for cancellation permission.
x-gray-env Header STRING Optional Environment flag identifier used for internal gray/stage testing.
x-trace-id Header STRING Optional Custom client trace ID for request lifecycle tracking and debugging.
x-user-id Header STRING Optional Target user identifier for context validation.
i
Pre-Flight Best Practice

Always invoke this check prior to rendering the "Cancel Order" confirmation modal or triggering automated abort sequences to prevent failed cancellation attempts.

02

Request Example

Example POST request using cURL to verify cancel permission.

cURL BASH
curl -X POST \
'https://api.binance.com/sapi/v1/c2c/orderMatch/checkIfAllowedCancelOrder' \
-H 'clientType: WEB' \
-H 'Content-Type: application/json' \
-d '{
  "orderNumber": "202608161234567890"
}'
03

Response

Example response returned on successful eligibility check.

RESPONSE 200 OK
{
    "code": "000000",
    "message": "success",
    "data": true,
    "success": true
}

Response Fields

Field Type Description
code STRING Standard Binance status response code ("000000" indicates success).
message STRING Response execution feedback or status description.
data BOOLEAN Returns true if the order can be cancelled; returns false otherwise.
success BOOLEAN Indicates overall request execution result.
04

How It Works

Workflow for validating order cancellation eligibility.

01 Select Order Obtain target orderNumber to inspect.
02 Send Check Request POST orderNumber payload to verification endpoint.
03 Evaluate Permission Check if returned data boolean equals true.
04 Trigger Cancel API Proceed to call cancelOrder API safely if permitted.

Common Use Cases

Pre-Cancellation Validation

Ensure programmatic abort routines only attempt cancellations when the exchange backend permits them.

Dynamic UI Button State

Enable or disable the "Cancel Order" button in trading interfaces based on real-time server permissions.

Error Prevention

Avoid triggering repeated 400/403 API errors caused by attempting to cancel already-paid or locked orders.



💬
Telegram WhatsApp