Blockdaemon Documentation
Transactions
Overview
GET Transaction by Hash
GET Transaction Output by Hash and Index
GET Transaction Confirmations by Hash
GET All Transactions
Overview
The Ubiquity Universal API endpoints listed in this section allow the retrieval of transaction information for a given protocol and network.
As with all Ubiquity Universal API endpoints, they provide a standard format to obtain consistent information across multiple protocols.
GET Transaction by Hash
https://{ubiquity_url}/{protocol}/{network}/tx/{id}
Returns details of a transaction by a given transaction hash.
Developer documentation: GET Transaction by Hash
Learn how to authorize your request: Authentication Guide
Ubiquity URL
To run a query, add your Ubiquity URL. For most users this will be:
svc.blockdaemon.com/universal/v1
An example of this is shown below:
https://svc.blockdaemon.com/universal/v1/{protocol}/{network}/tx/{id}
Note: If you created your Ubiquity API Key before September 2022, add the legacy Ubiquity URL:
ubiquity.api.blockdaemon.com/v1
An example of this is shown below:
https://ubiquity.api.blockdaemon.com/v1/{protocol}/{network}/tx/{id}
Path Parameters
You should specify a protocol and a network as path parameters, e.g.:
ethereum/mainnet
It is also is required to add a transaction hash, e.g.:
0x7bf9c72babc58abc5ec8a40c8740198e8d207da6feefc18d8477886a1e3073d7
Supported Protocols and Networks
Here is a full list of supported protocols and networks with their path parameters:
litecoin/testnet
Protocol | Network | Path parameters |
Algorand | Mainnet | algorand/mainnet |
Bitcoin | Mainnet Testnet |
bitcoin/mainnet bitcoin/testnet |
Bitcoin Cash | Mainnet Testnet |
bitcoincash/mainnet bitcoincash/testnet |
Dogecoin | Mainnet Testnet |
dogecoin/mainnet dogecoin/testnet |
Ethereum | Mainnet Goerli Ropsten |
ethereum/mainnet ethereum/goerli ethereum/ropsten |
Litecoin | Mainnet Testnet |
litecoin/mainnet litecoin/testnet |
Optimism | Mainnet | optimism/mainnet |
Polkadot | Mainnet | polkadot/mainnet |
Polygon | Mainnet | polygon/mainnet |
Solana | Mainnet Testnet |
solana/mainnet solana/testnet |
Stellar | Mainnet | stellar/mainnet |
Tezos | Mainnet | tezos/mainnet |
XRP | Mainnet | xrp/mainnet |
Example Queries
The query in this section provides a useful example for GET Transaction by Hash.
To get an Ethereum Mainnet transaction, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/tx/0x7bf9c72babc58abc5ec8a40c8740198e8d207da6feefc18d8477886a1e3073d7
GET Transaction Output by Hash and Index
https://{ubiquity_url}/v1/{protocol}/{network}/tx/{id}/{index}
Returns a transaction output (UTXO) by a given transaction hash and a given output index.
The output can be unspent, spent, or unknown (if the transaction was not found or does not exist). For any spent output this endpoint returns information about the transaction where it was used as input.
Developer documentation: GET Transaction Output by Hash and Index
Learn how to authorize your request: Authentication Guide
Ubiquity URL
To run a query, add your Ubiquity URL. For most users this will be:
svc.blockdaemon.com/universal/v1
An example of this is shown below:
https://svc.blockdaemon.com/universal/v1/{protocol}/{network}/tx/{id}/{index}
Note: If you created your Ubiquity API Key before September 2022, add the legacy Ubiquity URL:
ubiquity.api.blockdaemon.com/v1
An example of this is shown below:
https://ubiquity.api.blockdaemon.com/v1/{protocol}/{network}/tx/{id}/{index}
Path Parameters
You should specify a protocol and a network as path parameters, e.g.:
bitcoin/mainnet
It is also is required to add a transaction hash, e.g.:
000ed6ef37fb212bf8488454e74fb5ab40ff22d96de55e8799b0e4d2d2ee946b
Finally, add an output index (integer):
0
,1
, etc.
To find output indexes, see utxo_output
events returned by GET Transaction by Hash. Each of them has an id
and an index
field, both containing its index:
"events": [
{
"id": "ffd7746484a29cffd678cefe65bca83a3813b1770cd4e20fd538f13ce7795056-0",
"transaction_id": "ffd7746484a29cffd678cefe65bca83a3813b1770cd4e20fd538f13ce7795056",
"type": "utxo_output",
"denomination": "BTC",
"destination": "37G32tDFSUekLXjm4ihC5AjM2ufoAnY5p8",
"meta": {
"index": 0
},
"date": 1652283133,
"amount": 363755,
"decimals": 8
},
{...more events...}
]
Supported Protocols and Networks
Here is a full list of supported protocols and networks with their path parameters:
Protocol | Network | Path parameters |
Bitcoin | Mainnet Testnet |
bitcoin/mainnet bitcoin/testnet |
Bitcoin Cash | Mainnet Testnet |
bitcoincash/mainnet bitcoincash/testnet |
Dogecoin | Mainnet Testnet |
dogecoin/mainnet dogecoin/testnet |
Litecoin | Mainnet Testnet |
litecoin/mainnet litecoin/testnet |
Example Queries
The query in this section provides a useful example for GET Transaction by Hash (V1).
To get the output of a Bitcoin Mainnet transaction, use the following query:
https://svc.blockdaemon.com/universal/v1/bitcoin/mainnet/tx/000ed6ef37fb212bf8488454e74fb5ab40ff22d96de55e8799b0e4d2d2ee946b/0
GET Transaction Confirmations by Hash
https://{ubiquity_url}/{protocol}/{network}/tx/{id}/confirmations
Returns the number of transaction confirmations by a given transaction hash.
Developer documentation: GET Transaction Confirmations by Hash
Learn how to authorize your request: Authentication Guide
Ubiquity URL
To run a query, add your Ubiquity URL. For most users this will be:
svc.blockdaemon.com/universal/v1
An example of this is shown below:
https://svc.blockdaemon.com/universal/v1/{protocol}/{network}/tx/{id}/confirmations
Note: If you created your Ubiquity API Key before September 2022, add the legacy Ubiquity URL:
ubiquity.api.blockdaemon.com/v1
An example of this is shown below:
https://ubiquity.api.blockdaemon.com/v1/{protocol}/{network}/tx/{id}/confirmations
Path Parameters
You should specify a protocol and a network as path parameters, e.g.:
ethereum/mainnet
It is also is required to add a transaction hash, e.g.:
0x7bf9c72babc58abc5ec8a40c8740198e8d207da6feefc18d8477886a1e3073d7
Supported Protocols and Networks
Here is a full list of supported protocols and networks with their path parameters:
Protocol | Network | Path parameters |
Bitcoin | Mainnet Testnet |
bitcoin/mainnet bitcoin/testnet |
Bitcoin Cash | Mainnet Testnet |
bitcoincash/mainnet bitcoincash/testnet |
Dogecoin | Mainnet Testnet |
dogecoin/mainnet dogecoin/testnet |
Ethereum | Mainnet Goerli Ropsten |
ethereum/mainnet ethereum/goerli ethereum/ropsten |
Litecoin | Mainnet Testnet |
litecoin/mainnet litecoin/testnet |
Polkadot | Mainnet | polkadot/mainnet |
Tezos | Mainnet | tezos/mainnet |
Example Queries
The query in this section provides a useful example for GET Transaction Confirmations by Hash.
To get confirmations of an Ethereum Mainnet transaction, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/tx/0x7bf9c72babc58abc5ec8a40c8740198e8d207da6feefc18d8477886a1e3073d7/confirmations
GET All Transactions
https://{ubiquity_url}/{protocol}/{network}/txs
Returns all transactions in the network, starting with the latest one.
The response is paginated — use a query parameter to get the next page (see below).
Developer Documentation: GET All Transactions
Learn how to authorize your request: Authentication Guide
Ubiquity URL
To run a query, add your Ubiquity URL. For most users this will be:
svc.blockdaemon.com/universal/v1
An example of this is shown below:
https://svc.blockdaemon.com/universal/v1/{protocol}/{network}/txs
Note: If you created your Ubiquity API Key before September 2022, add the legacy Ubiquity URL:
ubiquity.api.blockdaemon.com/v1
An example of this is shown below:
https://ubiquity.api.blockdaemon.com/v1/{protocol}/{network}/txs
Path Parameters
You should specify a protocol and a network as path parameters, e.g.:
ethereum/mainnet
Supported Protocols and Networks
Here is a full list of supported protocols and networks with their path parameters:
Protocol | Network | Path parameters |
Algorand | Mainnet | algorand/mainnet |
Bitcoin | Mainnet Testnet |
bitcoin/mainnet bitcoin/testnet |
Bitcoin Cash | Mainnet Testnet |
bitcoincash/mainnet bitcoincash/testnet |
Dogecoin | Mainnet Testnet |
dogecoin/mainnet dogecoin/testnet |
Ethereum | Mainnet Goerli Ropsten |
ethereum/mainnet ethereum/goerli ethereum/ropsten |
Litecoin | Mainnet Testnet |
litecoin/mainnet litecoin/testnet |
Polkadot | Mainnet | polkadot/mainnet |
Stellar | Mainnet | stellar/mainnet |
Tezos | Mainnet | tezos/mainnet |
XRP | Mainnet | xrp/mainnet |
Query Parameters
To query particular assets, use the following parameter:
- parameter:
assets
- value: an asset path or a comma-separated list of paths
You can specify a token, or a native coin, e.g.:
- LINK
ethereum/contract/0x514910771AF9Ca656af840dff83E8264EcF986CA/erc-20
- MATIC
ethereum/contract/0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0/erc-20
- ETH (native)
ethereum/native/eth
See also: Available Currencies and Tokens
Note: Assets associated with transactions are returned in the denomination
field of the response.
To filter by block hash, use:
- parameter:
block_id
- value: e.g.
0x2444165297806ad5598e4569e5823b3df0cde3e48b346781ab632fa6cef1a0ec
Note: You can specify only one block hash at a time.
To set the sort order, use:
- parameter:
order
- value:
asc
/desc
To set the maximum number of transactions returned on one page, use:
- parameter:
page_size
- value: 25 by default, up to 100
To get the next page, use:
- parameter:
page_token
- value: returned in the
next_page_token
field
Example Queries
The queries in this section provide useful examples for GET All Transactions.
To get all Ethereum Mainnet transactions, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/txs
To get all LINK transactions in Ethereum Mainnet, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/txs?assets=ethereum/contract/0x514910771AF9Ca656af840dff83E8264EcF986CA/erc-20
To get all LINK and MATIC transactions in Ethereum Mainnet, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/txs?assets=ethereum/contract/0x514910771AF9Ca656af840dff83E8264EcF986CA/erc-20,ethereum/contract/0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0/erc-20