Skip to main content

Market Connect

Get Quote LTP

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/ltp

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_getQuoteLTP(
    userId="{{userId}}",
    exchange="BFO",
    tradingSymbol="ZEEL24JAN285PE"
)
curl --location --request POST 'https://connect.thefirstock.com/api/V4/getQuote/ltp' \
--header 'Content-Type: application/json' \
--data-raw '{
  "userId": "{{userID}}",
  "exchange": "BFO",
  "tradingSymbol": "ZEEL24JAN285PE",
  "jKey": "{{jKey}}"
}'
const Firstock = require("thefirstock");

const firstock = new Firstock();

firstock.getQuoteltp(
  {
    userId: {{userId}},
    exchange: "NSE",
    token: "26000",
  },
  (err, result) => {
    console.log("getQuoteltp Error, ", err);
    console.log("getQuoteltp Result: ", result);
  }
);
using thefirstock;

class Program
{
    public static void Main()
    {
        Firstock firstock = new Firstock(userId: {{userId}});
       var result = firstock.getQuoteltp(exchange: "NSE", token: "26000");
    }
}

Success response details

API Parameters
Parameter Description Example
status
String
Indicates the overall status of the
response, success or failure
success
data.requestTime
String
Timestamp of the response, provided
only on successful response
12:25:00 18-03-2023
data.companyName
String
Company Name associated with the data Nifty Fin Service
data.exchange
String
Exchange where the company is listed,
like NSE, BSE, etc.
NSE
data.token
String
Unique token identifying the company 26037
data.lastTradedPrice
String
Last traded price of the company's stock 17567.05
{
    "status": "success",
    "data": {
        "requestTime": "12:25:00 18-03-2023",
        "companyName": "Nifty Fin Service",
        "exchange": "NSE",
        "token": "26037",
        "lastTradedPrice": "17567.05"
    }
}

Failure response details

API Error 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
EXCHANGE/TOKEN
error.field
String
Field in the request that triggered the error exchange/token
error.message
String
Detailed message describing the error Invalid Exchange/Token
{
    "status": "failed",
    "code": "400",
    "name": "EXCHANGE/TOKEN",
    "error": {
        "field": "exchange/token",
        "message": "Invalid Exchange/Token"
    }
}