<p>To find all the accounts that hold an asset, e.g. <code>USD/gw1</code>, you just need to use the <a href="https://ripple.com/wiki/RPC_API#account_lines" rel="nofollow">account_lines</a> API on the <code>gw1</code> account and filter out the USD entries (or whatever currency code you are interested in).</p>

<p>Although you could recursively look up the account lines of each found account in turn, that doesn't tell you anything more about who "holds the IOUs from a given issuer" which was your question. It instead tells you how much each found account would currently be able to redeem via the issuer. For example, if account_lines on gw1 says UserA has <code>100 USD/gw1</code> and account_lines for UserA says they also have <code>-50 USD/UserB</code>, then UserB could redeem 50 USD via gw1 (not accounting for any quality or transfer rates that may be set).</p>

CC BY-SA 3.0
2013-11-08T23:39:43.583Z
Does this function return just the IOU holders that directly trust the given account, or does it also look for secondary IOU holders that trust the original IOU holders that have sent the IOUs further down?
ThePiachu
CC BY-SA 3.0
2013-11-09T13:22:13.773Z
@ThePiachu direct trust lines only (both incoming and outgoing). Those are the only ones relevant. "secondary IOU holders" makes no sense, the closest thing would be payment paths that [ripple_]path_find might return.
dchapes
CC BY-SA 3.0
2013-11-08T17:27:37.307Z
2013-11-08T17:27:37.307Z
dchapes
<p>In Ripple, anyone can issue IOUs, which later can be passed on to other parties in the network through a web of trust. How can one find every account holding IOUs from a given issuer? Would it need to be done through crawling the trust network, or is there an easier way?</p>

<ripple><iou><live-data><traceability>
How can one find everyone holding IOUs from a given issuer in Ripple?
ThePiachu
# How can one find everyone holding IOUs from a given issuer in Ripple?

(Asked by: username_0 on 2013-11-08)

In Ripple, anyone can issue IOUs, which later can be passed on to other parties in the network through a web of trust. How can one find every account holding IOUs from a given issuer? Would it need to be done through crawling the trust network, or is there an easier way?

**Tags:** ripple, iou, live-data, traceability


---

## 1 answers

### Answer by username_1 on 2013-11-08. Score: 2

To find all the accounts that hold an asset, e.g. `USD/gw1`, you just need to use the [account\_lines](https://ripple.com/wiki/RPC_API#account_lines) API on the `gw1` account and filter out the USD entries (or whatever currency code you are interested in).

Although you could recursively look up the account lines of each found account in turn, that doesn't tell you anything more about who "holds the IOUs from a given issuer" which was your question. It instead tells you how much each found account would currently be able to redeem via the issuer. For example, if account\_lines on gw1 says UserA has `100 USD/gw1` and account\_lines for UserA says they also have `-50 USD/UserB`, then UserB could redeem 50 USD via gw1 (not accounting for any quality or transfer rates that may be set).

> **Comments:**
> **username_0**: Does this function return just the IOU holders that directly trust the given account, or does it also look for secondary IOU holders that trust the original IOU holders that have sent the IOUs further down?  
> **username_1**: @username_0 direct trust lines only (both incoming and outgoing). Those are the only ones relevant. "secondary IOU holders" makes no sense, the closest thing would be payment paths that [ripple_]path_find might return.  

---

