api call from processes in multiprocessing

sayali_ghosh1984
Running one some_target_process() in various sub-processes using multi-processing, all processes running parallelly, whether api call by each sub process work?

E.g. kite.ltp(some_instrument_token) is called in the some_target_function(), and this function is being run in say 30 subprocesses using multi-processing pool.
  • SRIJAN
    SRIJAN edited March 2022
    No, because quote call has a limit of 1r/s.
    https://kite.trade/docs/connect/v3/exceptions/#api-rate-limit
  • sayali_ghosh1984
    sayali_ghosh1984 edited March 2022
    @srijan - thank you! Could you suggest a way around to work with multiprocessing for the same, without circumventing your limits? Is there is a way to check number of requests already in queue before a call is made from the subprocesses?

    Also, putting a ceiling on requests per second, for orders is understandable, but plain fetching of data without sending an order, should be without any limit - I am comparing to using API as a replacement for ODIN type platforms which deliver mammoth data per tick (0.25 seconds)
  • sujith
    @sayali_ghosh1984,
    You need to design a separate process to fetch live market data and it should be independent of your subtasks/subprocesses.
    The live market data collection should be done using Websocket API, if you want data so frequent. Kite Connect is purely an execution platform, you need to design your scripts based on the whats allowed by the system and not circumvent it.
Sign In or Register to comment.