Interchain API
  1. Transaction
Interchain API
Bitcoin
  • Overview
  • Bitcoin
  • Ethereum
  • Transaction
    • Get transaction by hash.
      GET
  • Block
    • Get block by hash.
      GET
    • Get block by hash.
      GET
  • Chain
    • Returns various state info regarding block chain processing.
      GET
  • Memory Pool
    • Returns various information about the TX mempool.
      GET
    • Returns transactions in the TX mempool.
      GET
    • Returns headers.
      GET
    • Returns Unspent Transaction (TX) Outputs
      GET
  1. Transaction

Get transaction by hash.

GET
/tx/{txHash}
transaction
Last modified:2024-05-27 22:00:31
Given a transaction hash: returns a transaction in binary, hex-encoded binary, or JSON formats. For full TX query capability, one must enable the transaction index via txindex=1 command line / configuration option.

Request

Path Params
txHash
string 
required
The transaction hash.

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/tx/'

Responses

🟢200successful operation
application/json
Body
amount
number <float>
optional
The transaction amount in BTC
fee
number <float>
optional
The amount of the fee in BTC. This is negative and only available for the send category of transactions.
confirmations
integer <int64>
optional
The number of confirmations
blockhash
string 
optional
The block hash
blockindex
integer <int64>
optional
The index of the transaction in the block that includes it
blocktime
integer <int32>
optional
The time in seconds since epoch (1 Jan 1970 GMT)
txid
string 
optional
The transaction id
txhash
string 
optional
The transaction hash
version
integer 
optional
size
integer 
optional
vsize
integer 
optional
locktime
integer 
optional
time
integer <int32>
optional
The transaction time in seconds since epoch (1 Jan 1970 GMT)
timereceived
integer <int32>
optional
The time received in seconds since epoch (1 Jan 1970 GMT)
bip125-replaceable
enum<string> 
optional
Whether this transaction could be replaced due to BIP125 (replace-by-fee); may be unknown for unconfirmed transactions not in the mempool
Allowed values:
yesnounknown
Example
{
  "amount": 0,
  "fee": 0,
  "confirmations": 0,
  "blockhash": "string",
  "blockindex": 0,
  "blocktime": 0,
  "txid": "string",
  "txhash": "string",
  "version": 0,
  "size": 0,
  "vsize": 0,
  "locktime": 0,
  "time": 0,
  "timereceived": 0,
  "bip125-replaceable": "yes"
}
🟠400Invalid hash
🟠404Transaction not found
Next
Get block by hash.
Built with