Institution Portfolio Returns
GET/api/v1.0/quote/institution/return-rateGet an institution's historical cumulative return curve and latest portfolio market value / stock count changes. Optional compare_code (e.g. US.SPY / US.QQQ) for benchmark comparison.
Request
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
institution_id | int | query | yes | Institution ID, e.g. 255251 (Berkshire Hathaway) |
compare_code | string | query | no | Benchmark symbol for comparison, e.g. US.SPY / US.QQQ; omit for no comparison |
Example
bash
curl -X GET 'https://webapi.moomoo.com/api/v1.0/quote/institution/return-rate?institution_id=1&compare_code=1' \
-H 'Authorization: Bearer <AccessToken>' | jqResponse
| Field | Type | Description |
|---|---|---|
data.items | object[] | |
data.total_return_rate | number | Period cumulative return in percent |
data.market_value | string | Latest portfolio market value in USD |
data.market_value_change | string | Market value change vs prior period in USD |
data.stock_count | integer | Number of holdings |
data.stock_count_change | integer | Change in number of holdings vs prior period |
data.items[].date | integer | Period date YYYY-MM-DD |
data.items[].timestamp | integer | Period timestamp in milliseconds |
data.items[].return_rate | number | Cumulative return in percent |
data.items[].compare_increase | number | Benchmark return in percent |
Errors
| ret_code | error.code | Description |
|---|---|---|
| 0 | — | Success |
| -3 | invalid_parameter | Missing or invalid parameter |
| -7 | invalid_symbol | Unknown symbol |
| -8 | unsupported | Market or product is not supported |
| -9 | permission_denied | Missing permission |
| -10 | no_data | No data |
| -11 | rate_limited | Too many requests |
Sample
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"total_return_rate": "example",
"market_value": "example",
"market_value_change": "example",
"stock_count": "example",
"stock_count_change": "example",
"items": [
{
"date": 0,
"timestamp": 0,
"return_rate": "example",
"compare_increase": "example"
}
]
}
}