Not able to fetch Holding details
-
Hi Team,
'I am not able to fetch my portfolio details. Below is the response I am getting."Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'AngelBroking.HoldingData' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.\r\nPath 'data', line 1, position 58."
Below is the code. Using this same code I could able to fetch
getPosition()
getOrderBook();
getTradeBook();
GetProfile()string Client_code = "xxxx"; //YOUR CLIENT CODE string Password = "xxxx"; //YOUR PASSWORD string api_key = "xxxx"; string JWTToken = ""; // optional string RefreshToken = ""; // optional SmartApi connect; OutputBaseClass obj; connect = new SmartApi(api_key, JWTToken, RefreshToken); obj = new OutputBaseClass(); //Login by client code and password obj = connect.GenerateSession(Client_code, Password); AngelToken agr = obj.TokenResponse; //Get Token obj = connect.GenerateToken(); agr = obj.TokenResponse; obj = connect.getHolding(); if (obj.status) { return obj.GetHoldingResponse.data; }
-
hi @firosh Please download the latest copy of DLL from git repo DLL folder and add reference to your project .
-
HI @firosh We will update you on this.
-
@admin Any update on this?
-
Hi @firosh Your issue has been reported.