Authorized .NET API
-
Hi all,
@HowUTrade has released a .NET Library for Upstox API.
You can access the API docs at https://howutrade.in/docs/upstoxnet
Download the library at https://howutrade.in/downloads/upstoxnet
Download Sample Excel Workbook built with UpstoxNet at https://howutrade.in/downloads/upstoxnet/upstoxxl
Download Sample Dot Net App built with UpstoxNet at https://howutrade.in/downloads/upstoxnet/sampleapp
Excel Settings & Setup Guide: https://howutrade.in/docs/upstoxnet/guide/Troubleshooting and Reference Links:
Upstox API : https://upstox.com/forum/topic/404/diff-between-historical-and-interactive-api/2
UDF List : https://upstox.com/forum/topic/415/udf-list/2
Login Issue : https://upstox.com/forum/topic/411/troubleshooting-login-issue-with-webbrowser-control-upstoxnet/1
Excel Bit : https://upstox.com/forum/topic/150/finding-out-the-excel-bitness/1
Restrict Multiple Order : https://upstox.com/forum/topic/190/restrict-multiple-order-firing-in-excel/1
Login Button Not Working : https://upstox.com/forum/topic/342/setting-login-buttons-are-not-working-not-able-login-to-excel-api/10
Virus Alert : https://upstox.com/forum/topic/354/howutrade-net-library-contains-virus/2This library is just a wrapper built around the Upstox API.
It supports all methods of Upstox API and wraps all the raw HTTP calls as simple functions. All JSON responses are parsed in the background and user is provided with data that's ready to use for analysis.
Getting streaming quotes is made easy with this library and all heavy load WebSocket processing are done in the background. The user is provided with just live quotes.
Dependencies
Newtonsoft.Json
Websocket4Net.JsonThis library is COM enabled, so you can directly call this library from external applications like Excel etc.
Main Features
- Inbuilt Webbrowser Control for login flow
- Supports RTD Server to get live quotes in Excel
- Separate Methods to Place Orders in Simple, OCO & CO
- Automatic reconnection of WebSocket in case of network failure
- Update Events to get notified on Live Quotes, Orders, Positions and Trades
Login Flow
Users have the option to choose either the inbuilt web browser control or can login in their own browser.Steps:
- Call
Login
method to get access code - Call
GetAccessToken
method to get access token - Call
GetMasterContract
method to download symbols.
Once the symbol is downloaded, you can all other methods.
Note: Symbol download is mandatory
You can check the symbol download status from the
symbol_download_status
property.
The first login of the day will take little bit time as the symbols are downloaded from the Upstox server.
Every subsequent login will be fast since the symbols have already loaded.The symbol download is mandatory, because this library validates your request (like place order etc) for invalid details and throws exceptions if any. You can catch the exception and will be useful to debug your code quickly. So only valid requests are processed and sent to the server.
How to install
To use with Excel
Just download the EXE file from above and extract it to any folder. It will automatically install the required libraries to get you started.To use with Visual Studio
Just download the Zip file from the link above and extract it tobin
ordebug
folder of your project.
Add reference toUpstoxNet.dll
.Sample Excel Sheet
A sample Excel sheet in the ZIP file which uses theUpstoxNet.dll
is included in the ZIP file.
The entire trading platform functionality has been brought inside Excel. All method/functions have been wrapped in as User Defined Functions. The user can call this function directly from within the cell. The user can use this excel sheet as a base to make her/his own strategies.RTD Server Details
The Syntax for Excel RTD Function is
RTD (ProgID, ServerName, Topic1, [Topic2])
ProgID
- Upstox.Rtd
ServerName
- Blank
Topic1
- Ticker in the following format:[TRADESYMBOL].[EXCH]
(ex:AXISBANK.NSE
,NIFTY16DECFUT.NFO
,SILVERM16NOVFUT.MCX
)
Topic2
- A supported price field (listed below)Supported Price Fields
- TICKER
- LAST
- PCTCHG
- NETCHG
- LASTSIZE
- BID
- BIDSIZE
- ASK
- ASKSIZE
- AVGPRICE
- VOLUME
- BUYQTY
- SELLQTY
- OPEN
- HIGH
- LOW
- CLOSE
- OI
- SPOT
- LOWERCKT
- UPPERCKT
Do feel free to reach out to @HowUTrade for any support or questions!
-
@shrini.viswanath
Unable to download the file from https://howutrade.in/docs/upstoxnet/html/upstoxnet.zip
-
Can you please upload a short sample code for using the DLL in VB.NET
Thanks
-
@amul_baby
You can download the sample .Net Project from hereRequirements:-
VS 2012 or Later
.Net Framework 4.0 or Later
-
@howutrade
Thank you howutrade
-
@HowUTrade
hey, there is update, thanks
nice look
and also fetching functions (posoitions, funds status) very fast, how it possible
may i know whats new in this update? kindly let us know
Thanks 'How u Trade' team
-
@251433
Only Excel UI is changed, Library is being updated.
We plan to release it on Monday.
Main features in the coming release;- Market Depth Window for Excel Users.
2.Real Time MTM & Net Qty through RTD (Application Calculated based on trades, not from server. But work good as long as you receive order updates correctly).
3.Custom Tag to Identify Order Id
4.Other Utilities Function.
5.Implementing best algorithm for fast performance and optimization
- Market Depth Window for Excel Users.
-
@HowUTrade
When Can we expect a c# sample code?