Skip to main content

ORDER BOOK

This API retrieves the Order Book for authorized end users through a middleware-based integration.

The Order Book contains details of all orders placed by the user, including pending, completed, rejected, and cancelled orders.

🔑 Header Parameters

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

🔍 Query Parameters

FieldsTypeRequiredDescriptionExample
userIdstringYesUser ID (UCC){{user_id}}
offsetintegerNoSpecifies the page number of the collection to be displayed1
limitintegerNoLimits the number of items returned per page20
orderStatusnumberNoFilter orders by status-1

🟢 Success Response - 200 OK

FieldsTypeDescriptionExample
statusstringResponse status"success"
codestringResponse code"s-101"
messagestringSuccess message"Order Book fetched successfully"
dataarray(object)List of order recordsSee below table

📘 Order Object Fields

FieldsTypeDescriptionExample
order_idstringSystem generated unique order number"NXVZO00098K1"
exchangestringExchange segment"NSE_EQ"
scrip_tokenintegerExchange token number of the scrip1594
exchange_order_nostringExchange order number"120000000123456"
statusstringCurrent order status"OPEN"
error_reasonstringReason for rejection, cancellation, or modification failure"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 name/type1
expiry_datestringContract expiry date"2026-07-30"
strike_pricestringStrike price"2500000"
option_typestringOption type"CE"
market_lotintegerMarket lot size50
order_timestampstringOMS order timestamp"2026-07-02 10:15:30"
exchange_timestampstringExchange order timestamp"2026-07-02 10:15:31"
initiated_bystringApplication identifier through which order was placed"MOBAPP"
modified_bystringApplication identifier through which order was modified"WEBAPP"
is_amo_orderstringIndicates whether order is an AMO order"N"
gateway_order_idstringInternal gateway order identifier"GW12345678"
order_identifierstringUser-defined order reference"ORD001"
bracket_detailsobjectBracket Order-related details (if applicable){}

📘 Metadata Object Fields

FieldsTypeDescriptionExample
total_recordsnumberTotal orders returned in the response20
all_recordsnumberTotal order count150
completed_recordsnumberCount of completed orders90
open_recordsnumberCount of open/pending orders60

📝 Notes

  • Retrieves order history and current order status for the user.
  • Supports pagination using:
    • offset
    • limit
  • Orders can be filtered using the orderStatus parameter.
  • Returns details for:
    • Pending Orders
    • Completed Orders
    • Rejected Orders
    • Cancelled Orders