Query on Web socket and quotes

What is the difference between websocket data and quotes,

  • which one is better for live data viewing in python GUI and which one is better for order transactions(including strategy building)
  1. Can i use both in same GUI like for live data feeding websocket and for order placement quotes.

please clarify doubts, it would be great help for me.

  • You should use Data Websocket for realtime streaming data. Quotes or quote API will hit various API limits and the data is just a snapshot at the time of request ie. Daily timeframe OHLCV. WS supports 200 symbols and may increase, Quote API is only 50 symbols per http request and is unlikely to scale up further.

You will need to implement the history api for historical data or backfill (if required).

  • Yes you can use both in same app. Order socket as of now doesn’t place orders. It just broadcasts server status to client. To place Orders, use the order placement API. (You can directly use http API URL or Fyers python module). If you use order socket, then you won’t need the Webhook which is an alternate for API based code/app.

You have to understand that Fyers Websocket spawns its own thread(s), so you should write your main thread accordingly and use other worker threads as needed. ie. don’t block the main thread. (it is general thumb rule). Also, dont further compute/process code in callback functions of Web socket, as callback functions run in the address/cpu space of worker threads.

Hey @107300906897473599661

The difference is that Quotes gives one time data and Websocket keeps giving real time data , quotes affects the Rate limit of API and the websocket does not .

You can used the order placement api to punch orders