Money in and out: USD flows, deposits, transfers, fiat
get_money_flowsSummarise money entering and leaving the portfolio, in one of four views. capital_flow: deposits and withdrawals per bucket (month by default, or week) over period (omit for all time), in USD split by asset and valued on the day they moved, oldest bucket first; moves between the user's own accounts, Earn shuffles and cancelled withdrawals are excluded, so this is capital genuinely entering or leaving. deposits: exchange deposits, newest first, with what is settled about each one's cost basis (manual_cost, transfer_id when matched to the user's own withdrawal, reconciliation classification); exchange deposits only, spam hidden. transfers: withdrawals matched to the deposit that landed on another of the user's own accounts, most recently matched first, both legs in full. fiat: per local fiat currency (e.g. VND, KRW), all-time fiat spent buying crypto and received selling it, net invested and volume-weighted rates, in that currency, not USD. period and bucket apply to capital_flow only; other views refuse them. Lists return at most 200 rows. Use for "how much did I deposit each month", "which deposits need a cost basis", "did my BTC arrive in my wallet". For single events in native units use get_movements.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| view | Yes | Which view to read: capital_flow (USD deposited and withdrawn per bucket); deposits (exchange deposits and their cost-basis status); transfers (matched moves between own accounts); fiat (fiat in and out per local currency). Each view takes only the arguments the description lists for it. | |
| bucket | No | capital_flow only. Granularity of the series. Defaults to month. | |
| 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 |
|---|---|---|---|
| fiat | No | Present when view = "fiat". | |
| 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). | |
| deposits | No | Present when view = "deposits". | |
| next_step | No | What the user should do about data_status. | |
| transfers | No | Present when view = "transfers". | |
| 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. | |
| capital_flow | No | Present when view = "capital_flow". | |
| stock_assets | No | Present when the answer mentions Binance Stocks shares (EQ_<ticker>): they are US stocks, not crypto. |