Income received: staking, lending, rewards, airdrops
get_incomeTotal the income the portfolio received (yield, staking, lending, rewards, airdrops) over period (omit for all time), each payment valued in USD on the day it arrived, in one of two views. by_category: totals per category (staking, lending, defi, rewards, airdrop, other), topSources largest first, and a monthly series. by_asset: per bucket (week by default, or day or month), oldest first, the USD each asset paid, with topAssets largest first; bucket applies to this view only and by_category refuses it. Futures P&L is excluded because it is a trading result, and unpricedAssets lists what could not be valued. A series longer than 200 buckets keeps the most recent 200 and says so in truncated, so use week or month for long periods. Use for "how much did staking pay me this year", "which coin has paid me the most". For the individual payments use get_movements with kind INCOME; for income as one line of overall profit use get_performance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | Yes | Which view to read: by_category (totals per income category); by_asset (series of income per asset). Each view takes only the arguments the description lists for it. | |
| bucket | No | by_asset only. Granularity of the series. Defaults to week. | |
| 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. |
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. | |
| message | No | Plain-language explanation that accompanies `error`, `data_status` or a proposed change. Read it to the user. | |
| profile | No | The portfolio these figures belong to (absent on list_profiles). | |
| by_asset | No | Present when view = "by_asset". | |
| 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. | |
| by_category | No | Present when view = "by_category". | |
| 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. |