Postback URL

yash544
yash544 edited October 2016 in General
I have read about postback URL in documentation but could not understand it, what URL should be used for it
Tagged:
  • Vivek
    @yash544 When you place order you will get callback(request from our server) to your server when order status changes. For example you have placed an limit order and when it gets executed you will get postback from our server with these order details. You can read more about webhooks here - https://webhooks.pbworks.com/w/page/13385124/FrontPage
  • fury1984
    @yash544 @vivek I have been reading little bit about integrating webhooks with python without having myself to run a server for the HTTPS postback link. AmazonSQS/IronMQ seems to be a good solution. Both give free options for the requirements of a retail trader. Do you have any better suggestions to implement webhooks for a kite-python based trading application?
  • kapilaggr
    @vivek could you comment on @fury1984's suggestions above. Amazon/Iron is better of solutions to go ahead with? What are the other effective free/low cost solution
  • Vivek
    @kapilaggr It's an overkill I feel. Unless you have specific requirements you can just spin off a AWS EC2 server or Digital ocean server to get postbacks and use it in your app. We will release few examples to do the same.
  • kapilaggr
    @vivek any examples on the above to be expected soon?
  • kapilaggr
    @vivek @sujith I configured postback url using IronMQ but not receiving order status on the same. Could you please help where I may be doing wrong? URL = https://mq-aws-eu-west-1-1.iron.io/3/projects/589bbd904b2b3300078f66ec/queues/myQueue/webhook
  • sujith
    Hi @kapilaggr,
    This url looks fine. You get raw json in body. Can you check if you have setup everything that is as mentioned here?
  • sauravkedia
    Hi, did you publish any examples to to setup web-hooks. Right now, I am having to poll every 5 seconds.
  • sujith
    Hi @skk,
    You need to setup a simple server which accepts post request which will get data in the payload.
    You can check out more details here.
    We will put up an example by end of next week.
  • sauravkedia
    Unfortunately, while I have see the link but don't know how to move beyond that. Will wait for your example.
  • sujith
    @skk,
    You can refer to this.
  • ramatius
    Another alternative is to get a static IP from your ISP and setup a webserver in your laptop/desktop. This is easy to do and doesn't incur server costs.
  • sauravkedia
    @ramatius can you guide on on to this. Any link etc?
  • ramatius
    Sure. we can catch up on phone/email. will share contact details in pvt msg.
  • ping2balaji
    hi Sujith,

    I have been referring to the link you have provided for using webhook.
    But it still needs us(my client python program in laptop) to host an public-ip/domain on postback_url so that i will get the event from server on order status change, correct?

    Please clarify.
  • sujith
    @ping2balaji,
    Yes, you need a domain to which we will make a post request.
  • ping2balaji
    @sujith

    so its like i have to own a website/domain and also have some apache(http or https?) server running in it?
    Is there any way i can talk to you over phone? Or you can send me a private message on contact no?
    Because i send multiple mails to talk@rainmatter but no one responds.
    You are doing a great job here in keeping the kiteconnect api hope alive for people but responding atleast.

    If we can't talk over phone, please clarify my queries, here it goes:
    I kind of have my python code ready for placing order and trade using my strategy.
    Few things i am not clear now is:
    1. The authentication process. What redirect URL i should give during registration if i have my logic python code in my laptop? any sample video / code for this authentication method?
    2. If i cannot own a domain/website with server(as they are costly) , is there any easy way you are aware for retail investors like us? (some service in internet where we can take domain and use for this kiteconnect POSTBACK_URL purpose only)
    3. If I need to include SuperTrend indicator for my strategy:
    a) any sample python code for that available?
    b) or some algoz command?
    c) Or i need to use websockets to stream the price every second and using that i form supertrend signals using implementation in python?

    Thanks in advance.
  • sujith
    Hi @ping2balaji,
    1. The authentication process. What redirect URL i should give during registration if i have my logic python code in my laptop? any sample video / code for this authentication method?
    Check out this webinar for authentication demo. You can give local host as redirect url.
    2. If i cannot own a domain/website with server(as they are costly) , is there any easy way you are aware for retail investors like us? (some service in internet where we can take domain and use for this kiteconnect POSTBACK_URL purpose only)
    You can use DigitalOcean may be just $5 instance will serve your purpose. You don't need domain use IP directly.
    3. If I need to include SuperTrend indicator for my strategy:
    a) any sample python code for that available?
    b) or some algoz command?
    c) Or i need to use websockets to stream the price every second and using that i form supertrend signals using implementation in python?
    Kite Connect is purely an execution platform, we don't provide support for writing strategies.
    You can use websockets data to generate super trend signals.
  • arkochhar
    Hi @ping2balaji, I have written Python functionality to compute SuperTrend. I invite you check it out on GitHub and provide me your feedback. Thanks
  • mailboxofrafiq
    @sujith I have setup a URL for my postback.. Will I get a call whenever any of my order changes.. or should I do something while placing order.. I am using Java..
  • sujith
    You don't have to do anything at your end. For every order update, you will receive a post request to that endpoint from Kite trade.
  • cisk
    @mailboxofrafiq Do try the on_order_update event triggered method
  • nickmanan
    @sujith
    I have my own domain but do not have ssl certificate. That will cost me 4k/year. is there anyway i can use domain without ssl certificate ?

    can i update my postback url later in the app ?
  • sujith
    @nickmanan,
    You need a valid https URL to get postbacks. You can try this.
  • vatayush
    Hi, when creating an application. We need to set a post back url. Can we change the post back url once the app has been created?
  • sujith
    @vatayush,
    You can change the postback and redirect URL after creating app also. You can go to the app details page of the developers console for the same.
Sign In or Register to comment.