Skip to content

Holdings

Holdings contain long and short-term equity delivery stocks. You will be able to see Demat Holdings, Collateral Holding, and Unsettled holding which is supposed to get delivered from the exchange.

POST: /api/holding

https://connect.thefirstock.com/api/holding

Request Details

Parameter Description
userId Logged in User Id
actid Account id of the logged in user
product C -> Cash and Carry
jKey Key Obtained on login success.

Code

from thefirstock import thefirstock

Hold = thefirstock.firstock_Holding()
curl -X POST 'https://connect.thefirstock.com/api/holding' \
-H 'Content-Type: application/json' \
-d '{
    "userId": "",
    "jKey": "",
    "actid": "",
    "product": "C"
}'
const Firstock = require('thefirstock');

const firstock = new Firstock();

firstock.holdings({ product: "" }, (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 Details

Parameter Description
stat Ok or Not_Ok Place order success or failure indication
exch_tsym Trading Symbol
holdqty Holding quantity
dpqty DP Holding quantity
npoadqty Non Poa display quantity
brkcolqty Broker Collateral
btstqty BTST quantity
usedqty Holding used today
upldprc Average price uploaded along with holdings

Response Details: Json Fields of object in values Array

Parameter Description
exch NSE/BSE
tsym Trading symbol of the scrip (contract)
token Token of the scrip (contract)
pp Not_Ok Price precision
ti Tick size
ls Lot size
sell_amt
trdqty

Response data will be in json format with below fields in case of failure:

Parameter Description
stat Ok or Not_Ok Place order success or failure indication
requestTime Response received time.
emsg Error message

Sample Response

[
{
"stat": "Ok",
"exch_tsym": [
{
"exch": "NSE",
"token": "1594",
"tsym": "INFY-EQ",
"pp": "2",
"ti": "0.05"
},
{
"exch": "BSE",
"token": "500209",
"tsym": "INFY",
"pp": "2",
"ti": "0.05"
}
],
"holdqty": "0",
"dpqty": "0",
"unplgdqty": "0",
"brkcolqty": "70",
"btstqty": "0",
"usedqty": "0",
"sell_amt": "0",
"trdqty": "0",
"upldprc": "1720.86"
},
{
"stat": "Ok",
"exch_tsym": [
{
"exch": "NSE",
"token": "14356",
"tsym": "MINDTREE-EQ",
"pp": "2",
"ti": "0.05"
},
{
"exch": "BSE",
"token": "532819",
"tsym": "MINDTREE",
"pp": "2",
"ti": "0.05"
}
],
"holdqty": "0",
"dpqty": "0",
"unplgdqty": "0",
"brkcolqty": "50",
"btstqty": "0",
"usedqty": "0",
"sell_amt": "0",
"trdqty": "0",
"upldprc": "3541.87"
},
{
"stat": "Ok",
"exch_tsym": [
{
"exch": "NSE",
"token": "15355",
"tsym": "RECLTD-EQ",
"pp": "2",
"ti": "0.05"
},
{
"exch": "BSE",
"token": "532955",
"tsym": "RECLTD",
"pp": "2",
"ti": "0.05"
}
],
"holdqty": "0",
"dpqty": "0",
"unplgdqty": "0",
"brkcolqty": "413",
"btstqty": "0",
"usedqty": "0",
"sell_amt": "0",
"trdqty": "0",
"upldprc": "132.59"
},
{
"stat": "Ok",
"exch_tsym": [
{
"exch": "NSE",
"token": "547",
"tsym": "BRITANNIA-EQ",
"pp": "2",
"ti": "0.05"
},
{
"exch": "BSE",
"token": "500825",
"tsym": "BRITANNIA",
"pp": "2",
"ti": "0.05"
}
],
"holdqty": "0",
"dpqty": "0",
"unplgdqty": "0",
"brkcolqty": "30",
"btstqty": "0",
"usedqty": "0",
"sell_amt": "0",
"trdqty": "0",
"upldprc": "3853.05"
},
{
"stat": "Ok",
"exch_tsym": [
{
"exch": "NSE",
"token": "17963",
"tsym": "NESTLEIND-EQ",
"pp": "2",
"ti": "0.05"
},
{
"exch": "BSE",
"token": "500790",
"tsym": "NESTLEIND",
"pp": "2",
"ti": "0.05"
}
],
"holdqty": "0",
"dpqty": "0",
"unplgdqty": "0",
"brkcolqty": "25",
"btstqty": "0",
"usedqty": "0",
"sell_amt": "0",
"trdqty": "0",
"upldprc": "19906.10"
},
{
"stat": "Ok",
"exch_tsym": [
{
"exch": "NSE",
"token": "2664",
"tsym": "PIDILITIND-EQ",
"pp": "2",
"ti": "0.05"
},
{
"exch": "BSE",
"token": "500331",
"tsym": "PIDILITIND",
"pp": "2",
"ti": "0.05"
}
],
"holdqty": "0",
"dpqty": "0",
"unplgdqty": "0",
"brkcolqty": "50",
"btstqty": "0",
"usedqty": "0",
"sell_amt": "0",
"trdqty": "0",
"upldprc": "2289.10"
},
{
"stat": "Ok",
"exch_tsym": [
{
"exch": "NSE",
"token": "13611",
"tsym": "IRCTC-EQ",
"pp": "2",
"ti": "0.05"
},
{
"exch": "BSE",
"token": "542830",
"tsym": "IRCTC",
"pp": "2",
"ti": "0.05"
}
],
"holdqty": "0",
"dpqty": "0",
"unplgdqty": "0",
"brkcolqty": "250",
"btstqty": "0",
"usedqty": "0",
"sell_amt": "0",
"trdqty": "0",
"upldprc": "776.00"
},
{
"stat": "Ok",
"exch_tsym": [
{
"exch": "NSE",
"token": "11536",
"tsym": "TCS-EQ",
"pp": "2",
"ti": "0.05"
},
{
"exch": "BSE",
"token": "532540",
"tsym": "TCS",
"pp": "2",
"ti": "0.05"
}
],
"holdqty": "0",
"dpqty": "0",
"unplgdqty": "0",
"brkcolqty": "50",
"btstqty": "0",
"usedqty": "0",
"sell_amt": "0",
"trdqty": "0",
"upldprc": "3674.71"
},
{
"stat": "Ok",
"exch_tsym": [
{
"exch": "NSE",
"token": "11860",
"tsym": "JKPAPER-EQ",
"pp": "2",
"ti": "0.05"
},
{
"exch": "BSE",
"token": "532162",
"tsym": "JKPAPER",
"pp": "2",
"ti": "0.05"
}
],
"holdqty": "0",
"dpqty": "1",
"unplgdqty": "0",
"brkcolqty": "0",
"btstqty": "0",
"usedqty": "0",
"sell_amt": "0",
"trdqty": "0",
"upldprc": "331.20"
}
]   
{
"stat":"Not_Ok",
"emsg":  "Invalid Input : Missing uid or actid or prd."
}