BO placing after the execution of already placed BO

sachinstlko09
Hi,
I want to place BO after the order completion of already placed BO. I have to code at the Post Back page for this.
Any one please guide me how to know the particular order is completed. Please guide me how can I code accordingly.
  • sujith
    sujith edited October 2017
    Hi,
    You can check status in the postback response. Order status will be 'COMPLETE'. You can use that as an event for placing a new order.
  • sachinstlko09
    sachinstlko09 edited October 2017
    @sujith Yes, now I can successfully get the response on the postback page. Now, I want to post an BO at the same time.

    But, for the placing of an order, Request Token is necessary to get and set the access token. How can I get this request token and generate the access token to place an order at the post back page?
  • sujith
    There is no API for generating request token.
    I think you can post an event to your program and place orders from there.
  • sachinstlko09
    It means at the Post Back page we can not code to post any order?
    Please confirm.

    As per my current analysis, Request Token we can get only at the Redirect URL page of the app.
  • sujith
    @sachinstlko09,
    Yes, you get request token only in redirect url page.
    It means at the Post Back page we can not code to post any order?
    It is difficult to comment unless one knows complete setup and code.
  • sachinstlko09
    I have used checksum value as a access token. Can I use it?

    https://kite.trade/docs/connect/v1/#postback-webhooks

    When I have used this , it throws "Invalid session" issue.
  • sujith
    Hi,
    Kite Connect authenticates all API calls with the access token. You need to pass access token. Kite Connect won't recognize checksum.
  • botany02
    botany02 edited October 2017
    @sachinstlko09
    You need to store the generated the access token and retrieve it on the post-back page.
    A simple example would be;
    Just write the access token to text file, say my_token.txt on successful login and
    retrieve the access token in the post back page by just reading the text file my_token.txt
    and place orders as per your logic.
  • sachinstlko09
    @botany02
    Hi, I understood your suggestion. But, Can we use same access token multiple times to place an order.
    Please confirm !
  • sujith
    Once you get the access token, it is valid throughout the day. You can place any number of orders using one access token.
Sign In or Register to comment.