Api (over) regulation - SEBI

It looks like SEBI is considering marking all api orders as algos and subjecting them to existing approval/auditing process along with allowing execution only on broker servers.

This looks a major backward step to me, denying something as basic as api access.

And it will probably hit me hard, at least in immediate future, as currently i only trade intraday with a system that i have designed and worked on over many years - from trading it with discretion over Nest (using ahk automation to send orders manuallyā€¦ ) to trading with apis with full automation with my own tools. Automation has allowed me to be more or less free of emotions and also to reduce risk of mistakes and to take many more trades. I doubt that i will be able to execute it manually now, as i place a lot of orders and really do not want to fiddle with broker GUI for sending 2k-3k orders in a year. And trading with jugaad type of workarounds will have risk of something not working on any fine day - not a professional way to trade most of your networth.
Nest is gone from most brokers, and who wants to use it ?

If this happens, it will probably hit many people like me. We can adapt, i can start looking at trading EOD for instance. But all of the work that i have done so far will go to waste and time will be lost in developing something that can be manually executed and in scaling up. And even for discretionary trading, we will be forced to execute manually without being able to have a middleware with internal checks. And i will likely not be able to reach the returns that i get today. STT is already very high, overnight in cash is multiple times more.

3rd party providers providing algos to retail should obviously need some regulatory oversight, but this kind of implementation punishes people like me who know what they are doing, in order to over protect people who dont take the effort. And my trading does not bring any real market risk - individual retail generally does not have that scale.

i sound very negative, but past experience has been that SEBI is indifferent to individual retail trader and that brokers never really take a firm stance in opposing them.

Would Zerodha be really willing to host retail algos ? It sounds impractical. And the approval/audit process looks to be very difficult to implement, esp as systems get refined/changed over time.

Blockquote
6.1. All orders emanating from an API should be treated as an algo order and be
subject to control by stock broker and the APIs to carry out Algo trading should
be tagged with the unique algo ID provided by the Stock Exchange granting
approval for the algo

https://www.business-standard.com/article/markets/sebi-mulls-regulatory-framework-for-algo-trading-by-retail-investors-121120900919_1.html

5 Likes

In todayā€™s era, placing orders via API has become a necessity. Traders are supposed to make the market more efficient, and API helps so much in that. SEBI canā€™t expect an efficient market from manual orders.

SEBI is supposed to be an impartial referee.

Institutions can place orders directly from exchange via LAN, probably 1 millisecond. What about normal retailers?

Do they just want institutions to do trading, is that it? No place for the small guy?

I did not understand exactly all the technical implications of this article, just expressing my opinion. I hope, If something like this was to happen, where we wonā€™t be able to place API orders easily, Zerodha will stand up for us.

4 Likes

