<p>The database schema is located here: <a href="https://webbtc.com/api/schema" rel="nofollow">https://webbtc.com/api/schema</a></p>

<p>You might be disappointed to find out that it's not as simple as an amount and a sender for each transaction. What there are is a list of inputs (references to previous outputs), and a list of new outputs. Each output with an amount and a pseudonymous address. Each input has a TXID and output index to reference which previous output it is spending. Unless you know who owns specific addresses, though, you can't determine the identity of the sender(s).</p>

<p>You can use the <code>prev_out</code> and <code>prev_out_index</code> from a row in the inputs table to find the associated previous output, which will tell you the amount and address.</p>

CC BY-SA 3.0
2015-12-10T19:07:46.970Z
I need sender in sense of getting his pubkey or even hash of pubkey which your comment if I understand correctly refers to as 'address'. 
So, I need to look up previous transactions. And what if previous transaction has many recipients and only one of them participating in the current?
Moonwalker
CC BY-SA 3.0
2015-12-10T19:14:21.330Z
The `pk_script` of the outputs table gives you that, but you'll need to convert that scriptPubKey to an address. It's not super easy to do that, and the table doesn't give you the actual address. So, you can either look up the standard output types and learn how to convert them to an address, or use a different data set that has the addresses in them.
morsecoder
CC BY-SA 3.0
2015-12-10T20:08:53.947Z
Could you suggest different data set which already has addresses in it? I would much appreciate it.
Moonwalker
CC BY-SA 3.0
2015-12-10T20:30:39.770Z
If you're specifically looking for downloadable databases, I don't know of any, unfortunately. There are API web services that provide that information, but it takes a long time to parse the whole block chain (and a lot of bandwidth) with an API.
morsecoder
CC BY-SA 3.0
2015-12-10T20:31:03.123Z
See http://bitcoin.stackexchange.com/questions/11687/reliable-efficient-way-to-parse-the-blockchain-into-a-sql-database
morsecoder
CC BY-SA 3.0
2015-12-10T18:18:35.930Z
2015-12-10T18:18:35.930Z
morsecoder
<p>I'm using blockchain dumps from <a href="http://dumps.webbtc.com/" rel="nofollow">http://dumps.webbtc.com/</a> 
in database schema in mentioned that result of script in pk_script should specify recipient of transaction. But how do I get amount of bitcoin sent and sender? </p>

<transactions><blockchain><sending><receiving>
How do I build bitcoin transactions graph?
Moonwalker
# How do I build bitcoin transactions graph?

(Asked by: username_0 on 2015-12-10)

I'm using blockchain dumps from <http://dumps.webbtc.com/>
in database schema in mentioned that result of script in pk\_script should specify recipient of transaction. But how do I get amount of bitcoin sent and sender?

**Tags:** transactions, blockchain, sending, receiving


---

## 1 answers

### Answer by username_1 on 2015-12-10. Score: 1

The database schema is located here: <https://webbtc.com/api/schema>

You might be disappointed to find out that it's not as simple as an amount and a sender for each transaction. What there are is a list of inputs (references to previous outputs), and a list of new outputs. Each output with an amount and a pseudonymous address. Each input has a TXID and output index to reference which previous output it is spending. Unless you know who owns specific addresses, though, you can't determine the identity of the sender(s).

You can use the `prev_out` and `prev_out_index` from a row in the inputs table to find the associated previous output, which will tell you the amount and address.

> **Comments:**
> **username_0**: I need sender in sense of getting his pubkey or even hash of pubkey which your comment if I understand correctly refers to as 'address'.  So, I need to look up previous transactions. And what if previous transaction has many recipients and only one of them participating in the current?  
> **username_1**: The `pk_script` of the outputs table gives you that, but you'll need to convert that scriptPubKey to an address. It's not super easy to do that, and the table doesn't give you the actual address. So, you can either look up the standard output types and learn how to convert them to an address, or use a different data set that has the addresses in them.  
> **username_0**: Could you suggest different data set which already has addresses in it? I would much appreciate it.  
> **username_1**: If you're specifically looking for downloadable databases, I don't know of any, unfortunately. There are API web services that provide that information, but it takes a long time to parse the whole block chain (and a lot of bandwidth) with an API.  
> **username_1**: See http://bitcoin.stackexchange.com/questions/11687/reliable-efficient-way-to-parse-the-blockchain-into-a-sql-database  

---

