KiteConnect Python: No holidays() method and inconsistent funds fetching – need official guidance

sanket_naik
Hello Zerodha Team,

I am using Kite Connect Python client (kiteconnect v5.0.1) for intraday algo trading.

I am facing the following issues and need official guidance / recommended logic from Zerodha:

1️⃣ holidays() method not available

In the Python client, the KiteConnect object does not have a holidays() method.

Verification test:

from kiteconnect import KiteConnect
kite = KiteConnect(api_key="test")
print(hasattr(kite, "holidays")) # False

Because of this:

I cannot reliably detect exchange holidays

Algo exits with incorrect assumptions like "Market closed"

Please confirm:

Is there an official replacement API to fetch exchange holidays?

Or should holidays be fetched from a separate endpoint or static source?

2️⃣ Funds availability confusion

While kite.funds() exists, its behavior is inconsistent for algo usage:

Different keys for cash/margin depending on account

No clear documentation on which field should be used for intraday margin checks

Please clarify:

The correct and stable way to fetch available trading balance

Which key should be used for MIS / intraday strategies

3️⃣ Post NSE Algo SOP clarification

As per the NSE circular (July 22) regarding API & Algo trading:

Static IP requirement

Order rate limit (10 orders/second)

Strategy registration requirements

Kindly confirm:

Whether these changes impact retail Kite Connect Python users

Any mandatory code-side changes required to stay compliant

Request

Please provide:

Official Python code snippets for:

Holiday detection

Funds & margin checks

Or clear documentation links if already available

This will help avoid incorrect market-time logic and capital miscalculations in live trading systems.

Kindly reply to me on [email protected] as well, if possible.

Thank you for your support.

Regards,
Sanket Naik
  • Gunja
    Please help me ,the process for algo trading,I have created App and got Api key and Secret key,lso installed the latest python version. What are next to do?How can I connect to Zerodha to python?
  • salim_chisty
    @Gunja, Please refer to the Python library on the Kite Connect API documentation. You can also explore our Quantinsti course on Algorithmic trading with Zerodha Kite Connect API and Python.​
  • salim_chisty
    salim_chisty edited 6:31AM
    @sanket_naik 1️⃣ holidays() method not available
    Currently, we don't have a direct API or endpoint to check the holiday calendar through the Kite Connect API. Exchange holidays are easy to maintain at your end as it's fixed and is released at the start of the year on the NSE portal.
    2️⃣ Funds availability confusion
    The kite.margins() method in the Kite Connect API is used to fetch segment-wise margin and fund availability for the trading account. It returns a structured response containing available, utilised, and total margins across different segments such as equity and commodity. Please check the margin API documentation for details.
    3️⃣ Post NSE Algo SOP clarification
    Strategy registration is not required if the order limit is less than 10 orders per second. The static IP requirement will apply only to the order place/modify/cancel endpoints, and this feature will soon be added to the developer console. Please check Z-Connect post for more details.
Sign In or Register to comment.