Skip to content

dhan margins

Calculate margin requirements. Read-only — neither subcommand requires --yes or supports --dry-run.

Subcommand Dhan endpoint Purpose Flags
dhan margins order --file <json> POST margincalculator Calculate margin for one order. --file (req)
dhan margins multi --file <json> POST margincalculator/multi Calculate combined margin for multiple orders. --file (req)
{
"exchangeSegment": "NSE_EQ",
"transactionType": "BUY",
"quantity": 1,
"productType": "CNC",
"securityId": "1333",
"price": 1500
}
Terminal window
dhan margins order --file margin.json --json --no-color
dhan margins multi --file multi-margin.json --json --no-color