v3

latestOpenAPI 3.0.02026-07-311784111.3 MB
Trading
Matching Engine
Private

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.

📖 Related Article: Order Management Best Practices

Scope: trade:read_write

Try in API console

get/private/sell

Query parameters

instrument_namestring required

Unique instrument identifier

Example:BTC-PERPETUAL

Instrument name

amountnumber

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.

contractsnumber

It represents the requested order size in contract units and can be passed instead of amount. The contracts is a mandatory parameter if amount parameter is missing. If both contracts and amount parameter are passed they must match each other otherwise error is returned.

type'limit' | 'stop_limit' | 'take_limit' | 'market' | 'stop_market' | 'take_market' | 'market_limit' | 'trailing_stop'

The order type, default: "limit"

labelstring

user defined label for the order (maximum 64 characters)

pricenumber
<p>The order price in base currency (Only for limit and stop_limit orders)</p> <p>When adding an order with advanced=usd, the field price should be the option price value in USD.</p> <p>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%</p>
time_in_force'good_til_cancelled' | 'good_til_day' | 'fill_or_kill' | 'immediate_or_cancel'
<p>Specifies how long the order remains in effect. Default `"good_til_cancelled"`</p> <ul> <li>`"good_til_cancelled"` - unfilled order remains in order book until cancelled</li> <li>`"good_til_day"` - unfilled order remains in order book till the end of the trading session</li> <li>`"fill_or_kill"` - execute a transaction immediately and completely or not at all</li> <li>`"immediate_or_cancel"` - execute a transaction immediately, and any portion of the order that cannot be immediately filled is cancelled</li> </ul>
display_amountnumber

Initial display amount for iceberg order. Has to be at least 100 times minimum amount for instrument and ratio of hidden part vs visible part has to be less than 100 as well.

post_onlyboolean
<p>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.</p> <p>Only valid in combination with time_in_force=`"good_til_cancelled"`</p>
reject_post_onlyboolean
<p>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.</p> <p>Only valid in combination with `"post_only"` set to true</p>
reduce_onlyboolean

If true, the order is considered reduce-only which is intended to only reduce a current position

trigger_pricenumber

Trigger price, required for trigger orders only (Stop-loss or Take-profit orders)

trigger_offsetnumber

The maximum deviation from the price peak beyond which the order will be triggered

trigger'index_price' | 'mark_price' | 'last_price'

Trigger type (only for trigger orders). Allowed values: "index_price", "mark_price", "last_price".

Defines the trigger type. Required for "Stop-Loss", "Take-Profit" and "Trailing" trigger orders

advanced'usd' | 'implv'

advanced type: "usd" or "implv" (Only for options; field is omitted if not applicable).

Advanced option order type. (Only for options. Advanced USD orders are not supported for linear options.)

mmpboolean

Order MMP flag, only for order_type 'limit'

valid_untilinteger

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 <a href='#public-get_time'>/public/time</a> method to obtain current server time.

linked_order_type'one_triggers_other' | 'one_cancels_other' | 'one_triggers_one_cancels_other'
<p>The type of the linked order.</p> <ul> <li>`"one_triggers_other"` - Execution of primary order triggers the placement of one or more secondary orders.</li> <li>`"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.</li> <li>`"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.</li> </ul>
trigger_fill_condition'first_hit' | 'complete_fill' | 'incremental'
<p>The fill condition of the linked order (Only for linked order types), default: `first_hit`.</p> <ul> <li>`"first_hit"` - any execution of the primary order will fully cancel/place all secondary orders.</li> <li>`"complete_fill"` - a complete execution (meaning the primary order no longer exists) will cancel/place the secondary orders.</li> <li>`"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.</li> </ul>
amountnumber

Required. The secondary 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.

direction'buy' | 'sell'

Required. Direction of the secondary order.

type'limit' | 'stop_limit' | 'take_limit' | 'market' | 'stop_market' | 'take_market' | 'market_limit' | 'trailing_stop'

The order type, default: "limit"

labelstring

User defined label for the order (maximum 64 characters).

pricenumber

The order price in base currency. Required for limit and stop_limit orders.

reduce_onlyboolean

If true, the order is considered reduce-only which is intended to only reduce a current position.

time_in_force'good_til_cancelled' | 'good_til_day' | 'fill_or_kill' | 'immediate_or_cancel'

Specifies how long the order remains in effect. Default "good_til_cancelled".

post_onlyboolean

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 below or above the spread (according to the direction of the order).

reject_post_onlyboolean

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.

trigger_pricenumber

Trigger price. Required for trigger orders (stop-loss or take-profit orders).

trigger_offsetnumber

The maximum deviation from the price peak beyond which the order will be triggered. Used for trailing stop orders.

trigger'index_price' | 'mark_price' | 'last_price'

Defines the trigger type. Required for stop-loss, take-profit, and trailing stop orders.

List of secondary orders to place or cancel when the primary order is filled. Each entry in the array defines one secondary order. amount and direction are required; all other fields are optional.

Response

Success response

jsonrpc'2.0' required

The JSON-RPC version (2.0)

idinteger

The id that was sent in the request

Example response

{
  "result": {
    "order": {
      "order_id": "ETH-100234",
      "starbase_order_id": 103148386170,
      "instrument_name": "BTC-PERPETUAL",
      "creation_timestamp": 1536569522277,
      "last_update_timestamp": 1536569522277,
      "starbase_last_update_timestamp": 1536569522277000000,
      "block_trade": true,
      "trigger_order_id": "SLIB-370",
      "combo_order_id": "103148386169",
      "app_name": "Example Application",
      "mmp_cancelled": true,
      "oto_order_ids": [
        "ETH-100234"
      ],
      "primary_order_id": "ETH-100234"
    },
    "trades": [
      {
        "instrument_name": "BTC-PERPETUAL",
        "timestamp": 1517329113791,
        "block_trade_id": "154"
      }
    ]
  }
}