maximum 4 order allow per day

Vishalahir
hello i have subscribe zerodha Api muje ye janna he ki kya me python coding se ye set kar sakta hu ki mere maximum trade din ke 4 ho usse jyada koi trade execute hi na ho me manually trade karu to bhi na execute ho kya ye possible he?
Tagged:
  • sujith
    This is not possible on Kite Connect API.
  • Vishalahir
    ok or ye set ho sakta hi ke mera maximum loss 1 certain amount ho wo me api se set kar saku ki wo amount ka loss hone per me koi naya trade na le saku manually order dalne per bhi reject ho jaye ya fir mera trading time 9.45 tak hi max rahe uske baad me trade na kar pau ye dono facility available he zerodha kite api se zerodha broking account me
  • sujith
    Kite Connect only has trading capabilities, it doesn't have any backoffice features. It is not possible to automate Kill switch using Kite Connect APIs.
  • sujith
    You can either use Kill Switch or pause the Kite Connect app.
  • MAG
    MAG edited June 24
    One crude but effective way of enabling the equivalent of a kill switch in code is to invalidate the access token.
    example
    If loss > 10000 : 
    <code to invalidate access token>
    This method can apply to any condition you want to set, limited only by your imagination and coding skills.

    Once access token is invalidated, no orders can be placed by any code running on any system for that account.

    How ever this also means that one wont be able to get/query any data via ticker or quote,orders,position calls etc. Even historical api will throw exception errors once the token is invalidated.
  • Vishalahir
    thanks for advice
    but mera problem ye he ki me overtrading kar leta hu bahot trade leke or per day ke max loss se jyada loss kar leta hu isliye muje ye 3 condition chahiye thi ki max 4 trade per day + max 10000 loss + 9.45AM tak hi trading or wo bhi automatic ho tabhi emotion control ho sakte he mene kill swich ka bhi upyog kar liya but end of the day its a manually process so 1 trade leke karta hu aisa soch ke jyada trade ho jate he agar koi solution ho me manually trade karta hu or agar meri ye ye condition automatically ho jaye to acha ho sakta he
  • MAG
    First of all don't you know English? You seem to be reading our answers fine.
    I find the hinglish irritating so if you continue using it, I will stop responding.

    Everything you want can be done. But you need to write the code to fulfill those conditions.
    There are no ready made solutions.
    So unless you know coding, or you know someone who can write the code for you, you are out of luck.
  • Vishalahir
    The code I wrote executes immediately when I place an order manually from Kite. That's why I asked if the Zerodha API can execute back office features through the API during manual trading. Sujith answered that it's not possible, but Mag are saying it is possible. What is the correct answer?
  • MAG
    MAG edited June 25
    Both MAG and sujith are right. Problem is in your lack of understanding or unwillingness to understand.

    Let me explain but I will keep it short.
    Sujith said that the features you want like disable trading after certain loss, only allow 4 trades per day etc are not possible via the existing kite web/mobile or api offerings. And he is right when he says that.

    Now I told you that if you know programming you can build your own solution which has those and any other features that you want/desire. That is also right.

    So while the existing API/tooling cannot give you the features you want out of the box/readymade, if one has the programming knowledge they can build their own trading software having those features.

    And this is my last post on this topic. Not going to get pulled into useless whataboutery discussions. Got no time for that.
    In fact that is the reason I havent been replying to posts on the forum lately.
  • kakush30
    What's the actual problem you are facing here, its a simple code, isnt it?

    kill_switch = false
    if trade_count > 4 and datetime.now().time() > datetime.strptime('9:45','%H:%M').time():
    kill_switch = true

    if kill_switch == false:
    buy API

    if p&l < -10000:
    Sell API for exiting position.
  • MAG
    @kakush30 The problem is that they want ready made solutions that fits their wish-case. Writing their own code is too much work either because they do not know programming well enough or they do not want to put in the effort.
  • Vishalahir
    my number is 7874471915 pls help me
  • kakush30
    kakush30 edited July 4
    @Vishalahir No one going to spoon feed you, if you dont know programming language, then first learn the basic concepts, there are lots of free tutorials on youtube.

    Furthur, the way you asking that API should also turn off execution of manual orders ( which is insanity to even ask this), I think you dont know about trading either. By algo trading you be applying your own logic and experiences into it, it wont be like by automating it you be booking profits.

    Bhaiya ji dilli abhi dur hai, low capital par thoda seekho cheeze aur experience gain karo, baad main automate karne ka sochna.

    Best is to close this thread.
Sign In or Register to comment.