Skip to main content

ORDERS HISTORY

This API retrieves the complete history of an order for authorized end users through a middleware-based integration.

It provides the lifecycle of an order, including all state changes, modifications, executions, rejections, and bracket order details associated with the specified Order ID.

🔗 Path Parameters

FieldsTypeRequiredDescriptionExample
order_idstringYesSystem-generated Order ID. Must be URL encoded if it contains special characters.NXVZO00086K1

🔑 Header Parameters

FieldsTypeRequiredDescriptionExample
AuthorizationstringYesBearer token for authenticationaccess_token
x-api-keystringYesAPI key providedx-api-key

🔍 Query Parameters

FieldsTypeRequiredDescriptionExample
userIdstringYesUser ID (UCC){{user_id}}

🟢 Success Response - 200 OK

FieldsTypeDescriptionExample
statusstringStatus of API call"success"
codestringResponse code"s-101"
messagestringSuccess message"Order history fetched successfully"
dataarray(object)Order history recordsSee below table

📘 Order History Object Fields

FieldsTypeDescriptionExample
order_idstringSystem-generated unique order number"NXVZO00086K1"
exchangestringExchange segment"NSE_EQ"
scrip_tokenintegerExchange token number of the scrip1594
exchange_order_nostringExchange order number"120000000123456"
statusstringCurrent order status"OPEN"
error_reasonstringError message if order is rejected, cancelled or modification fails"Insufficient Margin"
transaction_typestringBuy or Sell transaction"BUY"
product_typestringProduct type"D"
order_typestringOrder type"RL"
total_quantityintegerOriginal order quantity100
pending_quantityintegerPending quantity50
traded_quantityintegerExecuted quantity50
disclosed_quantityintegerQuantity disclosed to the market25
order_pricenumberOrder price2500.50
trigger_pricenumberTrigger price2495.00
validitystringOrder validity"DAY"
validity_daysintegerNumber of days for GTD validity30
symbolstringTrading symbol"INFY"
seriesstringSeries"EQ"
instrumentnumberInstrument type/name1
expiry_datestringContract expiry date"2026-07-30"
strike_pricestringStrike price"2500000"
option_typestringOption type"CE"
order_timestampstringTimestamp when order was registered in OMS"2026-07-02 10:15:30"
exchange_timestampstringTimestamp when order was registered at exchange"2026-07-02 10:15:31"
initiated_bystringApplication identifier from which order was placed"MOBAPP"
modified_bystringApplication identifier from which order was modified"WEBAPP"
is_amo_orderstringIndicates whether order is an AMO"N"
gateway_order_idstringInternal gateway order identifier"GW12345678"
order_identifierstringUser-defined order reference"ORD001"
sequence_numberstringSequence number representing a specific state transition"15"
bracket_detailsobjectBracket Order related detailsSee below table

📘 Bracket Details Object Fields

FieldsTypeDescriptionExample
parent_order_idstringOrder ID of the main leg"NXVZO00086K0"
leg_indicatorstringIndicates the bracket leg type"STOPLOSS"
stoploss_pricenumberStop Loss leg price2450.00
stoploss_trigger_pricenumberStop Loss trigger price2460.00
profit_pricenumberProfit target price2600.00
stoploss_jump_pricenumberIncremental value by which Stop Loss moves when market moves in favor1.00
ltp_jump_pricenumberIncremental value by which LTP moves before trailing is applied2.00
bo_order_idstringBracket Order ID"BO123456"
bo_order_statusstringBracket Order status"COMPLETED"
bo_modify_flagnumberIndicates which legs can be modified7

📘 Metadata Object Fields

FieldsTypeDescriptionExample
total_recordsnumberTotal records returned25
all_recordsnumberTotal history records available25
completed_recordsnumberCompleted records count10
open_recordsnumberOpen records count15

📝 Notes

  • Retrieves the complete lifecycle of a specific order.
  • Returns all order state transitions using the sequence_number field.
  • Bracket Order details are included when applicable.
  • order_id should be URL encoded before sending if it contains special characters.
  • Requires a valid authenticated session.