nsepython icon indicating copy to clipboard operation
nsepython copied to clipboard

Update index_history with json payload as per the new NSE API Server

Open mraj602 opened this issue 1 year ago • 1 comments

Update index_history with JSON payload as per the new NSE API Server. Changed the structure of the request sent to the server after testing it with the new NSE API. Added cinfo and index object data, which the API uses to access the internal data.

mraj602 avatar Jun 04 '24 19:06 mraj602

hope this one does not see the fate of https://github.com/aeron7/nsepython/pull/40

buzzvolt avatar Jun 12 '24 03:06 buzzvolt

Unfortunately the issue still persists with this patch. Still getting the KeyError 'd' with both nsepythonserver and nsepython.

ramit-mitra avatar Aug 10 '24 15:08 ramit-mitra

Merged with aeron7:master as the resolution is the same.

mraj602 avatar Aug 10 '24 16:08 mraj602

Unfortunately the issue still persists with this patch. Still getting the KeyError 'd' with both nsepythonserver and nsepython.

The issue is from the server. Even the request on nifty indices website returns no result. Might be a temporary issue. Hopefully, NSE will not change its structure again.

mraj602 avatar Aug 10 '24 16:08 mraj602

Unfortunately the issue still persists with this patch. Still getting the KeyError 'd' with both nsepythonserver and nsepython.

The issue is from the server. Even the request on nifty indices website returns no result. Might be a temporary issue. Hopefully, NSE will not change its structure again.

yeah, it seems they made some changes which broke their endpoint.

{
    "Message": "Object reference not set to an instance of an object.",
    "StackTrace": "   at System.Data.RBTree`1.Successor(Int32\u0026 nodeId, Int32\u0026 mainTreeNodeId)\r\n   at System.Data.RBTree`1.RBTreeEnumerator.MoveNext()\r\n   at Newtonsoft.Json.Converters.DataTableConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)\r\n   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)\r\n   at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)\r\n   at Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer)\r\n   at Newtonsoft.Json.JsonConvert.SerializeObject(Object value)\r\n   at IISL.Backpage.getHistoricaldatatabletoString(String cinfo) in D:\\NseIndices\\Temp\\March07_2024_LiveBackup\\Nifty Indices New\\Backpage.aspx.cs:line 420",
    "ExceptionType": "System.NullReferenceException"
}

ramit-mitra avatar Aug 10 '24 20:08 ramit-mitra