Infinn API Documentation
Order and Trades

Basket Margin

POST/NorenWClientAPI/GetBasketMargin

Authorization token is required. Enter your access_token from GenAcsTok above.

jData fields

Values are sent as a JSON string in the jData form field.

Logged in User Id

Login users account ID

Exchange (Select from ‘exarr’ Array provided in User Details response)

Unique id of contract on which order to be placed. (use url encoding to avoid special char error for symbols like M&M)

Order Quantity

Order Price

Only to be sent in case of SL / SL-M order.

Product name (Select from ‘prarr’ Array provided in User Details response, and if same is allowed for selected, exchange. Show product display name, for user to select, and send corresponding prd in API call)

B -> BUY, S -> SELL

LMT / MKT / SL-LMT / SL-MKT

Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order)

Optional field. Application only for modify order, open order quantity

Optional field. Application only for modify order, quantity already filled.

Optional field. Application only for modify order, open order price

Optional field. Application only for modify order, open order trigger price

Optional field. Application only for H or B order modification

Optional field. Application only for H or B order modification

Optional field. Array of json objects. (object fields given in below table)

Authorization Token

Required for all API calls. Use the access_token from the GenAcsTok response as a Bearer token.

Request to be POSTed to url : /NorenWClientAPI/GetBasketMargin

Request Details

Parameter NamePossible valueDescription
jData*Should send json object with fields in below list
Authorization*Bearer <access_token>access_token from GenAcsTok response. Required for all API calls.
Json FieldsPossible valueDescription
uid*Logged in User Id
actid*Login users account ID
exch*NSE / NFO / BSE / MCXExchange (Select from ‘exarr’ Array provided in User Details response)
tsym*Unique id of contract on which order to be placed. (use url encoding to avoid special char error for symbols like M&M)
qty*Order Quantity
prc*Order Price
trgprcOnly to be sent in case of SL / SL-M order.
prd*C / M / HProduct name (Select from ‘prarr’ Array provided in User Details response, and if same is allowed for selected, exchange. Show product display name, for user to select, and send corresponding prd in API call)
trantype*B / SB -> BUY, S -> SELL
prctyp*LMT / MKT / SL-LMT / SL-MKT
blprcBook loss Price applicable only if product is selected as H and B (High Leverage and Bracket order)
rorgqtyOptional field. Application only for modify order, open order quantity
fillsharesOptional field. Application only for modify order, quantity already filled.
rorgprcOptional field. Application only for modify order, open order price
orgtrgprcOptional field. Application only for modify order, open order trigger price
norenordnoOptional field. Application only for H or B order modification
snonumOptional field. Application only for H or B order modification
basketlistsOptional field. Array of json objects. (object fields given in below table)

Note

Out of basketlists, the parameter provided will be considered as the first order.

Json Fields of object in values ArrayPossible valueDescription
exch*NSE / NFO / BSE / MCXExchange (Select from ‘exarr’ Array provided in User Details response)
tsym*Unique id of contract on which order to be placed. (use url encoding to avoid special char error for symbols like M&M)
qty*Order Quantity
prc*Order Price
trgprcOnly to be sent in case of SL / SL-M order.
prd*C / M / HProduct name (Select from ‘prarr’ Array provided in User Details response, and if same is allowed for selected, exchange. Show product display name, for user to select, and send corresponding prd in API call)
trantype*B / SB -> BUY, S -> SELL
prctyp*LMT / MKT / SL-LMT / SL-MKT

Response Details

Response data will be in json format with below fields:

Json FieldsPossible valueDescription
statOk or Not_OkPlace order success or failure indication.
request_timeResponse received time.
remarksThis field will contain rejection reason.
marginusedTotal margin used.
marginusedtradeMargin used after trade.
emsgThis will be present only if Order placement fails

Calculation

The /Limits API must be called first in order to calculate the post-trade margin and basket margin. Here, the marginused in the Limits API response will be [marginused(Limits)].

  1. Not Ticked - Include Existing Margin:

    • Post-trade margin = marginusedtrade(GetBasketMargin) - marginused(Limits)
    • Basket margin = marginused(GetBasketMargin) - marginused(Limits)
  2. Ticked - Include Existing Margin:

    • Post-trade margin = marginusedtrade(GetBasketMargin)
    • Basket margin = marginused(GetBasketMargin)
curl --request POST \
  --url 'https://api.infinn.in/NorenWClientAPI/GetBasketMargin' \
  --header 'Content-Type: text/plain' \
  --data 'jData={}'
Response will appear here after sending a request