LIGHTNING-BKPR-CHANNELSAPY(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

✨ lightning-bkpr-channelsapy β€” the manual, but make it cute ✨

okay bestie, so you're looking at the lightning-bkpr-channelsapy(7) page from the Core Lightning manual set (section 7, the RPC-command section, iykyk). Buckle up, we're doing channel earnings πŸ’…


πŸ’– NAME πŸ’–

bkpr-channelsapy β€” the command that spills the tea on your channel earnings πŸ“

πŸ¦‹ SYNOPSIS πŸ¦‹

bkpr-channelsapy [start_time] [end_time]

🌸 DESCRIPTION 🌸

The bkpr-channelsapy RPC command lists stats on routing income, leasing income, and various calculated APYs for channel routed funds. literally the glow-up report for your channels, no cap πŸ’…

  • start_time (u64, optional) β€” a UNIX timestamp (in seconds!) and it filters events after the timestamp you gave it. the default is zero. zero, bestie 🫢
  • end_time (u64, optional) β€” another UNIX timestamp (in seconds) but this one filters events up to and at the timestamp you provided. the default is max-int, so like, the end of time 😭

πŸ”₯ RETURN VALUE πŸ”₯

On success you get an object containing channels_apy. it's an array of objects, and every single object in there has these fields:

  • account (string) β€” the account name. if the account is a channel, it's the channel_id. and the 'net' entry is the rollup of all channel accounts β€” the main character of the array, honestly πŸ‘‘
  • routed_out_msat (msat) β€” sats routed (outbound).
  • routed_in_msat (msat) β€” sats routed (inbound).
  • lease_fee_paid_msat (msat) β€” sats paid for leasing inbound (liquidity ads).
  • lease_fee_earned_msat (msat) β€” sats earned for leasing outbound (liquidity ads).
  • pushed_out_msat (msat) β€” sats pushed to peer at open.
  • pushed_in_msat (msat) β€” sats pushed in from peer at open.
  • our_start_balance_msat (msat) β€” starting balance in channel at funding. ⚠️ note that if our start balance is zero, any _initial field will be omitted (can't divide by zero, the math said absolutely not πŸ™ˆ).
  • channel_start_balance_msat (msat) β€” total starting balance at funding.
  • fees_out_msat (msat) β€” fees earned on routed outbound.
  • utilization_out (string) β€” sats routed outbound / total start balance.
  • utilization_in (string) β€” sats routed inbound / total start balance.
  • apy_out (string) β€” fees earned on outbound routed payments / total start balance for the length of time this channel has been open, amortized to a year (APY).
  • apy_in (string) β€” fees earned on inbound routed payments / total start balance for the length of time this channel has been open, amortized to a year (APY).
  • apy_total (string) β€” total fees earned on routed payments / total start balance for the length of time this channel has been open, amortized to a year (APY).
  • fees_in_msat (msat, optional) β€” fees earned on routed inbound.
  • utilization_out_initial (string, optional) β€” sats routed outbound / our start balance.
  • utilization_in_initial (string, optional) β€” sats routed inbound / our start balance.
  • apy_out_initial (string, optional) β€” fees earned on outbound routed payments / our start balance for the length of time this channel has been open, amortized to a year (APY).
  • apy_in_initial (string, optional) β€” fees earned on inbound routed payments / our start balance for the length of time this channel has been open, amortized to a year (APY).
  • apy_total_initial (string, optional) β€” total fees earned on routed payments / our start balance for the length of time this channel has been open, amortized to a year (APY).
  • apy_lease (string, optional) β€” lease fees earned over total amount leased for the lease term, amortized to a year (APY). πŸŽ€ only appears if the channel was leased out by us. exclusive behavior, we love to see it.

🧚 AUTHOR 🧚

Lisa Neigut niftynei@gmail.com is mainly responsible. icon behavior, we stan πŸ’œ

πŸ’« SEE ALSO πŸ’«

lightning-bkpr-listincome(7), lightning-bkpr-listfunds(7), lightning-bkpr-listaccountevents(7), lightning-bkpr-dumpincomecsv(7), lightning-listpeers(7)

🌈 RESOURCES 🌈

Main web site: https://github.com/ElementsProject/lightning


⭐ EXAMPLES ⭐

Example 1:

Request:

$ lightning-cli bkpr-channelsapy

{
  "id": "example:bkpr-channelsapy#1",
  "method": "bkpr-channelsapy",
  "params": {}
}

Response:

{
  "channels_apy": [
    {
      "account": "channelid0120000120000120000120000120000120000120000120000120000",
      "routed_out_msat": 1000000,
      "routed_in_msat": 510091208,
      "lease_fee_paid_msat": 0,
      "lease_fee_earned_msat": 0,
      "pushed_out_msat": 0,
      "pushed_in_msat": 0,
      "our_start_balance_msat": 0,
      "channel_start_balance_msat": 1000000000,
      "fees_out_msat": 0,
      "fees_in_msat": 106,
      "utilization_out": "30.7060%",
      "utilization_in": "10.0027%",
      "utilization_in_initial": "50.0081%",
      "apy_out": "0.0080%",
      "apy_in": "0.0080%",
      "apy_in_initial": "0.0250%",
      "apy_total": "0.0160%"
    },
    {
      "account": "channelid0230000230000230000230000230000230000230000230000230000",
      "routed_out_msat": 510190102,
      "routed_in_msat": 0,
      "lease_fee_paid_msat": 0,
      "lease_fee_earned_msat": 0,
      "pushed_out_msat": 0,
      "pushed_in_msat": 0,
      "our_start_balance_msat": 1000000000,
      "channel_start_balance_msat": 1000000000,
      "fees_out_msat": 106,
      "fees_in_msat": 0,
      "utilization_out": "31.7060%",
      "utilization_out_initial": "51.5591%",
      "utilization_in": "11.0027%",
      "apy_out": "0.0081%",
      "apy_out_initial": "0.0121%",
      "apy_in": "0.0081%",
      "apy_total": "0.0161%",
      "apy_total_initial": "0.0161%"
    },
    {
      "account": "channelid0250000250000250000250000250000250000250000250000250000",
      "routed_out_msat": 500000000,
      "routed_in_msat": 0,
      "lease_fee_paid_msat": 0,
      "lease_fee_earned_msat": 0,
      "pushed_out_msat": 0,
      "pushed_in_msat": 0,
      "our_start_balance_msat": 1000000000,
      "channel_start_balance_msat": 1000000000,
      "fees_out_msat": 0,
      "fees_in_msat": 0,
      "utilization_out": "32.7060%",
      "utilization_out_initial": "52.5591%",
      "utilization_in": "12.0027%",
      "apy_out": "0.0082%",
      "apy_out_initial": "0.0122%",
      "apy_in": "0.0082%",
      "apy_total": "0.0162%",
      "apy_total_initial": "0.0162%"
    },
    {
      "account": "net",
      "routed_out_msat": 1011190102,
      "routed_in_msat": 510091208,
      "lease_fee_paid_msat": 0,
      "lease_fee_earned_msat": 0,
      "pushed_out_msat": 0,
      "pushed_in_msat": 0,
      "our_start_balance_msat": 2000000000,
      "channel_start_balance_msat": 3000000000,
      "fees_out_msat": 106,
      "fees_in_msat": 106,
      "utilization_out": "33.7060%",
      "utilization_out_initial": "53.5591%",
      "utilization_in": "13.0027%",
      "utilization_in_initial": "53.0081%",
      "apy_out": "0.0083%",
      "apy_out_initial": "0.0123%",
      "apy_in": "0.0083%",
      "apy_in_initial": "0.0253%",
      "apy_total": "0.0163%",
      "apy_total_initial": "0.0163%"
    }
  ]
}

🫢 okay that's the whole page bestie, every flag, every field, every percentage. go check those APYs, periodt. πŸ’…

and that's a wrap from the Core Lightning v26.06.9 build of this here LIGHTNING-BKPR-CHANNELSAPY(7) page β€” mwah, study it, and slay βœ¨πŸŽ€πŸ’–

πŸ“¦ where this page comes from