API Comparision


#1

Hi Traders,

Side by Side comparison of Nest Plus API / PiBridge / Kite Connect API.


How to stream realtime quotes using PiBridge
What is KITE API?
Difference between Pi Bridge and Kite Connect
#2

Great post. Thank you !


#3

What is the reason for 1/10th the troughput of Kite order placement ? Meaning - using COM its 40 orders/second while with Kite its only 3/second. I would have assumed it would be opposite given Kite API is more native. Anyways - can a trader in consultation with rainmatter increase the throughput ?


#4

@abbanerjee

The difference is basically depends on how the API is connected to other end.
You can refer the images below and 3/s throttle limit is restricted by Kite Admin(Zerodha) and they can increase the limit (drop a mail to talk@rainmatter.com).Even if they entirely removed the limitation on kite, still I feel that you may not able to place large number of orders in a second like PiBridge/Nest API.

Layout

Latency


#5

Nice post. Thanks. But I am using KiteConnect API during the market opening hours 9:15-9:30 the latency is very high you can post one order at most in a second. other doesnot pass through. even after the single order is placed if you do a query on the order status it returns null as if the order havent gone through it takes around 5-6 secs to reflect sometimes if you try to check the order status from kite.orders


#6

@trader29 You are true.

I’m also facing such issue and sometimes even order is getting rejected.
The reason is that Zerodha OMS (TR) unable to handle the request during volatility.
I always say
**Many Brokerage Firm has Large Client base But Zerodha ® Zerodha Only has Large Active Client Base.**means some X Broker may have 10 lacs client base but only very few say 5000 or 10000 may trade, but in Zerodha almost all of their clients actively trading.

@nithin has already explained in a discussion that their OMS (TR) has capacity to handle only 1000 request/sec.

So here is what happening during volatility.
Suppose at 11:10:15, some bad news out and people are reacting to that news which resulted in increased volatility.(Here, I’m considering only Zerodha Clients and Just taking 2 seconds)

11:10:15 | 15000 Orders Placed (by different zerodha clients on different stocks)
11:10:16 | 10000 Orders Placed (assume that the 10000 Orders include your order and it is the last order i.e 10000th Order)

Since zerodha OMS (TR) has capicty to handle only 1000 request/sec.
Order Execution as follows;
All Order Requests are processed as FIFO (First In First Out)

11:10:15 | 1000 Orders Processed
11:10:16 | 1000 Orders Processed
11:10:17 | 1000 Orders Processed
11:10:18 | 1000 Orders Processed
11:10:19 | 1000 Orders Processed
11:10:20 | 1000 Orders Processed
11:10:21 | 1000 Orders Processed
11:10:22 | 1000 Orders Processed
11:10:23 | 1000 Orders Processed
11:10:24 | 1000 Orders Processed
11:10:25 | 1000 Orders Processed
11:10:26 | 1000 Orders Processed
11:10:27 | 1000 Orders Processed
11:10:28 | 1000 Orders Processed
11:10:29 | 1000 Orders Processed
It took almost 15 seconds to process all 15000 order requests placed at 11:10:15

11:10:30 | 1000 Orders Processed
11:10:31 | 1000 Orders Processed
11:10:32 | 1000 Orders Processed
11:10:33 | 1000 Orders Processed
11:10:34 | 1000 Orders Processed
11:10:34 | 1000 Orders Processed
11:10:35 | 1000 Orders Processed
11:10:36 | 1000 Orders Processed
11:10:37 | 1000 Orders Processed
11:10:38 | 1000 Orders Processed
It took almost 10 seconds to process all 10000 order requests placed at 11:10:16
Your Order Placed at 11:10:16 might have executed at 11:10:38 (After 25 Seconds)

Everything has default timeout/Expiry after that it goes worthless and so in our case,connection to zerodha server.All our terminal and API’s are using TCP/IP for communication which has default timeout (Appx 30Sec).

If there are more order requests are pending before your request and if it takes more than 30 sec to process the pending orders, then most probably connection will timeout and result in rejection of your order or error. Another way to understand is if 30000 requests are pending before your request, then your request will be rejected or will not be processed or will not be honored.

The above example is just for illustration.
But in real, during volatility, more and more orders are placed every second and all are put in a very long queue if you are at the end of the queue, then most probably your order will be rejected or executed with delay.(Delayed execution ultimately result in heavy slippage and loss).

Now the question is What is the Solution…?
There is no Immediate Solution to the above issue.
Zerodha is really working hard to fix the issue.
But whatever Zerodha tries(Like Changes in AMO Placement) have only very little effect on the issue

Then…?
The One needs to blame is **TR (Omnesys now Thomson Reuters).**I don’t think that TR is seriously doing anything to fix this issue.Because, the issues are there for very long time.

The permanent solution for this issue is to make the OMS robust to handle more requests/sec (NSE has 50000/s capacity) and it is the TR who needs to do necessary modification or up-gradation of their OMS.

I hope Zerodha is pressurizing the TR, but TR is not responding much or not taking any serious interest.I believe, the TR(their OMS) is damaging the Zerodha Reputation and Good Will.

Even if Zerodha upgrade their Kite Server, Trading Platform (Pi,Kite) and API to high efficient and robust, but still no use until unless the OMS is upgraded. The OMS is the final thing to which all the platform communicates.

The solution is
Either the TR should upgrade their OMS immediately(Not sure, they will do)
OR
Zerodha should build their own OMS(Even if Zerodha has plan, it may take year to build the beta one)

@nithin, correct me if anything wrong in the above.


#7

Thanks for the detailed explanation it made things clear. I made my algorithm bit passive and using sleep(secs) between orders to currently make this work. @nithin also i feel personally that retail users who are trying out the kite API 2000 INR pm is bit on higher side. it may be okay for startups and other fintech companies


#8

With IT Jobs vanishing in thin air we can see more IT Engineers coming to Trading and to Zerodha especially. Thanks to Kite Connect API.

Hope Zerodha will scale up Tech Infra.

Loading charts in Pi also need to speed up that has nothing to do with OMS.


#9

Can someone confirm that Kite API is fully automatic. That is once you issue a trade from the API, no further action is needed on the front end or anywhere ? Also, is there any event callback when the order is autmatically filled ?


#10

@abbanerjee

Yes…

You will get Order Updates in Postback


#11

Okay thanks ! This is awesome … RKSV is semi automatic.


#12

Thanks for the explanation.

I have one doubt, it may be basic one! please answer it,

As given in the slide TA and charting can not be done through API.

But, how it (API) processes the strategies based on technical analysis or indicators which are coded in any of the programming language(Talking particularly about Kite Connect) ?

Or is that the case, for that matter I need to connect through only Amibroker ?


#13

TR means ?


#14

We devloped and used the API and it costed me alot but after 3-4 months we got tired of using it.

Maybe they have improved now but keeping a dealer to place my order manually than system trade is batter for my firm.

-Cs.


#15

@nithin any plan to build ur own OMS?