Multi order margin

This API calculates the margin required for given set of orders. If input is single scrip then margin required for single order is provided if input is multiple scripts then combined margin with hedge benefit is provided. API also accepts parameter CoverPositions if yes the margin is calculated considering existing positions.

REQUEST URL

https://Openapi.5paisa.com/VendorsAPI/Service1.svc/MultiOrderMargin

Request headers

KeyValue
Content-Typeapplication/json
Authorizationbearer{your access token}
SAMPLE REQUEST URL
https://Openapi.5paisa.com/VendorsAPI/Service1.svc/MultiOrderMargin

Request body

Field NameMandatoryDescription
Head keyYesAppKey of User or Partner
body Client CodeYesClient code of user
 Cover PositionsYes 
OrdersExchange Exchange of the insrument
Exchange Type Type of exchange
Scrip Code Scrip code of the instrument traded
PlaceModifyCancel User has to put what function they need:
P: Place ,M:Modify,C:Cancel
Order Type Type of order
Price The price at which order took place at market
Quantity The quantity of the orders placed
IsIntraday Either the order was intraday or not . 
Pass boolean value: True/False
SAMPLE REQUEST BODY  :

{
    "head": {
        "key": "6zWyCzzGupJnB7bllZEzlgKbzVCJ7viT"
    },
    "body": {
        "ClientCode": "52839446",
        "CoverPositions":"N",
        "Orders": [
            {
                "Exch": "N",
                "ExchType": "D",
                "ScripCode": "53480",
                "ScripData": "",
                "PlaceModifyCancel": "P",
                "OrderType": "B",
                "Price": 274,
                "Qty": 3000,
                "IsIntraday":false
            }
        ]
    }
}

Response Body

Field NameValuesDescription
headresponseCode5PMultiOrderMarginThis is the unique response code for the API.
status-1: Server unable to process your request
0: Success
1: Invalid input parameters.
2: Invalid head parameters.

This is the status code which depicts the status of API request to the server.
statusDescriptionServer unable to process your request
Success
Invalid input parameters.
Invalid head parameters.

This is the description of the status received from the server for the API request.
bodyAvailableMarginNumeric valueThis shows the margin available for user's account
MessageSuccess
Invalid client code
The message depicts if margin has been fetched succesfully by putting in correct parameters
Status-1: Server unable to process your request
0: Success
1: Invalid input parameters.
2: Invalid head parameters.

This is the status code which depicts the status of API request to the server.
TotalMarginRequiredNumerical valueThis calculates the total margin required for you to correctly place the order
Response body  :

{
    "body": {
        "AvailableMargin": 0,
        "Message": "Success",
        "Status": 0,
        "TotalMarginRequired": 145122
    },
    "head": {
        "responseCode": "5PMultiOrderMargin",
        "status": "0",
        "statusDescription": "Success"
    }
}
On this Page

Knowledge base

Calculates the total margin required for multiple orders combined.
MultiOrderMargin

Contribute and get rewarded

Help make these Dev Docs great, contribute to the APIs and get rewarded for your contribution

Need Help

Ask Developer Community

Contact Support

 

Changelog

Changes made to our APIs - Changelog

AVENUES