wstrange / GoogleAuth

Google Authenticator Server side code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

candleData method error

Hari-Charan-Reddy-Veerannagari opened this issue · comments

In the the method for fetching the candle data, the code is trying to get data as a string from jsonObject but its should try to get it as a josnArray. (6th line of below code)

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);
			return response.getString("data");
		} catch (Exception | SmartAPIException e) {
			System.out.println(e.getMessage());
			return null;
		}
	}```