Get security info
The Get SecurityInfo APIs provide comprehensive information about various instruments.
Method: POST
https://connect.thefirstock.com/api/V3/securityInfo
Request details
Parameter | Description | Data types | Example |
---|---|---|---|
userId | User Id of the login user | String | "AA1999" |
exchange | Exchange | String | "NSE" |
token | Contract Token | String | "22" |
jKey | Key Obtained on login success. | String | "d4180daa72ea70885ab0d 0fb38f0fa5796352b57de0 641d4442294b87f2b7315" |
- cURL
curl -X POST 'https://connect.thefirstock.com/api/V3/securityInfo'
-H 'Content-Type: application/json'
-d '{
"userId": "AA123",
"jKey": "e6a211bea63adff386578988e1cf4a9521c4744e6a39ad63174c8797e2af8c38",
"exchange": "NSE",
"token": "22"
}'
from thefirstock import thefirstock
getSecurityInfo = thefirstock.firstock_getSecurityInfo(
exchange="NSE",
token="22"
)
const Firstock = require("thefirstock");
const firstock = new Firstock();
firstock.getSecurityInfo(
{
exchange: "NSE",
token: "22",
},
(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.getSecurityInfo(exchange: "NSE", token: "22");
}
}
Success response details
Parameter | Description | Data types | Examples |
---|---|---|---|
status | Success | String | "Success" |
data.exchange | NSE, BSE,NFO | String | "NSE" |
data.tradingSymbol | Trading Symbol | String | "ACC-EQ" |
data.companyName | Company Name | String | "ACC LIMITED" |
data.symbolName | Symbol Name | String | "ACC" |
data.segment | Segment | String | "EQT" |
data.instrumentName | Intrument Name | String | "EQ" |
data.tickSize | Tick Size | String | "0.05", |
data.lotSize | Lot Size | String | "1" |
data.pricePrecision | Price precision | String | "2" |
data.mult | Multiplier | String | "1" |
data.token | Contract Token | String | "22" |
data.prcftr_d | ((GN / GD) * (PN/PD)) | String | "(1 / 1 ) * (1 / 1)" |
Failure response details
Parameter | Description | Data Type | Example |
---|---|---|---|
status | Failed | String | "Failed" |
code | HTTP Code | String | "401" |
name | Type of error | String | "INVALID_USERID" |
error.field | Error field | String | "userid" |
error.message | Error message | String | "userid parameter is invalid" |
Sample response
- Success response
- Failure response
{
"status": "Success",
"data": {
"exchange": "NSE",
"tradingSymbol": "ACC-EQ",
"symbolName": "ACC",
"companyName": "ACC LIMITED",
"instrumentName": "EQ",
"segment": "EQT",
"pricePrecision": "2",
"lotSize": "1",
"tickSize": "0.05",
"mult": "1",
"prcftr_d": "(1 / 1 ) * (1 / 1)",
"token": "22"
}
}
{
"status": "Failed",
"code": "401",
"name": "INVALID_USERID",
"error": {
"field": "userid",
"message": "userid parameter is invalid"
}
}