I've used this query to try to get all the transaction between two addresses:


but the thing is- according to my wallet there are many more transactions that aren't appearing in the json result here.

Why is that?

How can I see actually all of the transactions?

I though maybe blockexplorer would be better than blockchain.info, but actually- not so.

They have it as this:


perhaps it would be better to just query by txid?

  • When you say "all the transactions between two addresses" do you mean you only want transactions where both addresses were involved, or do you just want all transactions from both addresses?
    – m1xolyd1an
    Dec 13 '16 at 16:56
  • the ones between then, but- also those that are not just bi-directional, but that also include maybe like- 1 to many others as well- but- at least those two Dec 13 '16 at 20:16

I don't believe you can do this with just a single API call. I'd return all the transactions from one of the addresses, and cycle through all the inputs and outputs and if they match the other address then show the tx data.

Not sure which language you're using but the logic should be the same.

$addr1 = "1EipJdYVJbqsTSQhj1icK424AkMbyjvgBm";
$addr2 = "1LWwLvKWbcpiZYqCcwfuQ3gjjNJkxftmEJ";

$url = "https://blockchain.info/address/".$addr1."?format=json";
$fgc = json_decode(file_get_contents($url), true);

//num of txs
$txs = count($fgc["txs"]);

//loop through all txs
    //check all inputs & outputs for the other address
    $numinputs = count($fgc["txs"][$i]["inputs"]);
        if($fgc["txs"][$i]["inputs"][$ii]["prev_out"]["addr"] == $addr2){
            //found a corresponding tx
    }//end inputs loop

    $numoutputs = count($fgc["txs"][$i]["out"]);
        if($fgc["txs"][$i]["out"][$iii]["addr"] == $addr2){
            //found a corresponding tx
    }//end outputs loop



  • why is it so that this is not an easy thing to query? Dec 14 '16 at 9:50

I had trouble too. Documentation is unclear. This link works by way of browser: https://blockchain.info/multiaddr?address=641ad5051edd97029a003fe9efb29359fcee409d&address=1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.