Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .idea/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/fyers-api-sample-code.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

11 changes: 7 additions & 4 deletions My API Sample Script(GET STARTED)/Sample_Test_trading_Data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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))

Expand Down