REST vs Websocket

I am new to Fyers v3.

I had some questions.

I was trying to build an Algo that trades depending on Criteria's specified by me. The issue I am facing is, using REST I'm not able to fetch Nifty and Bank Nifty Data (both Market price and options data).

My strategy also needs 30 days historical Data.

Everytime I run the code, I get 503 error saying Insufficient Date for Nifty or Bank Nifty.

So I switched to Websocket, which is fetching only real time data with buffer of 60 min.

Does this create a while trading in Index Options? With regards to trade placement or Rate Limits?

How can the issue with REST be handled, because I need atleast 20 candle data for my code to run effectively. With Websocket, it take too much time to just collect data.

Thank you

3 replies