Skip to content

Search Scripts

The Search Scripts APIs enable you to search instruments using key words.


POST: /apiV2/searchScrips

https://connect.thefirstock.com/apiV2/searchScrips

Request Details

Parameter Description
userId User Id of the login user
stext Search Text
jKey key obtained during login

Code

   curl -X POST 'https://connect.thefirstock.com/apiV2/searchScrips' \
     -H 'Content-Type: application/json' \
     -d '{
     "userId": "",
     "jKey": "",
     "stext": ""
      }'
from thefirstock import thefirstock

searchScrips = thefirstock.firstock_SearchScrips(
    stext=""
)
const Firstock = require('thefirstock');

const firstock = new Firstock();

firstock.searchScripts({stext:""},(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.searchScripts(stext: "ITC");
}
}

Response Success Details

Parameter Description
status Success
data.status Ok
values list of symbol informations

Response Details: Json Fields of object in values Array

Parameter Description
exchange NSE, BSE, NFO ...
Exchange
tradingSymbol Trading symbol of the scrip (contract)
token Token of the scrip (contract)
pricePrecision Price precision
tickSize Tick size
lotSize Lot size
companyName Company Name
instrumentName instrument Name

Sample Response

{
"Status": "Success",
"data": {
    "status": "Ok",
    "values": [
        {
            "exchange": "",
            "tradingSymbol": "",
            "token": "",
            "companyName": "",
            "instrumentName": "",
            "pricePrecision": "",
            "lotSize": "",
            "tickSize": ""
        },
        {
            "exchange": "",
            "tradingSymbol": "",
            "token": "",
            "companyName": ".",
            "instrumentName": "",
            "pricePrecision": "",
            "lotSize": "",
            "tickSize": ""
        }  
       ]
    }
}
{
  "Status": "Failed",
  "data": "Session Expired :  Invalid Session Key"
}