Skip to content

Get Quotes

The market quotes APIs enable you to retrieve market data snapshots of various instruments. These are snapshots gathered from the exchanges at the time of the request. For realtime streaming market quotes, use the WebSocket API.

POST: /api/getQuotes

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

Request Details

Parameter Description
userId Logged in User Id
exchange Exchange
token Contract Token
jKey Key Obtained on login success.

Code

from thefirstock import thefirstock

gQ = thefirstock.firstock_GetQuotes(
exchange='NSE', 
token='26000',
)
curl -X POST 'https://connect.thefirstock.com/api/getQuotes' \
      -H 'Content-Type: application/json' \
      -d '{
           "userId": "",
           "jKey": "",
           "exchange": "NSE",
           "token": "26000"
           }'
const Firstock = require('thefirstock');

const firstock = new Firstock();

firstock.getQuotes({
exchange: "",
token: ""
}, (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.getQuotes(exchange: "NSE", token: "26000");
}
}

Response Details

Parameter Description
stat Ok or Not_Ok
Watch list update success or failure indication.
request_time It will be present only on successful response.
emsg This will be present only if Logout fails.
exch NSE, BSE, NFO ...
Exchange
tsym Trading symbol
cname Company Name
symnam Symbol Name
seg Segment
instname Intrument Name
isin ISIN
pp Price precision
ti Tick size
ls Lot size
mult Multiplier
uc Upper Circuit Limit
lc Lower Circuit Limit
prcftr_d Price factor ((GN / GD) * (PN/PD) )
token Token
lp LTP
h Day High Price
l Day Low Price
v Volume
ltq Last trade quantity
ltt Last trade time
bp1 Best Buy Price 1
sp1 Best Sell Price 1
bp2 Best Buy Price 2
sp2 Best Sell Price 2
bp3 Best Buy Price 3
sp3 Best Sell Price 3
bp4 Best Buy Price 4
sp4 Best Sell Price 4
bp5 Best Buy Price 5
sp5 Best Sell Price 5
bq1 Best Buy Quantity 1
sq1 Best Sell Quantity 1
bq2 Best Buy Quantity 2
sq2 Best Sell Quantity 2
bq3 Best Buy Quantity 3
sq3 Best Sell Quantity 3
bq4 Best Buy Quantity 4
sq4 Best Sell Quantity 4
bq5 Best Buy Quantity 5
sq5 Best Sell Quantity 5
b01 Best Buy Orders 1
so1 Best Sell Orders 1
b02 Best Buy Orders 2
so2 Best Sell Orders 2
b03 Best Buy Orders 3
so3 Best Sell Orders 3
b04 Best Buy Orders 4
so4 Best Sell Orders 4
b05 Best Buy Orders 5
so5 Best Sell Orders 5
c 16352.45

Sample Response

{ 
  "request_time": "01:04:11 30-05-2022",
  "stat": "Ok",
  "exch": "NSE",
  "pp": "2",
  "ls": "1",
  "ti": "0.05",
  "mult": "1",
  "prcftr_d": "(1 / 1 ) * (1 / 1)",
  "token": "26000",
  "lp": "16352.45",
   "c": "16352.45"
}
 [
 {
  "stat": "Not_Ok",
  "request_time": "10:50:54 10-12-2020",
  "emsg": "Error Occurred : 5 \"no data\""
}
]