Please send JSONObject or JSONArray for return type of smartconnect.candleData(JSONObject params)
-
Folks, it is hard to process the return type of String to fetch the data we need. can you return the JSONObject or or JSONArray in the com.angelbroking.smartapi.SmartConnect?
I know you may have converted to String to print, but you can print the String, but pass the actual JSONObject or JSONArray.
com.angelbroking.smartapi.SmartConnect.java:
...
public String candleData(JSONObject params) {
try {
String url = routes.get("api.candle.data");
JSONObject response = smartAPIRequestHandler.postRequest(this.apiKey, url, params, accessToken);
System.out.println(response);Please pass the response itself below instead of response.getString("data")
return response.getString("data"); } catch(Exception | SmartAPIException e) { System.out.println(e.getMessage()); return null; } }
-
Any updates on this?
-
Hi @vvbchandrasekhar ok.
-
@admin thanks! i got the code working with some json parsing on my side. not really needed now.
-
Hi @vvbchandrasekhar we have noted this as one of our product enhancement feature and we will try to make this changes in next release.
-
@admin thank you. let me know once this is fixed
-
Hi @vvbchandrasekhar we will discuss this with our team and update you.