> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Kalshi Cancel Order

Cancel an existing resting order on Kalshi. Returns an acknowledgement (`order.order_id`, `order.reduced_by` — the contracts canceled, and `order.ts_ms`). Requires the order ID of a resting order. Ideal for: order management, risk control, automated position adjustment, stop-loss workflows.

![Kalshi Cancel Order logo](https://cdn.b3.fun/kalshi-logo.png)
Catalog action Utility kalshi

Cancel an existing resting order on Kalshi. Returns an acknowledgement (`order.order_id`, `order.reduced_by` — the contracts canceled, and `order.ts_ms`). Requires the order ID of a resting order. Ideal for: order management, risk control, automated position adjustment, stop-loss workflows.


## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `kalshi-cancel-order` |
| Category | Utility |
| Connector | `kalshi` |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `kalshi`, `prediction-market`, `trading`, `order`, `write` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `orderId` | `string` | Yes | The ID of the order to cancel |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `order` | `object` | Yes | The cancelled order acknowledgement |

## Examples

**Workflow node**

```json
{
  "type": "kalshi-cancel-order",
  "payload": {
    "orderId": "example-orderId"
  },
  "children": [],
  "connector": {
    "type": "kalshi",
    "id": "conn_kalshi"
  }
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/kalshi-cancel-order/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "orderId": "example-orderId"
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.