Portfolio Holdings
Retrieves portfolio holdings for a portfolio.
Endpoint
GET
/data/v1/portfolio_holdings/:idParameters
api_key string
required
Your authentication key needed to make requests.
search string
Limit holdings where ticker or name contain search string.
order_by string
Defines what rating is used to rank stocks in response. -
in front denotes ranking in descending order (e.g. -total_rating
returns stock with highest total_rating first).
limit int
default: 50 max: 200
A limit on the number of objects to be returned. Limit can range between 1 and 200, and the default is 50.
offset int
default: 0
Use in combination with limit
. If e.g. offset
set to 50 with limit
set to 100 object 51 to 150 will be returned. If offset
set without limit
it will default to limit
of 50 so setting e.g. offset
to 50 will return object 51 to 100.
format string
default: json
Defines return format of response. Options are json or csv. Default is json.
Example Request
curl -X GET "https://sensaai.com/data/v1/portfolio_holdings/332?api_key=API_KEY"
Response
Returns a list of portfolio holdings if a valid portfolio ID was provided. Returns an error otherwise.
[
{
"date": "2023-10-02",
"stock": {
"id": "67",
"ticker": "ADM",
"name": "ARCHER DANIELS MIDLAND CO",
"marketCap": "40613400000",
"sector": "Consumer Defensive",
"industry": "Consumer Packaged Goods"
},
"totalRating": "9.7817",
"returnRating": "9.8054",
"growthRating": "9.8576",
"riskRating": "8.6948",
"valuationRating": "9.8244",
"technicalRating": "9.8149",
"macroRating": "5.0024"
},
...more holdings
]