# Cancel an order

DELETE https://api.bb.no/v1/orders/{orderId}

Cancel a pending order. If the order is already filled, an error will
 be returned. It is not possible to cancel market orders.

## Authentication

x-bb-api-key: Public part of your API key. Starts with `bb/public/`.

x-bb-api-hmac: HMAC authentication for the API request, constructed using the corresponding secret value from your API key.

x-bb-api-nonce: Nonce value. Used to ensure correct ordering of all API requests, as well as prevent attackers from being able to replay old requests. Can be set to any value, but needs to increase for each request. Recommendation is to use the current Unix timestamp in milliseconds.

API-key permission: trading.

[API keys and signing](https://barebitcoin.no/developers/authentication/api-keys)

## Parameters

### orderId

path parameter · string · required





## Examples

### Signed API key

```sh
curl -X DELETE \
  https://api.bb.no/v1/orders/REPLACE_ORDERID \
  -H "x-bb-api-key: $BB_API_KEY" \
  -H "x-bb-api-nonce: $BB_NONCE" \
  -H "x-bb-api-hmac: $BB_HMAC"
```



## Responses

### 200

OK



Source: https://barebitcoin.no/developers/api/orders/cancel-order
