code: public Map<String, Margin> getMargins() throws KiteException, JSONException, IOException {
          String url = routes.get("user.margins");
          JSONObject response = new KiteRequestHandler(proxy).getRequest(url, apiKey, accessToken);
          Type type = new TypeToken<Map<String, Margin>>(){}.getType();
          return gson.fromJson(String.valueOf(response.get("data")), type);
      }
docs: Gets account balance and cash margin details for a equity and commodity.
  @return Map of String and Margin is a map of commodity or equity string and funds data.
  @throws KiteException is thrown for all Kite trade related errors.
  @throws JSONException is thrown when there is exception while parsing response.
  @throws IOException is thrown when there is connection error.