Pacifica
  • Getting Started
    • Closed Alpha Guide
      • Link To Guide PDF
    • Closed Alpha Trading Competition
  • Trading on Pacifica
    • Overview
    • Contract Specifications
      • Oracle Price & Mark Price
      • Settlement Mechanism
    • Order Types
      • Market Order
      • Limit Order
      • Order Rules & Constraints
    • Margin & Leverage
    • Funding Rates
    • Liquidations
  • API Documentation
    • API
      • REST API
        • Markets
          • Get market info
          • Get prices
          • Get kline (candle) data
          • Get recent trades
        • Account
          • Get account info
          • Get account settings
          • Update leverage
          • Update margin mode
          • Get positions
          • Get trade history
          • Get funding history
          • Get account equity history
          • Create subaccount
          • Request withdrawal
        • Orders
          • Get open orders
          • Get order history
          • Get order history by ID
          • Create order
          • Create stop order
          • Create position TP/SL
          • Cancel order
          • Cancel all orders
          • Cancel stop order
          • Batch orders
      • Websocket
        • Subscriptions
          • Prices
          • Orderbook
          • Trades
          • Candle
          • Order updates
          • Account balance
          • Account margin
          • Account leverage
          • Account positions
          • Account orders
          • Account order updates
          • Account trades
        • Trading operations
          • Create order
          • Cancel order
          • Cancel all orders
      • Signing
      • Rate limits
    • Specification
  • Other
    • Audits
    • Brand Assets
    • Contact Us
    • Glossary of Terms
Powered by GitBook
On this page
  1. API Documentation
  2. API
  3. Websocket
  4. Trading operations

Cancel all orders

Request

{
  "id": "uuid-v4-string",
  "params": {
    "cancel_all_orders": {
      "account": "42trU9A5...",
      "signature": "5j1Vy9Uq...",
      "timestamp": 1716200000000,
      "all_symbols": true,
      "exclude_reduce_only": false,
      "symbol": "BTC",
      "agent_wallet": "69trU9A5...",
      "expiry_window": 30000
    }
  }
}
Field
Type
Need
Description
Example

"account"

string

required

User's wallet address

42trU9A5...

"signature"

string

required

Cryptographic signature

5j1Vy9Uq...

"timestamp"

integer

required

Current timestamp in milliseconds

1716200000000

"all_symbols"

boolean

required

Whether to cancel orders for all symbols

true

"exclude_reduce_only"

boolean

required

Whether to exclude reduce-only orders

false

"symbol"

string

required (if all_symbols is false)

Trading pair symbol

"agent_wallet"

string

optional

Agent wallet address

69trU9A5...

"expiry_window"

integer

optional

Signature expiry in milliseconds

30000

{
    "id": "uuid-v4-string",
    "type": "cancel_all_orders",
    "code": 200,
    "data": {
        "cancelled_count": 5  
    },
    "t": 1234567890
}
Field
Type
Description

'id'

string

Same as above request ID

'code'

integer

Status code

'cancelled_count'

integer

Number of orders cancelled

't'

integer

Timestamp in milliseconds

PreviousCancel orderNextSigning

Last updated 12 hours ago