This API is used to fetch the complete market snapshot of multiple scrips at a time.
Base URL https://openapi.5paisa.com/VendorsAPI/Service1.svc/MarketDepth
API Name MarketDepth
Requires Authentication Yes
Method Type POST
Version of the API No
Pre-requisites HTTP authentication, Session Validation
URI /MarketDepth
| Sr.No. | Field Name | Description | Data Type |
|---|---|---|---|
| 1 | ClientCode | Pass the ClientCode. | String |
| 2 | Count | Pass the Count. | Long |
| 3 | Data | List of MarketDepthReqData | List |
| Sr.No. | Field Name | Description | Data Type |
|---|---|---|---|
| 1 | Exch | Pass the Exch. | String |
| 2 | ExchType | Pass the ExchType. | String |
| 3 | ScripCode | Pass the ScripCode. | Integer |
| Sr.No. | Field Name | Description | Data Type |
|---|---|---|---|
| 1 | LastTradeTime | Pass the LastTradeTime. | DateTime |
| 2 | NetChange | Pass the NetChange. | String |
| 3 | Open | Pass the Open. | String |
| 4 | High | Pass the High. | String |
| 5 | Low | Pass the Low. | String |
| 6 | Close | Pass the Close. | String |
| 7 | Volume | Pass the Volume. | String |
| 8 | AverageTradePrice | Pass the AverageTradePrice. | Double |
| 9 | LastTradedPrice | Pass the LastTradedPrice. | Double |
| 10 | LastQuantity | Pass the LastQuantity. | Integer |
| 11 | BuyQuantity | Pass the BuyQuantity. | Integer |
| 12 | SellQuantity | Pass the SellQuantity. | Integer |
| 13 | TotalBuyQuantity | Pass the TotalBuyQuantity. | Integer |
| 14 | TotalSellQuantity | Pass the TotalSellQuantity. | Integer |
| 15 | OpenInterest | Pass the OpenInterest. | Integer |
| 16 | Exchange | Pass the Exchange. | String |
| 17 | ExchangeType | Pass the ExchangeType. | String |
| 18 | ScripCode | Pass the ScripCode. | Integer |
{
"head": {
"appName": "5PRASHMI",
"appVer": "1.0",
"key": "WelW2CTD0srtUUDaQzs2e22TeydRlLv3",
"osName": "Android",
"requestCode": "5PMF",
"userId": "r8aokDeH54g",
"password": "qo6eKEuVFNe"
},
"body": {
"ClientCode": "50000001",
"Count": "1",
"Data":
[{"Exchange":"N","ExchangeType":"C","ScripCode":"2885"},{"Exchange":"N","ExchangeType":"C","ScripCode":"2885"},{"Exchange":"","ExchangeType":"","ScripCode":"0"}]
}}
{
"body": {
"CacheTime": 0,
"Data": [
{
"AverageTradePrice": 2005.36,
"BuyQuantity": 100,
"Close": "1982.05",
"Exchange": "N",
"ExchangeType": "C",
"High": "2172.55",
"LastQuantity": 2,
"LastTradeTime": "/Date(1622570430000)/",
"LastTradedPrice": 1992.65,
"Low": "1843.95",
"NetChange": "10.6000000000001",
"Open": "1990",
"OpenInterest": "0",
"ScripCode": 2885,
"SellQuantity": 1,
"TotalBuyQuantity": 812942,
"TotalSellQuantity": 48,
"Volume": "960235"
},
{
"AverageTradePrice": 2005.36,
"BuyQuantity": 100,
"Close": "1982.05",
"Exchange": "N",
"ExchangeType": "C",
"High": "2172.55",
"LastQuantity": 2,
"LastTradeTime": "/Date(1622570430000)/",
"LastTradedPrice": 1992.65,
"Low": "1843.95",
"NetChange": "10.6000000000001",
"Open": "1990",
"OpenInterest": "0",
"ScripCode": 2885,
"SellQuantity": 1,
"TotalBuyQuantity": 812942,
"TotalSellQuantity": 48,
"Volume": "960235"
},
{
"AverageTradePrice": 0,
"BuyQuantity": 0,
"Close": "0",
"Exchange": "",
"ExchangeType": "",
"High": "0",
"LastQuantity": 0,
"LastTradeTime": "/Date(-2209008600000+0530)/",
"LastTradedPrice": 0,
"Low": "0",
"NetChange": "0",
"Open": "0",
"OpenInterest": "0",
"ScripCode": 0,
"SellQuantity": 0,
"TotalBuyQuantity": 0,
"TotalSellQuantity": 0,
"Volume": "0"
}
],
"Message": "Success",
"Status": 0,
"TimeStamp": "/Date(1622525530205+0530)/"
},
"head": {
"responseCode": "5PMD",
"status": "0",
"statusDescription": "Success"
}
}
{
"body": null,
"head": {
"responseCode": "5PMD",
"status": "2",
"statusDescription": "Invalid head parameters."
}
}
{
"body": {
"CacheTime": 0,
"Data": null,
"Message": "Invalid Session",
"Status": 9,
"TimeStamp": "/Date(1622525892018+0530)/"
},
"head": {
"responseCode": "5PMD",
"status": "0",
"statusDescription": "Success"
}
}