This information is correct on 18.02.2023, SmartAPI MAY change their API.
Settings
For proper working of the programm, firstly you should create settings.txt file in root of programm. Fill it with format of example below:
API_KEY:####;ID:####;PASSWORD:####;OTP_CODE:####
You may change the way of programm getting settings by changing InitSettings
class in settings.py module.
Using
After making settings.txt file you`ll start main.py and every 3 minutes you will have updated .txt files of OPTIDX data in root of your programm. Each file have time of last update in first row, and contains all data provided about option.
Example of output data:
19:45:32
key:value/key:value/key:value/.../key:value
key:value/key:value/.../key:value/key:value
key:value/.../key:value/key:value/key:value
Change the format of data
To change the format of saved data you have to go into output_processor.py and change method parse_options_data_into_string. It gets python dictionary with format below:
{
"CE":{
}"PE":{
}
}
CE is Call data; PE is Put data. Each have the dictionary of properties from Instrument list and WebSocket2.0 merged.
Instrument List - https://smartapi.angelbroking.com/docs/Instruments
WebSocket2.0 - https://smartapi.angelbroking.com/docs/WebSocket2
All the properties you can check in the SmartApi documentation in part about WebSocket2.0 (Snap Quote).
Change the way programm saving data
To change the way programm saving option data you have to go into output_processor.py and change method _push
in it. This method is working with options_store_key_name
dictionary where you have this structure:
{
"BANKNIFTY":{
"SYMBOL1":{
"CE":{},
"PE":{}
}
"SYMBOL2":{
"CE":{},
"PE":{}
}
}
"NIFTY":{
"SYMBOL1":{
"CE":{},
"PE":{}"
}
"SYMBOL2":{
"CE":{},
"PE":{}"
}
}
...
}
angeloneoptionchainsmartapi's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.