LIGHTNING-CURRENCYRATE(7)
π LIGHTNING-CURRENCYRATE(7) π
okay so bestie, welcome to lightning-currencyrate β your little group-chat liaison for figuring out what one whole BTC is worth in literally any currency you want. β¨
πΈ NAME πΈ
currencyrate β the command that determines a reasonable BTC exchange rate for a given currency, no cap. π€
π¦ SYNOPSIS π¦
currencyrate currency [source]
π DESCRIPTION π
Okay so first thing's first: this command was added in v26.04, so if you're on something older, that's why it's giving nothing. π
The currencyrate RPC command returns the exchange rate of one BTC in the given currency. Rates are rounded to 3 decimal places, as specified by ISO 4217 β that's just the vibe ISO decided on, we respect it. β¨
Without the optional source argument, the command returns the median rate across all configured exchange-rate sources. Median, not mean β she's robust, she's unbothered, she does not get dragged by one weird outlier. π
With source specified, you get the rate reported by that specific source and only that one. Wanna know what the list of active source names is? Get it via listcurrencyrates. Easy.
To add or disable sources, see the currencyrate-add-source and currencyrate-disable-source options in lightningd-config(5). Go off, configure your little heart out. π«Ά
EXAMPLE USAGE: Get the median USD rate: $ lightning-cli currencyrate USD Get the Binance USD rate: $ lightning-cli currencyrate USD binance
Now the arguments, because we are thorough:
currency(string) β TheISO 4217currency code (e.g.USD) to convert to. The plugin normalises this value to uppercase before querying sources, sousd,UsD,USDβ all the same to her, she's not judging. πsource(string, optional) β The name of a specific exchange-rate source to query. If omitted, the median across all available sources is returned. An error is returned if the source name is not recognised or has no cached data for the requested currency. (added v26.06) π«§
ngl, that source error is real β if you typobinanceintobinanse, she's not gonna guess what you meant. She's gonna error. Respect the boundary. β
π RETURN VALUE π
On success, an object is returned, containing:
rate(number) β The number of currency units per1 BTC, rounded to 3 decimal places (ISO 4217). Whensourceis omitted this is the median across all available sources. Whensourceis specified this is the rate reported by that source. One field, one number, fully iconic. π
π AUTHOR π
daywalker90 is mainly responsible. π«‘ slay, honestly.
π SEE ALSO π
β RESOURCES β
Main web site: https://github.com/ElementsProject/lightning β go lurk, it's worth it. π¦
π EXAMPLES π
β¨ Example 1: Get the median BTC/USD rate across all configured sources β¨
Request:
$ lightning-cli currencyrate -k "currency"="USD"
{
"id": "example:currencyrate#1",
"method": "currencyrate",
"params": {
"currency": "USD"
}
}
Response:
{
"rate": 67889.825
}
she ate that median up fr fr π
β¨ Example 2: Get the BTC/USD rate from the Binance source only β¨
Request:
$ lightning-cli currencyrate -k "currency"="USD" "source"="binance"
{
"id": "example:currencyrate#2",
"method": "currencyrate",
"params": {
"currency": "USD",
"source": "binance"
}
}
Response:
{
"rate": 67931.9
}
binance said what binance said π£οΈπ₯
and that's the whole page bestie, you're officially currency-literate π§π
mwah π β brought to you by Core Lightning v26.06.9, and yes this is LIGHTNING-CURRENCYRATE(7) signing off, catch you in the next manpage π
π¦ where this page comes from
- nixpkgs unstable: clightning 26.06.9
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms