Please provide a sample code for python
Please provide a sample demo code in python how to use it to connect to trading API. I want to build automatic order placing based on time and indicators. Thanks, Subash
Hi Subash..!! We have developed two python packages for connecting to trading APIs. You can explore both of them. The pypi package can be found at https://github.com/IIFLSecurities/TradingAPIs/tree/master/IIFLapis and https://pypi.org/project/IIFLapis/. The python Django module can be found at https://github.com/IIFLSecurities/TradingAPIs/tree/master/python You can use the package you are comfortable with. They have instructions in Readme.md file for setting up.
hello, sir installed IIFLapis but could not find keys.conf file and for Django, seems instruction are given for install on Linux machine can you please update for windows too!. please advice
Dear @preetparm, For Django version, you can follow below mentioned steps:
- Install Python (Refer https://www.python.org/downloads/).
- Download Django code into your directory.
- Install requirements through command: pip install -r requirement.txt (This command should be run at the location where requirement.txt is located)
- After successful installation, run the application by command: python manage.py runserver 0.0.0.0:8000 (this command should be run at the location where manage.py is located)
- Import insomnia.json file into the insomnia. (This step has pre-requisite. You need to have insomnia installed in your system)
- If you want to run the apis directly without insomnia in your environment, you can use URLs structured like localhost:8000/api/LoginRequestV2/. Base URL will be localhost:8000/api/ for all the APIs. Only method name will change in the URL. For reference, please go through insomnia.json (https://github.com/IIFLSecurities/TradingAPIs/blob/master/python/Insomnia.json).