Funds & Margin

margin calculator

Margin Calculation API lets you calculate span, exposure, var, brokerage, leverage, available margin values for any type of order and instrument.

post/margincalculator

Headers

access-tokenstring required

Request body

dhanClientIdstring

User specific identification generated by Dhan

exchangeSegment'NSE_EQ' | 'NSE_FNO' | 'BSE_EQ' | 'BSE_FNO' | 'MCX_COMM' required
EnumsExchangeSegment
NSE_EQNSEEquity Cash
NSE_FNONSEFutures & Options
BSE_EQBSEEquity Cash
BSE_FNOBSEFutures & Options
MCX_COMMMCXCommodity
transactionType'BUY' | 'SELL' required

Signifies the type of transaction whether it's BUY or SELL

quantityinteger

Number of shares for the order

productType'CNC' | 'INTRADAY' | 'MARGIN' | 'MTF' | 'CO' | 'BO'
Enum ValuesDescription
CNCCash & Carry for equity deliveries
INTRADAYIntraday for Equity, Futures & Options
MARGINCarry Forward in Futures & Options
COCover Order; entry and stop loss
BOBracket Order; entry, stop loss & target price
CO & BO product types will be valid only for Intraday
securityIdstring

Exchange standard identification for each scrip

pricenumber float

Price at which the order is requested to execute

triggerPricenumber float

Price at which the order is requested to trigger

Response

Successful operation

totalMarginnumber float

Total available margin to trade

spanMarginnumber float

Available span margin

exposureMarginnumber float

Available exposure margin

availableBalancenumber float

Available balance to trade

variableMarginnumber float

Variable margin

insufficientBalancenumber float

Insufficient balance

brokeragenumber float

Applicable brokerage

leveragestring

Applicable leverage

Changes

No recorded changes to this endpoint across all 1 revision of this API.