I am placing order using Asp.net kit. 1) how to implement webhook. 2) how to check webhook on localhost (i.e i am running backend code using visual studio where i am getting url https://localhost:5290/) 3) how to get apikey and accesstoken in webhook 4) shall i need to configure webhook url in account Because i need to process position after order status. if any reference code it will help me. how to do in webhook.
One can't test postbacks using local. You need to give a valid https url for Kite Trade to make a request to your endpoint. You may use postb.in like service to try it out.
https://trade.fnotrader.com/api/liveTrading/zerodhaOrderResponsePostBack this is my postback url, but still i am not getting any order update for order, i check with limit order still not success I am create postback like this in asp.net core [HttpPost("zerodhaOrderResponsePostBack")] public IActionResult ZerodhaOrderResponsePostBack([FromBody] dynamic webhookData) {
You may use postb.in like service to try it out.
this is my postback url, but still i am not getting any order update for order, i check with limit order still not success
I am create postback like this in asp.net core
[HttpPost("zerodhaOrderResponsePostBack")]
public IActionResult ZerodhaOrderResponsePostBack([FromBody] dynamic webhookData)
{
try
{
_log.LogInformation($"Webhook Data: {webhookData}");
return Ok("zerodhaOrderResponsePostBack call successfully");
}
catch (Exception ex)
{
// Handle any exceptions that might occur during file writing
_log.LogInformation(ex.Message);
return StatusCode(500, $"Error saving file: {ex.Message}");
}
}