---
title: "Cancel all TP/SL orders"
method: POST
path: "/v1/orders/tpsl/cancel-all"
tags: ["Orders"]
---

# Cancel all TP/SL orders

`POST /v1/orders/tpsl/cancel-all`

## Request

- Base URL: `https://api.testnet.rise.trade`
- URL: `https://api.testnet.rise.trade/v1/orders/tpsl/cancel-all`
- Auth: none required
- TypeScript: <https://skmtc.dev/rise/apis/risex-rest-api/docs/v1/orders/tpsl/cancel-all/post.ts> (a function with typed inputs; its response is checked against the schema)

Cancel all accepted TP/SL orders for an account in a specific market. Already triggered, executed, or previously cancelled records are left untouched.

**Signature (required for non-JWT):**
Sign EIP-712 typed data (same domain as regular orders) with primaryType `CancelAllTpslOrders`:
fields: account(address), marketId(uint64), deadline(uint32).

## Request body

- ApiCancelAllTpslOrdersRequest
  - `account` string: Account address that owns the orders
  - `market_id` string, uint64: Market ID to cancel TP/SL orders in (required, must be > 0)
  - `signer` string: Signer address (session key) that signed this request
  - `signature` string, byte: 65-byte ECDSA signature (r+s+v) from signer over EIP-712 CancelAllTpslOrders typed data
  - `deadline` integer: Unix timestamp after which the signature expires

## Response `200`

A successful response.

- ApiCancelAllTpslOrdersResponse
  - `cancelled_count` string, int64: Number of TP/SL orders cancelled by this call (0 if none were in 'accepted' status)
  - `success` boolean: Whether the cancel-all call succeeded

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/rise/apis/risex-rest-api.md) - [All operations](https://skmtc.dev/rise/apis/risex-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rise/apis/risex-rest-api/revisions/98eabcd6a6ad?raw)
