LIGHTNING-LISTCHANNELMOVES(7)

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

πŸ’… lightning-listchannelmoves β€” bestie, it's the coin-movement audit trail ✨

okay so picture this: the manual page lightning-listchannelmoves(7) β€” that's the one we're doing right now, she's serving audit log energy β€” and honestly? lowkey iconic. She's the command that hands you the receipts for every coin that ever moved through your channels. no cap, receipts. πŸ§ΎπŸ¦‹


🌸 NAME 🌸

listchannelmoves β€” the command that gets you the audit list of all channel coin movements. every credit, every debit, every little fee. the whole story. periodt. πŸ‘‘


✨ SYNOPSIS ✨

listchannelmoves [index [start] [limit]]

three optional little arguments, all vibes, all optional. slay.


πŸ’– DESCRIPTION πŸ’–

So listchannelmoves is a command added in v25.09 (yes she's new, yes she's already main character energy), and what she does is return the confirmed balance changes within lightning channels over time. like a little timeline of your coin's whole journey. 🌈

Her arguments, one by one:

  • index (string, optional) β€” how to interpret start and limit. and um, the tea is: it's always "created". there's literally only one option. she's committed to the bit. πŸ’…
  • start (u64, optional) β€” if index is specified, you can specify start to start from that value. and where do you get that value? generally it's returned from lightning-wait(7). iykpyk. 🫢
  • limit (u32, optional) β€” if index is specified, limit lets you specify the maximum number of entries to return. for when you don't want the whole novel, just a chapter. πŸ“–

πŸŽ€ RETURN VALUE πŸŽ€

On success (and we love a success), you get back an object containing channelmoves. it's an array of objects, and each object is giving:

  • created_index (u64) β€” a 1-based index showing the order this move was created in. counting starts at 1, not 0, don't @ me. πŸ”’
  • account_id (string) β€” the channel_id corresponding to the channel involved. it's the channel's whole identity, ngl.
  • credit_msat (msat) β€” amount credited. and listen: one of this or debit_msat is zero. it's one or the other, never both popping off. πŸ’Έ
  • debit_msat (msat) β€” amount debited. same deal, one of this or credit_msat is zero.
  • timestamp (u64) β€” time of this event, in seconds since January 1 1970 UTC. yes, the classic unix epoch moment. ⏰
  • primary_tag (string) β€” one of "invoice", "routed", "pushed", "lease_fee", "channel_proposed", "penalty_adj", "journal_entry". it's a set of one or more tags defining the nature of the change. it's giving vibe check for your coins. 🏷️
  • fees_msat (msat) β€” the fees paid for this payment. small but mighty. πŸ’€
  • payment_hash (hash, optional) β€” the hash associated with this payment. not present for leases or push funding β€” she's just not invited to those parties. πŸ™ˆ
  • part_id (u64, optional) β€” the part_id for the payment. and the tea: the payment_hash, group_id, part_id tuple will be unique. πŸ”₯
  • group_id (u64, optional) β€” the group_id for the payment. same rule, same uniqueness, the payment_hash, group_id, part_id tuple is unique. fr fr.

πŸ’€ ERRORS πŸ’€

On failure, one of these error codes may come back at you:

  • -32602 β€” error in given parameters. aka you fed her something weird. check your args bestie 😭

🌟 RESOURCES 🌟

Main web site: https://github.com/ElementsProject/lightning β€” go say hi, the source is right there πŸ‘‘


πŸ¦‹ EXAMPLES πŸ¦‹

Example 1

Request:

$ lightning-cli listchannelmoves

{
  "id": "example:listchannelmoves#1",
  "method": "listchannelmoves",
  "params": {}
}

Response:

