currency.list
List GnuCash 5.17's built-in ISO 4217 currencies.
Lists GnuCash 5.17's 227 built-in ISO 4217 currencies in code order, with each one's code, name, ISO numeric code
(exchangeCode), fraction, symbol and, for the euro and the currencies with a fixed rate to it, euroRate. Every
book can use any of them without defining it first. commodity.list lists these and the
book's own securities together.
Examples
Example: with a new, empty book open as book.gnucash.
JSON-RPC
Request:
{"jsonrpc":"2.0","id":1,"method":"currency.list","params":{}}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"id": "CURRENCY::ADF",
"code": "ADF",
"fullname": "Andorran Franc",
"exchangeCode": "950",
"fraction": 100,
"symbol": "₣",
"euroRate": null
},
"…"
]
}
Command line
red-ale exec --book book.gnucash currency.list
It prints:
[
{
"id": "CURRENCY::ADF",
"code": "ADF",
"fullname": "Andorran Franc",
"exchangeCode": "950",
"fraction": 100,
"symbol": "₣",
"euroRate": null
},
"…"
]
MCP tool call
Tool call:
{"name":"currency.list","arguments":{}}
Result:
{
"content": [
{
"type": "text",
"text": "[{\"id\":\"CURRENCY::ADF\",\"code\":\"ADF\",\"fullname\":\"Andorran Franc\",\"exchangeCode\":\"950\",\"fraction\":100,\"symbol\":\"₣\",\"euroRate\":null},\"…\"]"
}
]
}
Effect: read.
Params
Params for methods that take none.
Type: NoParams.
Result
Type: array of CurrencyInfo.