<blockquote>
  <p><code>lightning-cli listforwards</code></p>
  
  <p>List all forwarded payments and their information</p>
</blockquote>

CC BY-SA 4.0
2018-11-23T04:49:46.417Z
2018-11-23T04:49:46.417Z
fiatjaf
<p>I've written a plug-in for c-lightning that emulates <code>lncli feereport</code> command of LND. For full functionality, including <code>day_fee_sum</code>, <code>week_fee_sum</code> and <code>month_fee_sum</code> calculations, requires c-lightning v0.7.1 or newer (older versions didn't save timestamps for historical forwards).</p>

<p><a href="https://github.com/kristapsk/lightning-feereport" rel="nofollow noreferrer">https://github.com/kristapsk/lightning-feereport</a></p>

CC BY-SA 4.0
2019-07-26T20:45:42.530Z
2019-07-26T20:45:42.530Z
Kristaps Kaupe
<p>I am using c-lightning version:<code>v0.6-182-g1851ebb</code>. Is there a way to know how much I have earned routing fees? I found that lnd has <code>lncli feereport</code> command that shows earned fees. Does c-lightning have same functionality? If not, is there a way to know earned routing fees?</p>

<p>I created a query for calculating earned routing fees. However, this doesn't work because HTLCs info is removed when a channel forwarded HTLCs closed.</p>

<pre><code>sqlite3 $HOME/.lightning/lightningd.sqlite3 "select sum(a.msatoshi - b.msatoshi) from channel_htlcs a inner join channel_htlcs b on a.id = b.origin_htlc"
</code></pre>

<p>Any ideas?</p>

<lightning-network><lightning-routing><core-lightning>
How to know earning LN routing fees
ogw_yuya
# How to know earning LN routing fees

(Asked by: username_0 on 2018-07-18)

I am using c-lightning version:v0.6-182-g1851ebb. Is there a way to know how much I have earned routing fees? I found that lnd has lncli feereport command that shows earned fees. Does c-lightning have same functionality? If not, is there a way to know earned routing fees?
I created a query for calculating earned routing fees. However, this doesn't work because HTLCs info is removed when a channel forwarded HTLCs closed.
sqlite3 $HOME/.lightning/lightningd.sqlite3 "select sum(a.msatoshi - b.msatoshi) from channel_htlcs a inner join channel_htlcs b on a.id = b.origin_htlc"

Any ideas?

**Tags:** lightning-network, lightning-routing, core-lightning


---

## 2 answers

### Answer by username_1 on 2018-11-23. Score: 1 | Accepted answer

> `lightning-cli listforwards`
>
> List all forwarded payments and their information


---

### Answer by username_2 on 2019-07-26. Score: 0

I've written a plug-in for c-lightning that emulates `lncli feereport` command of LND. For full functionality, including `day_fee_sum`, `week_fee_sum` and `month_fee_sum` calculations, requires c-lightning v0.7.1 or newer (older versions didn't save timestamps for historical forwards).

<https://github.com/kristapsk/lightning-feereport>


---

