Skip to main content

Developers API

Home / Developers API / Instruments

Developers API

Instruments

In addition to real-time and historical market data, the Developer API provides instruments files—lists containing trading symbols, exchange codes, tokens, and other metadata. These files are typically updated on a daily basis, ensuring you always have the most current mapping of instruments for:

  • Equities (NSE, BSE)
  • Futures & Options (NFO, BFO)
  • Other segments (Indices, etc.)

Having a local or cached copy of these instrument files is extremely useful for validating user inputs (e.g., a tradingSymbol), auto-completing symbol searches, or building watchlists.

Files Format

Common File Types & Columns

  • CSV: The instrument files are often provided in CSV format, easily downloadable via an endpoint or link.
  • Fields / Columns:
    • Token: An internal numeric identifier recognized by the API.
    • Exchange: E.g., "NSE", "BSE", "NFO", "BFO".
    • Trading Symbol: The symbol used in API calls (e.g., "RELIANCE-EQ", "NIFTY06JUL25C15000").
    • Instrument Name: "Equity", "FUTSTK", "OPTIDX", etc.
    • Expiry (for derivatives): Expiry date or code, often in DDMONYYYY format.
    • Lot Size (for F&O): The number of shares per lot.

Usage & Parsing

  • Download & Store: Typically, you’ll download these files daily, store them locally (in a database or CSV format), then parse for quick lookups.
  • Mapping: Use the token or tradingSymbol to integrate with other endpoints (quotes, option chains, order placement).
  • Validation: Check if a user-supplied symbol actually exists in the file before sending an API request.

File Update Every Day

Frequency & Timing

  • Daily Refresh: The instrument files are generally refreshed once every trading day, capturing new listings, expired contracts, or renamed symbols.
  • Update Schedule: Look for an official update time (e.g., early morning before market open) in the documentation or from support announcements.

Automation

  • Cron Jobs: Consider setting up a early-morning cron job to download the latest CSV.
  • Version Control: Keep older files if needed for auditing or historical references, but note that they can quickly grow in size.
  • Performance Considerations: If your application deals with thousands of symbols, parse and index them in a local database for faster lookups.

Data Types

Instrument Fields

  • Token (integer)
    • Internal numeric code, used in certain quote or order requests.
    • Example: 26000 for “NIFTY” index.
  • TradingSymbol (string)
    • “Human-readable” symbol used in tradingSymbol API fields.
    • Example: "IDEA-EQ", "NIFTY24APR25C22500".
  • Exchange (string)
    • "NSE", "BSE", "NFO", "BFO", or "INDEX" for certain lists.
  • Instrument Name (string)
    • "Equity", "FUTSTK", "OPTSTK", "OPTIDX", etc.
  • Expiry (string, optional)
    • Present for derivatives, e.g., "27APR2025".
  • Lot Size (integer, optional)
    • E.g., 75 for NIFTY options/futures.

Parsing & Validation

  • Convert numeric fields (token, lot size) from strings if your CSV parser reads everything as text.
  • Watch for optional fields (like expiry or lot size) which might be blank for equities.

Example Record

Order Placement API Parameters
token exchange tradingSymbol instrumentName expiry lotSize
14366

NSE

IDEA-EQ

Equity

(none)

(none)

79501

NFO

NIFTY24APR
25C23500

OPTIDX

24APR2025

50

Best Practices

  • Daily Download
    • Automate a script to fetch the instrument file(s) each morning, update local references, and handle newly listed or expired symbols.
  • Symbol Validation
    • When a user enters a symbol, cross-check it in your local instrument list to avoid “resource not found” errors.
  • API Integration
    • Combine the local instrument data with other endpoints—like Get Multi Quotes or Get Option Chain—to easily pivot between a user-friendly name and the token or tradingSymbol the APIs require.
  • Version Awareness
    • If new columns or data types appear in the instrument files, ensure your parsing logic can handle them gracefully (particularly if they come with new features or expansions in the Developer API).

Conclusion

