Order Margin

Margin Calculator API delivers the real time margin calculations for a basket of positions.

Endpoint

Base URL
https://connects.torusdigital.com/api/v1/order/calculate/margin

Header Parameters

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Request Parameter

ParameterSample/Possible ValueMandatoryRemarks

exchange

NSE

Y

Exchange

segment

E

Y

In Segment E stands for Equity

security_id

1996

Y

Security ID

txn_type

B

Y

Transaction Type

totalremqty

9

Y

Quantity

price

0.00

Y

Order price (for market pass 0)

product

C

Y

Product

trigger_price

10.00

Y

Trigger price (In case of CO this value should be trigger price of SL leg and in case of BO this value should be absolute)

Request

cURL
curl --location 'https://connects.torusdigital.com/api/v1/order/calculate/margin' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "source": "A",
    "data": {
        "security_id": "14366",
        "product": "B",
        "segment": "E",
        "exchange": "NSE",
        "totalremqty": "1",
        "price": "13.00",
        "txn_type": "B",
        "trigger_price":"13.10"
    }
}'

Response

{
    "data": [
        {
            "INSFFBALNC": 0.0,
            "VARELMMARGIN": 0.0,
            "AVAILBALANCE": 10000000.0,
            "BROKERAGE": 0.0,
            "TOTMARGIN": 5292.0,
            "EXPOMARGIN": 0.0,
            "SPANMARGIN": 0.0,
            "BROKER_BROKERAGE": 600,
            "LEVIES_BROKERAGE": 0,
            "OTHER_BROKERAGE": 0
        }
    ],
    "status": "success",
    "message": "Success"
}

Response Parameter

FieldDescription

INSFFBALNC

Insufficient balance in the account (floating-point number).

VARELMMARGIN

Variation margin, the funds required to bring the margin balance up to the initial margin during the trading day.

AVAILBALANCE

Available balance in the account (floating-point number).

BROKERAGE

Brokerage fee charged for executing trades or services (floating-point number).

TOTMARGIN

Total margin held in the account, typically required for trading derivatives (floating-point number).

EXPOMARGIN

Exposure margin required for exposure to risks (floating-point number).

SPANMARGIN

SPAN margin determined by exchanges for futures/options contracts (floating-point number).

BROKER_BROKERAGE

Specific type of brokerage fee (integer).

LEVIES_BROKERAGE

Levies or additional charges associated with brokerage (integer).

OTHER_BROKERAGE

Other brokerage-related charges or fees (integer).

Last updated