---
title: "IDB Cancel OTC Trade"
method: POST
path: "/v2/idb/otc-command#cancel"
tags: ["idb"]
---

# IDB Cancel OTC Trade

`POST /v2/idb/otc-command#cancel`

## Request

- Base URL: `https://api.exchange.bullish.com/trading-api`
- URL: `https://api.exchange.bullish.com/trading-api/v2/idb/otc-command#cancel`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bullish/apis/bullish-trading-api/docs/v2/idb/otc-command%23cancel/post.ts> (a function with typed inputs; its response is checked against the schema)

Cancel a pending OTC trade that was previously initiated by the IDB.

Submits a command to the trading engine. A successful response indicates that the command entry was acknowledged
but does not indicate that the command was executed.
This endpoint uses the [signing format](/rest/authentication#signing-format) which does not require strict field
ordering and addition of null fields in the request body.

Command schemas and examples are provided below. Supported commands:
- V1IdbCancelOtcTrade

- requires [bearer token](/rest/authentication#add-authenticated-request-header) in authorization header

## Headers

- `BX-SIGNATURE` string, required
- `BX-TIMESTAMP` string, required
- `BX-NONCE` string, required

## Request body

- IdbCancelOtcTradeCommand: A command to cancel a dual-sided OTC trade using `sharedMatchKey`
  - `commandType` string, required: Specifies the command type and must be 'V1IdbCancelOtcTrade' to indicate the cancellation of a dual-sided OTC trade.
  - `sharedMatchKey` string, required: Unique shared key that is agreed between the two customers to represent their OTC trade to be matched on Bullish's OTC Clearing Facility. Must be a 12 to 64 characters alphanumeric value
  - `idbRemarks` string: text field for IDB's internal reference to a trade, max length is 255 characters

## Response `200`

Status OK. This means a command was successfully acknowledged.

- IdbCancelOtcTradeResponse: A response for an acknowledged OTC command to cancel a dual-sided OTC trade
  - `message` string, required: message indicating the status of the request
  - `sharedMatchKey` string, required: system-generated unique identifier for the dual-sided brokered OTC trade
  - `maker` IdbRequestItem, required
    - `requestId` string
    - `otcTradeId` string: unique numeric (i64) identifier generated on Bullish side expressed as a string value
  - `taker` IdbRequestItem, required
    - `requestId` string
    - `otcTradeId` string: unique numeric (i64) identifier generated on Bullish side expressed as a string value

## Other responses

- `400`: Bad Request For example, sending a request with the `BX-SIGNATURE` header missing will result in the following response:
- `401`: Unauthorized. Either API details are missing or invalid
- `403`: Forbidden- You do not have access to the requested resource
- `500`: Internal Server Error

---

[API](https://skmtc.dev/bullish/apis/bullish-trading-api.md) - [All operations](https://skmtc.dev/bullish/apis/bullish-trading-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bullish/apis/bullish-trading-api/revisions/df5d69ccedcf?raw)
