Static IP registration is live on the Kite Connect developer dashboard. You have until April 1 to do so. Log in to developers.kite.trade, go to your profile page, and enter your static IP under the "IP Whitelist" section.
What's changing from April 1
All order requests from an unregistered IP will be rejected. This applies to all Kite Connect users who place orders via the API, regardless of order frequency.
A strict 10 orders-per-second rate limit will apply. Requests exceeding this will receive a 429 response. To place more than 10 orders per second, you will need the strategy registered with the stock exchange.
Market orders will require market protection. Orders placed with market protection set to "0" will be rejected. Learn more. (This is mandated by the exchanges for all algo orders)
MCX does not support IOC (Immediate-or-Cancel) orders in the algo segment.
Order slicing should be capped at a maximum of 10 slices to stay in line with the 10 orders-per-second limit.
A few things worth knowing
The IP applies across all apps on your Kite Connect account.
Sharing of IPs is permitted between family members (spouse, dependent children, and dependent parents) as per the regulation. Violation may result in the developer account being suspended.
Only order endpoints are will be validated against the static IP. All other API endpoints — WebSocket data, order book, positions, etc. — remain accessible from any IP.
If you don't yet have a static IP, you'll need to acquire one from an ISP, cloud provider (AWS, GCP, etc.), or a VPN/VPC service before April 1.
@Matti, I want a clarification on this:::: Market orders will require market protection. Orders placed with market protection set to "0" will be rejected.
I want a clarification on this, since all the orders are executed from my UI, and the range is set before trades are executed, and all are market orders placed based on candle close of previous minute along with stop losses placed the second after executing the order
Moreover, strategies also include short straddle, for which the SL is placed in the system, not visible in the order book, but it is there, how to proceed with this
Sharing of IPs is permitted between family members => But I am getting "The IP address(es) you are trying to add are already linked to another account. Each IP address can only be linked to one account." error when I try to add the same IP in family member account.
I have configured IP in profile page. Is there any API i call call from the my System to check whether the IP is configured correctly ?
eg. GET /static_ip/config
When called from correct system, It should return.
{ "status": "success", "data": "The static IP (x.x.x.x) configured is valid." }
When called from different system, i should return error.
{ "status": "error", "data": "The static IP (x.x.x.x) configured is not valid. Your current IP is (y.y.y.y)" }
I hope this option will solve @SpacemanSpiff 's problem. I do not want to check this configuration in live orders. Hoping for a solution before enabling the restriction. @Matti
@yogeshs, but with one profile page, how can we share with other family members, their zerodha account is different.. IP should be able to share between two different profile
Is it accurate to infer that any market order placed from April 1 using python sdk would start failing . Am I missing something because this seems like a serious oversight
If this doesn’t get fixed before April 1 which it probably won't, I think kite._post or kite._put can be utilized as a workaround.
Not ideal though, these are internal methods, so treat this as temporary and have to be revalidated after SDK updates but still better than rewriting entire code from python sdk to http
Market orders must now have market protection—orders with “0” will be rejected. So yes, you’ll need to update your order placement logic to include this.
Any market order must comply with this rule.
For your current setup:
If market orders are being placed via API, you’ll need to update the code to include a suitable market protection percentage.
If orders are placed via UI/manual flow, ensure the same is configured appropriately in the order placement settings.
@RS6006 Sharing IP across accounts: Static IP is configured at the developer profile level. You can add multiple Zerodha accounts under the same developer profile, and the configured IP will apply across them. answered here.
Are you saying that you are still working on the sdk support for this when the cut off date for market protection orders is 1st Apr.? This is serious problem, from 1st Apr, the market orders via SDK will start failing (as existing SDK does not provide any option to set market protection in the market orders).
@knightrider, An easier way is to update local kiteconnect.py and make the PR changes (just oneline) incase anyone is not interested to make version upgrades from kiteconnect4 -> kiteconnect5
@Sravanthi_bh how does market protection impact options trading in selling side, considering there is no major price fluctuation while the order is executed in a particular range
@Sravanthi_bh@Matti I have added the market_protection field , but started getting error this morning as of Mar-27. KiteConnect.place_order() got an unexpected keyword argument 'market_protection'
@Tusshar18 Market protection sets a limit on how far the execution price can deviate from the current market price for market orders. For options selling, it helps prevent execution at significantly lower prices during sudden spikes or low liquidity.Learn more.
@Sravanthi_bh _bh but if I am setting up an entry range for both ce and pe, and it is defined and cannot deviate from that, then why is it necessarry in options, also considering the entry parts to be related to candle close of the previous minute
@RS6006 - Yea, but, as a standard practice, it's not recommended to update the site-packages manually. Especially if the system is docker containerised, it becomes unnecessary burden to update the package in a manual way.
Btw, during my testing today, the PR doesn't seem to work either, the market_protection parameter is ignored by the backend it seems.
Requesting @kiteapi@kiteconnect to look into this matter quickly because only 2 trading days are left before this becomes a bigger problem for Zerodha !
@Tusshar18 Market protection acts as a final safeguard at execution level, ensuring the order doesn’t get filled at an extreme price during sudden volatility or illiquidity. So, irrespective of your entry logic, this needs to be included for all market orders.
I have added the market_protection field , but started getting error this morning as of Mar-27. KiteConnect.place_order() got an unexpected keyword argument 'market_protection'
@adarsh1392 At present, market protection is supported in the raw HTTP API, as well as the Java and .NET SDKs. You may encounter this error if the market_protection parameter is not yet available in the SDK you are using.
We are actively working on extending this support across all libraries, and it is expected to go live this weekend.
@knightrider - I have added the market_protection = 2 flag in my order placements. Still getting error. @Nivas - Is there an ETA by which market_protection flag will be enabled for python sdk? All my orders are failing this morning.
@adarsh1392 - It's not about adding parameter while calling the method, the definition of the place_order() in kiteconnect.py [kiteconnect package] needs to accept that parameter right. I was talking about that.
Earlier, I mentioned that it did not work because I was receiving {"market_protection": 0} in the order response, but, when I checked the orders on web ui, it shows a shield for those orders (shields is a symbol of market protection). So, we can use that fix till the time zerodha updates their kiteconnect package to support the market_protection parameter.
If my API is placing more than 10 orders per second. Let say 15 orders are placed. Is it going to cancel the 5 orders and the new limit of 10 orders will be given for next second if I have not registered my strategy.
@Arockiya_r - Please make sure to consider the case of modify_order() when I'm trying to modify an existing LIMIT-SL order to MARKET order. Thank you !
I do not want to check this configuration in live orders.
How do we test that its working ?
@subrah@SpacemanSpiff March 31st is a holiday; we are discussing taking this validation live on that date. Once it is live, you can verify it by placing AMO orders.
If my API is placing more than 10 orders per second. Let say 15 orders are placed. Is it going to cancel the 5 orders and the new limit of 10 orders will be given for next second if I have not registered my strategy.
@Arockiya_r - Example: - I have an trigger-pending SL-LIMIT order - Sometimes, before hitting the trigger, I need to square the order off the position. In that case, instead of cancelling the existing trigger-pending SL-LIMIT order and creating a new market order for squaring off my position, I just modify the existing trigger-pending SL-LIMIT order to a MARKET order. I do that by using modify_order() method in kiteconnect.py. So, I need to have a market protection parameter for that method as well.
If my API is placing more than 10 orders per second. Let say 15 orders are placed. Is it going to cancel the 5 orders and the new limit of 10 orders will be given for next second if I have not registered my strategy.
10 orders will be placed, and 5 orders will be blocked with a 429 response.
I want a clarification on this, since all the orders are executed from my UI, and the range is set before trades are executed, and all are market orders placed based on candle close of previous minute along with stop losses placed the second after executing the order
Moreover, strategies also include short straddle, for which the SL is placed in the system, not visible in the order book, but it is there, how to proceed with this
For this do I need to make changes in the code?
I want to test this without risking live trades too much.
Some questions on behaviour before April 1 once i register static ips.
Are orders requests getting rejected from unregistered IP before April 1 ?
How do we test that its working ?
Do we have IP update frequency restrictions before April 1 ?
Can we remove it if facing any issue and will that take effect immediately ?
Sharing of IPs is permitted between family members => But I am getting "The IP address(es) you are trying to add are already linked to another account. Each IP address can only be linked to one account." error when I try to add the same IP in family member account.
Is there any API i call call from the my System to check whether the IP is configured correctly ?
eg. GET /static_ip/config
When called from correct system, It should return. When called from different system, i should return error. I hope this option will solve @SpacemanSpiff 's problem.
I do not want to check this configuration in live orders.
Hoping for a solution before enabling the restriction.
@Matti
This can become a huge problem if not fixed URGENTLY.
Whats the impact on Java kite connect ?
https://github.com/zerodha/pykiteconnect/blob/6b7b7621e575411921b506203b526bf275a702c7/kiteconnect/connect.py#L336-L352
Is it accurate to infer that any market order placed from April 1 using python sdk would start failing . Am I missing something because this seems like a serious oversight
Not ideal though, these are internal methods, so treat this as temporary and have to be revalidated after SDK updates but still better than rewriting entire code from python sdk to http
https://github.com/zerodha/pykiteconnect/pull/218
If you're using requirements.txt for python, just replace kiteconnect with this:
https://github.com/pepalguru/pykiteconnect/archive/89e3b432110ab05b03cd740f8afd40caa18f9ece.zip
Market orders must now have market protection—orders with “0” will be rejected. So yes, you’ll need to update your order placement logic to include this.
Any market order must comply with this rule.
For your current setup:
Sharing IP across accounts:
Static IP is configured at the developer profile level. You can add multiple Zerodha accounts under the same developer profile, and the configured IP will apply across them. answered here.
@knightrider @scaars13 @yogeshs
Market protection
This is serious problem, from 1st Apr, the market orders via SDK will start failing (as existing SDK does not provide any option to set market protection in the market orders).
An easier way is to update local kiteconnect.py and make the PR changes (just oneline) incase anyone is not interested to make version upgrades from kiteconnect4 -> kiteconnect5
KiteConnect.place_order() got an unexpected keyword argument 'market_protection'
Market protection sets a limit on how far the execution price can deviate from the current market price for market orders.
For options selling, it helps prevent execution at significantly lower prices during sudden spikes or low liquidity.Learn more.
Btw, during my testing today, the PR doesn't seem to work either, the market_protection parameter is ignored by the backend it seems.
Requesting @kiteapi @kiteconnect to look into this matter quickly because only 2 trading days are left before this becomes a bigger problem for Zerodha !
cc: @scaars13 @yogeshs
So, irrespective of your entry logic, this needs to be included for all market orders.
We are actively working on extending this support across all libraries, and it is expected to go live this weekend.
@Nivas - Is there an ETA by which market_protection flag will be enabled for python sdk? All my orders are failing this morning.
@kiteapi @kiteconnect
Market protection parameter is working with the PR:
https://github.com/zerodha/pykiteconnect/pull/218
Earlier, I mentioned that it did not work because I was receiving {"market_protection": 0} in the order response, but, when I checked the orders on web ui, it shows a shield for those orders (shields is a symbol of market protection). So, we can use that fix till the time zerodha updates their kiteconnect package to support the market_protection parameter.
- I have an trigger-pending SL-LIMIT order
- Sometimes, before hitting the trigger, I need to square the order off the position. In that case, instead of cancelling the existing trigger-pending SL-LIMIT order and creating a new market order for squaring off my position, I just modify the existing trigger-pending SL-LIMIT order to a MARKET order. I do that by using modify_order() method in kiteconnect.py. So, I need to have a market protection parameter for that method as well.