GeminiGemini
SandboxGet API key
  • Crypto Trading
  • Prediction Markets
Changelog
Gemini Crypto Exchange LogoGemini Crypto Exchange Logo

© 2026 Gemini Space Station, Inc.

Cancel Order

REST APIsTradingOrdersCancel Order

Cancel Order

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

This will cancel an order. If the order is already canceled, the message will succeed but have no effect.

Note

Enabled for perpetuals accounts from July 10th, 0100hrs ET onwards.

POSTv1/order/cancel
curl --request POST \
  --url https://api.gemini.com/v1/order/cancel \
  --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",
  "nonce": "<nonce>",
  "order_id": 106817811
}
'

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.

All Cancellation Reasons

Under unique circumstances, orders may be automatically cancelled by the exchange. These scenarios are detailed in the table below:

Cancel Reason
Description
MakerOrCancelWouldTake
Occurs when the "maker-or-cancel" execution option is included in the order request and any part of the requested order could be filled immediately.
ExceedsPriceLimits
Occurs when there is not sufficient liquidity on the order book to support the entered trade. Orders will be automatically cancelled when liquidity conditions are such that the order would move price +/- 5%.
SelfCrossPrevented
Occurs when a user enters a bid that is higher than that user's lowest open ask or enters an ask that is lower than their highest open bid on the same pair.
ImmediateOrCancelWouldPost
Occurs when the "immediate-or-cancel" execution option is included in the order request and the requested order cannot be fully filled immediately. This type of cancellation will only cancel the unfulfilled part of any impacted order.
FillOrKillWouldNotFill
Occurs when the "fill-or-kill" execution option is included in the new order request and the entire order cannot be filled immediately. Unlike "immediate-or-cancel" orders, this execution option will result in the entire order being cancelled rather than just the unfulfilled portion.
Requested
Cancelled via user request to /v1/order/cancel endpoint.
MarketClosed
Occurs when an order is placed for a trading pair that is currently closed.
TradingClosed
Occurs when an order is placed while the exchange is closed for trading.

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"Example: /v1/order/cancel
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
order_idinteger·required
The order ID given by `/order/new`Example: 106817811
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 order. Only available for exchange accounts.Example: primary
Example request body
{
  "request": "/v1/order/cancel",
  "nonce": "<nonce>",
  "order_id": 106817811
}

Responses

Response will be the fields included in Order Status. If the order was already canceled, then the request will have no effect and the status will be returned. Note the *is_cancelled* node will have a value of 'true'

order_idstring (integer)
idstring (integer)
symbolstring
exchangestring
avg_execution_pricestring (double)
sidestring·enum
Enum values: buysell
typestring·enum
Enum values: exchange limitexchange stop limitexchange market
timestampstring | integer
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
timestampmsstring | integer
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
is_liveboolean
is_cancelledboolean
is_hiddenboolean
was_forcedboolean
executed_amountstring (double)
remaining_amountstring (double)
reasonstring·enum
Enum values: MakerOrCancelWouldTakeExceedsPriceLimitsSelfCrossPreventedImmediateOrCancelWouldPostFillOrKillWouldNotFillRequestedMarketClosedTradingClosed
optionsarray
pricestring (double)
original_amountstring (double)
Example Responses
{
  "order_id": "106817811",
  "id": "106817811",
  "symbol": "btcusd",
  "exchange": "gemini",
  "avg_execution_price": "3632.85101103",
  "side": "buy",
  "type": "exchange limit",
  "timestamp": "1495742383",
  "timestampms": 1495742383345,
  "is_live": false,
  "is_cancelled": true,
  "is_hidden": false,
  "was_forced": false,
  "executed_amount": "3.7610296649",
  "remaining_amount": "1.2389703351",
  "reason": "Requested",
  "options": [],
  "price": "2960.00",
  "original_amount": "5"
}
PreviousCreate New OrderNextCancel All Active Orders
Last modified on May 5, 2026