Skip to content

Place Order

The Place Order endpoint allows you to execute a single buy or sell order by specifying essential parameters such as the instrument, quantity, price, order type, and execution type.

Method: POST
Endpoint: orders

cURL

curl --location 'https://api.nubra.io/orders' \
--header 'x-device-id: TEST21234' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer Bearer eyJh...6Pno' \
--data '{
    "ref_id": 76969,
    "request_type": "ORDER_REQUEST_NEW",
    "order_type": "ORDER_TYPE_MARKET",
    "order_qty": 1,
    "order_side": "ORDER_SIDE_BUY",
    "order_delivery_type": "ORDER_DELIVERY_TYPE_IDAY",
    "execution_type": "STRATEGY_TYPE_MARKET"
}'

Payload

[ {
    "ref_id": 76969,
    "request_type": "ORDER_REQUEST_NEW",
    "order_type": "ORDER_TYPE_MARKET",
    "order_qty": 1,
    "order_side": "ORDER_SIDE_BUY",
    "order_delivery_type": "ORDER_DELIVERY_TYPE_IDAY",
    "execution_type": "STRATEGY_TYPE_MARKET"
}]

Request Parameters

Field Type Required Description
ref_id int Yes The instrument reference id received from Instrument API (e.g., "69353")
request_type string Yes Always use ORDER_REQUEST_NEW
order_type string Yes ORDER_TYPE_LIMIT / ORDER_TYPE_MARKET
order_qty int Yes Quantity of contracts or shares
order_price int Yes The limit price for the order. The order will only execute at this price or better ( in paise )
order_side string Yes ORDER_SIDE_BUY or ORDER_SIDE_SELL
order_delivery_type string Yes ORDER_DELIVERY_TYPE_IDAY, ORDER_DELIVERY_TYPE_CNC
execution_type string Yes Strategy type – MARKET, LIMIT, IOC, etc.
leg_size int No Required for ICEBERG strategy. The size of each visible portion (leg) of the order. This is the quantity that will be exposed to the market at one time.Note: The total order quantity must be greater than the leg_size (and usually an integer multiple of leg_size).
trigger_price int No Required only for STOPLOSS orders. The price at which the stop order is triggered/activated. For a BUY stop-loss order, the trigger price must be less than or equal to the order price. For a SELL stop-loss order, the trigger price must be greater than or equal to the order price.(in paise)

Execution Strategy Types

In our trading API, the execution type determines how an order is executed. Below is a detailed explanation of each supported strategy type, including its behavior and required parameters.

Strategy Type Description
STRATEGY_TYPE_LIMIT A Limit Order strategy executes a buy or sell at a specific price (the limit) or better. This means a buy order will execute at the limit price or lower, and a sell order will execute at the limit price or higher. Limit orders guarantee the price but not the execution – the order will only fill if the market reaches the specified price.
STRATEGY_TYPE_MARKET A Market Order strategy executes immediately against the best available prices in the market.
STRATEGY_TYPE_IOC An Immediate-Or-Cancel (IOC) strategy is a time-in-force instruction that attempts to execute all or part of the order immediately and cancels any portion that remains unfilled. In practice, an IOC order will match against available orders in the market instantaneously. If it can only be partially filled, it will do so and cancel the rest; if it cannot be filled at all in that moment, it is canceled entirely.
STRATEGY_TYPE_ICEBERG An Iceberg Order strategy allows you to place a large order while only revealing a small portion of it at any given time. The order is divided into smaller chunks (called legs), which are placed sequentially. Only the leg currently being executed is visible in the order book, while the rest of the order remains hidden – much like the bulk of an iceberg is hidden. When one leg is fully executed, the next leg (another portion of the order) is automatically placed, until the entire order quantity is traded.
STRATEGY_TYPE_STOPLOSS A Stop-Loss strategy is a conditional order designed to trigger once the market reaches a certain price, in order to limit losses or to initiate a trade when a level is breached. In our API, this is implemented as a Stop-Limit order: you specify a trigger price and a limit price. The order remains inactive until the trigger price is reached in the market; once that happens, the system will place a limit order at the given order_price.

Execution Type Requirements

Execution Type Additional Required Fields Order Type
STRATEGY_TYPE_LIMIT order_price ORDER_TYPE_LIMIT
STRATEGY_TYPE_MARKET ORDER_TYPE_MARKET
STRATEGY_TYPE_IOC order_price ORDER_TYPE_LIMIT
STRATEGY_TYPE_ICEBERG order_price, leg_size ORDER_TYPE_LIMIT
STRATEGY_TYPE_STOPLOSS order_price, trigger_price ORDER_TYPE_LIMIT
Misconfiguring required fields will result in validation errors or rejections.

Response Structure

[
    {
        "order_id": 19,
        "client_code": "UAT00006",
        "basket_id": 0,
        "ref_id": 76969,
        "order_source": "ORDER_SOURCE_NORMAL",
        "order_type": "ORDER_TYPE_MARKET",
        "order_side": "ORDER_SIDE_BUY",
        "order_price": 7474,
        "order_qty": 1,
        "leg_size": 0,
        "filled_qty": 0,
        "avg_filled_price": 0,
        "order_status": "ORDER_STATUS_PENDING",
        "order_time": -6795364578871345152,
        "ack_time": null,
        "filled_time": null,
        "last_modified": null,
        "updated_by": 0,
        "ref_data": null,
        "LTP": null,
        "order_delivery_type": "ORDER_DELIVERY_TYPE_IDAY",
        "display_name": "",
        "brokerage": null,
        "exchange_order_id": 0,
        "duration": 0,
        "trigger_price": 0,
        "execution_type": "STRATEGY_TYPE_MARKET",
        "max_prate": 0
    }
]

Response Attributes

Fields Description
order_id Unique ID of the order
exchange_order_id order ID assigned by the exchange
ref_id The instrument reference id received from Instrument API (e.g., "69353")
display_name Represents the internal name of the traded instrument
order_type Type of order (Limit, Market)
order_side Buy or Sell
order_price Price at which order is placed ( In paise )
order_qty Total quantity ordered
leg_size Size of each leg in the order
filled_qty Quantity already filled
avg_filled_price Average price of filled quantity
order_status Current status of the order
last_modified Last modification time
last_traded_price Last traded price of the instrument
order_delivery_type CNC, Intraday
trigger_price Trigger price for stop-loss orders
execution_type Execution mode