list_commodities
List commodities from your GnuCash book, filter by stale prices to identify those needing fresh quotes, and get details for price updates.
Instructions
List all commodities (currencies, stocks, etc.) in the book.
Leads with a Showing X-Y of Z commodities line, then a
compact one-line-per-commodity format by default. Page with
offset; limit=0 returns the count only. Use verbose=true
for full JSON with fraction, latest prices, etc.
THE PRICE-UPDATE WORK LIST: stale_days=30, held_only=true
returns exactly the commodities needing fresh quotes, each
marked Nd stale or no price on file. Look the quotes
up, then record them all in one create_prices call.
Args: verbose: If true, return full JSON details for each commodity. limit: Page size (default 50, max 250). 0 = count only. offset: 0-indexed first row to return (default 0). stale_days: Only commodities whose latest market price is at least this many days old, including never-priced ones, excluding the book default currency. Omit for the unfiltered list. held_only: Only commodities some real account is denominated in. Filters AND-combine.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| verbose | No | ||
| held_only | No | ||
| stale_days | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |