From 72611006344acd991d5ed55afcc3aa98a7fdfe46 Mon Sep 17 00:00:00 2001 From: Randhir Kumar Date: Sat, 30 Sep 2023 12:02:02 +0530 Subject: [PATCH] Some minor changes: - Deleted the /.idea folder as all devs don't use IDEA editor, and it shouldn't be checked into the Source Control - Updates in Sample file: - Added a log_path variable where a user can update based on local path - Modified an outdated symbol (HDFC) --- .idea/.gitignore | 2 -- .idea/fyers-api-sample-code.iml | 8 -------- .idea/inspectionProfiles/profiles_settings.xml | 6 ------ .idea/misc.xml | 4 ---- .idea/modules.xml | 8 -------- .idea/vcs.xml | 6 ------ .../Sample_Test_trading_Data.py | 11 +++++++---- 7 files changed, 7 insertions(+), 38 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/fyers-api-sample-code.iml delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml delete mode 100644 .idea/misc.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 5c98b42..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Default ignored files -/workspace.xml \ No newline at end of file diff --git a/.idea/fyers-api-sample-code.iml b/.idea/fyers-api-sample-code.iml deleted file mode 100644 index c444878..0000000 --- a/.idea/fyers-api-sample-code.iml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2d..0000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index a2e120d..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 731694d..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/My API Sample Script(GET STARTED)/Sample_Test_trading_Data.py b/My API Sample Script(GET STARTED)/Sample_Test_trading_Data.py index 0a4456a..fbf2f86 100644 --- a/My API Sample Script(GET STARTED)/Sample_Test_trading_Data.py +++ b/My API Sample Script(GET STARTED)/Sample_Test_trading_Data.py @@ -61,7 +61,10 @@ 1. accessToken : this is the one which you received from above 2. client_id : this is basically the app_id for the particular app you logged into """ -fyers = fyersModel.FyersModel(token=access_token,is_async=False,client_id=client_id,log_path="/home/downloads/") +# Action: Replace the log path here +log_path = "C:/Projects/Fyers API App/fyers-api-sample-code/My API Sample Script(GET STARTED)/logs" + +fyers = fyersModel.FyersModel(token=access_token,is_async=False,client_id=client_id,log_path=log_path) ### After this point you can call the relevant apis and get started with @@ -135,13 +138,13 @@ "takeProfit":0 }, { - "symbol":"NSE:HDFC-EQ", + "symbol":"NSE:HDFCBANK-EQ", "qty":1, "type":2, "side":1, "productType":"INTRADAY", "limitPrice":0, - "stopPrice":0 , + "stopPrice":0, "disclosedQty":0, "validity":"DAY", "offlineOrder":"False", @@ -231,7 +234,7 @@ ## Historical Data -data = {"symbol":"NSE:SBIN-EQ","resolution":"D","date_format":"0","range_from":"1622097600","range_to":"1622097685","cont_flag":"1"} +data = {"symbol":"NSE:HDFCBANK-EQ","resolution":"D","date_format":"0","range_from":"1695843000","range_to":"1696012140","cont_flag":"1"} print(fyers.history(data))