---
title: "Margin Calculator"
method: POST
path: "/globalstocks/margincalculator"
tags: ["Global Stocks"]
---

# Margin Calculator

`POST /globalstocks/margincalculator`

Calculate margin requirements.

## Headers

- `access-token` string, required

## Request body

- InxEstimatorRequest
  - `securityId` string, required — Exchange standard identification for each scrip
  - `price` string, required — Price at which order is placed
  - `quantity` string, required — Number of shares (fractional supported)
  - `transactionType` string, required — Transaction type - BUY(B) or SELL(S)

## Response `200`

Successful operation

- InxMarginResponse
  - `insufficientBal` number, float — Insufficient balance
  - `brokerage` number, float — Brokerage
  - `leverage` string — Leverage
  - `totalMargin` number, float — Total margin required
  - `availableBal` number, float — Available balance

---

[API](https://skmtc.dev/dhan/apis/dhanhq-api.md) · [All operations](https://skmtc.dev/dhan/apis/dhanhq-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dhan/apis/dhanhq-api/revisions/2d368b9ed32d?raw)
