Skip to main content

private/create-order

POST 

/private/create-order

Creates a new BUY or SELL order.

This call is asynchronous, so the response is simply a confirmation of the request.

The user.order subscription can be used to check when the order is successfully created.

Request​

Body

required
    id int64required

    Request id (echoed in response)

    method stringrequired

    Must be "private/create-order"

    api_key stringrequired

    Your API key (only required for private REST)

    sig stringrequired

    HMAC-SHA256 signature in hex (only required for private REST)

    nonce int64required

    Current timestamp in milliseconds, e.g. "1771761038000".

    params objectrequired
    Order parameters for private/create-order (DMA direct market access orders).
    instrument_name stringrequired

    Instrument symbol, e.g. BTCUSD-PERP.

    side OrderSide (string)required

    Possible values: [BUY, SELL]

    BUY or SELL

    type stringrequired

    Possible values: [LIMIT, MARKET, STOP, STOP_LIMIT]

    Order type:

    • ➖ LIMIT: Limit order at specified price.
    • ➖ MARKET: Market order; executes at best available price.
    • ➖ STOP: Stop order; triggers a market order when ref_price is reached.
    • ➖ STOP_LIMIT: Stop-limit order; places a limit order when ref_price is reached.
    quantity decimalrequired

    Order quantity.

    price decimal

    Limit price. Required for LIMIT and STOP_LIMIT orders.

    ref_price decimal

    Trigger price. Required for STOP_LOSS and STOP_LIMIT orders.

    ref_price_type RefPriceType (string)

    Possible values: [BEST_BID_OR_LAST_PRICE, BEST_ASK_OR_LAST_PRICE]

    Reference price type for trigger orders:

    • ➖ BEST_BID_OR_LAST_PRICE: Best bid price or last traded price (whichever is higher for BUY, lower for SELL)
    • ➖ BEST_ASK_OR_LAST_PRICE: Best ask price or last traded price (whichever is lower for BUY, higher for SELL)
    client_oid string

    Client order ID (max 36 chars). Recommended for correlation.

    time_in_force string

    Possible values: [GOOD_TILL_CANCEL, IMMEDIATE_OR_CANCEL, FILL_OR_KILL, GOOD_TILL_DATE]

    Time in force:

    • ➖ GOOD_TILL_CANCEL: Active until filled or explicitly cancelled. Default for limit orders.
    • ➖ IMMEDIATE_OR_CANCEL: Fill immediately (partial or full); cancel remainder.
    • ➖ FILL_OR_KILL: Fill entirely and immediately, or cancel the entire order.
    • ➖ GOOD_TILL_DATE: Active until expire_time_ns. Requires expire_time_ns.
    expire_time_ns int64

    Order expiry time in epoch nanoseconds. Required when time_in_force is GOOD_TILL_DATE.

Success.
Schema
    id int64

    Echoed request id

    method string

    Method invoked

    code int32

    0 = success; non-zero indicates error (reason code).

    result object
    Present when code === 0. order_id, client_oid.
    order_id int64

    Newly created order ID

    client_oid string

    Client Order ID from the request, or the request nonce if not provided. Recommend specifying client_oid as nonce can be the same across orders.

    message string

    Response message. Contains additional reason when code !== 0.

    original string

    Present when code !== 0.