I got the following error-

{“status”:“Failed”,“code”:“429”,“name”:“API_RATE_LIMIT”,“error”:{“field”:“API”,“message”:“Too Many Requests”}}

Could you provide more info on this?

Hi Praveen,
The above exceptions tells that the number of times the API can be used has been exceeded, you can take a look at the documentation for more details regarding rate limits of the API

Exceptions & error | Firstock

Please check out the link for more details

Thanks, I see

Quote 1 req/second

How is this even make sense? Basically you are asking not to work with more than one strategy. Addition to that how can you even construct option chain with LTP using Quote 1 req/second. Because your option chain api needs strike price.

Hi Praveen,
There is an API called Get Multi Quotes and Get Multi Quotes LTP


which makes it possible to build the option chain where more than one token can be sent, example:


from thefirstock import thefirstock

getMultiQuotes = thefirstock.firstock_getMultiQuoteLTP(
            "exchange": "NSE",
            "token": "26000"
            "exchange": "NFO",
            "token": "55101"
            "exchange": "NSE",
            "token": "26009"


{'status': 'Success', 'data': [{'token': '26000', 'result': {'requestTime': '00:48:50 05-04-2023', 'companyName': 'NIFTY INDEX', 'exchange': 'NSE', 'token': '26000', 'lastTradedPrice': '17398.05'}}, {'token': '55101', 'result': {'requestTime': '00:48:50 05-04-2023', 'companyName': 'BANDHANBNK MAY 100 CE ', 'exchange': 'NFO', 'token': '55101', 'lastTradedPrice': '105.15'}}, {'token': '26009', 'result': {'requestTime': '00:48:50 05-04-2023', 'companyName': 'NIFTY BANK', 'exchange': 'NSE', 'token': '26009', 'lastTradedPrice': '40813.05'}}]}

The above API is able to fetch the data upto 30 Symbols and this can be used for option chain.
Also in the upcoming days we will be coming up the multi web socket connection for single user, where more than one data feed can be used, I hope the above query was resolved.

Thank you

Not completely. To build option chain -

Step 1: Get strike price (Spot/future ltp) to pass it to option chain (https://connect.thefirstock.com/api/V3/getQuote/ltp) Request Quote Count=1
Step 2: Call Option chain (https://connect.thefirstock.com/api/V3/optionChain)
Request Quote Count=1
Step 3: Call multiple quotes on option chain token (https://connect.thefirstock.com/api/V3/getMultiQuotes/ltp)
Request Quote Count=2

  1. Am I missing something here? I need to make minimum of 2 request quotes/ second to build option chain.

  2. What if I have 2 or basket of strategies deployed? How 1 quote request/second help?

Hello Praveen,

We shall be increasing the total number of request on Get Quotes to 3 per second and this will be available on the 15th Release (i.e. next Saturday) also on the python package we shall be allowing two parallel WebSocket connection.

Thank you.
Firstock Team

Thanks for understanding. I would suggest you should follow overall request per second than restricting on each category.

Also, I think with this restrictions in place. It will become very hard to code with your APIs as I want to have basket of strategies.