I wanted to write a small script to parse all incoming transactions to a wallet. The wallet I'm looking at is from an OpenSource project I'm working for, to get an overview of the amounts given to the project in a certain time-range. I use the Blockchain Data API and try to parse the information from this call (includes the wallet-adress). But I can't seem to get the amount of Bitcoins that were transferred to the wallet. Sometimes there are amounts as big as 266 BTC listed, even though the real transaction was just a couple of Satoshis.
So, the question is: When I have a JSON Transaction Block like this:
"ver":1,
"inputs":[
{
"sequence":4294967295,
"prev_out":{
"spent":true,
"tx_index":273950706,
"type":0,
"addr":"12tPhkHLjmkDfqTfvbagbnkYDU5UTu2pMp",
"value":461323,
"n":1,
"script":"76a91414b04a7b66d06dd399bdb689df209ed688e9bcaa88ac"
},
"script":"483045022100f38ffd67d53b4c5a6f6a2543ca6217863be5b4f3a43e885a2520dbb768ba5df702203d9782af024ee9e213fb59cee1c788c70e66d66addb553b74610a1fed3df10390121026b138ff61ffeaf459c4916889d2c53894fc029c9729886714fe23ebd8a15bb32"
}
],
"block_height":480392,
"relayed_by":"52.59.6.61",
"out":[
{
"spent":false,
"tx_index":274914673,
"type":0,
"addr":"1M3GipkG2YyHPDMPewqTpup83jitXvBg9N",
"value":295902,
"n":0,
"script":"76a914dbd0788d294dd15704d232053790c555d1cb337888ac"
},
{
"spent":false,
"tx_index":274914673,
"type":0,
"addr":"18h2yt8cJSYwGSWV5nUodTgPZj9Vi5aCJS",
"value":124987,
"n":1,
"script":"76a914545b2c20e7d8ded3853a2336ebedf7752cf823dd88ac"
}
],
"lock_time":0,
"result":0,
"size":226,
"time":1502650024,
"tx_index":274914673,
"vin_sz":1,
"hash":"02a7bf19417db6d975d48e27199cd65dcc415c5bf81ed447f945b2a4f3dc1d24",
"vout_sz":2
},
What is the amount of Satoshis that have been added (or redeemed) from that wallet? How should I interpret the values in the json?