Skip to content

Releases: zerodha/pykiteconnect

Kite connect 3.7.2

05 Jun 06:20
f96696e
Compare
Choose a tag to compare
  • Disable connection pooling by default (Fix: request.ReadTimeout issue)
  • Fix: Reconnection should trigger resubscribe in spite of on_open cb

Kite connect 3.0.0 beta 11

09 May 12:49
461d49a
Compare
Choose a tag to compare
Pre-release
v3.7.0-beta11

Remove travis Python 3.3 build

Kite connect 3.0.0 beta 8

27 Feb 07:08
Compare
Choose a tag to compare
Pre-release
v3.7.0-beta8

Freeze pypwin32 package to support Python 3.4

Kite connect 3.0.0 beta 4 - Trigger range

05 Feb 12:16
Compare
Choose a tag to compare

Changelog

  • trigger_range method to fetch CO trigger range
  • quote, ltp, ohlc and trigger_range takes instruments as args

Trigger range example

kite.trigger_range("BUY", "NSE:INFY", "NSE:RELIANCE")

Quote calls example

kite.ltp("NSE:INFY", "NSE:RELIANCE")
kite.quote("NSE:INFY", "NSE:RELIANCE")
kite.ohlc("NSE:INFY", "NSE:RELIANCE")

Kiteconnect v3 changelog

Kite connect 3.0.0 beta 1

18 Jan 11:40
Compare
Choose a tag to compare
Pre-release

Documentation

Install

pip install kiteconnect --upgrade --pre

New features

  • method: profile
  • method: ohlc
  • method: ltp
  • method: renew_access_token
  • method: invalidate_refresh_token
  • constants for products, order type, transaction type, variety, validity, exchanges and margin segments
  • Param disable_ssl to KiteConnect initializer
  • quote call supports multiple instruments call
  • exit_order alias for cancel_order
  • All datetime string fields has been converted to datetime object.
    • orders, order_history, trades, order_trades, mf_orders responses fields order_timestamp, exchange_timestamp, fill_timestamp
    • mf_sips fields created, last_instalment
    • generate_session field login_time
    • quote fields timestamp, last_trade_time
    • instruments field expiry
    • mf_instruments field last_price_date
  • Requests thread pooling is enabled by default with defaults requests library settings Read more

API method name changes

v2 v3
request_access_token generate_session
invalidate_token invalidate_access_token
historical historical_data
order_place place_order
order_modify modify_order
order_cancel cancel_order
product_modify convert_position
mf_order_place place_mf_order
mf_order_cancel cancel_mf_order
mf_sip_place place_mf_sip
mf_sip_modify modify_mf_sip
mf_sip_cancel cancel_mf_sip
set_session_hook set_session_expiry_hook
orders(order_id) order_history(order_id)
trades(order_id) order_trades(order_id)

Param and other changes

Deprecated from v2

  • exceptions.UserException
  • exceptions.ClientNetworkException
  • exceptions.TwoFAException
  • Param micro_cache from KiteConnect initializer
  • Param order_id from orders call (Renamed to order_history)
  • Param order_id from trades call (Renamed to order_trades)

KiteTicker changes

  • Rename class WebSocket to KiteTicker
  • KiteTicker initializer param public_token is replaced with access_token
  • Added KiteTicker param reconnect to enable/disable auto re-connection.
  • Auto re-connection is enabled by default (reconnect is True by default)
  • reconnect_interval is deprecated and replaced with reconnect_max_delay
  • Rename: reconnect_tries to reconnect_max_tries
  • Auto reconnect uses exponential back-off algorithm instead of fixed reconnect interval (https://en.wikipedia.org/wiki/Exponential_backoff)
  • Underlying WebSocket library is replaced with Autohbahn Python client (Supports 2,7+, 3.3+) for more stability.
  • Added param connect_timeout to KiteTicker initializer
  • Added method stop_retry to stop auto reconnect while auto re-connection in progress.

KiteTicker callback changes

  • on_ticks(ws, ticks) - Triggered when ticks are received.
    • ticks - List of tick object. Check below for sample structure.
  • on_close(ws, code, reason) - Triggered when connection is closed.
  • on_error(ws, code, reason) - Triggered when connection is closed with an error.
  • on_connect - Triggered when connection is established successfully.
    • response - Response received from server on successful connection.
  • on_message(ws, payload, is_binary) - Triggered when message is received from the server.
    • payload - Raw response from the server (either text or binary).
    • is_binary - Bool to check if response is binary type.
  • on_reconnect(ws, attempts_count) - Triggered when auto re-connection is attempted.
    • attempts_count - Current reconnect attempt number.
  • on_noreconnect(ws) - Triggered when number of auto re-connection attempts exceeds reconnect_tries.

KiteTicker deprecated methods

  • enable_reconnect
  • disable_reconnect
  • reconnect - reconnect can be set while initializing KiteTicker

KiteTicker response changes

  • Full mode has following new fields
    • last_trade_time - Last trade time (Python datetime object or None)
    • oi - Open interest
    • oi_high - Day's open interest high
    • oi_low - Day's open interest low
    • timestamp - Tick timestamp (Python datetime object or None)

Kite connect 3.7.0

20 May 10:09
Compare
Choose a tag to compare

OHLC and LTP

12 Dec 05:59
Compare
Choose a tag to compare

ohlc - Retrieve OHLC and market depth for list of instruments
ltp - Retrieve last price for list of instruments

Both methods accepts params: instruments which is a list of instruments. Instrument are in the format of tradingsymbol:exchange. For example NSE:INFY

Continuous chart and other bug fixes

14 Sep 07:35
Compare
Choose a tag to compare
  • Now you can fetch continuous chart for futures and options contract in historical api call
  • Bug fix with order modify

Mutual fund API

16 Aug 09:36
Compare
Choose a tag to compare

Mutual funds API calls has been implemented for

  • Place/Cancel and get mutual fund orders
  • Place/Modify/Cancel and get SIP's
  • Get mutual fund holdings
  • Get mutual fund instruments

Please check documentation for list of calls available.

Auto reconnect and bug fixes

17 Jul 10:38
Compare
Choose a tag to compare

Added features

Auto reconnect WebSocket connection in case of network failure. Refer README for usage details -
https://github.com/rainmattertech/pykiteconnect#websocket-usage

Bug fixes

  1. Fixed mode was sent incorrectly as quote while subscribed for full mode (3d78dfc)
  2. Send empty buy and sell lists instead of empty depth if depths are not available. (1c2e0cd)