I'm using blockchain api to display transactions of credits and debits seperately, I'm using the below procedure for displaying credit and debit transactions. But credit transactions are showing in debit transactions... I mean the credited transaction which need to display in "inputs" index showing in "out".
Clear explanation :
Taking an address as an example: 12RpKRwx7AevwTDJYF94MVDx6vEduFBvHR. If you can the compare transaction list in blockchain.info url https://blockchain.info/address/12RpKRwx7AevwTDJYF94MVDx6vEduFBvHR and json format url https:// blockchain.info/address/12RpKRwx7AevwTDJYF94MVDx6vEduFBvHR?format=json&limit=5, first 2 transactions are showing fine in 'out' index json. But when you see the 3rd transaction in https:// blockchain.info/address/12RpKRwx7AevwTDJYF94MVDx6vEduFBvHR it is incoming transaction, This 3rd transaction is showing in "out" index.
My moto is to show my website users a clear transactions of their address.
Here I need to show list of Incoming and Outgoing transactions from blockchain api seperately, Procedure I'm following as suggested by the blockchain.info support team.
Procedure:
1st api call https:// blockchain.info/address/12RpKRwx7AevwTDJYF94MVDx6vEduFBvHR?format=json&limit=5 . From this api call I'm taking "hash" index value and passing the to 2nd api call --> https://blockchain.info/rawtx/$hash in the foreach loop . Showing "inputs" index as incoming transactions received to address 12RpKRwx7AevwTDJYF94MVDx6vEduF and "out" as outgoing transactions from 12RpKRwx7AevwTDJYF94MVDx6vEdu.