Portfolio

Holding

This API allows to fetch the complete information of the DP Holding of the Users

Method POST
Production URL https://openapi.motilaloswal.com/rest/report/v1/getdpholding
Test URL https://uatopenapi.motilaloswal.com/rest/report/v1/getdpholding
Request None or JSON (in case of Dealer)
Response JSON

Request JSON

Field Type Mandatory Description
clientcode String(15) N It's mandatory in case of Dealer

Sample Request (Body)


{
  "clientcode":"AA017", // In case of dealer else not required
}

	
	

Sample Response

	
{
  "status": "SUCCESS",
  "message": "DP Holding Data",
  "errorcode": "",
  "data": [
{
    "clientcode": "AA020",
    "scripisinno": "INE131B01039",
    "dpquantity": 1119,
    "blockedquantity": 0,
    "scripname": "RELAXO EQ",
    "buyavgprice": 813.66,
    "poaquantity": 41,
    "collateralquantity": 1078,
    "outstandingquantity": 0,
    "debitstockquantity": 0,
    "nonpoaquantity": 0,
    "rmssellingquantity": 0,
    "btstquantity": 0,
    "buybackquantity": 0,
    "tpinquantity": 0,
    "slbmquantity": 0,
    "nbfcquantity": 0,
    "bsescripcode":50001,
    "nsesymboltoken":123
},
{....}..
]
}
	
Field Type Description
clientcode String(20) Client
scripisinno String(20) Unique Identifier of Scrip
dpquantity Number Total Quantity
blockedquantity Number Quantity Blocked against executed or pending orders
scripname String(30) Name of scrip
buyavgprice Decimal(15,4) Average price at which all shares were bought
poaquantity Number POA Quantity
collateralquantity Number Collateral Quantity
outstandingquantity Number Share purchased on T-2 Days
debitstockquantity Number CUSA Stock
nonpoaquantity Number Non POA Quantity
rmssellingquantity Number RMS Selling Quantity
btstquantity Number Share Purchased on T-1 Day
buybackquantity Number Quantity blocked against Buyback Orders
tpinquantity Number Quantity which required EDIS to sell
slbmquantity Number SLBM Quantity
nbfcquantity Number NBFC Quantity
bsescripcode Number BSE Scrip code i.e. unique identifier
nsesymboltoken Number NSE Symbol Token i.e. unique identifier

Position

This API allows to fetch the complete information of the Position of the Users.

Method POST
Production URL https://openapi.motilaloswal.com/rest/book/v1/getposition
Test URL https://uatopenapi.motilaloswal.com/rest/book/v1/getposition
Request None or JSON(In case of Dealer)
Response JSON

Request JSON

Field Type Mandatory Description
clientcode String(15) N Its mandatory in case of Dealer

Sample Request (Body)

	
{
  "clientcode":"AA017", //  in case of dealer else not required
}
	
	

Sample Response

	
{
  "status": "SUCCESS",
  "message": "Position Data",
  "errorcode": "",
  "data": [
{
    "exchange": "NSE",
    "clientcode": "AA020",
    "productname": "NORMAL",
    "symboltoken": 1660,
    "symbol": "INFY",
    "buyquantity": 0,
    "buyamount": 0,
    "sellquantity": 0,
    "sellamount": 0,
    "daybuyquantity": 0,
    "daybuyamount": 0,
    "daysellquantity": 0,
    "daysellamount": 0,
    "LTP": 0,
    "marktomarket": 0,
    "bookedprofitloss": 0,
    "cfbuyquantity": 0,
    "cfbuyamount": 0,
    "cfsellquantity": 0,
    "cfsellamount": 0,
    "actualbookedprofitloss": 0,
    "actualmarktomarket": 0,
    "series": "EQ",
    "expirydate": "0",
    "strikeprice": 0,
    "optiontype": "XX"
}    
]
}

