Doc Fundamentals
Funds Management
Market Data
Order Management
Portfolio Management
User Authentication
20-MarketDepth
Daily API Calls
Success Rate
Avg. Response Time
The Market 20-Depth feature provides a detailed view of the order book for a particular instrument, displaying up to 20 levels of bid (buy) and ask (sell) orders. This depth information reflects the current market liquidity by showing the quantity, price, and number of orders available at different price levels.
Market depth is commonly used by traders, algorithmic systems, and institutional participants to analyze supply and demand dynamics, assess market liquidity, and understand potential price movements based on order concentration.
wss://gateway.5paisa.com/openapi/20depth?access_token={{access_token}}
URL Query Parametrs
| PARAMETER NAME | MANDATORY | DESCRIPTION |
|---|---|---|
access_tokenSTRING | Yes | Access token received in the response of login API |
wss://gateway.5paisa.com/openapi/20depth?access_token={{access_token}}
Subscription Requests
| PARAMETER NAME | MANDATORY | DESCRIPTION |
|---|---|---|
MethodSTRING | Yes | It specifies if the request is for subscribing or unsubscribing the data feed.Subscribe |
OperationSTRING | Yes | 20Depth |
instrumentsARRAY | Yes | List of instrument identifiers to subscribe["nc1660","nd45456"] |
Response body
| Field | Data Type |
|---|---|
| Exch | String |
| ExchType | String |
| Token | Integer |
| TBidQ | Integer |
| TOffQ | Integer |
| Details | Array |
| Quantity | Integer |
| Price | Float |
| NumberOfOrders | Integer |
| BbBuySellFlag | Integer |
| TimeStamp | Integer (Epoch Milliseconds) |
{
"Exch": "N",
"ExchType": "C",
"Token": 1660,
"TBidQ": 0,
"TOffQ": 0,
"Details": [
{
"Quantity": 13,
"Price": 305.15,
"NumberOfOrders": 3,
"BbBuySellFlag": 66
},
{
"Quantity": 25,
"Price": 305.1,
"NumberOfOrders": 4,
"BbBuySellFlag": 66
},
{
"Quantity": 1440,
"Price": 305.05,
"NumberOfOrders": 8,
"BbBuySellFlag": 66
},
{
"Quantity": 3064,
"Price": 305.0,
"NumberOfOrders": 68,
"BbBuySellFlag": 66
},
{
"Quantity": 3379,
"Price": 304.95,
"NumberOfOrders": 20,
"BbBuySellFlag": 66
}.
As follows till 20Depth.
],
"TimeStamp": 1773052927557
}
NOTE
- The details scrip code for any instrument can be found from the Scrip master.
- Example for multiple subscribe : instruments:["nc1660","nd47625"]
- This only works for NSE Scrip codes.