client_order_id for idempotency and an order_configuration object that specifies the order type and its parameters.
Endpoint
Authentication
This endpoint requires a valid JWT Bearer token with trade permission passed in theAuthorization header:
Request Body
string
required
A unique ID you generate for this order. Used to ensure idempotency — submitting the same
client_order_id more than once will not create duplicate orders. Use a UUID or similarly unique value.string
required
The trading pair for the order (e.g.,
BTC-USD, ETH-USD). Must be a valid, active product on Coinbase Advanced Trade.string
required
The direction of the order. Must be
BUY or SELL.object
required
Defines the order type and its associated parameters. Exactly one of the following sub-objects must be provided:
string
Leverage multiplier for futures orders (e.g.,
"5" for 5× leverage). Omit for spot orders.string
Margin mode for futures orders. One of
CROSS or ISOLATED. Omit for spot orders.Response Fields
boolean
Indicates whether the order was successfully submitted.
string
The Coinbase-assigned unique identifier for the created order.
string
The
client_order_id you supplied in the request.object
Present when
success is true. Contains confirmation details.object
Present when
success is false. Contains details about why the order was rejected.post_only for limit orders: Setting post_only: true guarantees your limit order will be added to the order book as a maker order and will never execute as a taker. If the order would match an existing order immediately, it is rejected rather than filled. This is useful for strategies where you want to avoid taker fees.Examples
Market Buy
Market Buy Response
Limit Sell
Limit Sell Response
Stop-Limit Sell (Stop-Loss)
This example places a stop-limit sell order that triggers if BTC-USD falls to 42,500. This is a common stop-loss pattern to cap downside risk on a long position.Stop-Limit Response