Skip to main content

Market Connect

Get Quotes

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/V4/getQuote

Request details

API Parameters
Parameter Description Example
userId
string
Identifier for the user upon login,
unique to each user in the system.
AA0013
exchange
string
Exchange on which the order is placed
(e.g., NSE, BSE, NFO, BFO)
BSE
tradingSymbol
string
Encoded trading symbol of the security
ITC-EQ
jKey
string
Authentication token obtained from
the login API
d4180daa72ea70885ab0d

Libraries and SDKs

Tabbed Interface
from thefirstock import thefirstock

gQ = thefirstock.firstock_getQuote(
    userId="{{userId}}",
    exchange="BFO",
    tradingSymbol="ZEEL24JAN285PE"
)
curl --location --request POST 'https://connect.thefirstock.com/api/V4/getQuote' \
--header 'Content-Type: application/json' \
--data-raw '{
  "userId": "{{userID}}",
  "exchange": "BFO",
  "tradingSymbol": "ZEEL24JAN285PE",
  "jKey": "{{jKey}}"
}'
const Firstock = require("thefirstock");

const firstock = new Firstock();

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

Success response details

API Parameters
Parameter Description Example
Status
String
Indicates the outcome of the API
request, such as 'success' for a
successful response or 'failed'
for an error.
success
data.requestTime
String
Timestamp of when the API response
was generated, indicating the
time of data processing.
17:42:53
15-02-2023
data.exchange
String
The stock exchange on which
the transaction or operation is executed,
such as NSE, BSE, NFO, or BFO.
NSE
data.tradingSymbol
String
Represents the specific trading
symbol or ticker associated
with a financial instrument or
security on the exchange.
Nifty Fin
Service
data.companyName
String
The official name of the
company or entity associated with
the trading symbol.
Nifty Fin
Service
data.company
String
Displays the current market
value or last traded price of the
company's stock.
18595.70
data.segment
String
Indicates the market segment
to which the trading symbol belongs,
such as equities, derivatives, etc.
EQT
data.token
String
A unique identifier or code
assigned to the specific trading
instrument or security.
26037
data.symbolName
String
The common name or abbreviated
title used to identify the trading
instrument on the exchange.
FINNIFTY
data.instrumentName
String
Describes the type of financial
instrument, such as a stock, bond,
futures contract, etc.,
represented by the trading symbol.
BUNDIND
data.pricePrecision
String
Number of decimal places to
which the price is calculated,
affecting the minimum fluctuation
in the price of a security.
2
data.tickSize
String
The smallest increment by which
the price of a security or contract can
move in the market.
0.05
data.lotSize
String
The standard number of units
in one lot of a security.
It represents the minimum quantity
that can be traded.
1
data.multiplier
String
A factor used to calculate
the notional value of a contract,
usually representing the value
of one point move in the contract.
1
data.priceFactor
String
A formula used to determine the
price factor, which may involve
ratios such as Gross Notional (GN)
over Gross Denominator (GD),
and Price Notional (PN) over
Price Denominator (PD).
(1 / 1 ) * (1 / 1)
data.lastTradedPrice
String
The price at which the security
or contract was last traded.
It's the most recent price
a buyer and seller agreed upon.
18636.95
data.upperCircuit
String
The maximum price limit set
for the day, beyond which the security
cannot be traded. It's intended
to prevent extreme price
volatility.
0.00
data.lowerCircuit
String
The minimum price limit for the
day, below which trading in the
security is halted. It serves as
a safety measure against excessive
price drops.
0.00
data.dayHighPrice
String
The highest price at which
the security has been traded during
the current trading day.
18663.00
data.dayLowPrice
String
The lowest price at which
the security has been traded during√ the current trading day.
18494.95
data.volume
String
Total number of shares or
contracts traded in the security for
the current day.
0.00
data.lastTradedQuantity
String
The quantity involved in the
last completed trade of the security.
0.00
data.lastTradeTime
String
The exact time when the last trade
of the security was executed.
0.00
data.bestBuyPrice1
String
Best Buy Price 1 0.00
data.bestBuyPrice2
String
Best Buy Price 2 0.00
data.bestBuyPrice3
String
Best Buy Price 3 0.00
data.bestBuyPrice4
String
Best Buy Price 4 0.00
data.bestBuyPrice5
String
Best Buy Price 5 0.00
data.bestSellPrice1
String
Best Sell Price 1 0.00
data.bestSellPrice2
String
Best Sell Price 2 0.00
data.bestSellPrice3
String
Best Sell Price 3 0.00
data.bestSellPrice4
String
Best Sell Price 4 0.00
data.bestSellPrice5
String
Best Sell Price 5 0.00
data.bestBuyQuantity1
String
Best Buy Quantity Price 1 0.00
data.bestBuyQuantity2
String
Best Buy Quantity Price 2 0.00
data.bestBuyQuantity3
String
Best Buy Quantity Price 3 0.00
data.bestBuyQuantity4
String
Best Buy Quantity Price 4 0.00
data.bestBuyQuantity5
String
Best Buy Quantity Price 5 0.00
data.bestSellQuantity1
String
Best Sell Quantity 1 0.00
data.bestSellQuantity2
String
Best Sell Quantity 2 0.00
data.bestSellQuantity3
String
Best Sell Quantity 3 0.00
data.bestSellQuantity4
String
Best Sell Quantity 4 0.00
data.bestSellQuantity5
String
Best Sell Quantity 5 0.00
data.bestBuyOrder1
String
Best Buy Order 1 0.00
data.bestBuyOrder2
String
Best Buy Order 2 0.00
data.bestBuyOrder3
String
Best Buy Order 3 0.00
data.bestBuyOrder4
String
Best Buy Order 4 0.00
data.bestBuyOrder5
String
Best Buy Order 5 0.00
data.bestSellOrder1
String
Best Sell Order 1 0.00
data.bestSellOrder2
String
Best Sell Order 2 0.00
data.bestSellOrder3
String
Best Sell Order 3 0.00
data.bestSellOrder4
String
Best Sell Order 4 0.00
data.bestSellOrder5
String
Best Sell Order 5 0.00
data.VWAP
String
Average Price 113.13
data.totalSellQuantity
String
Total Sell Quantity 243543
data.openInterest
String
Open Interest 1.3
data.totalBuyQuantity
String
Total Buy Quantity 23131
{
    "status": "success",
    "data": {
        "requestTime": "01:05:45 05-02-2024",
        "companyName": "ITC LTD",
        "exchange": "NSE",
        "tradingSymbol": "ITC-EQ",
        "symbolName": "ITC",
        "segment": "EQT",
        "instrumentName": "EQ",
        "pricePrecision": "2",
        "lotSize": "1",
        "tickSize": "0.05",
        "multipler": "1",
        "priceFactor": "(1 / 1 ) * (1 / 1)",
        "token": "1660",
        "lastTradedPrice": "472.30",
        "dayClosePrice": "440.10",
        "dayOpenPrice": "444.00",
        "isin": "INE154A01025",
        "upperCircuit": "506.10",
        "lowerCircuit": "396.10",
        "dayHighPrice": "506.10",
        "dayLowPrice": "396.10",
        "volume": "6836353",
        "lastTradedQuantity": "3",
        "lastTradeTime": "15:42:13",
        "bestBuyPrice1": "0.00",
        "bestBuyPrice2": "0.00",
        "bestBuyPrice3": "0.00",
        "bestBuyPrice4": "0.00",
        "bestBuyPrice5": "0.00",
        "bestSellPrice1": "472.30",
        "bestSellPrice2": "0.00",
        "bestSellPrice3": "0.00",
        "bestSellPrice4": "0.00",
        "bestSellPrice5": "0.00",
        "bestBuyQuantity1": "0",
        "bestBuyQuantity2": "0",
        "bestBuyQuantity3": "0",
        "bestBuyQuantity4": "0",
        "bestBuyQuantity5": "0",
        "bestSellQuantity1": "146",
        "bestSellQuantity2": "0",
        "bestSellQuantity3": "0",
        "bestSellQuantity4": "0",
        "bestSellQuantity5": "0",
        "bestSellOrder1": "2",
        "bestSellOrder2": "0",
        "bestSellOrder3": "0",
        "bestSellOrder4": "0",
        "bestSellOrder5": "0",
        "bestBuyOrder1": "0",
        "bestBuyOrder2": "0",
        "bestBuyOrder3": "0",
        "bestBuyOrder4": "0",
        "bestBuyOrder5": "0",
        "VWAP": "455.00",
        "totalSellQuantity": "146",
        "openInterest": "0.00",
        "totalBuyQuantity": "0"
    }
}

Failure response details

API Parameters
Parameter Description Example
status
String
Indicates the result status of the
API operation
failed
code
String
HTTP status code associated with the
error
400
name
String
Specifies the type or category of
the error encountered
BAD_REQUEST
error.field
String
Field in the request that triggered
the error
jKey
error.message
String
Detailed message describing the
error
jKey cannot be undefined or NULL
{
  "status": "failed",
  "code": "400",
  "name": "BAD_REQUEST",
  "error": {
      "field": "jKey",
      "message": "jKey cannot be undefined or NULL"
  }
}