Skip to content

Release Notes

Version 2

Date: Monday Sep 15 2024

DhanHQ v2 extends execution capability with live order updates and forever orders on superfast APIs. Along with this, we also released Market Quote APIs, built on top of Live Market Feed which can be integrated with ease. We have also introduced improvements, bug fixes and increased stability with new version.

New Features

  • Market Quote
    Fetch LTP, Quote (with OI) and Market Depth data directly on API, for upto 1000 instruments at once with Market Quote API.

  • Forever Orders
    Place, modify and manage your Forever Orders, including single and OCO orders to manage risk and trade efficiently with Forever Order API.

  • Live Order Update
    Order Updates are sent in real time via websockets, which will update order status of all your orders placed via any platform - Live Order Update.

  • Margin Calculator
    Margin Calculation simplifies order placement by providing details about required margin and available balances before placing order - Margin Calculator API.

Improvements

  • Intraday Historical Data
    Intraday Historical Data now provides OHLC with Volume data for last 5 trading days across timeframes such as 1 min, 5 min, 15 min, 25 min and 60 min - Intraday Historical Data API.

  • GET Order APIs
    filledQty, remainingQuantity and averageTradedPrice is available as part of all GET Order APIs, which makes it simpler to fetch post execution details of an order. We have also added PART_TRADED as a flag on orderStatus which will be clear distinction for partially traded orders.

  • Live Market Feed
    You can now authorise Live Market Feed via Query Parameters and subscribe/unsubscribe to instruments via JSON messages on websockets with this version. Also, FULL packet is now available which will gives LTP, Quote, OI and Market Depth data in a single packet.

Breaking Changes

  • Order Placement
    Deprecated non-mandatory request keys including tradingSymbol, drvExpiryDate, drvOptionType and drvStrikePrice from Order Placement API endpoints. Along with this, pre-open AMO orders can also be placed now with PRE_OPEN tag.

  • Order Modification
    quantity field needs to be placed order quantity instead of pending order quantity. Earlier, for Order Modification API, in case of partial execution, user needed to pass pending order quantity, which led to errors due to simultaneous execution on exchange or need to call GET Trade APIs as well. quantity and price fields are conditionally required for modification.

    quantity field in Order Modification

  • Daily Historical Data
    symbol is replaced with securityId as key in Daily Historical Data, making it simple for users to fetch data everywhere with Security ID itself - Daily Historical Data API.

  • Error Messages
    Now error messages are categorised with DH-900 series which helps you self debug on level of error - Error Codes.

  • Security ID List Mapping
    Security ID List is now comprehensive with tag changes as well. Check new mappings and description - Security ID List.

  • Epoch time introduced instead of Julian time in Historical Data APIs - Timestamp in Daily Historical Data API and Intraday Historical Data API is now Epoch or UNIX time and with key timestamp.

  • Market Depth deprecated as mode in Live Market Feed
    Market Depth mode is now replaced with FULL packet which has combined data of Quote, OI and market depth in single packet, enabling ease in subscribing and fetching data.

  • Change in endpoint for Trade History and Kill Switch
    New endpoint for Trade History is /trades, making it common with other Trade book APIs. For Kill Switch, the new endpoint as per nomenclature is killswitch.

Bug Fixes

  • realizedProfit and unrealizedProfit in Positions API
    You can now get realtime values of realizedProfit and unrealizedProfit on Positions API.

  • Target leg modification in Order Modification API
    TARGET_LEG was not getting modified with Order Modification API which is fixed now.