Cannot add property api_status_code to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.

Hi, I am getting this error “Cannot add property api_status_code to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.” when trying to access candle data using below code in c#

            StockHistoryModel model = new StockHistoryModel();

            model.Symbol = symbol;

            model.DateFormat = "1";

            model.ContFlag = 1;

            model.RangeFrom = RangeFrom;

            model.RangeTo = RangeTo;

            model.Resolution = Resolution;

            Tuple<JArray, JObject> stockTuple = await fyersModel.GetStockHistory(model);

This is not frequent, but some times I am getting this and errored out from application.

Please help me on this.

1 Like