Create New Order
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.
Master API keys do not support cancelation on disconnect via heartbeat.
Enabled for perpetuals accounts from July 10th, 0100hrs ET onwards.
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:
Headers
Request Body
Responses
Response will be the fields included in Order Status