{
  "channelmoves": [
    {
      "created_index": 1,
      "account_id": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7",
      "credit_msat": 500000000,
      "debit_msat": 0,
      "timestamp": 1738520000,
      "primary_tag": "invoice",
      "payment_hash": "paymenthashdelpay10101010101010101010101010101010101010101010101",
      "fees_msat": 0
    },
    {
      "created_index": 2,
      "account_id": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
      "credit_msat": 0,
      "debit_msat": 500000000,
      "timestamp": 1738520000,
      "primary_tag": "invoice",
      "payment_hash": "8a46ab91013146df39e98ad7c89505fbb5419f110e928f7a393e8304f3057df7",
      "part_id": 0,
      "group_id": 1,
      "fees_msat": 0
    },
    {
      "created_index": 3,
      "account_id": "f8fc83a432cbfb2fffe222cc06727fdd977b5dd10ebd6707158e799e6f522d9f",
      "credit_msat": 0,
      "debit_msat": 500000000,
      "timestamp": 1758192801,
      "primary_tag": "invoice",
      "payment_hash": "88969daaf02214a1928e6eb62a237a8ee557f3da93b2c44f3901432c88f4334b",
      "part_id": 0,
      "group_id": 1,
      "fees_msat": 0
    },
    {
      "created_index": 4,
      "account_id": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
      "credit_msat": 0,
      "debit_msat": 10000,
      "timestamp": 1758192801,
      "primary_tag": "routed",
      "payment_hash": "paymenthashinvl0310031003100310031003100310031003100310031003100",
      "fees_msat": 1
    },
    {
      "created_index": 5,
      "account_id": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7",
      "credit_msat": 10001,
      "debit_msat": 0,
      "timestamp": 1758192801,
      "primary_tag": "routed",
      "payment_hash": "paymenthashinvl0310031003100310031003100310031003100310031003100",
      "fees_msat": 1
    },
    {
      "created_index": 6,
      "account_id": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
      "credit_msat": 0,
      "debit_msat": 10000,
      "timestamp": 1758192801,
      "primary_tag": "routed",
      "payment_hash": "paymenthashkey01k101k101k101k101k101k101k101k101k101k101k101k101",
      "fees_msat": 1
    },
    {
      "created_index": 7,
      "account_id": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7",
      "credit_msat": 10001,
      "debit_msat": 0,
      "timestamp": 1758192801,
      "primary_tag": "routed",
      "payment_hash": "paymenthashkey01k101k101k101k101k101k101k101k101k101k101k101k101",
      "fees_msat": 1
    },
    {
      "created_index": 8,
      "account_id": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
      "credit_msat": 0,
      "debit_msat": 10000101,
      "timestamp": 1758192802,
      "primary_tag": "routed",
      "payment_hash": "paymenthashkey02k201k201k201k201k201k201k201k201k201k201k201k201",
      "fees_msat": 101
    },
    {
      "created_index": 9,
      "account_id": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7",
      "credit_msat": 10000202,
      "debit_msat": 0,
      "timestamp": 1758192802,
      "primary_tag": "routed",
      "payment_hash": "paymenthashkey02k201k201k201k201k201k201k201k201k201k201k201k201",
      "fees_msat": 101
    },
    {
      "created_index": 10,
      "account_id": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
      "credit_msat": 0,
      "debit_msat": 10000,
      "timestamp": 1758192802,
      "primary_tag": "routed",
      "payment_hash": "paymenthashkey03k301k301k301k301k301k301k301k301k301k301k301k301",
      "fees_msat": 1
    },
    {
      "created_index": 11,
      "account_id": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7",
      "credit_msat": 10001,
      "debit_msat": 0,
      "timestamp": 1758192802,
      "primary_tag": "routed",
      "payment_hash": "paymenthashkey03k301k301k301k301k301k301k301k301k301k301k301k301",
      "fees_msat": 1
    },
    {
      "created_index": 12,
      "account_id": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
      "credit_msat": 0,
      "debit_msat": 50000,
      "timestamp": 1758192802,
      "primary_tag": "routed",
      "payment_hash": "paymenthashinvl0320032003200320032003200320032003200320032003200",
      "fees_msat": 1
    },
    {
      "created_index": 13,
      "account_id": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7",
      "credit_msat": 50001,
      "debit_msat": 0,
      "timestamp": 1758192802,
      "primary_tag": "routed",
      "payment_hash": "paymenthashinvl0320032003200320032003200320032003200320032003200",
      "fees_msat": 1
    },
    {
      "created_index": 14,
      "account_id": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
      "credit_msat": 0,
      "debit_msat": 100000,
      "timestamp": 1758192803,
      "primary_tag": "invoice",
      "payment_hash": "paymenthashinvl0330033003300330033003300330033003300330033003300",
      "part_id": 0,
      "group_id": 1,
      "fees_msat": 0
    },
    {
      "created_index": 15,
      "account_id": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
      "credit_msat": 0,
      "debit_msat": 10001,
      "timestamp": 1758192803,
      "primary_tag": "routed",
      "payment_hash": "61b929204f4db4f38e0412b2bd4c3c03668dad3575fb05f4e15a2214046c2bff",
      "fees_msat": 1
    },
    {
      "created_index": 16,
      "account_id": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7",
      "credit_msat": 10002,
      "debit_msat": 0,
      "timestamp": 1758192803,
      "primary_tag": "routed",
      "payment_hash": "61b929204f4db4f38e0412b2bd4c3c03668dad3575fb05f4e15a2214046c2bff",
      "fees_msat": 1
    },
    {
      "created_index": 17,
      "account_id": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7",
      "credit_msat": 0,
      "debit_msat": 1000000,
      "timestamp": 1758192821,
      "primary_tag": "invoice",
      "payment_hash": "paymenthashsdinvsi10si10si10si10si10si10si10si10si10si10si10si10",
      "part_id": 0,
      "group_id": 1,
      "fees_msat": 0
    },
    {
      "created_index": 18,
      "account_id": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7",
      "credit_msat": 1000,
      "debit_msat": 0,
      "timestamp": 1758192821,
      "primary_tag": "invoice",
      "payment_hash": "paymenthashinvl0270027002700270027002700270027002700270027002700",
      "fees_msat": 0
    }
  ]
}

Example 2

Request:

$ lightning-cli listchannelmoves -k "index"="created" "start"=10 "limit"=2

{
  "id": "example:listchannelmoves#2",
  "method": "listchannelmoves",
  "params": {
    "index": "created",
    "start": 10,
    "limit": 2
  }
}

Response:

{
  "channelmoves": [
    {
      "created_index": 10,
      "account_id": "a397dd9b3e44afcb67f3f3ce1d649b74a8ade63e35505985e4cc1828634f69a2",
      "credit_msat": 0,
      "debit_msat": 10000,
      "timestamp": 1758192802,
      "primary_tag": "routed",
      "payment_hash": "paymenthashkey03k301k301k301k301k301k301k301k301k301k301k301k301",
      "fees_msat": 1
    },
    {
      "created_index": 11,
      "account_id": "252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7",
      "credit_msat": 10001,
      "debit_msat": 0,
      "timestamp": 1758192802,
      "primary_tag": "routed",
      "payment_hash": "paymenthashkey03k301k301k301k301k301k301k301k301k301k301k301k301",
      "fees_msat": 1
    }
  ]
}

okay that's the whole page bestie, you ate that. this cutie is brought to you by Core Lightning v26.06.9 and she lives in section 7 of the manual as LIGHTNING-LISTCHANNELMOVES(7) β€” go forth and audit your coins πŸ’œπŸŽ€βœ¨πŸ«Ά

πŸ“¦ where this page comes from