private/sell
Places a sell order for an instrument. Supports various order types including limit, market, stop, and advanced order types (stop-limit, take-profit, take-profit-limit, trailing-stop, etc.).
You can specify order parameters such as price, quantity, time-in-force, post-only, reduce-only, and trigger conditions. Orders can be labeled for easier management and tracking. Market Maker Protection (MMP) can be enabled to prevent excessive quoting.
Note: For spot orders routed to Coinbase Exchange, fills come back asynchronously. It is recommended to receive fills from the user.trades channel.
📖 Related Article: Order Management Best Practices
Authorizations
Query Parameters
It represents the requested order size. For perpetual and inverse futures the amount is in USD units. For options and linear futures it is the underlying base currency coin. The amount is a mandatory parameter if contracts parameter is missing. If both contracts and amount parameter are passed they must match each other otherwise error is returned.
The order type, default: "limit"
stop_limit, stop_market, take_limit, take_market, and trailing_stop (trigger/algo order types) are not supported for option and option_combo instruments.
For spot trading routed to Coinbase Exchange, only "market", "limit" and "stop_limit" orders are supported. Other order types will be rejected.
limit, stop_limit, take_limit, market, stop_market, take_market, market_limit, trailing_stop The order price in base currency (Only for limit and stop_limit orders)
When adding an order with advanced=usd, the field price should be the option price value in USD.
When adding an order with advanced=implv, the field price should be a value of implied volatility in percentages. For example, price=100, means implied volatility of 100%
Specifies how long the order remains in effect. Default `"good_til_cancelled"`
- `"good_til_cancelled"` - unfilled order remains in order book until cancelled
- `"good_til_day"` - unfilled order remains in order book till the end of the trading session
- `"fill_or_kill"` - execute a transaction immediately and completely or not at all
- `"immediate_or_cancel"` - execute a transaction immediately, and any portion of the order that cannot be immediately filled is cancelled
For spot trading, only `"good_til_cancelled"`, `"immediate_or_cancel"` and `"fill_or_kill"` are supported. `"good_til_day"` is not supported and will be rejected.
good_til_cancelled, good_til_day, fill_or_kill, immediate_or_cancel If true, the order is considered post-only. If the new price would cause the order to be filled immediately (as taker), the price will be changed to be just above the spread.
Only valid in combination with time_in_force=`"good_til_cancelled"`
For spot trading routed to Coinbase Exchange, the price is never adjusted: `"post_only"` must be combined with `"reject_post_only"` set to true, and the order is rejected if it would be matched instantly.
If an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected.
Only valid in combination with `"post_only"` set to true
For spot trading routed to Coinbase Exchange, this must be set to true whenever `"post_only"` is true; otherwise the request is rejected with `post_only_not_allowed`.
Defines the trigger type. Required for `"Stop-Loss"`, `"Take-Profit"` and `"Trailing"` trigger orders
For stop-limit orders routed to Coinbase Exchange, only `"last_price"` is allowed.
Trigger type (only for trigger orders). Allowed values: `"index_price"`, `"mark_price"`, `"last_price"`.index_price, mark_price, last_price Timestamp, when provided server will start processing request in Matching Engine only before given timestamp, in other cases timed_out error will be responded. Remember that the given timestamp should be consistent with the server's time, use /public/time method to obtain current server time.
The type of the linked order.
- `"one_triggers_other"` - Execution of primary order triggers the placement of one or more secondary orders.
- `"one_cancels_other"` - The execution of one order in a pair automatically cancels the other, typically used to set a stop-loss and take-profit simultaneously.
- `"one_triggers_one_cancels_other"` - The execution of a primary order triggers two secondary orders (a stop-loss and take-profit pair), where the execution of one secondary order cancels the other.
one_triggers_other, one_cancels_other, one_triggers_one_cancels_other The fill condition of the linked order (Only for linked order types), default: `first_hit`.
- `"first_hit"` - any execution of the primary order will fully cancel/place all secondary orders.
- `"complete_fill"` - a complete execution (meaning the primary order no longer exists) will cancel/place the secondary orders.
- `"incremental"` - any fill of the primary order will cause proportional partial cancellation/placement of the secondary order. The amount that will be subtracted/added to the secondary order will be rounded down to the contract size.
first_hit, complete_fill, incremental