Not receiving postback

masti6407
curl --location 'https://api.kite.trade/orders/regular' \
--header 'Authorization: token ******' \
--header 'X-Kite-Version: 3' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: _cfuvid=Vwefqbs.9fj8ONqml2DVfONeWi3IuQP.exZTK6fqsQM-1685768307344-0-604800000' \
--data-urlencode 'tradingsymbol=VEDL' \
--data-urlencode 'exchange=NSE' \
--data-urlencode 'transaction_type=BUY' \
--data-urlencode 'order_type=LIMIT' \
--data-urlencode 'quantity=1' \
--data-urlencode 'validity=DAY' \
--data-urlencode 'variety=regular' \
--data-urlencode 'product=CNC' \
--data-urlencode 'price=280'

I have placed an order using apiKey . I was expecting a postback response from zerodha on execution of order. But I did not received any. My postback URL is :
https://www.goveca.com/api/v1/kite/trade/callback. Can you please respond to it ?

I tried to hit reqesut manually on postback url and I am reveing a response :
curl --location 'https://www.goveca.com/api/v1/kite/trade/callback' \
--header 'api_key: 4l3z9me25bgm0p1a' \
--header 'Content-Type: application/json' \
--data '{
"user_id": "AB1234",
"unfilled_quantity": 0,
"app_id": 1234,
"checksum": "2011845d9348bd6795151bf4258102a03431e3bb12a79c0df73fcb4b7fde4b5d",
"placed_by": "AB1234",
"order_id": "220303000308932",
"exchange_order_id": "1000000001482421",
"parent_order_id": null,
"status": "COMPLETE",
"status_message": null,
"status_message_raw": null,
"order_timestamp": "2022-03-03 09:24:25",
"exchange_update_timestamp": "2022-03-03 09:24:25",
"exchange_timestamp": "2022-03-03 09:24:25",
"variety": "regular",
"exchange": "NSE",
"tradingsymbol": "SBIN",
"instrument_token": 779521,
"order_type": "MARKET",
"transaction_type": "BUY",
"validity": "DAY",
"product": "CNC",
"quantity": 1,
"disclosed_quantity": 0,
"price": 0,
"trigger_price": 0,
"average_price": 470,
"filled_quantity": 1,
"pending_quantity": 0,
"cancelled_quantity": 0,
"market_protection": 0,
"meta": {},
"tag": null,
"guid": "XXXXXX"
}
'
  • sujith
    You need a valid ssl certificate for the postback url.
  • masti6407
    Certificate is valid only.
  • masti6407
    @sujith : Certificate is valid only.
  • masti6407
    Thanks for the information. I have removed 45.55.121.172 IP mapping for www.goveca.com .
    Now It will point to only single IP.
  • sujith
    Postbacks are sent only when there is a partial fill, or trigger is hit or when order gets executed. If you are placing a limit order postbacks are not sent until there is a partial fill or order is executed.
  • masti6407
    I just placed an order for vedl via api and It has got filled. But i did not received postback for same.
  • masti6407
    curl --location 'https://api.kite.trade/orders/regular' \
    --header 'Authorization: token ********' \
    --header 'X-Kite-Version: 3' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --header 'Cookie: _cfuvid=Vwefqbs.9fj8ONqml2DVfONeWi3IuQP.exZTK6fqsQM-1685768307344-0-604800000' \
    --data-urlencode 'tradingsymbol=VEDL' \
    --data-urlencode 'exchange=NSE' \
    --data-urlencode 'transaction_type=BUY' \
    --data-urlencode 'order_type=LIMIT' \
    --data-urlencode 'quantity=1' \
    --data-urlencode 'validity=DAY' \
    --data-urlencode 'variety=regular' \
    --data-urlencode 'product=CNC' \
    --data-urlencode 'price=280'
  • masti6407
    I am receiving postback now. But it seems to be in different format in which I am expecting. I am expecting it as :
    curl --location 'https://www.goveca.com/api/v1/kite/trade/callback' \
    --header 'api_key: 4l3z9me25bgm0p1a' \
    --header 'Content-Type: application/json' \
    --data '{
    "user_id": "AB1234",
    "unfilled_quantity": 0,
    "app_id": 1234,
    "checksum": "2011845d9348bd6795151bf4258102a03431e3bb12a79c0df73fcb4b7fde4b5d",
    "placed_by": "AB1234",
    "order_id": "220303000308932",
    "exchange_order_id": "1000000001482421",
    "parent_order_id": null,
    "status": "COMPLETE",
    "status_message": null,
    "status_message_raw": null,
    "order_timestamp": "2022-03-03 09:24:25",
    "exchange_update_timestamp": "2022-03-03 09:24:25",
    "exchange_timestamp": "2022-03-03 09:24:25",
    "variety": "regular",
    "exchange": "NSE",
    "tradingsymbol": "SBIN",
    "instrument_token": 779521,
    "order_type": "MARKET",
    "transaction_type": "BUY",
    "validity": "DAY",
    "product": "CNC",
    "quantity": 1,
    "disclosed_quantity": 0,
    "price": 0,
    "trigger_price": 0,
    "average_price": 470,
    "filled_quantity": 1,
    "pending_quantity": 0,
    "cancelled_quantity": 0,
    "market_protection": 0,
    "meta": {},
    "tag": null,
    "guid": "XXXXXX"
    }
    '
    But above one is not working.

    Can you send me correct format ?
    @sujith
Sign In or Register to comment.