Transaction Object
GET <API_ENDPOINT>/v0/<CHAIN>/transaction/id/<TXN_HASH>
Transaction objects are returned by multiple methods, in varying levels of detail. The API will give you less detail by default, and you can add URL params to increase the detail level. In general:
- No url param will show the minimal information (usually just the id of the Transaction)
- ?showtxn=1 will show Transaction information
- ?showtxnio=1 will show Tranaction information and the Inputs and Outputs for the Transaction
Be warned that just requesting ?showtxnio=1 every time will considerably slow down the response time of the API and increase the amount of data you'll receive in each API call. Only turn these options on when you're sure you need the additional information.
Note Transaction return by Address functions have a special set of extra info to that reflects the relationship between the Transaction and the Address. (see below for the extra elements)
Examples
- BTC Block with minimal Transaction information
- BTC Transaction with medium information
- BTC Transaction with maximum information
Example Output Minimum Information
{"id"="94C0BBEA9CE28A5631642252E0EEAE36F9DC91E62F87310B064CEC4BFCE9DCBA"}
Medium Information
{
"id": "ABD2D6C1AB01F1CA22137AC67F73ABC72D006A1519F313522FDD759F71347764",
"size": 817,
"version": 1,
"time": 0,
"is_coinbase": 0,
"fees": 0,
"fees_fiat_now": 0,
"fees_disp": "0.00000000",
"block_id": "00000000000000001E1B2CC3C89B90C98DC0C59BC839B38DB6DBEDD5724752A8",
"block_height": 326035,
"block_time": 1413727866,
"confirmations": 0,
"input_count": 5,
"input_value": 201042953,
"input_value_fiat_now": "777.20",
"input_value_disp": "2.01042953",
"output_count": 2,
"output_value": 201042953,
"output_value_fiat_now": 777.2,
"output_value_disp": "2.01042953",
}
Maximum Information
{
"id": "ABD2D6C1AB01F1CA22137AC67F73ABC72D006A1519F313522FDD759F71347764",
"size": 817,
"version": 1,
"time": 0,
"is_coinbase": 0,
"fees": 0,
"fees_fiat_now": 0,
"fees_disp": "0.00000000",
"block_id": "00000000000000001E1B2CC3C89B90C98DC0C59BC839B38DB6DBEDD5724752A8",
"block_height": 326035,
"block_time": 1413727866,
"confirmations": 0,
"input_count": 5,
"input_value": 201042953,
"input_value_fiat_now": "777.20",
"input_value_disp": "2.01042953",
"output_count": 2,
"output_value": 201042953,
"output_value_fiat_now": 777.2,
"output_value_disp": "2.01042953",
"inputs": [
{
"value": 71817918,
"value_fiat_now": 277.64,
"value_disp": "0.71817918",
"tx_id": "0A216FA9DD2EACB1E74E533E648DFC1B4ECADFF2726C922547DE2600A3725F77",
"tx_pos": 2373,
"address": "1A9oR5ngk5iapd4zs7ekYetLPNgDdhhpQs"
},
<SNIP_TXN_INPUTS>
],
"outputs": [
{
"pos": 0,
"script_pub_key": "76A91437F777D8005840C3FF3AF318959D26F134A0547688AC",
"pubkey_hash": "37F777D8005840C3FF3AF318959D26F134A05476",
"address": "166vcwRxrvckPcsa1gXjZ1EPw9uaz3qJsX",
"value": 200000000,
"value_fiat_now": 773.17,
"value_disp": "2.00000000",
"spending_tx_id": null,
"spending_tx_pos": 0,
"is_spent": 0
},
<SNIP_TXN_OUTPUTS>
]
}
Elements
id
: String (hex) The id (or hash) of the Transactionsize
: Integer, Size (in bytes) of the raw Transaction dataversion
: Integer, The encoding version used to encode the Transaction prior to broadcast to the networktime
: Integer (Unix epoch) The time the Transaction claims to have been broadcast to the networkis_coinbase
: Integer, Is this Transaction a coinbase reward Transaction 0=No 1=Yesfees
: Integer, The fees paid to the miner from this Transaction (in Satoshies)fees_fiat_now
: String, A representation of the Approximate value of thefees
payment in the specified fiat currencyfees_disp
: String, A 'display friendly' representation of thefees
(in full coins)block_id
: String (hex)|NULL,The id (or hash) of the first Block to confirm this Transaction NULL=Not in a Block yetblock_height
: Integer|NULL, The height of the first Block to confirm this Transaction NULL=Not in a Block yetblock_time
: Integer (Unix epoch) The time of the first Block to confirm this Transaction. 0=Not in a Block yetconfirmations
: Integer, The number of confirmations for this Transaction. 0=Unconfirmed (Not in a block yet)input_count
: Integer, The number ofinput
s 'redeemed' by this Transactioninput_value
: Integer, The total value of theinput
s (in satoshies)input_value_fiat_now
: String, A representation of the Approximate value of theinput_value
payment in the specified fiat currencyinput_value_disp
: String, A 'display friendly' representation of theinput_value
(in full coins)output_count
: Integer, The number ofoutput
s 'created' by this Transactionoutput_value
: Integer, The total value of theoutput
s (in satoshies)output_value_fiat_now
: String, A representation of the Approximate value of theoutput_value
payment in the specified fiat currencyoutput_value_disp
: String, A 'display friendly' representation of theoutput_value
(in full coins)inputs
: Array of Inputs to the Transactionvalue
: Integer, The value of theinput
(in satoshies)value_fiat_now
: String, A representation of the Approximate value of thevalue
payment in the specified fiat currencyvalue_disp
: String, A 'display friendly' representation of thevalue
(in full coins)tx_id
: String (hex) The id (of hash) of the source Transaction being spenttx_pos
: Integer, The position of the output in the source Transaction being spentaddress
: String (enc58), theAddress
from where theinput
'comes from'
outputs
: Array of outputs from the Transactionpos
: Integer, The position of the output in the Transactionscript_pub_key
: String (hex), The 'spending script'pubkey_hash
: String (hex), the hash of the Public Key of the recipient of thevalue
address
: String (enc58), The Address thevalue
is 'paid into'value
: Integer, The value of theoutput
(in satoshies)value_fiat_now
: String, A representation of the Approximate value of thevalue
payment in the specified fiat currencyvalue_disp
: String, A 'display friendly' representation of thevalue
(in full coins)spending_tx_id
: String, The id (or hash) of the Transaction that spends thisoutput
. NULL indicates theoutput
has not been spentspending_tx_pos
: Integer, The position of this output, as the input in the spending Transactionis_spent
: Integer, Has the output been spent by another Transaction 0=no 1=yes
Special Address elements
When a Transaction object is returned as part of an Address method the following extra elements are provided.
tx_address_tx_pos
: Integer, The position of the output in the Transaction that is affecting the Addresstx_address_value
: Integer, the absolute value (in satoshies) of the value affecting the Addresstx_address_value_fiat_now
:String, A representation of the Approximate value of thetx_address_value
payment in the specified fiat currency ,tx_address_value_disp
: String, A 'display friendly' representation of thetx_address_value
(in full coins)tx_address_direction
: String ('input' or 'output'), Shows the direction of movement of thetx_address_value
relative to the address.tx_address_script_pub_key
: String (hex), the pub key script.tx_address_ledger
: Integer, How thetx_address_value
affects the balance of the Address. Positive number increases the balance, negative number decreases the balancetx_address_ledger_fiat_now
: String, A representation of the Approximate value of how thetx_address_value
payment in the specified fiat currency has affected the balance of the Addresstx_address_ledger_disp
: String, A 'display friendly' representation of the how thetx_address_value
(in full coins) has affected the balance of the Address
Also see
- Transaction details and Pagination
- Values and Currency How we handle values and currencies
- Request object
- Supported Chains