@@ -734,6 +734,18 @@ public JSONArray candleData(JSONObject params) {
734734 }
735735 }
736736
737+ public JSONArray oiData (JSONObject params ) {
738+ try {
739+ String url = routes .get ("api.oi.data" );
740+ JSONObject response = smartAPIRequestHandler .postRequest (this .apiKey , url , params , accessToken );
741+ log .info ("response : {}" ,response );
742+ return response .getJSONArray ("data" );
743+ } catch (Exception | SmartAPIException e ) {
744+ log .error (e .getMessage ());
745+ return null ;
746+ }
747+ }
748+
737749 /**
738750
739751 * Get Search Script Data.
@@ -1006,6 +1018,40 @@ public JSONObject putCallRatio() throws IOException, SmartAPIException {
10061018 }
10071019 }
10081020
1021+ public JSONObject nseIntraday () throws IOException , SmartAPIException {
1022+ try {
1023+ String url = routes .get ("api.nseIntraday" );
1024+ JSONObject response = smartAPIRequestHandler .getRequest (this .apiKey , url , accessToken );
1025+ return response ;
1026+ } catch (SmartAPIException ex ) {
1027+ log .error ("{} while getting nseIntraday {}" , SMART_API_EXCEPTION_OCCURRED , ex .toString ());
1028+ throw new SmartAPIException (String .format ("%s in getting nseIntraday %s" , SMART_API_EXCEPTION_ERROR_MSG , ex ));
1029+ } catch (IOException ex ) {
1030+ log .error ("{} while getting nseIntraday {}" , IO_EXCEPTION_OCCURRED , ex .getMessage ());
1031+ throw new IOException (String .format ("%s while fetching nseIntraday data %s" , IO_EXCEPTION_ERROR_MSG , ex .getMessage ()));
1032+ } catch (JSONException ex ) {
1033+ log .error ("{} while getting nseIntraday {}" , JSON_EXCEPTION_OCCURRED , ex .getMessage ());
1034+ throw new JSONException (String .format ("%s while fetching nseIntraday data %s" , JSON_EXCEPTION_ERROR_MSG , ex .getMessage ()));
1035+ }
1036+ }
1037+
1038+ public JSONObject bseIntraday () throws IOException , SmartAPIException {
1039+ try {
1040+ String url = routes .get ("api.bseIntraday" );
1041+ JSONObject response = smartAPIRequestHandler .getRequest (this .apiKey , url , accessToken );
1042+ return response ;
1043+ } catch (SmartAPIException ex ) {
1044+ log .error ("{} while getting bseIntraday {}" , SMART_API_EXCEPTION_OCCURRED , ex .toString ());
1045+ throw new SmartAPIException (String .format ("%s in getting bseIntraday %s" , SMART_API_EXCEPTION_ERROR_MSG , ex ));
1046+ } catch (IOException ex ) {
1047+ log .error ("{} while getting bseIntraday {}" , IO_EXCEPTION_OCCURRED , ex .getMessage ());
1048+ throw new IOException (String .format ("%s while fetching bseIntraday data %s" , IO_EXCEPTION_ERROR_MSG , ex .getMessage ()));
1049+ } catch (JSONException ex ) {
1050+ log .error ("{} while getting bseIntraday {}" , JSON_EXCEPTION_OCCURRED , ex .getMessage ());
1051+ throw new JSONException (String .format ("%s while fetching bseIntraday data %s" , JSON_EXCEPTION_ERROR_MSG , ex .getMessage ()));
1052+ }
1053+ }
1054+
10091055 public JSONObject oIBuildup (JSONObject params ) throws SmartAPIException , IOException {
10101056 try {
10111057 String url = routes .get ("api.oIBuildup" );
0 commit comments