Field Type Description
exchange String(50) Name of the Exchange
clientcode String(50) Client ID
productname String(20) Name of product
symboltoken Number Exchange Scrip code or Symbol Token i.e.unique identifier
symbol String(40) Symbol
buyquantity Number Buy Order Quantity for transactaion i.e.carryforward + traded
buyamount Decimal(15,4) Buy Amount for transactaion i.e.carryforward (based on last day close) + traded
sellquantity Number Sell Order Quantity for transactaion i.e.carryforward + traded
sellamount Decimal(15,4) Sell Amount for transactaion i.e.carryforward (based on last day close) + traded
daybuyquantity Number Buy Order Quantity in a Day for transactaion i.e.todays traded
daybuyamount Decimal(15,4) Buy Amount in a day for transactaion i.e.today traded
daysellquantity Number Sell Order Quantity in a Day for transactaion i.e.today traded
daysellamount Decimal(15,4) Sell Amount in a day for transactaion i.e.today traded
LTP Decimal(15,4) Last Traded Price
marktomarket Decimal(15,4) Unrealized Loss / Profit
bookedprofitloss Decimal(15,4) Realized Loss / Profit
cfbuyquantity Number Buy Order Quantity in a Day for transactaion i.e. caryforward
cfbuyamount Decimal(15,4) Buy Amount in a day for transactaion i.e.caryforward (on actual buy amount)
cfsellquantity Number Sell Order Quantity in a Day for transactaion i.e.caryforward
cfsellamount Decimal(15,4) Sell Amount in a day for transactaion i.e.caryforward (on actual sell amount)
actualbookedprofitloss Decimal(15,4) Unrealized Loss / Profit based on Actual Avg Price
actualmarktomarket Decimal(15,4) Realized Loss / Profit based on Actual Avg Price
series String(2) Series
expirydate String(40) Expiry date of scrip
strikeprice Decimal(15,4) Price when order will excute
optiontype String(2) Option type

Position Conversion

Method POST
Production URL https://openapi.motilaloswal.com/rest/trans/v1/positionconversion
Test URL https://uatopenapi.motilaloswal.com/rest/trans/v1/positionconversion
Request None or JSON (in case of Dealer)
Response JSON

Request JSON

Field Type Mandatory Description
clientcode String(15) N Client ID Mandatory in case of Dealer
exchange String(10) Y Name of the Exchange
scripcode Number Y Scrip code or Symbol Token is unique identifier
quantity Number Y Quantity for position conversion
oldproduct String(15) Y Type of Old Product
newproduct String(15) Y Type of new Product

Sample Request (Body)

	
{
   "clientcode":"KAL005", // in case of dealer else not required
   "exchange":"NSE",
   "scripcode":1660,
   "quantity":100,
   "oldproduct":"Normal",
   "newproduct":"ValuePlus"
}
	

Sample Response (Success)

	
{
   "status": "SUCCESS",
   "message": "Position Conversion Request Sent Successfully",
   "errorcode": ""
}
	

Sample Response (Failure)

	
{
   "status": "ERROR",
   "message": "Invalid Product Type Parameter",",
   "errorcode": "MO1057"
}
	

Position Detail

This API is used to get Position Detail for a clientcode

Method POST
Production URL https://openapi.motilaloswal.com/rest/book/v1/getpositiondetail
Test URL https://uatopenapi.motilaloswal.com/rest/book/v1/getpositiondetail
Request JSON
Response JSON

Request JSON

Field Type Mandatory Description
clientcode String N Client ID is mandatory in case of Dealer only

Sample Request (Body)


{
  "clientcode":"AA020" // In case of dealer only
}
	
	

Sample Response

	
{
    "status": "SUCCESS",
    "message": "Position Data in Detail",
    "errorcode": "",
    "data": [
        {
            "clientcode": "AA020",
            "transactiondate": "23-Jun-2023",
            "exchange": "NSECD",
            "symbol": "USDINR 29-Aug-2023 PE 81",
            "expirydate": "29-Aug-2023",
            "strikeprice": 81,
            "optiontype": "PE",
            "symboltoken": 13330,
            "openquantity": -2000,
            "openprice": 0.05
        },
	{
            "clientcode": "AA020",
            "transactiondate": "04-Jul-2023",
            "exchange": "NSECD",
            "symbol": "USDINR 27-Dec-2023 PE 82",
            "expirydate": "27-Dec-2023",
            "strikeprice": 82,
            "optiontype": "PE",
            "symboltoken": 12302,
            "openquantity": -5000,
            "openprice": 0.44
        }
    ]
}