API, SDK, WebSockets & List of Brokers in India That Support Algo Trading
Learn about API, SDK, WSS and Get a Comprehensive List of Brokers
Hi There ๐, Algo-Trading is just picking up in India. Almost every discount/traditional brokerage house wants to grab this market by offering innovative products and robust APIs for order executions, market feeds, etc.
This has led to a boom in the number of broking firms offering their API services. This article aims to cover most brokers in India offering this service and give you a comprehensive view of what they offer and how they can be of use to you.
But before we get started, you need to understand some methodology related to this topic; you might have read the technical version of each word below, but here is my attempt to explain this from a Finance point of view.
API (Application Programming Interface)
Let's think of a traditional bank like the State Bank of India, you walk into any branch in the country, and you see multiple desks within the branch. For a minute, think of these desks as a gateway, your gateway to access new financial products or conduct transactions. If you need to deposit money, sure go to the bank teller gateway; you need to enable online banking and go to the support gateway, similarly, you need to open a safe deposit box, you go to that relevant gateway within the bank. All these gateways are just endpoints that you need to call to access information or post information to them. Yes, that's an API. Very, very simple. You do not need to do anything more.
*Technical Representation of an API on how it act's as a gateway. * Source: Medium
SDKs (Software Development Kits)
An SDK in technical terms serves as a wrapper around an API, what this means is, an API is just a gateway, BUT, an SDK is a tool that contains all the various gateway and can easily be used by developers for use in their code/software.
In real life, think of a Relationship Manager (RM) from SBI (considering you have the luxury of having one RM), this RM acts as an SDK for you, you need any help related to the bank, you deal with the SDK who in turn would deal with all the API gateways.
SDK is available in multiple languages like Python, Go, Rust, PHP, .NET, it depends on the broking house on which languages they prefer for their clients. You are also always welcome to create your own SDK in any language you want.
WebSockets
You might have heard of the word Ticker Tape which was an actual thing in the 1990s; the stock prices would be printed on this tape and would be streamed to all brokers who had a subscription. It used to look something like this.
Source: Pinterest
Websockets is just a digital version of Ticker Tapes; a WebSocket is basically a connection between us and the broker servers where we request the continuous stock prices information to the server, and it responds with a continuous stream of prices until the broker or client stops the connection.
Most of the Algo-Trading strategies would rely on live stock prices and use WebSockets to get that live prices stream and use it to satisfy their strategy conditions and place orders. If a particular broker does not provide a WebSocket feed, you will have to arrange your own feed to run strategies which can be very inconvenient and expensive.
List Of Brokers with APIs
Before the list, Disclaimer: I do not work for any broking entities mentioned below, and nor is this any recommendation or affiliate marketing. This information is for your reference purpose only.
Every Broker Name below is hyperlinked to the relevant API page, and there is no monetary benefit to Trade With Python.
Just so you know, the table is scrollable horizontally, some columns might be hidden based on your screen size.
Broker | API | SDKs | Websockets | Charges |
5Paisa | Trading API | Python | ||
NodeJS | ||||
Go | No | Nil | ||
Abstox 1 | Trading API | |||
Market Data API | None | Yes | Nil | |
AliceBlue | Trading API | Python | Yes | Nil |
AngelBroking | Publisher API | |||
Trading API | ||||
Market Feeds API | ||||
Historical Data API | Python | |||
Java | ||||
NodeJS | ||||
R | ||||
Go | Yes | Nil | ||
Composite Edge 1 | Trading API | |||
Market Data API | None | Yes | Nil | |
Fyers 2 | Trading API | |||
Market Data API | Python | |||
NodeJS | Yes | Nil | ||
ICICI Securities | Trading API | None | No | Nil |
Kotak Securities | Trading API | Python | No | Nil |
MasterTrust 3 | Trading API | Python | ||
NodeJS | No | Nil | ||
SS Corporate Securities 1 | Trading API | |||
Market Data API | None | Yes | Nil | |
Trade Smart | Trading API | None | No | Nil |
TrustLine 4 | Trading API | None | No | Nil |
Upstox 5 | Trading API | |||
Historical Data API | Python | |||
NodeJS | Yes | 750 INR | ||
500 INR | ||||
Zebu | Trading API | None | No | Nil |
Zerodha | Trading API | |||
Historical Data API | Python | |||
Java | ||||
PHP | ||||
NodeJS | ||||
C# | ||||
.NET | ||||
Go | ||||
Rust | ||||
C++ | Yes | 2000 INR | ||
2000 INR | ||||
ShareKhan | Trading API | None | No | Nil |
TradeJini | Trading API | None | No | Nil |
Samco | Trading API | Python | ||
Java | ||||
NodeJS | Yes | Nil | ||
IIFL Securities | Trading API | Python | ||
NodeJS | ||||
PHP | ||||
Rust | ||||
C# | ||||
Java | ||||
VB.Net | No | Nil | ||
Finvasia | Trading API | C++ | ||
Java | ||||
.NET | No | Contact Them |
[1]: The broker is utilizing Symphony Fintech APIs
[2]: Fyers provide Historical/WebSocket Market Data API via TrueData vendor, which has a subscription fee.
[3]: MasterTrust website mentions they have SDKs, but I couldn't find them. TradeLab has developed its API
[4]: API developed by TradeLab
[5]: Upstox API is currently under Beta Development
List of Brokers with no API but that support Algo Trading via 3rd Party Platforms
A few days back, I wrote about the low-code/no-code trading platforms in India which give retail investors the power to create/backtest/deploy their strategies without any knowledge of coding. All of the above brokers (who have APIs) are supported by at least one low-code platform mentioned in that article which you can read here.
The below list of brokers do not have their open APIs, but if you have an account with them, they still allow you to Algo Trade using TradeTron. They might be supported by other low-code platforms as well, please feel free to mention them in the comments, and I will update the article.
That's it, Folks โ I spent a significant time researching and collating information for this article. Apologies in advance if there are any factual errors within the article, but I would be grateful if you can point them out in the comments below or using the Contact Us page on this blog.
If you run a brokerage house and also provide Algo-Trading service, do give me a shout, and I will be more than happy to add you to this article. ๐
Again, I would be more than happy to listen to you for some **feedback **and any ideas on future articles/content; I thank you for being a reader of TradeWithPython. If you would like to get in touch with me, please send a message or schedule a call via TopMate.
To support me for all the effort to create this content, consider buying me a coffee โ by clicking here or the button below.