Optionchain library not working properly its get stuck some times and stop ticking the live data , is any others facing the same ? Responsible team please reply me
Could we get more detais / logs regarding this as i have not faced this issue
Hi Sathish,
Could you please confirm that you have the latest version, fyers-apiv3 3.1.1?
If not, You can update it using the following command and try,
!pip install fyers-apiv3 --upgrade
Hi @WWhYB2qrsx , @naresh_janagama im using the latest version of fyers-apiv3 3.1.1 only , if you run the below code in loop then you can see the issues.
fyers = fyersModel.FyersModel(client_id=client_id, token=access_token,is_async=False, log_path="")
data = {
"symbol":"NSE:NIFTY50-INDEX",
"strikecount":1,
"timestamp": ""
}
while True :
response = fyers.optionchain(data=data)['data']['optionsChain']
print(response)
Hi @sathishmurugan450-phl, please try without while loop function. Please refer the sample code below.
`fyers = fyersModel.FyersModel(token=accessToken,is_async=False,client_id=appId,log_path=“”)
data = {
“symbol”:“NSE:NIFTY50-INDEX”,
“strikecount”:1}
response = fyers.optionchain(data=data);
print(response)`
then how we can get the ltp tick by tick by using Option chain API ?
@naresh_janagama , @WWhYB2qrsx can i have any reponse for my queries , in the below scressnshot you see the lack in optionchain API .
For fetching the real-time data it would be better to use the Websocket .
https://myapi.fyers.in/docsv3#tag/Web-Socket/paths/~1WebSocket/get
what do you mean by lack in option chain API?
@Abhishek are you sure we have Websocket for option chain ?
@chirag you can the log of printed time after , 12:38 :03 there is a lack of ticking the data from API
@WWhYB2qrsx then what is the purpose of using Optionchain API , from developing side you have to solve the issue only , you can’t say use insteaed of this , Optionchain is better for me instead of using websocket . please check the issue and try to solve the issue .
as mentioned above, its better to use websocket. API cant really emulate RTD plus you may also hit the API limits
@chirag actullay you will be shock to know that , even in the websocket also facing the same issue . The data is not ticking properly , you can check that by yourself too . you can see how much delay in the ticks in the below .
which strike do you think we can test now? I dont see the type of delay you mention

