0

I'm using Blockchain.info's api:

https://blockchain.info/api/blockchain_api

I understand that it is impossible for a transaction to know which block it will be included in but maybe one could use the block height to match the tx to the block?

1

but maybe one could use the block height to match the tx to the block?

Indeed that would work fine, block_height is returned by the /rawtx/ call (https://blockchain.info/rawtx/$tx_hash) for transactions that have been included in a block (unconfirmed transactions have no block_height key). Then you can find the block hash and/or information about the block with the /block-height/ call (https://blockchain.info/block-height/$block_height?format=json)

  • Would you mind trying tx hash: 4c1df235ffd7642008989422aee5255e6312b4172b55d94e328fa99e99d727c7 on smartbit.com.au/api just as a sanity check because I don't see the tx come up on the block it's supposed to... – timothyylim Nov 2 '17 at 18:04

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.