FlatTrade Account
If you want to open account with Flattrade kinndly use this link https://openaccount.flattrade.in/O_FT038256
Donate
If you like my codes, consider for a donation. UPI details given in right side tab and in my telegram channel
Instructions
Amibroker API Integration read this post and follow the instructions.
Live Updates/instructions will be given in the telegram channel EasySimpleTradeUpdates
Join falttrade official telegram group @FlattradeAPISupport to get offical support
FlatTrade API
Get API from from Flattrade . Watch this video . Only for API . For Login and Orders new AFL available.
Login Script
From C:\API folder, open Flattrade Login 1.py file in IDE or in notepad.
Change your credentials with in the quotes. Change User ID, Password, TOTP Key, API Ket and API Secret . In the login_file drive letter R is the RAM disk drive letter. check this you are also using the same. It can run by from IDLE run module or double click to Execute. In Limits file no need to change anything. Limits file can run from Amibroker only.
Apply Flattrade Dasboard.afl on chart. You can apply on background sheet also like Sheet 2, Sheet 8 etc.
Check Parameter C:\API\ Driver letter and Folder Name are same as yours.
Scrip Master
For Backfill and Live we need to create ScripMaster.csv , which have a symbol list with exchange, symbol , token. For stocks equity/futures, we need to create NSEEquityList.csv which have symbol name. Sample is given in API folder. For Index and MCX, input can give in parameter of scrip master afl. Then click respective button. It create a csv file ***Master.csv. Then do this for all required symbols. Then click join files. Now all ***Master.csv are combined and new file created as ScripMaster.csv . This is the token list we use for historical data and live data. This exchange token is same for all broker. I think Fyers and zerodha have different .
The next version Scrip Master have more features. It is under development. It import expiry data, exchange, lot size, strike difference etc to Amibroker. It is useful for all options users even you not use my datafeed or order place. Currently in options order afl, manually we give them. With this new scrip master, no need for that.
To use stock options, you need to add points between strike in "Point Value" . Upcoming scrip master do this. Before that you need DM me. Then create a watchlist which symbols you want to add options symbols. Then apply ExportStrike afl. ( Batch script download this afl also, if not download from GitHub) Apply on analysis. Select the watchlist. Set number of strikes in parameter. I think 0 give only atm. First click explore. Check all columns ok. Then click scan. It create Options list.csv in API folder. Now ScripMaster afl, click stock options. Then click join files.
Now you can backfill , Historical Data and Live Feed.
Backfill or live feed data go to opened database. So, if other data feed open, if live feed script running or strat backfill script, it will get filled.
Backfill
if you click Start Feed and it come like this, it is ok, tomorrow you are ready for live feed. to stop datafeed, just close the cmd window.
if you want Pre Market data, disable these two lines by put # at start of the line. it gives 9:00 and 9:07 tick for stocks. For Nifty and Sensex, 9:00 to 9:07 continuous candle