Net Wise Position


PURPOSE


This API will provide client Net Position report with additional parameter as multiplier. The only parameter passed on the request is the client’s ID which is passed to the system. This Net position will be for the day based on all orders, trades and will have Buy Quantity along with Buy Value and average buy value, Sell Quantity with sell value, last traded price along with booked PL. The only difference being Previous Closed Position is added to the day’s positions, hence a more holistic view is portrayed.

Request Method: POST

Request format: JSON

Request Header:

Content-Type: application/json

Ocp-Apim-Subscription-Key:
to be provided after registration


REQUEST BODY


HEADER

Field Name Description Data Type
(max length)
Validation Sample Value
appName App Name provided at the time of registration String Cannot be empty. IIFLMarDEMO
appVer Developer App Version String Cannot be empty. 1.0
key UserKey generated at the time of registration String Cannot be empty. ABpyyGUh1nsbesSlup3VKURkI4tQDe8y
osName Channel of order String Cannot be empty. WEB, Android, iOS
requestCode Request Code of the API called String Cannot be empty. IIFLMarRQNPNWV2
userId User ID generated at the time of registration String Cannot be empty. ZkhghN5uKj
password Password generated at the time of registration String Cannot be empty. lfjnfS7rHGj

BODY

Field Name Description Data Type
(max length)
Validation Sample Value
ClientCode Pass the Clientcode for whome we want to check margin. String(15) Cannot be empty. Dummy123

REQUEST:

{
  "head": {
    "appName": "IIFLMarDEMO",
    "appVer": "1.0",
    "key": "ABpyyGUh1nsbesSlup3VKURkI4tQDe8y",
    "osName": "Android",
    "requestCode": "IIFLMarRQNPNWV2",
    "userId": "mocZueK622W",
    "password": "UjR1ElLwSzr"
  },
  "body": {
    "ClientCode": "Dummy123"
  }
}

RESPONSE BODY


HEADER

Field Name Description Data Type
(max length)
List of Values Sample Value
responseCode This is the response code of API String - IIFLMarRQLoginForVendor
status This is the response code of API String 0
2
0
statusDescription This is the response code of API String 0 - Success
2 - Invalid head parameters
Success
responseCode This is the response code of API String - IIFLMarRQLoginForVendor

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. Int32 -1 = Exception
0 = success
1=No Record Found
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 of the scrip (C-Cash, D-Derivative, 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 Multiplier Scrip multiplier
BodQty Int32(4) Int32(4)
MTOM Double(15) MTOM Profit and Loss
BODPositionPrice Double(10) This is the average buy/sell price

Success Response

{
  "head": {
    "responseCode": "IIFLMarRQNPNWV1",
    "status": "0",
    "statusDescription": "Success"
  },
  "body": {
    "Message": "",
    "NetPositionDetail": [
      {
        "BodQty": 0,
        "BookedPL": -8233.33,
        "BuyAvgRate": 32085.3333,
        "BuyQty": 3,
        "BuyValue": 9625600,
        "Exch": "M",
        "ExchType": "D",
        "LTP": 32000,
        "MTOM": -17066.66,
        "Multiplier": 100,
        "NetQty": 2,
        "OrderFor": "D",
        "BODPositionPrice": 32676,
        "ScripCode": 210198,
        "ScripName": "GOLD 05 Apr 2019",
        "SellAvgRate": 32003,
        "SellQty": 1,
        "SellValue": 3200300
      },
      {
        "BodQty": 0,
        "BookedPL": 0,
        "BuyAvgRate": 2170,
        "BuyQty": 79,
        "BuyValue": 17143000,
        "Exch": "M",
        "ExchType": "D",
        "LTP": 0,
        "MTOM": -17143000,
        "Multiplier": 100,
        "NetQty": 79,
        "OrderFor": "D",
        "BODPositionPrice": 0,
        "ScripCode": 211781,
        "ScripName": "GOLD 27 Mar 2019 CE 28500.00",
        "SellAvgRate": 0,
        "SellQty": 0,
        "SellValue": 0
      },
      {
        "BodQty": 0,
        "BookedPL": -110,
        "BuyAvgRate": 1800,
        "BuyQty": 1,
        "BuyValue": 1800,
        "Exch": "N",
        "ExchType": "C",
        "LTP": 1700,
        "MTOM": 0,
        "Multiplier": 1,
        "NetQty": 0,
        "OrderFor": "I",
        "BODPositionPrice": 1640.85,
        "ScripCode": 22,
        "ScripName": "ACC",
        "SellAvgRate": 1690,
        "SellQty": 1,
        "SellValue": 1690
      },
      {
        "BodQty": 0,
        "BookedPL": -287.725,
        "BuyAvgRate": 1470.4545,
        "BuyQty": 110,
        "BuyValue": 161750,
        "Exch": "N",
        "ExchType": "C",
        "LTP": 1504,
        "MTOM": 2012.73,
        "Multiplier": 1,
        "NetQty": 60,
        "OrderFor": "D",
        "BODPositionPrice": 1393.5,
        "ScripCode": 236,
        "ScripName": "ASIANPAINT",
        "SellAvgRate": 1464.7,
        "SellQty": 50,
        "SellValue": 73235
      }
    ],
    "Status": 0
  }
}