GeminiGemini
Demo environmentGet API key
  • Overview
  • Crypto Trading
  • Prediction Markets
  • Perpetuals
  • Stocks
  • API Reference
  • SDKs & Tools
Changelog
Gemini logoGemini logo

© 2026 Gemini Space Station, Inc.

Overview
Spot
    OverviewGet started
    Orders API
      Order Placement & Management
        Create New OrderCancel OrderCancel All Active OrdersCancel All Session OrdersWrap OrderHeartbeat
      Order Status & Trade History
      Volume & Account Tiers
    Market Data API
    Fund Management API
    Instant Orders API
    WebSocket API
    FIX API
Margin
    Overview
    Margin REST API
      Get Margin Account SummaryGet Margin Interest RatesPreview Margin Order Impact
Staking
    Overview
    Staking REST API
      List Staking BalancesStake Crypto FundsUnstake Crypto FundsList Staking Event HistoryList Staking RatesList Staking Rewards
Clearing
    Clearing REST API
      Clearing Orders
      Broker & Trade Operations

Cancel All Active Orders

TradingOrdersCancel All Active Orders

Cancel All Active Orders

POSThttps://api.gemini.com/v1/order/cancel/all

This will cancel all outstanding orders created by all sessions owned by this account, including interactive orders placed through the UI.

Note

Note that this cancels orders that were not placed using this API key. Enabled for perpetuals accounts from July 10th, 0100hrs ET onwards. Typically Cancel All Session Orders is preferable, so that only orders related to the current connected session are cancelled.

POSTv1/order/cancel/all
curl --request POST \
  --url https://api.gemini.com/v1/order/cancel/all \
  --header 'Content-Type: application/json' \
  --header 'X-GEMINI-APIKEY: <string>' \
  --header 'X-GEMINI-PAYLOAD: <string>' \
  --header 'X-GEMINI-SIGNATURE: <string>' \
  --data '
{
  "request": "/v1/order/cancel/all",
  "nonce": "<nonce>"
}
'

Roles

The API key you use to access this endpoint must have the Trader role assigned. See Roles for more information.

The OAuth scope must have orders:create assigned to access this endpoint. See OAuth Scopes for more information.

Headers

X-GEMINI-APIKEYstring·required
Your API key
X-GEMINI-SIGNATUREstring·required
HEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring·required
Base64-encoded JSON payload
Content-Typestring
Default: text/plain
Content-Lengthstring
Default: 0
Cache-Controlstring
Default: no-cache

Request Body

requeststring·required
The literal string "/v1/order/cancel/all"Example: /v1/order/cancel/all
noncestring | integer·required
Gemini strongly recommends using milliseconds instead of seconds for timestamps.
Timestamp format
Example
Supported request type
string (seconds)
1495127793
POST only
string (milliseconds)
1495127793000
POST only
whole number (seconds)
1495127793
GET, POST
whole number (milliseconds)
1495127793000
GET, POST
Example: 1495127793000
accountstring
Required for Master API keys as described in [Private API Invocation](/authentication/api-key#private-api-invocation). The name of the account within the subaccount group. Specifies the account on which you intend to cancel the orders. Only available for exchange accounts.Example: primary
Example request body
{
  "request": "/v1/order/cancel/all",
  "nonce": "<nonce>"
}

Responses

JSON response

resultstring
Example: ok
detailsobject
cancelledOrders/cancelRejects with IDs of both
details.cancelledOrdersarray
details.cancelRejectsarray
Example Responses
{
  "result": "ok",
  "details": {
    "cancelRejects": [],
    "cancelledOrders": [
      330429106,
      330429079,
      330429082
    ]
  }
}
PreviousCancel OrderNextCancel All Session Orders