Managing Instruments effectively is crucial for a seamless user experience and robust data validation. By leveraging daily-updated instrument files—which include fields like token, tradingSymbol, and exchange—you can:

  • Quickly validate if a symbol is active,
  • Support user-friendly auto-complete or search features,
  • Ensure accurate and up-to-date references for all your F&O or equity trading flows.

For further details, see the Downloaders Documentation or contact support if you need guidance on large-scale or specialized use cases.

Footer

Take control of your wealth with Firstock. Track your investments, trade wisely—all in one easy-to-use platform.

Download the App now

Invest in Stocks, Mutual Funds, IPOs, Bonds, ETFs & Futures, Options,

© 2025 Firstock. All rights reserved.

Firstock Broking Pvt Ltd

  • No 350,1st Floor, 36th A Cross 7th Main Rd 5th Block Jayanagar, Bengaluru, KA 560041.
  • NSE​ &​ BSE – SEBI Registration No.: INZ000260334
  • CDSL: Depository services – SEBI Registration No.: IN-DP-67-2015 Mutual Fund ARN: 132812
  • For any complaints pertaining to securities broking please write to complaints@firstock.in for DP related to depository@firstock.in Please ensure you carefully read the Risk Disclosure Document as prescribed by SEBI.

    Attention Investors:

    Investments in the securities market are subject to market risks. Please read all related documents carefully before investing.

    Prevent Unauthorized Transactions in Your Trading/Demat Account:
    Update your mobile number and email ID with your stock broker or depository participant. Receive alerts and information about your transactions on your registered mobile number/email for all debit and other important transactions in your trading/demat account directly from the Exchange/CDSL on the same day.

    KYC is a one-time exercise while dealing in the securities market.
    Once KYC is completed through a SEBI-registered intermediary (broker, DP, mutual fund, etc.), you do not need to undergo the same process again when approaching another intermediary.

    No need to issue cheques when subscribing to an IPO.
    Simply write your bank account number and sign the application form to authorize your bank to make the payment in case of allotment. There is no worry about refunds, as the money remains in the investor's account.

    Procedure to file a complaint on SCORES (Easy & Quick): Register on the SCORES portal and keep the following mandatory details ready: Name, PAN, Address, Mobile Number, and Email ID.

    Benefits: Effective communication and speedy redressal of grievances.{" "}

    Dear Investor,

    If you are subscribing to an IPO, there is no need to issue a cheque. Please write your bank account number and sign the IPO application form to authorize your bank to make the payment in case of allotment. In case of non-allotment, the funds will remain in your bank account. As a business, we do not provide stock tips and have not authorized anyone to trade on behalf of others.

    Important:

    Stock brokers can accept securities as margin from clients only by way of a pledge in the depository system w.e.f. September 1, 2020.

    Update your email ID and mobile number with your stock broker or depository participant and receive OTPs directly from the depository on your registered email ID and/or mobile number to create pledges.

    Check your securities, mutual funds, and bonds in the consolidated account statement issued by NSDL/CDSL every month.

    Disclaimer:

    The Stock Exchange, Mumbai, is not in any manner answerable, responsible, or liable to any person for any acts of omission or commission, errors, mistakes, and/or violations—actual or perceived—by us or our partners, agents, associates, etc., of any rules, regulations, by-laws of the Stock Exchange, SEBI Act, or any other laws in force from time to time.

    The Stock Exchange, Mumbai, is not responsible or liable for any information on this website or for any services rendered by our employees or representatives. Please refer to BSE compliance for more details.

    Investor Alert:

    Investors are requested to note that stock broker Firstock Broking Private Limited (Firstock) is permitted to receive/pay money from/to investors only through designated bank accounts, named as "client bank accounts."

    Firstock is also required to disclose these client bank accounts to the Stock Exchange.

    Hence, you are requested to use only the following client bank accounts for any transactions in your trading account with us. The details of these accounts are also displayed by the Stock Exchanges on their website under “Know / Locate Your Stock Broker.”