Developer APIs

Positions API Download

Purpose

This method will provide the client’s Positions

Request URL https://Openapi.5paisa.com/VendorsAPI/Service1.svc/V1/NetPositionNetWise

Request Method POST
Request format: JSON

Request Header Content-Type:application/json

Request Body

Header

Field Name Description Data Type (max length) Sample Value
appName App Name provided at the time of registration String APPTRIAL
appVer Developer App Version String 1.0
key UserKey generated at the time of registration String ue73jHVeEzBswG5ss9ugyrAasdasdyKYxg
osName Channel of order String WEB, Android, iOS
requestCode Request Code of the API called String 5PNPNWV1
userId User ID generated at the time of registration String asdue73jHVeE
password Password generated at the time of registration String 9ugyrAasdasdy

*Note:- All fields are mandatory (cannot be empty)

Body

Field Name Description Data Type (max length) Sample Value
ClientCode Pass the registered client code of the user. String(10) 12345678

*Note:- All fields are mandatory (cannot be empty)

Response Body

Field Name Description Data Type (Max length) List Values Sample Value
Message If error code is not 0 then use the message field otherwise it will be empty. String A. "Invalid head parameters."
B. "Invalid Body Parameters."
C. “Success”
D. “Error while processing your request.”
Success
Status If Error code is not 0 then there is an issue while processing client request, In such a case use Message field only. Integer A. -1 = Exception
B. 0 = success
C. 1=No Record Found
D. 2- Invalid Input/ head parameters
0
NetPositionDetail This class contain the all Net Postion details of Client List - -

NET POSITION DETAIL

FieldName Type Description
Exch Char Exchange in which order has been Placed. N- NSE, B-BSE, M-MCX
ExchType Char Exchange segment C-Cash, D-Derivatives, U-Currency
ScripCode Int32 Scrip Code of the particular stock
ScripName String Scrip Name of the scrip.
BuyQty Int32 Number of Shares bought in particular scrip.
BuyAvgRate Double Average buying rate for a particular scrip
BuyValue Double Average buying rate Multiply by bought quantity
SellQty Int32 Number of shares sold in particular scrip.
SellAvgRate Double Average Selling Rate.
SellValue Double Average Selling rate Multiply by sold quantity.
NetQty Int32 Bought Quantity – sold Quantity.
BookedPL Double Profit or Loss booked by client for particular scrip.
LTP Double Last traded Price.
OrderFor Char I-Intraday , D- Delivery.
Multiplier Double Scrip multiplier
BodQty Int32 Bod quantity
MTOM Double MTOM profit and loss.
PreviousClose Double Previous close

Sample Request

{
    "head": {
        "appName": "APPTRIAL",
        "appVer": "1.0",
        "key": "ue73jH6AKVASDSD34RXeEzBswG5ss9ugyrAyKYxg",
        "osName": "Android",
        "requestCode": "5PNPNWV1",
        "userId": "s9RQWE22BzKCjdL9N",
        "password": "nnS4f34HY775zw"
    },
    "body": {
        "ClientCode": "12345678"
    }
}

Sample Response

Copy Copied
{
    "body": {
        "Message": "",
        "NetPositionDetail": [
    {
        "BodQty": 0,
        "BookedPL": 0,
        "BuyAvgRate": 0,
        "BuyQty": 0,
        "BuyValue": 0,
        "Exch": "N",
        "ExchType": "C",
        "LTP": 52.75,
        "MTOM": 0.15,
        "Multiplier": 1,
        "NetQty": -1,
        "OrderFor": "D",
        "PreviousClose": 52.1,
        "ScripCode": 11184,
        "ScripName": "IDFCFIRSTB",
        "SellAvgRate": 52.9,
        "SellQty": 1,
        "SellValue": 52.9
    }
    ],
        "Status": 0
    },
    "head": {
        "responseCode": "5PNPNWV1",
        "status": "0",
        "statusDescription": "Success"
    }
}