---
title: "Cancel Order"
method: POST
path: "/api/order/{id}/cancel"
tags: ["US Stock Trading"]
---

# Cancel Order

`POST /api/order/{id}/cancel`

## Request

- Base URL: `https://powered-by-bamboo-sandbox.investbamboo.com`
- URL: `https://powered-by-bamboo-sandbox.investbamboo.com/api/order/{id}/cancel`
- Auth: none declared. Required headers: `content-type`, `accept-language`, `x-user-id`, `x-subject-type`, `x-client-token`, `x-request-source`

This endpoint is used to cancel a pending order before it executes, allowing users to modify their trading strategy.

**Cancellation rules include:**
- Pending orders can be cancelled for LIMIT and STOP orders before execution
- You can only cancel market orders when market is closed because they usually execute too quickly to cancel during market hours
- Executed orders cannot be cancelled once they have already filled
- No fees are charged for order cancellation.

Cash impact of cancellation involves reserved cash being released back to available buying power immediately, making funds available for other trades instantly.

## Path parameters

- `id` string, required

## Headers

- `content-type` string, required
- `accept-language` string, required
- `x-user-id` string, required
- `x-subject-type` string, required
- `x-client-token` string, required
- `x-request-source` string, required
- `currency` string

## Response `200`

Cancel Order

- string

## Other responses

- `401`: Token have expired or invalid token
- `404`: Resource not found
- `422`: Error response

---

[API](https://skmtc.dev/investbamboo/apis/investbamboo-bamboo-api.md) - [All operations](https://skmtc.dev/investbamboo/apis/investbamboo-bamboo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/investbamboo/apis/investbamboo-bamboo-api/revisions/063521e8d924?raw)
