Fetch smallcase investments
The API provides the list of all the user smallcase investment details or returns the user investment details for a particular smallcase, provided a particular iscid in query param. Data like the current config of the smallcase, stats, returns, smallcase description, and much more is shared.
If query param "aggregatedData" is provided, the API shares user’s aggregated investment details. “data” object field containing aggregated data would be returned.
<<apiUseCaseTerm>>: This is an ideal data api when you want to display information to a user about the investments that have been made by the user
Request
- Base URLhttps://gatewayapi.smallcase.com/v1
- URLhttps://gatewayapi.smallcase.com/v1/{gatewayname}/engine/user/investments
- Authnone required
Path parameters
Query parameters
OPTIONAL | array of iscid (invested smallcase ID). If passed will only fetch the details of the given invested smallcase(s).
OPTIONAL | aggregatedData can have the value as "true" . If passed will fetch user’s aggregated investment details.
Headers
Required | apiSecret shared for authentication
Required | JWT signed with shared secret & payload for connected user
Response
200
Example response
{
"success": true,
"data": [
{
"investment": {
"currentConfig": {
"constituents": [
{
"averagePrice": 172.4025,
"shares": 4,
"returns": 0.07742057104740359,
"ticker": "ICICINIFTY",
"stockName": "ICICI Prudential Nifty 50 ETF"
}
]
},
"returns": {
"networth": 1168.8,
"unrealizedInvestment": 985.61,
"insights": {
"currentInvestment": 985.61,
"currentValue": 1168.8,
"totalReturns": 183.19,
"totalReturnsPercent": 18.59,
"currentReturns": 183.19,
"currentReturnsPercent": 18.59
}
},
"stats": {
"indexValue": 118.58645914712716,
"lastCloseIndex": 118.2242469130792,
"lastToLastWeekCloseIndex": 115.30930083907427,
"lastWeekCloseIndex": 119.0988321952902,
"lastMonthCloseIndex": 116.07126551069895
},
"name": "Top 100 Stocks",
"scid": "SCET_0010",
"shortDescription": "2 ETFs that represent the 100 largest companies weighted to minimize risk",
"date": "2020-09-09T11:36:14.275Z",
"status": "VALID",
"version": 10,
"iscid": "5f58be2e0ae6815aef0d1118",
"imageUrl": "https://assets.smallcase.com/images/smallcases/200/SCET_0010.png",
"recommendedAction": "INVESTMORE"
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.