<p>You can issue the <code>account_lines</code> command to a Ripple server to find out what credit lines have been extended by or to an account.</p>

<p>For example, you can use this <a href="http://www.websocket.org/echo.html" rel="nofollow">websocket test</a> page to issue websocket queries. Set the location to <code>wss://s1.ripple.com:51233</code>, click <code>use secure</code>, and then connect.</p>

<p>Then paste this in the <code>Message</code> window:<br>
<code>{ "command" : "account_lines", "account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B" }</code></p>

<p>This pulls the credit lines that Bitstamp has. You'll see entries like this:</p>

<pre><code>     {
        "account" : "rrpNnNLKrartuEqfJGpqyDwPj1AFPg9vn1",
        "balance" : "-501.64408854616",
        "currency" : "BTC",
        "limit" : "0",
        "limit_peer" : "10000",
        "quality_in" : 0,
        "quality_out" : 0
     },
</code></pre>

<p>This means that Bitstamp owes <code>rrpNnNLKrartuEqfJGpqyDwPj1AFPg9vn1</code> 501.64 BTC (Bitcoins) and that user has extended them a credit limit of 10,000 Bitcoins.</p>

CC BY-SA 3.0
2013-03-13T10:20:27.143Z
This answer is focused on a user, but his question was more about gathering general data. Does that imply that he should gather all existing addresses and do such a thing for each one?
o0'.
CC BY-SA 3.0
2013-03-13T13:38:25.533Z
@Lohoris: You can query each gateway. Measuring credit between normal users could give you lots of meaningless numbers. (I can create two accounts, extend a million dollars in credit from one to the other, and then borrow from that line without any actual money being involved.) You could walk the entire ledger, but it's a bit more complicated.
David Schwartz
CC BY-SA 3.0
2013-03-13T02:30:51.250Z
2013-03-13T02:30:51.250Z
David Schwartz
<p>Is there any way to measure how much stored value is in Ripple at any given moment?</p>

<p>I read that that people who are risk averse won't store cash in Ripple for long periods of time, and will redeem their IOUs right away.  Since the nature of transactions is for someone to "pay later" that makes me think there will always be stored value in the system.  Based on that:</p>

<ul>
<li><p>How many IOUs (outstanding debt) has been issued at a given time? (stored value)</p></li>
<li><p>What is the average duration of a transaction (network wide, per gateway, etc)</p></li>
</ul>

<p>How can I query for this data in raw format (or graphically)?</p>

CC BY-SA 3.0
2013-03-13T02:19:14.183Z
I'm not sure "duration of a transaction" is a well-defined concept. Transactions are essentially instantaneous.
David Schwartz
CC BY-SA 3.0
2013-03-13T02:28:19.270Z
@DavidSchwartz I see... perhaps outstanding debt is better
makerofthings7
<ripple><ripple-gateways>
How can I measure outstanding debt? How much "stored value" is in Ripple at any given moment?
makerofthings7
# How can I measure outstanding debt? How much "stored value" is in Ripple at any given moment?

(Asked by: username_0 on 2013-03-06)

Is there any way to measure how much stored value is in Ripple at any given moment?

I read that that people who are risk averse won't store cash in Ripple for long periods of time, and will redeem their IOUs right away. Since the nature of transactions is for someone to "pay later" that makes me think there will always be stored value in the system. Based on that:

* How many IOUs (outstanding debt) has been issued at a given time? (stored value)
* What is the average duration of a transaction (network wide, per gateway, etc)

How can I query for this data in raw format (or graphically)?

**Tags:** ripple, ripple-gateways

> **Comments:**
> **username_1**: I'm not sure "duration of a transaction" is a well-defined concept. Transactions are essentially instantaneous.  
> **username_0**: @username_1 I see... perhaps outstanding debt is better  

---

## 1 answers

### Answer by username_1 on 2013-03-13. Score: 3

You can issue the `account_lines` command to a Ripple server to find out what credit lines have been extended by or to an account.

For example, you can use this [websocket test](http://www.websocket.org/echo.html) page to issue websocket queries. Set the location to `wss://s1.ripple.com:51233`, click `use secure`, and then connect.

Then paste this in the `Message` window:  
`{ "command" : "account_lines", "account" : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B" }`

This pulls the credit lines that Bitstamp has. You'll see entries like this:

```
     {
        "account" : "rrpNnNLKrartuEqfJGpqyDwPj1AFPg9vn1",
        "balance" : "-501.64408854616",
        "currency" : "BTC",
        "limit" : "0",
        "limit_peer" : "10000",
        "quality_in" : 0,
        "quality_out" : 0
     },

```

This means that Bitstamp owes `rrpNnNLKrartuEqfJGpqyDwPj1AFPg9vn1` 501.64 BTC (Bitcoins) and that user has extended them a credit limit of 10,000 Bitcoins.

> **Comments:**
> **username_2**: This answer is focused on a user, but his question was more about gathering general data. Does that imply that he should gather all existing addresses and do such a thing for each one?  
> **username_1**: @Lohoris: You can query each gateway. Measuring credit between normal users could give you lots of meaningless numbers. (I can create two accounts, extend a million dollars in credit from one to the other, and then borrow from that line without any actual money being involved.) You could walk the entire ledger, but it's a bit more complicated.  

---

