Calculate your SIP ReturnsExplore

Rule based trading for traders using Angel One SmartAPI

05 August 20226 mins read by Angel One
Rule based trading for traders using Angel One SmartAPI
ShareShare on 1Share on 2Share on 3Share on 4Share on 5

Rule based trading has started gaining traction amongst retail investors fairly recently in the Indian stock market landscape. A few years earlier, the interest in Rule based trading was limited to institutional investors, which deployed cross-skilled teams of developers and market experts to leverage its applications. Today, however, the story has changed. Open APIs built along international development standards are fostering innovation in the Rule based trading space for retail investors and new-age traders are exploring opportunities in this space on their own. Leading stockbrokers like Angel One have played a part in this shift too. 

So how can you make your own trading smarter, and can you do Rule based trading too? Let’s check out.

Understanding APIs

APIs or Application Programming Interfaces are simply a set of rules that decide how one or more applications talk to each other over the internet, or even locally, inside your own computer. APIs have made it easy for developers to send and receive data to and from applications, the code and architectural complexity of which is beyond their grasp. Consider a trading platform that executes the orders of a million investors concurrently, throughout the day. You are unlikely to understand the code that makes up such an application. Still, it would be useful if you could send your own trade to such a platform from your own desktop application, right?

SmartAPI is an API that makes this possible, in addition to a whole lot of other things. SmartAPI is basically a collection of functions that make Rule based trading possible. Let us look at some of the main features of SmartAPI, after which we will talk about how you can set up your own personal rule based-trading desk with the use of SmartAPI.

SmartAPI: The key benefits for retail investors and traders

SmartAPI is made for retail investors with varying levels of technical expertise. Whether you are a pro at writing codes, or a novice who simply reads about various technologies on weekends, SmartAPI is documented in a manner that can be understood by you. Of course, with some self-learning and effort, which is also the key to becoming a successful trader, right?

First of all, SmartAPI is available free of cost, which means that you can make your everyday trades smarter by making use of Rule based trading. In Rule based trading, you basically write algorithms that code your go-to market strategies – what SmartAPI does for you, is to supply your applications with real time and historical market data, and taking care of executions of trades through Angel One’s very own trade execution platform. All that you need to focus on, is to encode your market strategies into algorithms that create signals based on market conditions. 

SmartAPI: A quick how-to

Working with SmartAPI is incredibly simple. You can lay the groundwork for Rule based trading within a few simple steps:

  1. Log on to the SmartAPI website at and sign up for free.
  2. Next, when you log in, you will see the SmartAPI dashboard. From here you can proceed to create an app – apps can be of different types, for serving different purposes. For example:
    1. Market feed API: This type of app will help you feed live market data on stocks into your application
    2. Trading API: This app will help you execute orders in real time, access market data, manage your portfolio, etc. – read complete trading functionalities.
    3. There are other types of APIs too, that help you access historical data, or add functionality to your local or web-based applications
  3. After selecting your application type, add your redirect and postback URLs. 
  4. Once you have added the details, click submit, and you are all set!

After completing these steps, your API is up and running – you get a pair of keys that are used to verify communication between your application and Angel One’s execution engine. Setting up an API is that simple with SmartAPI. For retail investors, getting started with Rule based trading was never this easy. 

Roadmaps for building your first Rule based trading app

Rule based trading requires you to first code your strategy into actionable steps that the computer should take, based on the data that it has been provided with. Once your algorithm is built, you need to test this algorithm on historical market data to gauge its efficacy and performance. This is called backtesting. This is when you make tweaks, in case the results are not as you expected them to be. Following this, you can take a variety of approaches to improve your algorithm too – this would ideally be a machine-learning based approach, which can bring improvements to your algorithm depending on its experience in the market. 

With Rule based trading, the possibilities are endless. Why not try out if it is for you today? Log on to our website , sign up for free today and start discovering the endless possibilities of Rule based trading.

‘Investments in securities market are subject to market risks, read all the related documents carefully before investing.’

Open Free Demat Account!

Enjoy Zero Brokerage on Equity Delivery

Join our 2 Cr+ happy customers

Enjoy Zero Brokerage on Equity Delivery
Enjoy Zero Brokerage on Equity Delivery

Get the link to download the App

Send App Link

Enjoy Zero Brokerage on
Equity Delivery