Skip to content

v2.3.0

Latest

Choose a tag to compare

@dhan-oss dhan-oss released this 08 Oct 14:40
8c6583e

What's new

  • Conditional Orders: place orders automatically when a price or technical-indicator condition is met
  • Global Stocks: trade US stocks (orders, trades, holdings, fund limit, market status, charge estimate, margin) and fetch the Global Stocks instrument list
  • Global Stocks Live Feed: real-time US stock Trade and OHLC data over WebSocket via GlobalStocksFeed
  • P&L Based Exit: automatically exit positions when cumulative profit or loss thresholds are hit
  • Multi-leg Margin Calculator: combined margin for multi-leg strategies with hedge benefits
  • Portfolio.exit_all_positions()

Fixes since 2.3.0rc1

  • Global Stocks Live Feed: Trade and Previous Close packets are now parsed correctly (previously crashed), and error packets such as token expiry are now reported (#166)
  • FullDepth no longer prints the access token when connecting (#166)
  • Removed deprecated UTC timestamp conversion in the market, full depth and Global Stocks feeds (#137, #157)

Notes

  • Global Stocks feed Trade data contains LTP, volume, LTT and LUT; Previous Close contains prev_close.
  • place_forever() no longer accepts the symbol argument.
  • Conditional orders require expDate in the condition.
  • Requires Python 3.10+.

Install: pip install -U dhanhq

Previous stable version: pip install dhanhq==2.2.0