Example order placement from Excel using Bridge

If you are new to API Trading, then please check out this article ‘Why we need Trade API in short?’ and watch our video’s to know more about API Trading.

If you have not installed Bridge, then refer this article for Hello Kite v2.0 setup and this for Hello Upstox v2.0 setup.

In this article, we have used Kite API to place order from Excel, but the procedure is same for other Broker’s API as well.

You can download the Excel file used in this article from here.

Lets create a simple Buy signal
Buy when Ltp crosses above our input level

'Get LTP
In Cell A1 = LTP

'Input Buy Level
Cell B1 = Your Buy Level

'Generate Signal
Cell C1 = IF(A1>=B1, "BUY", "NOSIGNAL")

'Place Order
Cell D1 = IF(C1="BUY",PlaceRegularOrderBridge( "NSE", "AXISBANK", "BUY", "MARKET", 1, "MIS", 0, 0, "DAY", "LONG", 0, True, "AA", False, "LONG" ),"NA")


Functions supported by Kite Bridge
Functions supported by Upstox Bridge

Video version of this article is available here

If you are new to Algo Trading, then try exploring the strategies at https://codeadvisor.in/code-advisor/. We already have some famous strategies coded in VBA/AFL (like ORB, Levels Breakout, Supertrend etc). You can use these strategies to get started quickly or use as a reference to build your own strategy. We will periodically add new strategies and codes that are available in public domain.

Was this article helpful?

Related Articles


  1. Avatar Gopal Kaushik

    Excel file link given in this article is supported for zerodha, please provide settings changes required for upstox…

  2. Avatar Pratik

    Today only part of my orders got placed from the excel .NET API. Any connectivity issues ongoing? Never faced this kind of issue earlier. Please confirm to identify what went wrong.

Leave A Comment?