With this proposal to equate APIs with Algos, am now convinced SEBI is working to finish off the indian fintech industry in general. Not to mention the general public notion that they lean towards big boys and elite media that covertly supports them (e.g. https://twitter.com/suchetadalal/status/1448532658812698627)ā€¦ all in the name of protecting investors.

Consider these sample API dependent apps:

  1. an app that monitors live quotes and sends mobile notifications to its users when conditions are met. (there is no algo trading here)
  2. an app that fetches historical data and compute a fair price using its own pricing model (there is no algo trading here)
  3. an app that presents a visually creative and insightful dashboard based on the users recent trades with clearcut success charts (there is no algo trading here)

A whole ecosystem is poised to go down due to these nitwits in high offices pretending not to know the difference between API access and Algo trading.

Instead of identifying and bringing in the unauthorized algo sellers who advertise openly, SEBI is shifting its own responsibility by putting the onus onto brokers in particular and exchanges in general. Merely covering its incapacity to propose a system wherein algo creators can formally be made a legitimate part of the system, independent of brokers or exchanges.

Again, even on the point of using API for placing orders, one could simply be using a script for that LONE purpose only as it is the best method for quickly sending orders to the exchanges to minimize slippage and bid ask spreads (Manual entry takes at least a minute to two, affecting PnL at both legs).

When big boys can place orders with colocation, DMA access and the like in less an millisecond (and they dont have stringent margin requirements, sometimes none)ā€¦ why shouldnā€™t a retail investor (with all the risk management at the brokers end present) be disallowed API for trading? Who has the higher risk profile for runaway trades? Has the SEBI working committee considered who has been responsible (institutions or retail) for flash trades and crashes in the pastā€¦ before lazily proposing to brand all API trades as Algo trades with such lack of shame in displaying their callousness or ill-suited credentials for the post they hold.

Every services is going API way and these characters want to walk backwards on the advice of half baked journalists prodded clandestinely by big boys cartel.

4 Likes

First of all as in the proposal we can send our views to SEBI before 15 Jan 2022

image

  1. NSE started collocation scheme in 2010 ā€œIn keeping up with the global trends and in continuation of service excellenceā€. Software deployed on collocated servers today execute transactions in ns (ms was in the past). They get information much before the retail segment and sit so close on the data distribution chain that they gain an inside edge over the retail. APIs will allow the retail to bridge the gap between them to the collocated algos from few seconds to few hundred ms. Regulations shouldnā€™t deny retail that tech enabled execution speed gain. Regulations should create an even playing field and not an uneven one where only few benefit from it.

  2. Risk management systems are already deployed on the order management systems of brokers and at the exchange. APIs cannot override these. Also APIs have throttling limits already - Order frequency, order quantity etc. If Broker / SEBI / Exchange wants they can audit the APIs to their satisfaction. I donā€™t know from where the ā€œrisk to marketā€ comes, if retail uses the API.

  3. Regulators are ok with giving instant leverage to credit unworthy individuals but concerned about retail using APIs that will allow them faster, automated and disciplined execution of their trading strategy. I simply donā€™t get the logic.

  4. Frontend platforms that offer a unified interface to multiple brokerage apiā€™s could be subjected to an approval process. But an individual retail trader the right to build a front end or command line tool for his personal use should be allowed without any additional approval process and expense.

  5. If we see the current implementation of APIs each client has to uniquely create an API key. So the audit trail for where an order came from is possible with present technology . The regulator / exchange / broker could use it if it smells something fishy.

I will certainly write to SEBI to stall this move to push the retail back to stone age.

6 Likes

https://twitter.com/i/spaces/1DXGyDnzZAZKM?s=20

SEBI has come out with a consultation paper on algorithmic trading by retail investors. Please join us tomorrow at @FinsecLaw Dialogues at Twitter Spaces to discuss this imp proposal with @Nithin0dha - hope to use session to write to SEBI @anilchoudhary https://t.co/Sb2T6nRsGe

ā€” Sandeep Parekh (@SandeepParekh) December 10, 2021

Atleast some guys are fighting the good fightā€¦

2 Likes

My 2 centsā€¦

  1. Very clearly, SEBI does NOT have ANY data about the scale, frequency and impact of any Retail trading algos, because they themselves mention it. So, this is just a ā€œhunchā€.
  2. Any rational person (traders :wink: ) will not made sweeping, life-altering decisions based on NO data.
  3. First SIMPLE step would be to gather DATA. I would recommend SEBI require brokers who offer API, tag those orders as ā€œRetail API originatedā€.
  4. Run this for about a year, gather some data, then analyze and assess the impact and ONLY THEN make an informed decision.

How do these people get these jobs when they donā€™t even understand the fundamentals of rational decision-making?

Pls point out any faults in my logic above, before I send it to SEBIā€¦

PS: Just saving some people the trouble in finding out how to write about this to SEBIā€¦ details below:
E-mail to [email protected], with subject as ā€œAlgorithmic Trading by Retail Investorsā€

7 Likes

Sensibull also will come under this?

Sensibull doesnā€™t provide any automated trades. The platform as such seems to be zerodhaā€™s in house platform that is approved by the exchange. So I think the new proposals wouldnā€™t damp them out much.

this is great move by SEBI.
Lot of people i know bought these intraday straddler bots and ran on their a/c only to lose money.
they fell for these marketing promises made by bot sellers and got screwed.

I know atleast 2 unofficial hedge funds who promise great returns by running their API bots on customer a/cā€™s.

All these bot sellers are not tech savvy and lost money in customer a/cā€™s because the bot algorithms are average at best.
We saw a glimpse of this chaos when execution range was removed.

So it only make sense for SEBI to want to audit these algorithms.
But, if the audit cost is not in reach of a retail programmer, than it does not make sense and this move is seen as anti-retailer.

Lets see, how this unfolds

2 Likes

This is like saying the roads will have potholes later, letā€™s not build the roads. Thatā€™s the regulatorā€™s job, to ā€œregulateā€ not ā€œexterminateā€. How they can do it best, itā€™s their problem, this is the responsibility they asked for.

Unless it is not backed by a statute, and there arenā€™t actual instances of the problem being so excessively large that the system is taking a toll. This umbrella regulation is not the way to go about it, especially for a developing, dynamic country like India, itā€™s just Babugiri disguised as good intentions.

3 Likes

Wrote them an email. Donā€™t know if anyone would ever read. Requesting you all to write them an email at email address provided in proposal. May be it could create some kind of impact and they reconsider their proposal.

2 Likes

People like that ( maybe applies to everyone starting out ā€¦ ) will lose money to scams until they learn their lesson. There is always fear and greed and scammy people who take advantage of it, whether its investing or trading or something else.

If you agree with the solution, then from that logic, someone could promise great trading results by trading manually and it could cause loses - so we should ban trading itself.
But wait - maybe now people will start ā€˜investingā€™ using other peopleā€™s bad advice and they can get screwed bad, so we should ban direct investments in stocks.
But wait - now maybe they invest in mutual funds near top based on bad advice and then sell it all near bottom out of despair. We should ban all Equity investments to keep retailer safe. Bonds are safer, retailers should be restricted to bonds.
But wait companies can default and retail could have invested through bad advice. SO ban that.
But wait gov can default or give us negative real returns, we can have high/hyper inflation ( Zimbabweā€¦ ) in rare cases. Perhaps future PM in India becomes dictator and money flows out. So ban it too ā€“ protect us.

As long as there is cash, we can always lose money - in business too due to scamsters. So lets ban money ban business. Ban everything. And now we cannot lose money. Go to barter system.

But wait maybe we can lose our valuables too due to bad advice. So lets just ban all possession itself. No more loses and retail will be saved.
But wait, Everyone dies, that is also a loss. Some people may kill themselves due to behavior of other people. So lets just ban all life. Finally we are free from scamsters ā€¦


More seriously,

  1. solution does not solve the problem of unregulated platforms.
    The way it is structured, it means api for ordering stops for all and we go back in tech instead of moving forward.
    Automation is still possible through workaround solutions ( desktop/web automation/ reverse engineer protocols etc ) and scamsters will have enough resources to manage this. I used to trade using ahk automation when we did not have apis and if apis get banned they only thing i can do is go back to something like that. That can work well, but is always going to be less reliable than apis so you will make the env worse for all of us.

  2. Execution range issue would still have remained without apis, removing market orders was a good solution but it can still happen if there is order imbalance as books can be illiquid.

What they need to do is have registration/oversight of these platforms.

4 Likes

Nah!!
i am speaking from experience and i have enough data to prove it.

Have you heard about tradetron (marketplace of algo strategies) ?
I was a member of tradetron and deployed multiple algoā€™s.

keeping the profitability of algoā€™s aside for a moment, it has close to 1lac members, 1000+ algoā€™s deployed everyday trading with clientā€™s money in their api enabled accounts.

i have stopped using tradetron because, its riddled with bugs, crashes frequently, algo take positions erroneously. (sometimes selling a put, and failing to place an order for buy, thus leaving client a/cā€™s vulnerable to infinite loss),

You can join tradetron telegram group and see for your selves, everyday is there is some issue, where either tradetron fails to place an order, or places an order for wrong quantity or the algo owner fires order for wrong strike or for wrong ticker.

In one instance, one of tradetron customer lost close to 1lac because the algo owner fired same order 24 times by mistake.

These customers dont have any protection because of TOS of tradetron clearly states that any erroroneous trades because of infrastructure issues are not their liability.
Brokerā€™s TOS clearly states that customers should bare liability if API triggered trades goes wrong.

With out knowing how ugly the API bots market is, please dont comment.
SEBIā€™s playbook is clear, even if it inconveniences some retail traders, they will try to protect the sheep (traders who takes risk, without knowing what they are doing).

To rephrase in the same example, you quoted, if road has potholes, SEBI will close the road until the road has no potholes, you might be an experienced driver who can navigate a pothole ridden road, but its not saef for general public to drive on a pothole ridden road.

  1. murders happen despite laws against it, so lets make murder legal
  2. people get cheated anyway, so lets make cheating legal.

This sort of thinking is not what i am espousing, if you see my answer, i am not calling for anything banning.
I just want SEBI to review algorithms so that they are of certain quality so that retail traders wont lose money for stupid bugs in algos.

Infosys implemented IT portal and its hot pile of sh*t with lot of bugs. if a MNC could not deliver a prestigious product commissioned by Govt, Are you confident that part time programmers can create a algo with out any bugs, that innocent retailers deploy with out any knowledge on how bad things can go wrong ?

Go read my answer to other comment on how innocent retailers are losing money on algo market places, because of bugs created by faceless, algo creators.

Just because people get duped, does not mean that they should.
Regulator body has guidelines for a reason, and they should do their job and enforce it to protect the small people.

Execution range issue could happen with out API too, i agree.
Algo creators amplify that effect by 10x.
lot of people buy bots or deploy algos because they could not do it themselves.
So essentially people who did not have time to trade and doing trading using these bots and are becoming victims of ER issues.

if SEBI can review their code and ensure that all algoā€™s handle such issues, we will have a much safer ecosystem.

ā€œDont do anything, let people destroy themeselves financiallyā€
ā€œBan everything, let people not do anything with their moneyā€
both options are bad. SEBI should find a middle ground where both parties can work together.

1 Like

Yes so i completely agree that we need regulations, oversight, accountability and punishment if necessary for these algo providers.

Some of the good ones can provide a service to others too - trading works and can give you much better returns vs risk. But you do need to understand how it works and it is not a endless cash machine without risk, so new people must also have reasonable expectations. But they will chase returns. That and competition means people who give unrealistic numbers will be favored over genuine ones.

I am speaking from experience too. I have used apis to place few thousand trades in my own account without major issues in my code. So just because tradetron is shit does not imply fault is with apis. Perhaps you should look at what api is - it is not the same as a bot.

But what sebi has published will indirectly cease all ordering through apis for everyone. Conditions are unrealistic and to expect an individual trader to register and audit their proprietary algos is not reasonable, and further brokers will not manage individual algos of small time traders like us.

End result is everyone starts using hacky tools again - including some of these algo providers. They are still not brought under regulations and oversight and so new people will continue to lose money without recourse. And hacky tools are even more prone to having issues.

So problem is there but solution is wrong and only makes matters worse.
Anyway, nithin has given out some interviews that explains much better - you can have a look.

1 Like

Whatever the regulators do some people will drink, drug and gamble themselves to self annihilation. I am not sure what can be done if someone sets out determined to self destruct.

Neither SEBI nor the stock brokers would be willing to review algo codes potentially written in any of the of available programming languages and running using different platform dependencies. Even for a hardcore software company that would be some task.

Always remember tech can fail. It need not be software bugs alone. An internet connection failure, server blackout, cyber attack or bandwidth congestion could easily cause auto execution to falter. All these could happen at any of the connectivity points - the algo platform, stock broker or the exchange. Its simply not possible to trust technology like your dog.

I think the middle ground on this would be to pass the right, risk and liability of auto execution to individuals rather than the stock broker or exchange or another public unregulated front end. Auto signal generation software could be brought under RA regulations. This would mean the death of commercial auto execution platforms as we see today.

Has anyone thought about profitable algo codes getting leaked because of multiple stakeholders involved in this entire process of review and approval at exchange & broker level?

1 Like

No the right analogy would beā€¦

Thieves rob houses that have a lot of gold, letā€™s stop retailers buying goldā€¦ cos weā€™re DF that canā€™t stop the thievesā€¦

Ever seen cigarette commercials recently??? No, right? They banned cigarette advertisingā€¦

Why canā€™t they do the same here?? Ban advertisingā€¦ Do you know. CA canā€™t advertise, neither can a doctor, in India?

Am sought of appalled at the direction of this discussion.

This is a system problem and needs technical solutions. My proposals:

  1. Only Limit orders permitted for API orders. No Market or Stop Loss (Limit, Market) orders allowed.

  2. Broker induces a ā€œspeed bumpā€ execution delay for API Orders (up to 1 Minute to match the time taken to place an order manually on an average) for API orders .These delays are only for 1st leg orders and modify orders. It does not apply to cancel orders or exit orders.

  3. Broker applies rate limits such as 5 orders a minute, 50 orders a day (1st leg orders) for API orders for each client.

  4. If more than 50 1st leg orders arrive from the same IP address in a day, no further orders will allowed from that IP (This virtually ends all these illegal algo platform entities)

  5. If algo sellers software is installed on client side, again Point (3) above will curb it.

A combination of client id and/or ip addr will solve the problem for the brokers to check if the order is algo or non-algo. Even if they are algo triggered, the risk or impact will be insignificant, because the rules ensure that algo trading is levelled down to merely a restricted form of automated trading, while API technology is retained for the benefit of disciplined investors and continued innovations in Indian fintech industry.

Providing recognition to Algo sellers and platforms needs a comprehensive new Certification and is unrelated to the technical solution presented above.

Submitting algo details for approval is readily possibleā€¦ to brokers (esp those with prop desk) or exchanges (esp those executives still around after colo scam) or even to regulators (who get invited to special dinners & drinks and discussions & seminars of institutional players)ā€¦ after all SEBI, NSE, BSE officials, as public servant, publish their respective networth, private (not official) vacation trips and the all sources of their yearly income in the internet for public scrutiny.

Poovhenden

1 Like