Skip to main content

ORDER BOOK API

This API returns the complete list of orders from the All Orders tab, including pending, completed, and all orders based on filters.

🔍 Query Parameters

ParameterTypeRequiredDescriptionExample
client_idstringNoClient ID to fetch orders for a specific userclient_id=VISHAL1
offsetintegerNoPage number for paginationoffset=1
limitintegerNoNumber of records per pagelimit=20
orderStatusnumberNoFilter orders (1 = Pending, 2 = Completed, -1 = All)orderStatus=-1

🔑 Header Parameters

HeaderTypeDescriptionExample
Content-TypestringSpecifies the media type of the requestapplication/json
AuthorizationstringAccess token for authenticated requests{{access_token}}
x-api-keystringAPI key used to authorize the request{{x-api-key}}

🟢 Success Response - 200 OK

Content-Type: application/json

FieldTypeDescriptionExample
statusstringStatus of API call"success"
codestringResponse code to user request"s-101"
messagestringSuccess message"Order book fetched successfully"
dataarrayList of ordersRefer to Data Object Fields
metadataobjectSummary of order recordsRefer to Metadata Fields

📦 Data Object Fields

FieldTypeDescription
order_idstringUnique order ID
exchangestringExchange segment
scrip_tokenintegerExchange token
exchange_order_nostringExchange order ID
statusstringOrder status
error_reasonstringError message (if rejected/cancelled)
transaction_typestringBUY or SELL
product_typestringProduct type
order_typestringOrder type
total_quantityintegerTotal order quantity
pending_quantityintegerPending quantity
traded_quantityintegerExecuted quantity
disclosed_quantityintegerDisclosed quantity
order_pricenumberOrder price
trigger_pricenumberTrigger price (SL orders)
validitystringOrder validity
validity_daysintegerValidity for GTD
symbolstringScrip symbol
seriesstringSeries
instrumentnumberInstrument type
expiry_datestringExpiry date
strike_pricestringStrike price
option_typestringCE/PE
market_lotintegerLot size
order_timestampstringOMS timestamp
exchange_timestampstringExchange timestamp
initiated_bystringSource of order placement
modified_bystringSource of order modification
is_amo_orderstringAMO flag
gateway_order_idstringInternal gateway order ID
order_identifierstringCustom order identifier

📘 Bracket Order Details

FieldTypeDescription
parent_order_idstringMain leg order ID
leg_indicatorstringLeg identifier
stoploss_pricenumberStop-loss price
stoploss_trigger_pricenumberStop-loss trigger
profit_pricenumberProfit leg price
stoploss_jump_pricenumberTrailing SL increment
ltp_jump_pricenumberLTP increment
bo_order_idstringBracket order ID
bo_order_statusstringBO status
bo_modify_flagnumberAllowed modification flags

📊 Metadata Fields

FieldTypeDescription
total_recordsnumberTotal orders count
all_recordsnumberAll orders count
completed_recordsnumberCompleted orders count
open_recordsnumberOpen orders count