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

© 2026 Gemini Space Station, Inc.

Create New Order

REST APIsTradingOrdersCreate New Order

Create New Order

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

If you wish orders to be automatically cancelled when your session ends, see the require heartbeat section, or manually send the cancel all session orders message.

Note

Master API keys do not support cancelation on disconnect via heartbeat.

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

POSTv1/order/new
curl --request POST \
  --url https://api.gemini.com/v1/order/new \
  --header 'Content-Type: application/json' \
  --header 'X-GEMINI-APIKEY: <string>' \
  --header 'X-GEMINI-PAYLOAD: <string>' \
  --header 'X-GEMINI-SIGNATURE: <string>' \
  --data '
{
  "request": "/v1/order/new",
  "nonce": "<nonce>",
  "client_order_id": "470135",
  "symbol": "BTCUSD",
  "amount": "5",
  "price": "3633.00",
  "side": "buy",
  "type": "exchange limit"
}
'

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.

Margin Orders

Set margin_order: true to place an order using borrowed funds on a margin-enabled account. This allows you to trade with leverage beyond your available balance.

Important

Margin trading amplifies both gains and losses. Monitor your account using the Margin Account Summary endpoint and preview order impacts with Order Preview before placing margin orders.

Stop-Limit Orders

A Stop-Limit order is an order type that allows for order placement when a price reaches a specified level. Stop-Limit orders take in both a price and a stop_price as parameters. The stop_price is the price that triggers the order to be placed on the continuous live order book at the price. For buy orders, the stop_price must be below the price while sell orders require the stop_price to be greater than the price.

What about market orders?

The API doesn't directly support market orders because they provide you with no price protection.

Instead, use the "immediate-or-cancel" order execution option, coupled with an aggressive limit price (i.e. very high for a buy order or very low for a sell order), to achieve the same result.

Order execution options

Note that options is an array. If you omit options or provide an empty array, your order will be a standard limit order - it will immediately fill against any open orders at an equal or better price, then the remainder of the order will be posted to the order book.

If you specify more than one option (or an unsupported option) in the options array, the exchange will reject your order.

No options can be applied to stop-limit orders at this time.

The available limit order options are:

Option
Description
"maker-or-cancel"

This order will only add liquidity to the order book.

If any part of the order could be filled immediately, the whole order will instead be canceled before any execution occurs.

If that happens, the response back from the API will indicate that the order has already been canceled ("is_cancelled": true in JSON).

Note: some other exchanges call this option "post-only".

"immediate-or-cancel"

This order will only remove liquidity from the order book.

It will fill whatever part of the order it can immediately, then cancel any remaining amount so that no part of the order is added to the order book.

If the order doesn't fully fill immediately, the response back from the API will indicate that the order has already been canceled ("is_cancelled": true in JSON).

"fill-or-kill"

This order will only remove liquidity from the order book.

It will fill the entire order immediately or cancel.

If the order doesn't fully fill immediately, the response back from the API will indicate that the order has already been canceled ("is_cancelled": true in JSON).

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/new"Example: /v1/order/new
noncenumber·required
The nonce, as described in [Private API Invocation](/authentication/api-key#private-api-invocation)
client_order_idstring
*Recommended*. A [client-specified order id](/client-order-id)
symbolstring·required
The [symbol](/market-data/symbols-and-minimums) for the new orderExample: BTCUSD
amountstring·required
Quoted decimal amount to purchaseExample: 5
pricestring·required
Quoted decimal amount to spend per unitExample: 3633.00
sidestring·enum·required
Enum values: buysellExample: buy
typestring·enum·required
The order type. "exchange limit" for all order types except for stop-limit orders. "exchange stop limit" for stop-limit orders.Enum values: exchange limitexchange stop limitexchange marketExample: exchange limit
optionsarray
An optional array containing at most one supported order execution option. See Order execution options for details.Example: maker-or-cancel
stop_pricestring
The price to trigger a stop-limit order. Only available for stop-limit orders.
margin_orderboolean
Set to `true` to place this order on a margin account using borrowed funds. Defaults to `false`. Only available for margin-enabled accounts. See [Margin Trading](/margin/account-summary) for details.Example: false
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 place the order. Only available for exchange accounts.
Example request body
{
  "request": "/v1/order/new",
  "nonce": "<nonce>",
  "client_order_id": "470135",
  "symbol": "BTCUSD",
  "amount": "5",
  "price": "3633.00",
  "side": "buy",
  "type": "exchange limit"
}

Responses

Response will be the fields included in Order Status

order_idstring
idstring
symbolstring
exchangestring
avg_execution_pricestring
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
remaining_amountstring (double)
client_order_idstring
optionsarray
pricestring (double)
original_amountstring (double)
stop_pricestring (double)
Example Responses
{
  "order_id": "106817811",
  "id": "106817811",
  "symbol": "BTCUSD",
  "exchange": "gemini",
  "avg_execution_price": "3632.8508430064554",
  "side": "buy",
  "type": "exchange limit",
  "timestamp": "1547220404",
  "timestampms": 1547220404836,
  "is_live": true,
  "is_cancelled": false,
  "is_hidden": false,
  "was_forced": false,
  "executed_amount": "3.7567928949",
  "remaining_amount": "1.2432071051",
  "client_order_id": "20190110-4738721",
  "options": [],
  "price": "3633.00",
  "original_amount": "5"
}
PreviousOrders (1.0.0)NextCancel Order
Last modified on May 5, 2026