Get quote
Our market quotes APIs provide you with access to up-to-date market data for various instruments. These data snapshots are collected directly from the exchanges in real-time, ensuring the accuracy of the information at the time of your request. For real-time streaming market quotes, we recommend utilizing our WebSocket API.
Method: POST
https://connect.thefirstock.com/api/V3/getQuote
Request details
Parameter | Description | Data types | Example |
---|---|---|---|
userId | User Id of the login user | String | "AA1999" |
exchange | Exchange | String | "BSE" |
token | Contract Token | String | "26000" |
jKey | Key Obtained on login success. | String | "d4180daa72ea70885ab0d 0fb38f0fa5796352b57de0 641d4442294b87f2b7315" |
- cURL
curl --location 'https://connect.thefirstock.com/api/V3/getQuote'
--header 'Content-Type: application/json'
--data '{
"userId": "AA123",
"jKey": "e6a211bea63adff386578988e1cf4a9521c4744e6a39ad63174c8797e2af8c38",
"exchange": "NSE",
"token": "26000"
}'
from thefirstock import thefirstock
getQuotes = thefirstock.firstock_getQuote(
exchange="NSE",
token="26000"
)
const Firstock = require("thefirstock");
const firstock = new Firstock();
firstock.getQuotes(
{
exchange: "NSE",
token: "26000",
},
(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");
}
}
Success response details
Parameter | Description | Data types | Examples |
---|---|---|---|
status | Success | String | "Success |
data.requestTime | It will be present only on successful response. | String | "17:42:53 15-02-2023" |
data.exchange | NSE, BSE, NFO, BFO | String | "NSE" |
data.tradingSymbol | Trading symbol | String | "Nifty Fin Service" |
data.companyName | Company Name | String | "Nifty Fin Service" |
data.company | Company | String | "18595.70" |
data.segment | segment | String | "EQT" |
data.token | token | String | "26037" |
data.symbolName | Symbol Name | String | "FINNIFTY" |
data.instrumentName | instname | String | "UNDIND" |
data.pricePrecision | Price precision | String | "2" |
data.tickSize | Tick size | String | "0.05" |
data.lotSize | Lot size | String | "1" |
data.multipler | Multiplier | String | "1" |
data.priceFactor | Price factor ((GN / GD) * (PN/PD) ) | String | "(1 / 1 ) * (1 / 1)" |
data.lastTradedPrice | LTP | String | "18636.95" |
data.upperCircuit | Upper circuit limit | String | "0.00" |
data.lowerCircuit | Lower circuit limit | String | "0.00" |
data.dayHighPrice | Day High Price | String | "18663.00" |
data.dayLowPrice | Day Low Price | String | "18494.95" |
data.volume | Volume | String | "0.00" |
data.lastTradedQuantity | Last trade quantity | String | "0.00" |
data.lastTradeTime | Last trade time | String | "0.00" |
data.bestBuyPrice1 | Best Buy Price 1 | String | "0.00" |
data.bestBuyPrice2 | Best Buy Price 2 | String | "0.00" |
data.bestBuyPrice3 | Best Buy Price 3 | String | "0.00" |
data.bestBuyPrice4 | Best Buy Price 4 | String | "0.00" |
data.bestBuyPrice5 | Best Buy Price 5 | String | "0.00" |
data.bestSellPrice1 | Best Sell Price 1 | String | "0.00" |
data.bestSellPrice2 | Best Sell Price 2 | String | "0.00" |
data.bestSellPrice3 | Best Sell Price 3 | String | "0.00" |
data.bestSellPrice4 | Best Sell Price 4 | String | "0.00" |
data.bestSellPrice5 | Best Sell Price 5 | String | "0.00" |
data.bestBuyQuantity1 | Best Buy Quantity 1 | String | "0.00" |
data.bestBuyQuantity2 | Best Buy Quantity 2 | String | "0.00" |
data.bestBuyQuantity3 | Best Buy Quantity 3 | String | "0.00" |
data.bestBuyQuantity4 | Best Buy Quantity 4 | String | "0.00" |
data.bestBuyQuantity5 | Best Buy Quantity 5 | String | "0.00" |
data.bestSellQuantity1 | Best Sell Quantity 1 | String | "0.00" |
data.bestSellQuantity2 | Best Sell Quantity 2 | String | "0.00" |
data.bestSellQuantity3 | Best Sell Quantity 3 | String | "0.00" |
data.bestSellQuantity4 | Best Sell Quantity 4 | String | "0.00" |
data.bestSellQuantity5 | Best Sell Quantity 5 | String | "0.00" |
data.bestBuyOrder1 | Best Buy Order 1 | String | "0.00" |
data.bestBuyOrder2 | Best Buy Order 2 | String | "0.00" |
data.bestBuyOrder3 | Best Buy Order 3 | String | "0.00" |
data.bestBuyOrder4 | Best Buy Order 4 | String | "0.00" |
data.bestBuyOrder5 | Best Buy Order 5 | String | "0.00" |
data.bestSellOrder1 | Best Sell Order 1 | String | "0.00" |
data.bestSellOrder2 | Best Sell Order 2 | String | "0.00" |
data.bestSellOrder3 | Best Sell Order 3 | String | "0.00" |
data.bestSellOrder4 | Best Sell Order 4 | String | "0.00" |
data.bestSellOrder5 | Best Sell Order 5 | String | "0.00" |
Failure response details
Parameter | Description | Data Type | Example |
---|---|---|---|
status | Failed | String | "Failed" |
code | HTTP Code | String | "400" |
name | Type of error | String | "BAD_REQUEST" |
error.field | Error field | String | "jKey" |
error.message | Error message | String | "jKey cannot be undefined or NULL" |
Sample response
- Success response
- Failure Response
{
"status": "Success",
"data": {
"requestTime": "17:42:53 15-02-2023",
"companyName": "Nifty Fin Service",
"exchange": "NSE",
"tradingSymbol": "Nifty Fin Service",
"symbolName": "FINNIFTY",
"segment": "EQT",
"instrumentName": "UNDIND",
"pricePrecision": "2",
"lotSize": "1",
"tickSize": "0.05",
"multipler": "1",
"priceFactor": "(1 / 1 ) * (1 / 1)",
"token": "26037",
"lastTradedPrice": "18636.95",
"company": "18595.70",
"upperCircuit": "0.00",
"lowerCircuit": "0.00",
"dayHighPrice": "18663.00",
"dayLowPrice": "18494.95",
"volume": "0.00",
"lastTradedQuantity": "0.00",
"lastTradeTime": "0.00",
"bestBuyPrice1": "0.00",
"bestBuyPrice2": "0.00",
"bestBuyPrice3": "0.00",
"bestBuyPrice4": "0.00",
"bestBuyPrice5": "0.00",
"bestSellPrice1": "0.00",
"bestSellPrice2": "0.00",
"bestSellPrice3": "0.00",
"bestSellPrice4": "0.00",
"bestSellPrice5": "0.00",
"bestBuyQuantity1": "0.00",
"bestBuyQuantity2": "0.00",
"bestBuyQuantity3": "0.00",
"bestBuyQuantity4": "0.00",
"bestBuyQuantity5": "0.00",
"bestSellQuantity1": "0.00",
"bestSellQuantity2": "0.00",
"bestSellQuantity3": "0.00",
"bestSellQuantity4": "0.00",
"bestSellQuantity5": "0.00",
"bestSellOrder1": "0.00",
"bestSellOrder2": "0.00",
"bestSellOrder3": "0.00",
"bestSellOrder4": "0.00",
"bestSellOrder5": "0.00",
"bestBuyOrder1": "0.00",
"bestBuyOrder2": "0.00",
"bestBuyOrder3": "0.00",
"bestBuyOrder4": "0.00",
"bestBuyOrder5": "0.00"
}
}
{
"status": "Failed",
"code": "400",
"name": "BAD_REQUEST",
"error": {
"field": "jKey",
"message": "jKey cannot be undefined or NULL"
}
}