The National Stock Exchange has released the Online Trade Inquiry Service (NOTIS) APIs to allow their trading members to view their daily trade reports.
Chanakya Trade Report is a free open source software created by Infotech Financials Pvt Ltd which uses the NOTIS API to display daily trade reports of Equity, Derivatives and Currency markets. It is a desktop application that requires members to input their username and tokens assigned by NSE in order to function.
- Members can view trades and actions report in real time.
- Reports have information of three market segments: cash, derivatives and currency
- Totals of buy/sell trades and other calculations available
- Reports can be downloaded as csv files and can be edited in Excel.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
.NET Framework Runtime 4.7.2 or higher.
Windows 7, 8, 8.1 and 10
.NET Framework 4.7.2 or .NET Framework 4.8 (latest)
Visal Studio 2019 IDE (any edition)
For development: Install Visual Studio IDE (this will install .NET framework)
For running app only: Install .NET Framework Runtime to run this app exe only.
- To run the application and download Trade data, the machine's Static IP must be configured with exchange.
-
Run the Chanakya-Trade-Report.exe file created in the Release folder under the bin directory inside the project folder.
Example : D:\Infotech\Chanakya-Trade-Report\Chanakya-Trade-Report\bin\x64\Release\Chanakya-Trade-Report.exe -
Copy the Release to the desired windows machine whose Static IP is configured with exchange and run the Chanakya-Trade-Report.exe file.
-
Download setup installer from Releases and install the application on the machine.
Start Chanakya Trade Report application using the option in Start Menu or by double clicking on Desktop shortcut.
- Open the project in Visual Studio and Build the program.
- Run the Chanakya-Trade-Report.exe file created in the Release folder under the bin directory inside the project folder.
- Enter required login and configuration details in settings window for trade data.
- Trade data and total calculations will be displayed in the window.
- Login
- Settings
- Trade Report Window
- Important Files
- App Settings File
- Trade Download File
- Error Messages
- Notes
Select Market ID from the dropdown and enter proper user details.
The Username and Password is currently configured in code.
These details will be used to communicate with exchange to request and receive trade data.
The Key
and Secret
field values will be received from exchange and will
be used to acquire access token from exchange.
If Access Token already generated it can be used in Access Token field.
Login URL
: This URL will be used to send request for Access Token.
Trade URL
: This URL will be used to send request for receiving Trade
data.
Trade Data Directory
: This location in the system will be used to save
Trade.txt files.
The Browse
button will provide a dialog box to select a folder.
Trade Interval
: This is the time interval in seconds between trade
download request sent to exchange.
Records Limit
: This value will show the number of Trade entries in the
table.
Actions URL
: This URL will be used to send request for receiving
Actions data.
The Debug
checkbox if checked will create a file in which all json
request and responses of a session will be saved for debugging.
All
Checkbox : To receive data for all trades.
TM
Checkbox : To receive only data of clearing members.
Trades
Checkbox : To receive trade data.
Actions
Checkbox : To receive actions data.
Old Format
Checkbox : To save trade data in old Trade.txt format.
New Format
Checkbox : To save trade data in new format in API.
On updating these settings the values will be saved on the system and will be loaded automatically from previous session when app restarts.
This window will display the downloaded trade data in a table.
Following fields are displayed in the window:
Total Buy Value
: Total value of trades on buy side.
Total Sell Value
: Total value of trades on sell side.
Total Trade Value
: Total of buy and sell value.
Total Trades
: Total of buy and sell traded quantity.
Total Count
: Total number of trade entries received from exchange.
Last Updated
: Latest time at which the Trade.txt file is updated.
Refresh Button
: To reload table data.
The log files are generated as per market selected in login along with date in name.
These files will be generated in the same folder where application is installed.
Example:
C:\Users\mseva\Desktop\Chanakya-Trade-Report\log-FO-2021-06-17.txt
This sequence number
of latest trade received and the message Id
of last
request is saved in a file so that if the application is closed during a
session it could be used when app restarts.
This file is created as per market segment along with date in the name.
Example: C:\Users\mseva\Desktop\Chanakya-Trade-Report\last-FO-seq-no-15062021.txt
File Data: 453659,2
Here 453659
is the last received trade sequence number and 2
is the
message Id used to make the download request.
The user settings in the application are saved in a file and loaded when app starts.
This file is located in the same folder where application is installed.
The data in this file is saved in XML format.
The trade data will be downloaded to files at the folder location specified in settings window.
The file name will contain market type and date.
Example :
If the folder mentioned in settings window is named Trade Data in Desktop directory :
File path โ
For Future & Options market:
C:\Users\mseva\Desktop\Trade Data\TradeFO_02062021.txt
For Cash market:
C:\Users\mseva\Desktop\Trade Data\TradeCM_02062021.txt
The error messages will be shown using message box popups and the detailed error will be added in the log file.
-
The trade interval time in settings should not be less than 30 seconds as currently mentioned by the exchange. Failing to obey this rule shall make them remove user from whitelist.
-
Do not move or delete the Trade.txt file generated when application is running.
-
For restarting app to download from 1st trade kindly move the downloaded Trade.txt files and last received sequence number files from setup folder to different location.
-
Do not edit or remove any other files present in the setup folder.
- Go to Github repository link of project on web browser.
- You will see a Code with Download sign button. Click that button.
- A https link will be displayed this link will be used to clone the project.
- Open Visual Studio go to Team Explorer tab there you will see clone option link.
- Click that link it will ask for remote repository link.
- Paste the copied link from web browser and press enter.
- The project will be downloaded on local machine.
- Another option to clone project is by using Github Desktop application. On clicking the Code with Download sign button on browser you will also see Open with Github Desktop option.
- On clicking that option Github Desktop application will open and display a window where to download the project.
NOTE: You can also download the source code as zip file and open the project in Visual Studio on your machine.
This project is licensed under the Microsoft Public License (MS-PL) License - see the LICENSE.md file for details
If you just have some feedback or suggestions you can create an issue, start a discussion or email us directly at [email protected]