Blockdaemon Documentation
Accounts
Overview
GET Balances of Address
GET Transactions of Address
GET Transaction Outputs of Address
POST Balances of Addresses
Overview
The Ubiquity Universal API endpoints listed in this section allow the retrieval of balances, transactions, and other details of accounts (identified by addresses) for a given protocol and network.
You can use the Universal API Accounts endpoints to access both native coin and token information.
As with all Ubiquity Universal API endpoints, they provide a standard format to obtain consistent information across multiple protocols.
GET Balances of Address
https://{ubiquity_url}/{protocol}/{network}/account/{address}
Returns the native and token balances of a given account.
Developer documentation: GET Balances of Address
Learn how to authorize your request: Authentication Guide
Notes:
- For Ethereum this endpoint returns only ETH balances by default. To get token balances, add query parameters (see below).
- Ubiquity does not support the concept of memepool and does not return
pending_balance
for the following networks: Bitcoin Testnet, all Bitcoin Cash, Dogecoin, and Litecoin networks.
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}/account/{address}
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}/account/{address}
Path Parameters
You should specify a protocol and a network as path parameters, e.g.:
ethereum/mainnet
It is also required to specify an account address as the last path parameter, e.g.:
0x6E4ab39231b7549735C4D584d9CbBb3CB6Ed4f1b
Note: You can specify Bitcoin Cash addresses both in the legacy Bitcoin format and in the newer Bitcoin Cash format. However, all Ubiquity endpoints always return the newer format.
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 |
NEAR | Mainnet | near/mainnet |
Oasis | Mainnet | oasis/mainnet |
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 |
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
Example Queries
The queries in this section provide useful examples for GET Balances of Address.
To get the balance of a given Ethereum Mainnet address, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/account/0x6E4ab39231b7549735C4D584d9CbBb3CB6Ed4f1b
To get the LINK balance of a given Ethereum Mainnet address, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/account/0x6E4ab39231b7549735C4D584d9CbBb3CB6Ed4f1b?assets=ethereum/contract/0x514910771AF9Ca656af840dff83E8264EcF986CA/erc-20
To get the LINK, MATIC and native ETH balances of a given Ethereum Mainnet address, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/account/0x6DAb591a596d2714390bCe1E7B9bAfF5e531b72C?assets=ethereum/contract/0x514910771AF9Ca656af840dff83E8264EcF986CA/erc-20,ethereum/contract/0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0/erc-20,ethereum/native/eth
GET Transactions of Address
https://{ubiquity_url}/{protocol}/{network}/account/{address}/txs
Returns all native coin and token transactions that a given account was involved with, starting with the latest one.
It includes all transactions where the given address was sender or receiver. See the source
and destination
fields. The response is paginated — use a query parameter to get the next page (see below).
Developer documentation: GET Transactions of Address
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}/account/{address}/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}/account/{address}/txs
Path Parameters
You should specify a protocol and a network as path parameters, e.g.:
ethereum/mainnet
It is also required to add an account address, e.g.:
0xdc7D545a03307c89Eb4A22953183c961Ccfa398E
Note: You can specify Bitcoin Cash addresses both in the legacy Bitcoin format and in the newer Bitcoin Cash format. However, all Ubiquity endpoints always return the newer format.
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 |
Solana | Mainnet Testnet |
solana/mainnet solana/testnet |
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 date range, use:
- parameters:
from
,to
- values: Unix timestamps, e.g.
1647867926
,1654531576
(see thedate
field of the response)
Note: this parameter is available for the following protocols: Algorand, Bitcoin, Bitcoin Cash, Dogecoin, Ethereum, Litecoin, Polkadot, Tezos.
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 Transactions of Address.
To get all transactions of a given Ethereum Mainnet address, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/account/0xdc7D545a03307c89Eb4A22953183c961Ccfa398E/txs
To get LINK transactions of a given Ethereum Mainnet address, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/account/0xdc7D545a03307c89Eb4A22953183c961Ccfa398E/txs?assets=ethereum/contract/0x514910771AF9Ca656af840dff83E8264EcF986CA/erc-20
To get LINK and MATIC transactions of a given Ethereum Mainnet address, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/account/0xdc7D545a03307c89Eb4A22953183c961Ccfa398E/txs?assets=ethereum/contract/0x514910771AF9Ca656af840dff83E8264EcF986CA/erc-20,ethereum/contract/0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0/erc-20
GET Transaction Outputs of Address
https://{ubiquity_url}/{protocol}/{network}/account/{address}/utxo
Returns outputs (UTXO) of all transactions a given account was involved with, starting with the latest one.
The output can be spent or unspent. For any spent output this endpoint returns information about the transaction where it was used as input.
You will get outputs of transactions where the given addres swas sender or receiver.
Developer documentation: GET Transaction Outputs of Address
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}/account/{address}/utxo
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}/account/{address}/utxo
Path Parameters
You should specify a protocol and a network as path parameters, e.g.:
bitcoin/mainnet
It is also is required to add an account address, e.g.:
1F6kKKu5tUNkMhCFnu5QpkbgMwFjxS9dUU
Note: You can specify Bitcoin Cash addresses both in the legacy Bitcoin format and in the newer Bitcoin Cash format. However, all Ubiquity endpoints always return the newer format.
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 |
Query Parameters
To filter by spent / unspent, use the following parameter:
- parameter:
spent
- value:
true
/false
To filter by mined date range, use:
- parameters:
from
,to
- values: Unix timestamps, e.g.
1647867926
,1654531576
(see themined.date
field of the response)
To set the maximum number of outputs 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
To set the sort order, use:
- parameter:
order
- value:
asc
/desc
Example Queries
The queries in this section provide useful examples for GET Transaction Outputs and Inputs of Address.
To get transaction outputs and inputs of a Bitcoin Mainnet address, use the following query:
https://svc.blockdaemon.com/universal/v1/bitcoin/mainnet/account/1F6kKKu5tUNkMhCFnu5QpkbgMwFjxS9dUU/utxo
To get transaction outputs of a Bitcoin Mainnet address, filtered by a given date range, use the following query:
https://svc.blockdaemon.com/universal/v1/bitcoin/mainnet/account/1F6kKKu5tUNkMhCFnu5QpkbgMwFjxS9dUU/utxo?from=1647867926&to=1654531576
POST Balances of Addresses
https://{ubiquity_url}/{protocol}/{network}/accounts
Returns the native and token balances of multiple given accounts (up to 10).
Developer documentation: POST Balances of Addresses
Learn how to authorize your request: Authentication Guide
Note: For Ethereum this endpoint returns only ETH balances by default. To get token balances, add query parameters (see below).
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}/accounts
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}/accounts
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 |
NEAR | Mainnet | near/mainnet |
Oasis | Mainnet | oasis/mainnet |
Polkadot | Mainnet | polkadot/mainnet |
Solana | Mainnet Testnet |
solana/mainnet solana/testnet |
Stellar | Mainnet | stellar/mainnet |
Tezos | Mainnet | tezos/mainnet |
XRP | Mainnet | xrp/mainnet |
Request Body
In the body of your request, specify an array of accounts (up to 10), for example:
{
"addresses": [
"0x6E4ab39231b7549735C4D584d9CbBb3CB6Ed4f1b",
"0xdc7D545a03307c89Eb4A22953183c961Ccfa398E",
"0xB2DC5571f477b1C5b36509a71013BFedD9Cc492F",
"0x12274c71304bC0E6B38a56b94D2949B118feb838",
"0xf27153d7475dBFBF82580cE2f5Bad1C47b1AF0e8"
]
}
Note: You can specify Bitcoin Cash addresses both in the legacy Bitcoin format and in the newer Bitcoin Cash format. However, all Ubiquity endpoints always return the newer format.
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
Example Queries
The queries in this section provide useful examples for POST Balances of Addresses.
To get balances of given Ethereum Mainnet addresses, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/accounts
To get LINK balances of given Ethereum Mainnet addresses, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/accounts?assets=ethereum/contract/0x514910771AF9Ca656af840dff83E8264EcF986CA/erc-20
To get LINK, MATIC, and native ETH balances of given Ethereum Mainnet addresses, use the following query:
https://svc.blockdaemon.com/universal/v1/ethereum/mainnet/accounts?assets=ethereum/contract/0x514910771AF9Ca656af840dff83E8264EcF986CA/erc-20,ethereum/contract/0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0/erc-20,ethereum/native/eth