<p>Every Chanel that us public is announced on the gossip protocol and in the channel announcement message linked to a funding transaction. What you can do (and what 1ml most likely does) is to save spent funding TX as close channels. As the gossip protocol will only forward channel announcement messages for open channels (those where the funding TX was not spent) it will be impossible to query your lightning node for closed channels from the past. You will only be able to collect this data for the future. Or you could crawl 1ml if their robots.txt allows this. </p>

CC BY-SA 4.0
2019-04-23T12:59:49.007Z
Thank you for this. This is how I understood it to work, but I wanted to be sure I didn't overlook something.
gijswijs
CC BY-SA 4.0
2019-04-23T12:56:27.027Z
2019-04-23T12:56:27.027Z
Rene Pickhardt
<p>I want to do analytics on unilaterally and mutually closed channels. To do so I need to scan know when channels close. It seems to me there's no other way than to actively scan the network graph for closed channels.</p>

<p>But I'm not sure if that's the right approach. How do explorers like 1ML do this?</p>

<lightning-network><ln-topology>
How do Lightning Explorers like 1ML register closed channels?
gijswijs
# How do Lightning Explorers like 1ML register closed channels?

(Asked by: username_0 on 2019-04-23)

I want to do analytics on unilaterally and mutually closed channels. To do so I need to scan know when channels close. It seems to me there's no other way than to actively scan the network graph for closed channels.

But I'm not sure if that's the right approach. How do explorers like 1ML do this?

**Tags:** lightning-network, ln-topology


---

## 1 answers

### Answer by username_1 on 2019-04-23. Score: 2 | Accepted answer

Every Chanel that us public is announced on the gossip protocol and in the channel announcement message linked to a funding transaction. What you can do (and what 1ml most likely does) is to save spent funding TX as close channels. As the gossip protocol will only forward channel announcement messages for open channels (those where the funding TX was not spent) it will be impossible to query your lightning node for closed channels from the past. You will only be able to collect this data for the future. Or you could crawl 1ml if their robots.txt allows this.

> **Comments:**
> **username_0**: Thank you for this. This is how I understood it to work, but I wanted to be sure I didn't overlook something.  

---

