Adds API endpoint for default currency

Adds an API endpoint to retrieve the default accounting
currency configured for the LNbits instance. Returns the configured
default currency or None if not set.
This commit is contained in:
padreug 2025-11-07 21:50:55 +01:00 committed by Patrick Mulligan
parent 44ba4e4086
commit 0d579892a8

View file

@ -100,6 +100,16 @@ async def api_list_currencies_available() -> list[str]:
return allowed_currencies()
@api_router.get("/api/v1/default-currency")
async def api_get_default_currency() -> dict[str, str | None]:
"""
Get the default accounting currency for this LNbits instance.
Returns the configured default, or None if not set.
"""
default_currency = settings.lnbits_default_accounting_currency
return {"default_currency": default_currency}
@api_router.post("/api/v1/conversion")
async def api_fiat_as_sats(data: ConversionData):
output = {}