Risk metrics and portfolio health score (Pro)
get_riskAssess portfolio risk, in one of two views; both need a Pro plan, and a free account gets an upgrade_required answer, not an error. metrics: measured risk over period (omit for full history): max drawdown in % and USD with peak and trough days, annualized volatility and return, Sharpe, and return, beta and correlation against benchmark (BTC by default, or ETH). Drawdown is flow-honest, so a withdrawal is not counted as a loss, and a metric is null when the window holds too few daily returns. score: a 0-100 structural health rating with a band (resilient, solid, fragile, concentrated), pillar sub-scores (diversification, custody, liquidity, quality, volatility, hygiene, target drift) and what moved since the last reading; it scores structure, never returns, over a fixed 30 days, so it takes no period or benchmark and refuses them. A pillar that cannot be measured yet is listed in excluded, not scored zero. Use metrics for "what was my worst drawdown", "do I just track bitcoin"; score for "how healthy is my portfolio". For profit use get_performance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | Yes | Which view to read: metrics (drawdown, volatility, Sharpe, beta over period); score (0-100 health score, fixed 30 days). Each view takes only the arguments the description lists for it. | |
| period | No | Time window ending now: last_24h, last_7d, last_30d, last_90d, ytd (since 1 January UTC) or all. Omit for all time. | |
| profile | No | Which portfolio to read, for accounts with more than one: its id, or its name (exact, case-insensitive, e.g. "Trading"). Omit to read this connection's default portfolio; every answer names the portfolio it read in `profile`. An unknown or shared name returns profile_not_found or profile_ambiguous listing the real ones, and list_profiles shows them up front. | |
| benchmark | No | metrics only. Asset to measure beta, correlation and excess return against. Defaults to BTC. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | No | Which view answered; its data is under the key of the same name. | |
| error | No | Present ONLY when the call was refused instead of answered: upgrade_required (Pro plan needed), not_found, profile_not_found, profile_ambiguous, invalid_arguments, write_not_permitted. No data fields come with it; read `message` to the user rather than retrying the same call. | |
| score | No | Present when view = "score". | |
| message | No | Plain-language explanation that accompanies `error`, `data_status` or a proposed change. Read it to the user. | |
| metrics | No | Present when view = "metrics". | |
| profile | No | The portfolio these figures belong to (absent on list_profiles). | |
| next_step | No | What the user should do about data_status. | |
| source_url | No | Link to the page in the WhereItGoes app that shows this data. | |
| data_status | No | Present only when the portfolio has no data yet. nothing_connected: no exchange and no wallet is connected, so empty lists and zeros mean "no data", NOT a $0 portfolio, and no data fields come with it (except on get_connections, get_alerts, get_target_allocation and list_profiles, which also answer). Send the user to next_step. syncing: a source is connected but its first sync is still running, so figures are partial and not final. | |
| upgrade_url | No | Where the user can upgrade, on an upgrade_required refusal. | |
| stock_assets | No | Present when the answer mentions Binance Stocks shares (EQ_<ticker>): they are US stocks, not crypto. |