Callback Not working

I deployed both ngrok and Google Cloud Function.
Both postback URLs -- and tried in the postback URL of the testing APP on kite.
But neither or the Google cloud function logs showed any request when I punched in regular orders after market hours. typically i should get a order rejected updated in the log.
  • tonystark
    You will receive an order update only for the client ID you specified in the app details page.
    Your ngrok URL seems to be dead.
    And the cloud functions URL is not used in any of your apps.

    Can you clarify how you collect the logs?
  • MW5790
    I configure following Google Function URL as my postback to client ID MW5790
    I get an access token for same Client ID and issue a NRML order on NIFTY FUT SHORT after market hours. The order gets placed successfully.
    but the order status turns into rejected.

    In the google function this is the trigger

    exports.broadcastUpdate = (req, res) => {
    let payload = req.body;
    console.log('got incoming broadcast update from -', req.connection.remoteAddress);
    console.log('Request Body -',payload);
    //res.status(200).send({ok: true});
    res.status(200).send(payload ||'Source IP-'|| req.connection.remoteAddress

    Multiple times curl command is issued but nothing gets logged on my Google logs.


    1. Configure simple web server on my laptop running on 3000
    2. Point ngrok and verify my --> hits the web server on browser , verified
    3. Updated Postback URL to
    4. My sample.js file has following standard logic for listenting to order_updates
    function order_details(data) {
    console.log("Entered Order_details");
    console.log("Order_details", data);
    5. Update same access token .api_key in sample.js file as used in curl command
    6. . issue curl command to place NRML order after market hours.
    7. The Positions, ticks data prints on console but the Order Update to rejected status doesn't print at all .. tried issuing same command multiple times
  • MW5790
    now its coming
  • MW5790
    seems inconsistent
  • MW5790
    can u suggest best practices to test this for consistency.
Sign In or Register to comment.