Market Quote
This API gives you snapshots of multiple instruments at once. You can fetch LTP, Quote or Market Depth of instruments via API which sends real time data at the time of API request.
POST | /marketfeed/ltp | Get ticker data of instruments |
POST | /marketfeed/ohlc | Get OHLC data of instruments |
POST | /marketfeed/quote | Get market depth data of instruments |
Info
You can fetch upto 1000 instruments in single API request with rate limit of 1 request per second.
Ticker Data
Retrieve LTP for list of instruments with single API request
curl --request POST \
--url https://api.dhan.co/v2/marketfeed/ltp \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'access-token: JWT' \
--header 'client-id: 1000000001' \
--data '{}'
Header
Header | Description |
access-token required |
Access Token generated via Dhan |
client-id required |
User specific identification generated by Dhan |
Request Structure
{
"NSE_EQ":[11536],
"NSE_FNO":[49081,49082]
}
Parameters
Field | Field Type | Description |
Exchange Segment ENUM required |
array | Security ID - can be found here |
Response Structure
{
"data": {
"NSE_EQ": {
"11536": {
"last_price": 4520
}
},
"NSE_FNO": {
"49081": {
"last_price": 368.15
},
"49082": {
"last_price": 694.35
}
}
},
"status": "success"
}
Parameters
Field | Type | Description |
last_price | float | LTP of the Instrument |
OHLC Data
Retrieve LTP for list of instruments with single API request
curl --request POST \
--url https://api.dhan.co/v2/marketfeed/ohlc \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'access-token: JWT' \
--header 'client-id: 1000000001' \
--data '{}'
Header
Header | Description |
access-token required |
Access Token generated via Dhan |
client-id required |
User specific identification generated by Dhan |
Request Structure
{
"NSE_EQ":[11536],
"NSE_FNO":[49081,49082]
}
Parameters
Field | Field Type | Description |
Exchange Segment ENUM required |
array | Security ID - can be found here |
Response Structure
{
"data": {
"NSE_EQ": {
"11536": {
"last_price": 4525.55,
"ohlc": {
"open": 4521.45,
"close": 4507.85,
"high": 4530,
"low": 4500
}
}
},
"NSE_FNO": {
"49081": {
"last_price": 368.15,
"ohlc": {
"open": 0,
"close": 368.15,
"high": 0,
"low": 0
}
},
"49082": {
"last_price": 694.35,
"ohlc": {
"open": 0,
"close": 694.35,
"high": 0,
"low": 0
}
}
}
},
"status": "success"
}
Parameters
Field | Type | Description |
last_price | float | LTP of the Instrument |
ohlc.open | float | Market opening price of the day |
ohlc.close | float | Market closing price of the day |
ohlc.high | float | Day High price |
ohlc.low | float | Day Low price |
Market Depth Data
Retrieve LTP for list of instruments with single API request
curl --request POST \
--url https://api.dhan.co/v2/marketfeed/quote \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'access-token: JWT' \
--header 'client-id: 1000000001' \
--data '{}'
Header
Header | Description |
access-token required |
Access Token generated via Dhan |
client-id required |
User specific identification generated by Dhan |
Request Structure
{
"NSE_FNO":[49081]
}
Parameters
Field | Field Type | Description |
Exchange Segment ENUM required |
array | Security ID - can be found here |
Response Structure
{
"data": {
"NSE_FNO": {
"49081": {
"average_price": 0,
"buy_quantity": 1825,
"depth": {
"buy": [
{
"quantity": 1800,
"orders": 1,
"price": 77
},
{
"quantity": 25,
"orders": 1,
"price": 50
},
{
"quantity": 0,
"orders": 0,
"price": 0
},
{
"quantity": 0,
"orders": 0,
"price": 0
},
{
"quantity": 0,
"orders": 0,
"price": 0
}
],
"sell": [
{
"quantity": 0,
"orders": 0,
"price": 0
},
{
"quantity": 0,
"orders": 0,
"price": 0
},
{
"quantity": 0,
"orders": 0,
"price": 0
},
{
"quantity": 0,
"orders": 0,
"price": 0
},
{
"quantity": 0,
"orders": 0,
"price": 0
}
]
},
"last_price": 368.15,
"last_quantity": 0,
"last_trade_time": "01/01/1980 00:00:00",
"lower_circuit_limit": 48.25,
"net_change": 0,
"ohlc": {
"open": 0,
"close": 368.15,
"high": 0,
"low": 0
},
"oi": 0,
"oi_day_high": 0,
"oi_day_low": 0,
"sell_quantity": 0,
"upper_circuit_limit": 510.85,
"volume": 0
}
}
},
"status": "success"
}
Parameters
Field | Type | Description |
average_price | float | Volume weighted average price of the day |
buy_quantity | int | Total buy order quantity pending at the exchange |
sell_quantity | int | Total sell order quantity pending at the exchange |
depth.buy.quantity | int | Number of quantity at this price depth |
depth.buy.orders | int | Number of open BUY orders at this price depth |
depth.buy.price | float | Price at which the BUY depth stands |
depth.sell.quantity | int | Number of quantity at this price depth |
depth.sell.orders | int | Number of open SELL orders at this price depth |
depth.sell.price | float | Price at which the SELL depth stands |
last_price | float | Last traded price |
last_quantity | int | Last traded quantity |
last_trade_time | string | Last traded quantity |
lower_circuit_limit | float | Current lower circuit limit |
upper_circuit_limit | float | Current upper circuit limit |
net_change | float | Absolute change in LTP from previous day closing price |
volume | int | Total traded volume for the day |
oi | int | Open Interest in the contract (for Derivatives) |
oi_day_high | int | Highest Open Interest for the day (only for NSE_FNO) |
oi_day_low | int | Lowest Open Interest for the day (only for NSE_FNO) |
ohlc.open | float | Market opening price of the day |
ohlc.close | float | Market closing price of the day |
ohlc.high | float | Day High price |
ohlc.low | float | Day Low price |
Note: For description of enum values, refer Annexure