Holdings
Portfolio holdings may encompass a wide range of investment products, including stocks, bonds, mutual funds, options, futures, and exchange traded funds (ETFs).
The holdings encompass a combination of both long and short-term equity delivery stocks. You will have visibility into three types of holdings, including Demat Holdings, Collateral Holdings, and Unsettled Holdings, which are expected to be delivered from the stock exchange.
Method: POST
https://connect.thefirstock.com/api/V3/holdings
Request details
Parameter | Description | Data types | Example |
---|---|---|---|
userId | User id of the logged in user. | String | "AA1999" |
jKey | Key Obtained on login success. | String | "d9b4e1b1c79042476fd96 11eed81003b2dc34c3f13b 0b60a4842fd5a24c9f3f2" |
- cURL
curl --location 'https://connect.thefirstock.com/api/V3/holdings' \
--header 'Content-Type: application/json' \
--data '{
"userId": "AA123",
"jKey": "e6a211bea63adff386578988e1cf4a9521c4744e6a39ad63174c8797e2af8c38"
}'
from thefirstock import thefirstock
holdings = thefirstock.firstock_Holding()
const Firstock = require("thefirstock");
const firstock = new Firstock();
firstock.holdings({ product: "I" }, (err, result) => {
console.log("Error, ", err);
console.log("Result: ", result);
});
using thefirstock;
class Program
{
public static void Main()
{
Firstock firstock = new Firstock();
var result = firstock.holdings(product: "I");
}
}
Response success details
Parameter | Description | Data types | Examples |
---|---|---|---|
Status | Success | String | "Success" |
data.holdQuantity | Holding quantity | String | "0" |
data.BTSTQuantity | BTST quantity | String | "0" |
data.usedQuantity | Holding used today | String | "0" |
data.sellAmount | Sell Amount | String | "0.000000" |
data.uploadPrice | Upload Price | String | "1027.55" |
data.tradeQuantity | Trade Quantity | String | "0" |
Response Details: Json Fields of object in values Array
Parameter | Description | Data types | Example |
---|---|---|---|
exchange | NSE/BSE | String | "BSE" |
tradingSymbol | Trading symbol of the scrip (contract) | String | "DEEPAKFERT" |
token | Token of the scrip (contract) | String | "500645" |
pricePrecision | Not_Ok Price precision | String | "2" |
tickSize | Tick size | String | "0.05" |
lotSize | Lot size | String | "1" |
Failure response details
Parameter | Description | Data Type | Example |
---|---|---|---|
status | Failed | String | "Failed" |
code | HTTP Code | String | "401" |
name | Type of error | String | "INVALID_JKEY" |
error.field | Error field | String | "jKey" |
error.message | Error message | String | "jKey parameter is invalid" |
Sample response
- Success response
- Failure response
{
"status": "Success",
"data": [
{
"exchangeTradingSymbol": [
{
"exchange": "NSE",
"token": "11184",
"tradingSymbol": "IDFCFIRSTB-EQ",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "1"
},
{
"exchange": "BSE",
"token": "539437",
"tradingSymbol": "IDFCFIRSTB",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "1"
}
],
"sellAmount": "0.000000",
"holdQuantity": "0",
"uploadPrice": "58.50",
"BTSTQuantity": "0",
"usedQuantity": "0",
"tradeQuantity": "0"
},
{
"exchangeTradingSymbol": [
{
"exchange": "NSE",
"token": "1660",
"tradingSymbol": "ITC-EQ",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "1"
},
{
"exchange": "BSE",
"token": "500875",
"tradingSymbol": "ITC",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "1"
}
],
"sellAmount": "0.000000",
"holdQuantity": "0",
"uploadPrice": "349.25",
"BTSTQuantity": "0",
"usedQuantity": "0",
"tradeQuantity": "0"
},
{
"exchangeTradingSymbol": [
{
"exchange": "NSE",
"token": "827",
"tradingSymbol": "DEEPAKFERT-EQ",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "1"
},
{
"exchange": "BSE",
"token": "500645",
"tradingSymbol": "DEEPAKFERT",
"pricePrecision": "2",
"tickSize": "0.05",
"lotSize": "1"
}
],
"sellAmount": "0.000000",
"holdQuantity": "0",
"uploadPrice": "1027.55",
"BTSTQuantity": "0",
"usedQuantity": "0",
"tradeQuantity": "0"
}
]
}
{
"status": "Failed",
"code": "401",
"name": "INVALID_JKEY",
"error": {
"field": "jKey",
"message": "jKey parameter is invalid"
}
}