LIGHTNING-LISTFORWARDS(7)
π lightning-listforwards(7) β the manual, bestie edition π
okay so this is lightning-listforwards(7), a Core Lightning manpage, and it's genuinely one of the most useful little commands ever. it's literally the receipts page for your node β¨
πΈ NAME πΈ
listforwards β the command that shows you all your HTLCs and all their info. every single one. no cap.
π¦ SYNOPSIS π¦
listforwards [status] [in_channel] [out_channel] [index [start] [limit]]
β¨ DESCRIPTION β¨
so the listforwards RPC command displays all htlcs that have been attempted to be forwarded by the Core Lightning node. attempted, bestie β not just the ones that worked. we're seeing the whole story here π
status(string, optional) (one of"offered","settled","local_failed","failed") β if you specify this, then only the forwards with the given status come back. filter era π₯in_channel(short_channel_id, optional) β only the matching forwards on the given inbound channel are returned.out_channel(short_channel_id, optional) β only the matching forwards on the given outbount channel are returned. (yes, the manpage really says "outbount" and honestly? iconic typo, we keep it π«Ά)index(string, optional) (one of"created","updated") β if neitherin_channelnorout_channelis specified, it controls ordering. the default iscreated. (added v23.11)start(u64, optional) β ifindexis specified,startmay be specified to start from that value, which is generally returned fromlightning-wait(7). (added v23.11)limit(u32, optional) β ifindexis specified,limitcan be used to specify the maximum number of entries to return. (added v23.11)
π RETURN VALUE π
on success, an object containing forwards is returned. it's an array of objects, and every object contains:
created_index(u64) β 1-based index indicating order this forward was created in. (added v23.11)in_channel(short_channel_id) β the channel that received the HTLC.in_msat(msat) β the value of the incoming HTLC.status(string) (one of"offered","settled","local_failed","failed") β still ongoing, completed, failed locally, or failed after forwarding.received_time(number) β the UNIX timestamp when this was received (may be zero for old forwards).in_htlc_id(u64, optional) β the unique HTLC id the sender gave this (not present if incoming channel was closed before upgrade to v22.11).out_channel(short_channel_id, optional) β the channel that the HTLC (trying to) forward to.out_htlc_id(u64, optional) β the unique HTLC id we gave this when sending (may be missing even ifout_channelis present, for old forwards before v22.11).updated_index(u64, optional) β 1-based index indicating order this forward was changed (only present if it has changed since creation). (added v23.11)style(string, optional) (one of"legacy","tlv") β either a legacy onion format or a modern tlv format.
π§ conditional fields, iykyk
if out_msat is present:
fee_msat(msat) β the amount this paid in fees.out_msat(msat) β the amount we sent out theout_channel.
if status is "settled" or "failed":
resolved_time(number) β the UNIX timestamp when this was resolved.
if status is "local_failed" or "failed":
failcode(u32, optional) β the numeric onion code returned.failreason(string, optional) β the name of the onion code returned.
π«Ά AUTHOR π«Ά
Rene Pickhardt r.pickhardt@gmail.com is mainly responsible. ty for your service king π
π SEE ALSO π
β RESOURCES β
main web site: https://github.com/ElementsProject/lightning
π EXAMPLES π
example 1
request:
$ lightning-cli listforwards -k "in_channel"="109x1x1" "out_channel"="123x1x1" "status"="settled"
{
"id": "example:listforwards#1",
"method": "listforwards",
"params": {
"in_channel": "109x1x1",
"out_channel": "123x1x1",
"status": "settled"
}
}
response:
{
"forwards": [
{
"created_index": 12,
"updated_index": 7,
"in_channel": "109x1x1",
"in_htlc_id": 19,
"out_channel": "123x1x1",
"out_htlc_id": 2,
"in_msat": 50000501,
"out_msat": 50000000,
"fee_msat": 501,
"status": "settled",
"style": "tlv",
"received_time": 1738000000,
"resolved_time": 1738500000
},
{
"created_index": 13,
"updated_index": 8,
"in_channel": "109x1x1",
"in_htlc_id": 20,
"out_channel": "123x1x1",
"out_htlc_id": 3,
"in_msat": 50000501,
"out_msat": 50000000,
"fee_msat": 501,
"status": "settled",
"style": "tlv",
"received_time": 1738010000,
"resolved_time": 1738510000
}
]
}
example 2
request:
$ lightning-cli listforwards
{
"id": "example:listforwards#2",
"method": "listforwards",
"params": {}
}
response:
{
"forwards": [
{
"created_index": 1,
"updated_index": 1,
"in_channel": "109x1x1",
"in_htlc_id": 1,
"out_channel": "111x1x1",
"out_htlc_id": 1,
"in_msat": 10001,
"out_msat": 10000,
"fee_msat": 1,
"status": "settled",
"style": "tlv",
"received_time": 1738000000,
"resolved_time": 1738500000
},
{
"created_index": 2,
"updated_index": 2,
"in_channel": "109x1x1",
"in_htlc_id": 2,
"out_channel": "111x1x1",
"out_htlc_id": 2,
"in_msat": 10001,
"out_msat": 10000,
"fee_msat": 1,
"status": "settled",
"style": "tlv",
"received_time": 1738010000,
"resolved_time": 1738510000
},
{
"created_index": 3,
"updated_index": 3,
"in_channel": "109x1x1",
"in_htlc_id": 3,
"out_channel": "111x1x1",
"out_htlc_id": 3,
"in_msat": 10000202,
"out_msat": 10000101,
"fee_msat": 101,
"status": "settled",
"style": "tlv",
"received_time": 1738020000,
"resolved_time": 1738520000
},
{
"created_index": 5,
"updated_index": 4,
"in_channel": "109x1x1",
"in_htlc_id": 5,
"out_channel": "111x1x1",
"out_htlc_id": 4,
"in_msat": 10001,
"out_msat": 10000,
"fee_msat": 1,
"status": "settled",
"style": "tlv",
"received_time": 1738030000,
"resolved_time": 1738530000
},
{
"created_index": 6,
"updated_index": 5,
"in_channel": "109x1x1",
"in_htlc_id": 6,
"out_channel": "111x1x1",
"out_htlc_id": 5,
"in_msat": 50001,
"out_msat": 50000,
"fee_msat": 1,
"status": "settled",
"style": "tlv",
"received_time": 1738040000,
"resolved_time": 1738540000
}
]
}
ngl bestie, notice how created_index skips 4 in example 2? that's just what the manpage shows, don't come for me π
πΈ okay that's the whole page!! this one's from Core Lightning v26.06.9, and it's the LIGHTNING-LISTFORWARDS(7) manpage β go check your forwards, they're giving main character energy ππ
π¦ 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