Packages & installation
Know about your preferred programming language and start of with installation.
At Firstock, the API is a comprehensive suite of REST APIs designed to support the development of stock market investment and trading platforms. It offers a range of functionalities including real-time order execution, portfolio management, live market streaming, and many more, making it a one-stop solution for all stock market needs
The API utilizes form-encoded parameters for inputs and provides responses in JSON format. It follows standard HTTP codes to indicate the success or failure of API requests, accompanied by relevant JSON data. It is important to note that the API endpoints are not enabled for cross-site requests and therefore cannot be directly accessed from browsers
A Firstock API key is a unique identifier assigned to a user after opening a trading account with Firstock. The API key allows users to access Firstock's suite of REST APIs and build stock market investment and trading platforms. To obtain the API key, users simply need to log in to their Firstock account through the Firstock Login.
Note
- The API key is a string-based identifier that is assigned to a user
- The API secret is a unique identifier that is received as a response from the two-factor authentication process during the Firstock login. This secret is used in conjunction with the API key to authenticate API requests and secure access to Firstock's APIs. The API secret must be entered in string format when making API requests.
- Data refers to the JSON object that serves as the input for REST API requests. In the REST description table, this object is referred to as "Input". If there is no input specified in the table, a blank object or a blank string must be sent as the Data input. The Data input must always be in string format.
Libraries and SDKs
pip install thefirstock
npm install thefirstock
dotnet add package thefirstock
Here is a list of pre-built client libraries for Firstock Connect that have been developed using various programming languages:
- Firstock Python library (Official)
- Firstock Node.js library (Official)
- Firstock C# library (Official)
These libraries provide an easier way for developers to interact with the Firstock APIs, allowing them to avoid the need to make raw HTTP calls. By using these libraries, developers can make API requests with just a few lines of code, saving time and effort.
The current major stable version of the Firstock API is 1. All API requests are directed to this version by default. However, it is recommended that a specific version be explicitly requested for production applications, as major releases may cause compatibility issues with older implementations. This will ensure that your production application continues to function seamlessly even after updates to the API.
Postman collection
- Postman Collection (V2) (Official)
- Postman Collection (V3) (Official)
Swagger Documentation
- Swagger Documentation (Official)
Trading Symbols
Links has been updated
All NFO Collection (Official)
Index Symbol Collection (Official)
NSE-EQ Symbol Collection (Official)
BSE-EQ Symbol Collection (Official)
BFO Symbol Collection (Official)
Version and API endpoint
The current major stable version of the API is 3. All requests go to it by default. It is recommended that a specific version be requested explicitly for production applications as major releases may break older implementations.
Root API endpoint
https://connect.thefirstock.com/api/V3
Root Websocket endpoint
wss://norenapi.thefirstock.com/NorenWSTP/