request token -How to get and put in application

FH1236
Hi ,

I saw multiple posts in last 10 days ....still not able to do following.

Requirements Part1 -
Have a nodeJS web application. Upon accessing a sample page in web application -- it should redirect to kite login page and then read request token from whatever redirection happens there. Then based on that redirection it gets requestToken and gets accessToken.

Now once access token is set and ready for use for placing orders.


Requirement Part2 - Then i want to implement following -

Say for example I enter some URL and press enter -
http://localhost:9999/xyzKiteApp?Script='BNF'&OrderType='PE/CE'&exitType=''&'Quantity='1'
--If it's PE and exit type - true ... then it should exit all CE positions and buy PE quantity lot BNF current spot [ round Off value. example - BNF is 30120 ..so buy 30100 PE option ]
--If it's PE and exit type - false... then it should not do anything with existing positions and buy PE quantity lot BNF current spot [ round Off value. example - BNF is 30120 ..so buy 30100 PE option ]
--similarly for CE

Please help me with atleast first requirement.....that's not strategy implementation.
Thanks
Tagged:
  • FH1236
    Yes I reviewed that page and webinar also.

    Webinar shows that it copies the requestToken from URL and then paste it in code to get access token. Obviously that's not what we will do in actual application.

    Please someone help me achieve requirement part1. ...Not looking for free strategy implementation.


  • ZI4453
    if you are looking for automating login process then i think its not approved by Exchange and brokers dont recommend login process to be automated.
    Uptill token generation it has to be manual.
  • FH1236
    Do you mean to say everyday request token has to be entered in code.

  • ZI4453
    @FH1236,Exchange Rules and Regulations - Yes.
    I can give you whole lecture on Alg0 trading, semi algO, Automation, Rate limits and our Indian Stock Exchanges.
    What you have procured and using now is merely an execution platform instead of using Webapp of Broker's.Nothing more than that!
  • FH1236
    Please help me
  • ZI4453
    You may go through these topics and figure out what you are missing......
    *REST API(Http Session's,requests,API endpoints,Authentication,params,payloads,Json payloads ,response structure, handling exceptions,json response, binary response) Fair Usage,Rate limits
    *Socket streaming,Threading(since i am Python guy, you need to check for Node JS)
  • FH1236
    I see documentation and videos... All of them get the requestToken manually in browser then copy past that request token in code to generate access token. I hope that is not to be done manually ....even in python allso.
  • sujith
    It is mandatory by the exchange that a trader has to log in manually at least once a day. We don't recommend automating login.
This discussion has been closed.