upsert_asset_profile
Create or update an asset profile by posting an empty record and patching metadata. Idempotent and error-tolerant.
Instructions
Create-or-update an asset profile.
POSTs an empty profile-data record (idempotent — Ghostfolio returns HTTP 500 on both duplicate-create and some first-time-create paths while still persisting the record, so this tolerates 500). Then PATCHes metadata (name, currency, asset class, optional sub-class). PATCH is the source of truth — if the profile doesn't exist after the POST, PATCH will surface a 404. Calling twice with the same input yields the same end state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable name for the asset | |
| symbol | Yes | Symbol/ticker of the asset. Permanent — renaming orphans associated activities and market data | |
| currency | Yes | Currency code of the asset (e.g., 'USD', 'CHF', 'EUR') | |
| asset_class | Yes | Asset class: 'EQUITY', 'FIXED_INCOME', 'REAL_ESTATE', 'COMMODITY', 'LIQUIDITY' (cash), or 'ALTERNATIVE_INVESTMENT'. Note: Ghostfolio's enum does not include 'CASH' — use 'LIQUIDITY' | |
| data_source | Yes | Data source for the symbol. Typically 'MANUAL' — Ghostfolio rejects profile-data writes for auto-fetched sources | |
| asset_sub_class | No | Optional asset sub-class (e.g., 'MUTUALFUND', 'CASH', 'ETF') |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||