> For the complete documentation index, see [llms.txt](https://openflow.gitbook.io/openflow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://openflow.gitbook.io/openflow/smart-contract-integration/smart-contract-sdk/invalidating-orders.md).

# Invalidating Orders

Openflow supports the ability to invalidate orders on-chain using the SDK. One unique feature is that in additional to allowing users to invalidate a single order at a time, we also support the ability to invalidate all pending orders for an SDK instance.

### Invalidate one order

```solidity
bytes memory orderUid = sdk.swap(fromToken, toToken);
sdk.invalidateOrder(orderUid);
```

### Invalidate all orders

```solidity
sdk.invalidateAllOrders()
```
