Advanced API Reference
This document describes Coinbase Node's Advanced API.
This API supplements the native Ethereum API. The Coinbase Node Advanced API simplifies access to blockchain data by offering data cuts which are hard to get via native Ethereum API methods, and offer aggregated and filtered data in one API call. The Advanced API provides access to token balances for accounts, transactions and transfers for accounts, smart contract event logs, and more.
API constraints:
- Only Ethereum Mainnet and Goerli Testnet are supported in this version of the API. Ethereum L2 chains and other protocols will be supported incrementally.
- This version of the API only supports ETH, ERC-20 and ERC-721 tokens.
Definitions
- balance: Amount of a token, for Ethereum this is the amount of ETH in wei. For NFTs this is the number of NFTs.
- contract: Also known as a "smart contract". A program that runs on a blockchain. Contracts are a type of account that have a balance and can send transactions.
- contract address: The hash associated with a contract address. This page lists the most common tokens, where you can also find the associated addresses.
- transaction: A cryptographically signed instruction that updates the state of the network. The action must be initiated by an externally-owned address, e.g. an account managed by a human.
- internal transaction: An unsigned message carried out by a smart contract. A series of internal transactions originate from a transaction.
- transfer: Refers to "token transfer", a transaction that transfers ERC-20 (Ethereum) or ERC-721 (NFT) tokens.
- allowance: Also known as "access permissions to tokens". Allows a third party to carry out transactions of a given amount with a user's tokens.
Servers
The Advanced API supports the following blockchain networks:
Name | Endpoint |
---|---|
Ethereum Mainnet | https://mainnet.ethereum.coinbasecloud.net |
Goerli Testnet | https://goerli.ethereum.coinbasecloud.net |
Authentication:
This endpoint uses HTTP Basic Auth.
To authenticate to this API:
- Create a project in the Coinbase Cloud Console
- Grab your project-specific API Access Token username and password from the project overview page
- Include your username and password as
auth
in each HTTP request
Methods
coinbaseCloud_getBalances
Get balance for multiple account addresses across one or more tokens within a single blockchain and network. The balance incorporates transactions, internal transfers and all supported token transfers. Supports ERC-20 and ERC-721. This API is meant to be our primary API to get balances. A more simple and lower latency API that just fetches balance for a single address and token is getSingleBalance
.
Use cases:
- Get balances for one or many addresses in a single call
- Get balances for all the tokens an account address may hold
- Get balances for all the tokens a contract may hold
Parameters
Name | Type | Description |
---|---|---|
addressAndContractList | AddressAndContract[] | REQUIRED. List of account or contract addresses and token identifiers. For Ethereum the token identifier is the token contract address. Maximum limit of 100 addresses per request. |
Returns
Type | Description |
---|---|
MultiTokenBalance[] | A list of balance amounts for the given token identifiers and block range in which the balances were computed. Note that the start block is always genesis for this method. |
Examples
USDC & DAI (ERC-20)
Retrieve balances for USDC and DAI. Note that this example shows how the Advanced API normalizes input and accepts long, mixed-case addresses.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getBalances",
"params": {
"addressAndContractList": [
{
"address": "0x00000000DF0635793e91d4f8e7426dbd9ed08471186f428D",
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
{
"address": "0xdf0635793e91d4f8e7426dbd9ed08471186f428d",
"contract": "0x6b175474e89094c44da98b954eedeac495271d0f"
}
]
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getBalances",
"params": {
"addressAndContractList": [
{
"address": "0x00000000DF0635793e91d4f8e7426dbd9ed08471186f428D",
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
{
"address": "0xdf0635793e91d4f8e7426dbd9ed08471186f428d",
"contract": "0x6b175474e89094c44da98b954eedeac495271d0f"
}
]
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"balances": [
{
"blockHeight": "0xf1baed",
"address": "0xdf0635793e91d4f8e7426dbd9ed08471186f428d",
"nativeAmount": "0xf7f73d2927bc398",
"nativeUnit": "Wei",
"tokenBalances": [
{
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"amount": "0x373373df",
"decimals": 6
},
{
"contract": "0x6b175474e89094c44da98b954eedeac495271d0f",
"amount": "0x147fb0b4b9b0085c2",
"decimals": 18
}
]
}
]
}
}
NFT (ERC-721)
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getBalances",
"params": {
"addressAndContractList": [
{
"address": "0xa3e90da6c1d5ea0b1b4e881d1eaaaaaaf3c25cc2",
"contract": "0x5180db8F5c931aaE63c74266b211F580155ecac8"
}
]
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getBalances",
"params": {
"addressAndContractList": [
{
"address": "0xa3e90da6c1d5ea0b1b4e881d1eaaaaaaf3c25cc2",
"contract": "0x5180db8F5c931aaE63c74266b211F580155ecac8"
}
]
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"balances": [
{
"blockHeight": "0xf1baf4",
"address": "0xa3e90da6c1d5ea0b1b4e881d1eaaaaaaf3c25cc2",
"nativeAmount": "0x735674a1d9feff6",
"nativeUnit": "Wei",
"tokenBalances": [
{
"contract": "0x5180db8f5c931aae63c74266b211f580155ecac8",
"amount": "0x3",
"decimals": 1
}
]
}
]
}
}
coinbaseCloud_getSingleBalance
Get an accurate balance for a single token and a single account address. The balance takes into account transactions, internal transfers, and any supported token transfers. The caller can expect low latency from this method compared to the getBalances
method.
Use cases:
- Get balances for an account address or a contract
Parameters
Name | Type | Description |
---|---|---|
address | String | REQUIRED. An account address or a contract address. |
contract | String | REQUIRED. Token identifier. For Ethereum the token identifier is the token contract address. |
Returns
Type | Description |
---|---|
SingleBalance | Balance of the native cryptocurrency (ETH, BTC, etc.) for the blockchain and network: Amount and unit (e.g. Wei, satoshi). Balance is returned in the smallest possible unit. Currently only Wei . 1 ETH = 10^18 Wei. |
Examples
USDC (ERC-20)
Retrieve balances for USDC. Note that this example shows how Advanced APIs normalize input and accept a long, mixed-case address.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getSingleBalance",
"params": {
"address": "0x00000000DF0635793e91d4f8e7426dbd9ed08471186f428D",
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getSingleBalance",
"params": {
"address": "0x00000000DF0635793e91d4f8e7426dbd9ed08471186f428D",
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHeight": "0xf1baf8",
"address": "0xdf0635793e91d4f8e7426dbd9ed08471186f428d",
"nativeAmount": "0xf7f73d2927bc398",
"nativeUnit": "Wei",
"tokenBalance": {
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"amount": "0x373373df",
"decimals": 6
}
}
}
NFT (ERC-721)
Retrieve NFT tokens.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getSingleBalance",
"params": {
"address": "0xa3e90da6c1d5ea0b1b4e881d1eaaaaaaf3c25cc2",
"contract": "0x5180db8F5c931aaE63c74266b211F580155ecac8"
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getSingleBalance",
"params": {
"address": "0xa3e90da6c1d5ea0b1b4e881d1eaaaaaaf3c25cc2",
"contract": "0x5180db8F5c931aaE63c74266b211F580155ecac8"
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHeight": "0xf1bafd",
"address": "0xa3e90da6c1d5ea0b1b4e881d1eaaaaaaf3c25cc2",
"nativeAmount": "0x735674a1d9feff6",
"nativeUnit": "Wei",
"tokenBalance": {
"contract": "0x5180db8f5c931aae63c74266b211f580155ecac8",
"amount": "0x3",
"decimals": 1
}
}
}
coinbaseCloud_getTokenAllowances
Get allowances for a specified owner and spender across one or more tokens within a single blockchain and network.
Use cases:
- Get allowance given to another account for one or more tokens
- Get allowances for all the tokens an account address may hold
Parameters
Name | Type | Description |
---|---|---|
allowances | Allowance[] | REQUIRED. List of owner addresses, spender addresses, and token identifiers. For Ethereum, the token identifier is the token contract address. Maximum limit of 100 allowances per request. |
Returns
Type | Description |
---|---|
TokenAllowance[] | List of allowances, including owner address, spender address, the block range in which the balances were computed (start block is genesis), and a list of allowance information. |
Examples
USDT (ERC-20)
Retrieve token allowances for USDT.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenAllowances",
"params": {
"allowances": [
{
"owner": "0xa646147bda82a866eba03568f363fc9c90185c6e",
"spender": "0xadd0e097b961572b2a1f5de572c622eef97e3d82",
"contracts": [
"0xdac17f958d2ee523a2206206994597c13d831ec7"
]
}
]
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenAllowances",
"params": {
"allowances": [
{
"owner": "0xa646147bda82a866eba03568f363fc9c90185c6e",
"spender": "0xadd0e097b961572b2a1f5de572c622eef97e3d82",
"contracts": [
"0xdac17f958d2ee523a2206206994597c13d831ec7"
]
}
]
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"allowances": [
{
"blockHeight": "0xea613d",
"owner": "0xa646147bda82a866eba03568f363fc9c90185c6e",
"spender": "0xadd0e097b961572b2a1f5de572c622eef97e3d82",
"tokenAllowances": [
{
"contract": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"amount": "0xffecee2142a7dea9314b809a0c42d3e9560b1408a9f3b3e792e3",
"decimals": 6
}
]
}
]
}
}
coinbaseCloud_getTransactionsByAddress
Get external transactions, internal transactions (triggered by smart contracts) and token transfers for a given address. Includes activity from and to the input address. Transactions are returned in reverse chronological order.
This API guarantees that all relevant transactions and transfers for a single block are returned in a single call.
Parameters
Name | Type | Description |
---|---|---|
address | String | REQUIRED. Account address. |
blockStart | String | REQUIRED. Start of block range to scan for transactions. |
blockEnd | String | End of block range to scan for transactions. Defaults to latest. |
addressFilter | String | Filter transactions by SENDER_ONLY , RECEIVER_ONLY , or SENDER_OR_RECEIVER . Defaults to SENDER_OR_RECEIVER . |
sort | String | The sorting preference, use asc to sort by ascending and desc to sort by descending. The default is desc . Tip: Specify a smaller blockStart and blockEnd range for faster search results. |
pageSize | Integer | The number of transactions displayed per page. The default and max value are 1000 . See Handle pagination. |
pageNumber | Integer | The integer page number, if pagination is enabled. It starts with 1 . See Handle pagination. |
Returns
Type | Description |
---|---|
Transaction[] | A list of transactions found for the address. |
Examples
ERC-20
Retrieve transactions for ERC-20 tokens.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTransactionsByAddress",
"params": {
"address": "0xcAfB10eE663f465f9d10588AC44eD20eD608C11e",
"blockStart": "0x40f400",
"blockEnd": "0xdc3501",
"addressFilter": "SENDER_OR_RECEIVER"
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTransactionsByAddress",
"params": {
"address": "0xcAfB10eE663f465f9d10588AC44eD20eD608C11e",
"blockStart": "0x40f400",
"blockEnd": "0xdc3501",
"addressFilter": "SENDER_OR_RECEIVER"
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"transactions": [
{
"transactionHash": "0xedfa0825fc6a22afb3888d1b1b67d7e82d978f32518123ffb55ee9c7c57c3e43",
"transactionIndex": "0x0",
"from": "0xcafb10ee663f465f9d10588ac44ed20ed608c11e",
"to": "0x0101010101010101010101010101010101010101",
"value": "0x0",
"gasLimit": "0x33450",
"gasPrice": "0x3a35294400",
"gasUsed": "0x558c",
"cumulativeGasUsed": "0x558c",
"status": "0x1",
"input": "0xb61d27f6000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e0000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x337",
"blockHash": "0xa5144e634386cb02c8dfd1e675ce3ed99bf7fd64881d13812e2cdcb2c1eea8db",
"blockNumber": "0xa2be2f",
"blockTimestamp": "0x5f38014b"
},
{
"transactionHash": "0xc4115b7ae4ca69403f6c13aaa56b89d86454dc8a4af280a01bcde027ee30c3a4",
"transactionIndex": "0x2c",
"from": "0x24c1bbb2421cf83ed6cbec5a81595e9236d71f54",
"to": "0xcafb10ee663f465f9d10588ac44ed20ed608c11e",
"value": "0x82bd67afbc000",
"gasLimit": "0x7aea",
"gasPrice": "0x4e3b29200",
"gasUsed": "0x5208",
"cumulativeGasUsed": "0x19a2f5",
"status": "0x0",
"input": "0x",
"nonce": "0x2f",
"blockHash": "0x2f60383a11b0578c3138c6db38d9f2e1320a28cbf771462e09473faf6ba8c86f",
"blockNumber": "0x4248cd",
"blockTimestamp": "0x59d86b41"
},
{
"transactionHash": "0x6e88a2ade9bf56e3bc7423de1a53d9dd4c57f5bb7c15a317d198d23c68a65bd6",
"transactionIndex": "0x6",
"from": "0xcafb10ee663f465f9d10588ac44ed20ed608c11e",
"to": "0x7727e5113d1d161373623e5f49fd568b4f543a9e",
"value": "0x192cd29da80d7d1e86a0",
"gasLimit": "0x7a0c",
"gasPrice": "0x4e3b29200",
"gasUsed": "0x7139",
"cumulativeGasUsed": "0x4e0db",
"status": "0x0",
"input": "0x",
"nonce": "0x336",
"blockHash": "0xc501788a0b316b522f548f8e4bf068645dec00b19987a4b0d54c72d3523a38a1",
"blockNumber": "0x40f400",
"blockTimestamp": "0x59b470c7",
"internalTransactions": [
{
"traceType": "CALL_0",
"from": "0x7727e5113d1d161373623e5f49fd568b4f543a9e",
"to": "0x1151314c646ce4e0efd76d1af4760ae66a9fe30f",
"value": "0x192cd29da80d7d1e86a0",
"gasLimit": "0x8fc"
}
]
}
]
}
}
coinbaseCloud_getTokenTransfersByAddress
Get token transfers for a given address (in reverse chronological order). Includes activity from and to the input address.
Parameters
Name | Type | Description |
---|---|---|
address | String | REQUIRED. Account address. |
blockStart | String | REQUIRED. Inclusive of specified block. |
blockEnd | String | Inclusive of specified block. Defaults to latest. |
addressFilter | String | Filter transactions by SENDER_ONLY , RECEIVER_ONLY , or SENDER_OR_RECEIVER . Defaults to SENDER_OR_RECEIVER . |
sort | String | The sorting preference, use asc to sort by ascending and desc to sort by descending. The default is desc . Tip: Specify a smaller blockStart and blockEnd range for faster search results. |
pageSize | Integer | The number of transactions displayed per page. The default and max value are 1000 . See Handle pagination. |
pageNumber | Integer | The integer page number, if pagination is enabled. It starts with 1 . See Handle pagination. |
Returns
Type | Description |
---|---|
TokenTransfersByAddress | A list of token transfers found for the address. |
Examples
ERC-20 and ERC-721 token transfers
Return all ERC-20 and ERC-721 token transfers to the burn wallet.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenTransfersByAddress",
"params": {
"address": "0x0000000000000000000000000000000000000000",
"blockStart": "0x1",
"blockEnd": "0x16bc50",
"addressFilter": "RECEIVER_ONLY"
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenTransfersByAddress",
"params": {
"address": "0x0000000000000000000000000000000000000000",
"blockStart": "0x1",
"blockEnd": "0x16bc50",
"addressFilter": "RECEIVER_ONLY"
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"tokenTransfers": [
{
"tokenAddress": "0x7789d991d2552f94066a9b273cd65c8cd763c227",
"tokenType": "erc20",
"from": "0xa044efd7b193444ced74a521a6104f7920d436fd",
"to": "0x0000000000000000000000000000000000000000",
"value": "0x3",
"transactionHash": "0xa3ee71f1a4b50f4ea1dc163d6a8419ed4c3f17768e190a9602548724dea67486",
"transactionIndex": "0x5",
"blockHash": "0x496788c88b61a1c74a2f06af3e42ac7eba356a938de86e492084229c33ae90e0",
"blockNumber": "0x165e2c",
"blockTimestamp": "0x572c3095"
},
{
"tokenAddress": "0xd25753116e068eeb7a1f8d11370aa6794c73728c",
"tokenType": "erc20",
"from": "0xd25753116e068eeb7a1f8d11370aa6794c73728c",
"to": "0x0000000000000000000000000000000000000000",
"value": "0x0",
"transactionHash": "0x1b7b06f8bef5e032183dfed1f733dbd3fa54c496c470fa6c849c47da0ea2233f",
"transactionIndex": "0x13",
"blockHash": "0x138efe004f40abeb4b00ca68034add511f9313dc3cfea66b574133c7ceeebf59",
"blockNumber": "0x15ee0e",
"blockTimestamp": "0x5725e384"
},
{
"...": "output truncated. Returns enough blocks to return 1000+ transfers."
}
]
}
}
ERC-721 token transfers
Return all ERC-721 token transfers to or from a given address.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenTransfersByAddress",
"params": {
"address": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"blockStart": "0x1",
"blockEnd": "0xdb0db3",
"addressFilter": "SENDER_OR_RECEIVER"
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenTransfersByAddress",
"params": {
"address": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"blockStart": "0x1",
"blockEnd": "0xdb0db3",
"addressFilter": "SENDER_OR_RECEIVER"
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"tokenTransfers": [
{
"tokenAddress": "0x6fa769eed284a94a73c15299e1d3719b29ae2f52",
"tokenType": "erc721",
"from": "0x88a0345fc2b5af9edff72e05227b179c8f4c46ec",
"to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"tokenID": "30050211",
"value": "0x0",
"transactionHash": "0xc5989ae775fbef07f8a048118022fd5b059640a192c3be43f2aee05a32366870",
"transactionIndex": "0x33",
"blockHash": "0x1d752cd04499c219cb3ac5858a759b9fb4574a62364568312be02b3bd2deb22e",
"blockNumber": "0x956f84",
"blockTimestamp": "0x5e8607dd"
},
{
"tokenAddress": "0xc20cf2cda05d2355e218cb59f119e3948da65dfa",
"tokenType": "erc721",
"from": "0x0000000000000000000000000000000000000000",
"to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"tokenID": "9233",
"value": "0x0",
"transactionHash": "0x6cba30deaa60bbfe3d071264bd842f57e3684705bc952029e68785c892f58de4",
"transactionIndex": "0xb",
"blockHash": "0xcf5b0eada27efe0635819f7196d4e30e983273dbc3ff487224fe8f0dfb730052",
"blockNumber": "0x9200f1",
"blockTimestamp": "0x5e584946"
},
{
"tokenAddress": "0xfe2786d7d1ccab8b015f6ef7392f67d778f8d8d7",
"tokenType": "erc20",
"from": "0x57ed92c079621c163f2a256daa0f78bb95b8b8a7",
"to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"value": "0xad78ebc5ac6200000",
"transactionHash": "0x0843d4ba50391e4cea418ad7b461398a8276ce7dc101da3d6fc3fc1d4f6abbdf",
"transactionIndex": "0x13",
"blockHash": "0x303b6b43bcba72851149e828680386ffe3b8ca666a1efa3aaadd25d16af12192",
"blockNumber": "0x8e3210",
"blockTimestamp": "0x5e25bad7"
},
{
"tokenAddress": "0xac9bb427953ac7fddc562adca86cf42d988047fd",
"tokenType": "erc20",
"from": "0xde1c8c935987fb430a0944a85bfb089b0928e7a9",
"to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"value": "0xde0b6b3a7640000",
"transactionHash": "0x51ef4f43f163bbaa3ff8b6923d87e828985e99e6e1864850d4b78e1f7700fc76",
"transactionIndex": "0x24",
"blockHash": "0x9f280246098663a07b3d6f0d59e8a7afc056a6d11068aeedd34911ce1b21ae2f",
"blockNumber": "0x8cb3b4",
"blockTimestamp": "0x5e11f991"
},
{
"tokenAddress": "0xd47881c10ab56bfd91639b86ac6aca1c293a8901",
"tokenType": "erc20",
"from": "0x0f4b92e13cc618bb9ff2120aec2ccd19f0d97b68",
"to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"value": "0x7e3",
"transactionHash": "0x9463ea5cd7c66ea161e53d33c677fa5fae0477ff2e8a43930e004d74ace5c99d",
"transactionIndex": "0x5c",
"blockHash": "0x820a6488fd5198bf0f8c98f18d40a7223c361be3b46334c6be1798fd50a4a40c",
"blockNumber": "0x87c599",
"blockTimestamp": "0x5dc5bd1a"
},
{
"tokenAddress": "0x7234c500895b825b40e46ca01824a18fa3662493",
"tokenType": "erc20",
"from": "0x5d03c8ebc7fbfc5c99ce64feac8ff998e53fab00",
"to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"value": "0x3782dace9d900000",
"transactionHash": "0xcbf585176991a9c1b7a5957a6c480a47f4ecca7c2369b8e858a6d4e1d9fb5335",
"transactionIndex": "0x38",
"blockHash": "0x241695503733b512b425c0fbead75a3f59d70368451dec14a8a99c069cd40339",
"blockNumber": "0x7c0281",
"blockTimestamp": "0x5d26973f"
},
{
"tokenAddress": "0x98976a6dfaaf97b16a4bb06035cc84be12e79110",
"tokenType": "erc20",
"from": "0x5d805d237e1c81df5aff3a8d481833412b774f17",
"to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"value": "0x16345785d8a0000",
"transactionHash": "0xff8c85ab5d64cc55ff9fd199a2148a9f96676b2d951fdbb6157dba64eeabb7ce",
"transactionIndex": "0x63",
"blockHash": "0x05cdaec591802b3dd5dc74c977af95cc478027ecc4a8122284601c25b37fe0ea",
"blockNumber": "0x77efcd",
"blockTimestamp": "0x5cefa538"
},
{
"tokenAddress": "0xcfbc9103362aec4ce3089f155c2da2eea1cb7602",
"tokenType": "erc20",
"from": "0xcf76653e257341aee3eacea153bb48e8b27e8391",
"to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"value": "0x2cfc",
"transactionHash": "0x679890e09aba3706bd69fa12503b19cb90ea5da204fdf3a1280b4e6010fbb9e5",
"transactionIndex": "0x3d",
"blockHash": "0xbfc3ee07005fcd89c63846d73827d022b3c8dc71d3530b86e1f8364d71677244",
"blockNumber": "0x7070a8",
"blockTimestamp": "0x5c8aa46c"
},
{
"tokenAddress": "0xcfbc9103362aec4ce3089f155c2da2eea1cb7602",
"tokenType": "erc20",
"from": "0xcf76653e257341aee3eacea153bb48e8b27e8391",
"to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"value": "0x2cfe",
"transactionHash": "0x634c4e39124988c9813cc531c8a8809f242fe0f3835daecadf7bd153dfe503ef",
"transactionIndex": "0x19",
"blockHash": "0x38384115aa3daab701d3714c728ecde1a8e5e8baa93281d2454b05c93a14d714",
"blockNumber": "0x70708a",
"blockTimestamp": "0x5c8aa2d1"
},
{
"tokenAddress": "0x212d95fccdf0366343350f486bda1ceafc0c2d63",
"tokenType": "erc20",
"from": "0x912f1da25018ae336d5dc46f19089c17c8e35703",
"to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"value": "0x56bc75e2d63100000",
"transactionHash": "0x853a8299601bd6cbc1cb46c38ffbe502c327aecf4936cec98867fe71044a01ff",
"transactionIndex": "0x37",
"blockHash": "0x6763766f2c8c1f32674d83565cd369aaba0f72ac31776a9e22b7135f661f076b",
"blockNumber": "0x5fe9f3",
"blockTimestamp": "0x5b91e620"
}
]
}
}
coinbaseCloud_getTransactionByHash
Get detailed information about a transaction, including all internal transactions and token transfers that were triggered by the transaction.
Use cases:
- Get complete data for a transaction
- Get all the internal transactions and token transfers triggered by a transaction
Constraints:
- Static calls among smart contracts can result in zero balance transfers in Ethereum. Such transfers are excluded from the output.
- This method doesn't currently support pagination. All the data for the transaction will be returned in a single call.
Parameters
Name | Type | Description |
---|---|---|
transactionHash | String | REQUIRED. Transaction hash. |
Returns
Type | Description |
---|---|
Transaction | The given transaction with all associated internal transactions and token transfers. |
Examples
ETH transfer
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTransactionByHash",
"params": {
"transactionHash": "0x2be70b2bcff662ba941c3f3c7706ef2c674d0d0ea4a13a91543cbe18862063d4"
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTransactionByHash",
"params": {
"transactionHash": "0x2be70b2bcff662ba941c3f3c7706ef2c674d0d0ea4a13a91543cbe18862063d4"
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"transaction": {
"transactionHash": "0x2be70b2bcff662ba941c3f3c7706ef2c674d0d0ea4a13a91543cbe18862063d4",
"transactionIndex": "0x8",
"from": "0x3f13e7a451a907030f8346db90c112c5d0dd7d9b",
"to": "0x797dbfab26308010199f0b18c97c1c554dd119f9",
"value": "0x11047ac8796000",
"gasLimit": "0x5208",
"gasPrice": "0x2540be400",
"gasUsed": "0x5208",
"cumulativeGasUsed": "0x562d9",
"status": "0x1",
"input": "0x",
"nonce": "0xb",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"blockTimestamp": "0x5eb01705"
}
}
}
ERC-721 transfer
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTransactionByHash",
"params": {
"transactionHash": "0x30eda1f9a9d1ec16be8802d2332c7696bd25897eab15ad0269f8e73ed9a9e2b9"
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTransactionByHash",
"params": {
"transactionHash": "0x30eda1f9a9d1ec16be8802d2332c7696bd25897eab15ad0269f8e73ed9a9e2b9"
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"transaction": {
"transactionHash": "0x30eda1f9a9d1ec16be8802d2332c7696bd25897eab15ad0269f8e73ed9a9e2b9",
"transactionIndex": "0x2e",
"from": "0x5b098b00621eda6a96b7a476220661ad265f083f",
"to": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",
"value": "0x0",
"gasLimit": "0x30d40",
"gasPrice": "0xee6b2800",
"gasUsed": "0xe8fb",
"cumulativeGasUsed": "0x3393fc",
"status": "0x0",
"input": "0x8b72a2ec000000000000000000000000582b2164d8c0ad22e0777275d646f29fd18d27c40000000000000000000000000000000000000000000000000000000000001fca",
"nonce": "0xac",
"blockHash": "0x4ce57b1345e7784d9ce33dbf38b34282b551950c6127903705b0c8ec33579bca",
"blockNumber": "0x3bd09a",
"blockTimestamp": "0x594d9798",
"tokenTransfers": [
{
"tokenAddress": "0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb",
"tokenType": "erc20",
"from": "0x5b098b00621eda6a96b7a476220661ad265f083f",
"to": "0x582b2164d8c0ad22e0777275d646f29fd18d27c4",
"value": "0x1",
"transactionHash": "0x30eda1f9a9d1ec16be8802d2332c7696bd25897eab15ad0269f8e73ed9a9e2b9",
"transactionIndex": "0x2e"
}
]
}
}
}
ERC-20 swap
Return transactions resulting from an ERC-20 swap.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTransactionByHash",
"params": {
"transactionHash": "0xf21640da131e6cabb14fa291d0d95ca08a8c5aadb6548c5234f11dd8361b3693"
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTransactionByHash",
"params": {
"transactionHash": "0xf21640da131e6cabb14fa291d0d95ca08a8c5aadb6548c5234f11dd8361b3693"
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"transaction": {
"transactionHash": "0xf21640da131e6cabb14fa291d0d95ca08a8c5aadb6548c5234f11dd8361b3693",
"transactionIndex": "0x1e",
"from": "0xab5c66752a9e8167967685f1450532fb96d5d24f",
"to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"value": "0x0",
"gasLimit": "0x15f90",
"gasPrice": "0x554f24500",
"gasUsed": "0xd099",
"cumulativeGasUsed": "0xdf591",
"status": "0x1",
"input": "0xa9059cbb0000000000000000000000008e1b05c050059b5251b8ad9dea8d9fbf93a92ba00000000000000000000000000000000000000000000000000000000059682f00",
"nonce": "0x2420a",
"blockHash": "0x4e454b49dc8a2e2a229e0ce911e9fd4d2aa647de4cf6e0df40cf71bff7283330",
"blockNumber": "0x7a1200",
"blockTimestamp": "0x5d0c7f75",
"tokenTransfers": [
{
"tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"tokenType": "erc20",
"from": "0xab5c66752a9e8167967685f1450532fb96d5d24f",
"to": "0x8e1b05c050059b5251b8ad9dea8d9fbf93a92ba0",
"value": "0x59682f00",
"transactionHash": "0xf21640da131e6cabb14fa291d0d95ca08a8c5aadb6548c5234f11dd8361b3693",
"transactionIndex": "0x1e"
}
]
}
}
}
ERC-721 sale
Return transactions resulting from an ERC-721 sale.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTransactionByHash",
"params": {
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef"
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTransactionByHash",
"params": {
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef"
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"transaction": {
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26",
"from": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"to": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"value": "0x136dcc951d8c0000",
"gasLimit": "0x104f3f",
"gasPrice": "0x1caf4ad00",
"gasUsed": "0xde085",
"cumulativeGasUsed": "0x5b2c66",
"status": "0x1",
"input": "0xab834bab0000000000000000000000007be8076f4ea4a4ad08075c2508e481d6c946d12b000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c99f70bfd82fb7c8f8191fdfbfb735606b15e5c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007be8076f4ea4a4ad08075c2508e481d6c946d12b000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af85000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca8550000000000000000000000005b3256965e7c3cf26e11fcaf296dfc8807c01073000000000000000000000000c99f70bfd82fb7c8f8191fdfbfb735606b15e5c5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000136dcc951d8c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005eb0163f000000000000000000000000000000000000000000000000000000000000000029b80cc2c3d5daeaa834b4a445adbf13db5ccae9bbd17030ea587e3334fdcb610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000136dcc951d8c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005eb01292000000000000000000000000000000000000000000000000000000000000000059387052a79cf74b9b2cbae5c47a55f1aef199e2d2aed751d0061acc55a8b8b40000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000011200000000000000000000000000000000000000000000000000000000000001ba0000000000000000000000000000000000000000000000000000000000000262000000000000000000000000000000000000000000000000000000000000030a000000000000000000000000000000000000000000000000000000000000030c0000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000001cdba43f0e6fc41d90f8a83e8a35e5520df73d40856214ba7b3d9e51ec565a985257d855ed66680d211133f8bbf24fcaea16e51a0676838cc284d6b77652d9f622dba43f0e6fc41d90f8a83e8a35e5520df73d40856214ba7b3d9e51ec565a985257d855ed66680d211133f8bbf24fcaea16e51a0676838cc284d6b77652d9f62200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a4468f0bcaa0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000560000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000004b023b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca8550000000000000000000000000000000000000000000000000000000000001f9c23b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca8550000000000000000000000000000000000000000000000000000000000001f9d23b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca8550000000000000000000000000000000000000000000000000000000000001fb223b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca8550000000000000000000000000000000000000000000000000000000000001fb323b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca8550000000000000000000000000000000000000000000000000000000000001fd723b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca8550000000000000000000000000000000000000000000000000000000000001fdc23b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca8550000000000000000000000000000000000000000000000000000000000001fe923b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca8550000000000000000000000000000000000000000000000000000000000001ff023b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca8550000000000000000000000000000000000000000000000000000000000001ffc23b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855000000000000000000000000000000000000000000000000000000000000200723b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855000000000000000000000000000000000000000000000000000000000000200823b872dd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855000000000000000000000000000000000000000000000000000000000000201900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a4468f0bcaa0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000560000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd0000000000000000000000002594d80da5f2e4f742d1e479eb9408aad132d0bd000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000004b023b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af8500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f9c23b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af8500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f9d23b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af8500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fb223b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af8500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fb323b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af8500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fd723b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af8500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fdc23b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af8500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fe923b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af8500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ff023b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af8500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ffc23b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200723b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200823b872dd000000000000000000000000a6fa96567abc0ea45e6683a0b29ca575fdf8af850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000201900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a44000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a440000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x1912",
"blockHash": "0xaa20f7bde5be60603f11a45fc4923aab7552be775403fc00c2e6b805e6297dbe",
"blockNumber": "0x989680",
"blockTimestamp": "0x5eb01705",
"internalTransactions": [
{
"traceType": "CALL_4",
"from": "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b",
"to": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"value": "0x136dcc951d8c0000",
"gasLimit": "0x8fc"
}
],
"tokenTransfers": [
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x1f9c",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
},
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x1f9d",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
},
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x1fb2",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
},
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x1fb3",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
},
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x1fd7",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
},
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x1fdc",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
},
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x1fe9",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
},
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x1ff0",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
},
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x1ffc",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
},
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x2007",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
},
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x2008",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
},
{
"tokenAddress": "0x2594d80da5f2e4f742d1e479eb9408aad132d0bd",
"tokenType": "erc721",
"from": "0xa6fa96567abc0ea45e6683a0b29ca575fdf8af85",
"to": "0x074fdc302f8d3c0e8b11c80f2a07bf2a3b8ca855",
"tokenID": "0x2019",
"value": "0x0",
"transactionHash": "0x48db4231fb7de49b624f0860fed5f459ca7231ff1f22ef58f00c1cefd6e454ef",
"transactionIndex": "0x26"
}
]
}
}
}
coinbaseCloud_getTokenStandardEvents
Get events triggered by the given token contract. The event data is returned in an easy-to-read format. Only supports events defined by Ethereum standards for ERC-20 and ERC-721 tokens.
Different event types will return different event data.
Parameters
Name | Type | Description |
---|---|---|
contract | String | REQUIRED. The token contract. |
blockStart | String | REQUIRED. Start of block range to scan for transactions. |
blockEnd | String | End of block range to scan for transactions. Defaults to latest. |
eventSignatureHashes | String[] | List of event signature hashes. Defaults to all standard events for ERC-20/ERC-721 (Transfer , Approval , ApprovalForAll ) |
sort | String | The sorting preference, use asc to sort by ascending and desc to sort by descending. The default is desc . Tip: Specify a smaller blockStart and blockEnd range for faster search results. |
pageSize | Integer | The number of transactions displayed per page. The default and max value are 1000 . See Handle pagination. |
pageNumber | Integer | The integer page number, if pagination is enabled. It starts with 1 . See Handle pagination. |
Returns
Type | Description |
---|---|
TokenStandardEvents | A list of parent transactions in the given block range, each with a sub-list of events that occurred as part of the parent transaction. Note: The output does not specify the token type (ERC20 vs ERC721). |
Examples
ERC 721
Retrieve events triggered by the token contract address.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenStandardEvents",
"params": {
"contract": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"blockStart": "0x1",
"blockEnd": "0xf19ddf",
"eventSignatureHashes": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenStandardEvents",
"params": {
"contract": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
"blockStart": "0x1",
"blockEnd": "0xf19ddf",
"eventSignatureHashes": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
]
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"events": [
{
"transactionHash": "0xc3a610d2c8f769bb16ec556d6f5ffeea34d2a1d67f4d2453917f770c332d00a3",
"transactionIndex": "0x6a",
"data": {
"data": "0",
"from": "0xa52899a1a8195c3eef30e0b08658705250e154ae",
"name": "Transfer",
"to": "0xed2ab4948ba6a909a7751dec4f34f303eb8c7236"
},
"eventType": "Transfer",
"signature": "Transfer(address, address, uint256)",
"signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"blockHash": "0xe9c618763d528988f656309720a1c4f8ef63c74b5f6cd276a48129147e3a550d",
"blockNumber": "0xf19ddf",
"blockTimestamp": "0x63599627"
},
{
"transactionHash": "0x39874e4397b79c40e9331e9295c91c89549964065ecd007cf1387ae422979ca1",
"transactionIndex": "0x82",
"data": {
"data": "0",
"from": "0xd4fb8a295c9ddc47063f4c83bab973e6140a42d8",
"name": "Transfer",
"to": "0x66362b929c1a9aaf14c51aab9b455ad7fb8268c4"
},
"eventType": "Transfer",
"signature": "Transfer(address, address, uint256)",
"signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"blockHash": "0x2d833e257a32eb8b8fe1aa0ed2962b0db9bf9a7e0d6edbd679a5ef9d136c60e5",
"blockNumber": "0xf19d33",
"blockTimestamp": "0x63598e0b"
},
{
"...": "output truncated."
}
]
}
}
coinbaseCloud_getTokenMetadata
Get metadata for the given token contract address.
Constraints:
- Only ERC20 and ERC721 token standards are supported. More (e.g. ERC1155) will be added incrementally.
Parameters
Name | Type | Description |
---|---|---|
contract | String | REQUIRED. The token contract. |
Returns
Type | Description |
---|---|
TokenContractMetadata | Token metadata (ERC-20 or ERC-721) based on the input. |
Examples
USDC (ERC-20)
Retrieve token metadata for USDC.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenMetadata",
"params": {
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenMetadata",
"params": {
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHeight": "0xf1bba8",
"tokenMetadata": {
"name": "USD Coin",
"symbol": "USDC",
"totalSupply": "0x8bb46ba45fbe1e",
"decimals": 6
}
}
}
NFT (ERC-721)
Retrieve token metadata for an NFT.
- cURL
- Request (JSON)
- Response (JSON)
curl https://mainnet.ethereum.coinbasecloud.net \
-u username:password \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenMetadata",
"params": {
"contract": "0x1A92f7381B9F03921564a437210bB9396471050C"
}
}'
{
"id": 1,
"jsonrpc": "2.0",
"method": "coinbaseCloud_getTokenMetadata",
"params": {
"contract": "0x1A92f7381B9F03921564a437210bB9396471050C"
}
}
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"blockHeight": "0xf1bbaf",
"tokenMetadata": {
"name": "Cool Cats",
"symbol": "COOL",
"totalSupply": "0x26e3"
}
}
}
Types
AddressAndContract
Properties
Name | Type | Description |
---|---|---|
address | String | REQUIRED. Account address. |
contract | String | REQUIRED. Token identifier. |
Example
{
"address": "0x00000000DF0635793e91d4f8e7426dbd9ed08471186f428D",
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}
MultiTokenBalance
Properties
Name | Type | Description |
---|---|---|
blockHeight | String | REQUIRED. The end block in which the balances were computed. The start block is genesis. |
address | String | REQUIRED. Account address. |
nativeAmount | String | REQUIRED. Balance of the native cryptocurrency (ETH, BTC, etc) for the blockchain and network. Balance is returned in the smallest possible unit. 1 ETH = 10^18 Wei. |
nativeUnit | String | REQUIRED. Unit the balance is returned in. Currently Wei-only. |
tokenBalances | TokenBalance[] | REQUIRED. The token balances. |
Example
{
"blockHeight": "0xea6204",
"address": "0xdf0635793e91d4f8e7426dbd9ed08471186f428d",
"nativeAmount": "0x1a06c95fd28d60",
"nativeUnit": "Wei",
"tokenBalances": [
{
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"amount": "0x579dd3c7",
"decimals": 6
},
{
"contract": "0x6b175474e89094c44da98b954eedeac495271d0f",
"amount": "0x7b5053643c5fcb0c",
"decimals": 18
}
]
}
SingleBalance
Properties
Name | Type | Description |
---|---|---|
blockHeight | String | REQUIRED. The end block in which the balances were computed. The start block is genesis. |
address | String | REQUIRED. Account address. |
nativeAmount | String | REQUIRED. Balance of the native cryptocurrency (ETH, BTC, etc) for the blockchain and network. Balance is returned in the smallest possible unit. 1 ETH = 10^18 Wei. |
nativeUnit | String | REQUIRED. Unit the balance is returned in. Currently Wei-only. |
tokenBalance | TokenBalance | The token balance. |
Example
{
"blockHeight": "0xea620e",
"address": "0xdf0635793e91d4f8e7426dbd9ed08471186f428d",
"nativeAmount": "0x1a06c95fd28d60",
"nativeUnit": "Wei",
"tokenBalance": {
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"amount": "0x579dd3c7",
"decimals": 6
}
}
Allowance
Properties
Name | Type | Description |
---|---|---|
owner | String | REQUIRED. The owner address. |
spender | String | REQUIRED. The spender address. |
contracts | String[] | REQUIRED. List of contract addresses. |
Example
{
"owner": "0xa646147bda82a866eba03568f363fc9c90185c6e",
"spender": "0xadd0e097b961572b2a1f5de572c622eef97e3d82",
"contracts": [
"0xdac17f958d2ee523a2206206994597c13d831ec7"
]
}
TokenAllowance
Properties
Name | Type | Description |
---|---|---|
blockHeight | String | REQUIRED. The end block in which the balances were computed. The start block is genesis. |
owner | String | REQUIRED. The owner address. |
spender | String | REQUIRED. The spender address. |
tokenAllowances | TokenBalance[] | REQUIRED. List of token balances. |
Example
{
"blockHeight": "0xea613d",
"owner": "0xa646147bda82a866eba03568f363fc9c90185c6e",
"spender": "0xadd0e097b961572b2a1f5de572c622eef97e3d82",
"tokenAllowances": [
{
"contract": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"amount": "411256436224324320870982430867023952481793415358246197400146659",
"decimals": 6
}
]
}
Transaction
Properties
Name | Type | Description |
---|---|---|
transactionHash | String | REQUIRED. The transaction hash. |
transactionIndex | String | REQUIRED. The transaction index. |
from | String | REQUIRED. The origin address. |
to | String | REQUIRED. The destination address. |
value | String | REQUIRED. The value in native blockchain currency. |
gasLimit | String | REQUIRED. The maximum gas limit of a transaction. |
gasPrice | String | REQUIRED. Transaction's cost per unit of gas in native blockchain currency. |
gasUsed | String | REQUIRED. Amount of gas actually used in transaction. |
cumulativeGasUsed | String | REQUIRED. Total amount of gas used in the block of the transaction. |
status | String | REQUIRED. "1": Success , "0": Fail , Other return codes: Unknown . |
input | String | REQUIRED. Transaction's input data. |
nonce | String | REQUIRED. Transaction's nonce. |
blockHash | String | REQUIRED. The block hash. |
blockNumber | String | REQUIRED. the block number. |
blockTimestamp | String | REQUIRED. Timestamp of when block was mined. |
internalTransactions | InternalTransaction[] | List of internal transactions. |
tokenTransfers | TokenTransfer[] | List of token transfers. |
Example
{
"transactionHash": "0x07160e2164087a3812abbe5e74109be176b0650bbe4be44f4e280fe3ee221a6d",
"transactionIndex": "0x3d",
"from": "0x3cd751e6b0078be393132286c442345e5dc49699",
"to": "0x912a523a10e052900b571889b07ff4f2fd86e029",
"value": "0x23047718e2a9800",
"gasLimit": "0x5208",
"gasPrice": "0x82c6fff33",
"gasUsed": "0x5208",
"cumulativeGasUsed": "0x443cc1",
"status": "0x1",
"input": "0x",
"nonce": "0x686b29",
"blockHash": "0x2c52d4bb68c6e56272974d21bd5afc7a01ec33093249d9d5ec0b74048a8389d5",
"blockNumber": "0xdc3501",
"blockTimestamp": "0x6238ccde"
}
TokenTransfersByAddress
Properties
Name | Type | Description |
---|---|---|
tokenTransfers | TokenTransfer[] | REQUIRED. List of token transfers. |
Example
{
"tokenTransfers": [
{
"tokenAddress": "0x7789d991d2552f94066a9b273cd65c8cd763c227",
"tokenType": "erc20",
"from": "0xa044efd7b193444ced74a521a6104f7920d436fd",
"to": "0x0000000000000000000000000000000000000000",
"value": "0x3",
"transactionHash": "0xa3ee71f1a4b50f4ea1dc163d6a8419ed4c3f17768e190a9602548724dea67486",
"transactionIndex": "0x5",
"blockHash": "0x496788c88b61a1c74a2f06af3e42ac7eba356a938de86e492084229c33ae90e0",
"blockNumber": "0x165e2c",
"blockTimestamp": "0x572c3095"
},
{
"tokenAddress": "0xd25753116e068eeb7a1f8d11370aa6794c73728c",
"tokenType": "erc20",
"from": "0xd25753116e068eeb7a1f8d11370aa6794c73728c",
"to": "0x0000000000000000000000000000000000000000",
"value": "0x0",
"transactionHash": "0x1b7b06f8bef5e032183dfed1f733dbd3fa54c496c470fa6c849c47da0ea2233f",
"transactionIndex": "0x13",
"blockHash": "0x138efe004f40abeb4b00ca68034add511f9313dc3cfea66b574133c7ceeebf59",
"blockNumber": "0x15ee0e",
"blockTimestamp": "0x5725e384"
},
{
"...": "output truncated."
}
]
}
TokenStandardEvents
Properties
Name | Type | Description |
---|---|---|
events | TokenEvent[] | REQUIRED. List of token events. |
Example
{
"events": [
{
"transactionHash": "0x39874e4397b79c40e9331e9295c91c89549964065ecd007cf1387ae422979ca1",
"transactionIndex": "0x82",
"data": {
"data": "0",
"from": "0xd4fb8a295c9ddc47063f4c83bab973e6140a42d8",
"name": "Transfer",
"to": "0x66362b929c1a9aaf14c51aab9b455ad7fb8268c4"
},
"eventType": "Transfer",
"signature": "Transfer(address, address, uint256)",
"signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"blockHash": "0x2d833e257a32eb8b8fe1aa0ed2962b0db9bf9a7e0d6edbd679a5ef9d136c60e5",
"blockNumber": "0xf19d33",
"blockTimestamp": "0x63598e0b"
},
{
"...": "output truncated."
}
]
}
TokenContractMetadata
Properties
Name | Type | Description |
---|---|---|
blockHeight | String | REQUIRED. The end block in which the balances were computed. The start block is genesis. |
tokenMetadata | TokenMetadata | REQUIRED. Metadata for a token. |
Example
{
"blockHeight": "0xea62cc",
"tokenMetadata": {
"name": "USD Coin",
"symbol": "USDC",
"totalSupply": "0x9e6738b1ff926e",
"decimals": 6
}
}
TokenBalance
Properties
Name | Type | Description |
---|---|---|
contract | String | REQUIRED. Token identifier. |
amount | String | REQUIRED. Balance Amount (For ERC-721 it is the number of tokens). |
decimals | Integer | REQUIRED. Unit (decimals for ERC-20). |
Example
{
"contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"amount": "0x579dd3c7",
"decimals": 6
}
InternalTransaction
Properties
Name | Type | Description |
---|---|---|
traceType | String | REQUIRED. Type of internal transaction, e.g. CREATE , CALL , CALLCODE , DELEGATECALL , SUICIDE |
from | String | REQUIRED. The origin address. |
to | String | REQUIRED. The destination address. |
value | String | REQUIRED. The value in native blockchain currency. |
gasLimit | String | The maximum gas limit of a transaction. |
Example
{
"traceType": "CALL_0",
"from": "0x00000000a50bb64b4bbeceb18715748dface08af",
"to": "0x7f268357a8c2552623316e2562d90e642bb538e5",
"value": "0x2386f26fc10000",
"gasLimit": "0x3196d"
}
TokenTransfer
Properties
Name | Type | Description |
---|---|---|
tokenAddress | String | REQUIRED. Address location for the token contract |
tokenType | String | REQUIRED. "erc20" or "erc721" |
from | String | REQUIRED. The origin address. |
to | String | REQUIRED. The destination address. |
value | String | REQUIRED. For ERC-20, gives quantity of tokens transferred. For ERC-721, gives list of token IDs of the token transferred |
transactionHash | String | REQUIRED. The transaction's identifying hash |
transactionIndex | String | REQUIRED. The transaction's index position |
blockHash | String | REQUIRED. The block hash. |
blockNumber | String | REQUIRED. the block number. |
blockTimestamp | String | REQUIRED. Timestamp of when block was mined. |
Example
{
"tokenAddress": "0x0da642e3ed481b119cc212b6f1c9bef04e3211ab",
"tokenType": "erc721",
"from": "0xaf5760607ead7e0a152f8b9987e95174fc32af70",
"to": "0xf88ad3b265a92acfc9f7157f927950dc5317cae5",
"tokenID": "1081",
"value": "0x0",
"transactionHash": "0xdd0971856280e6e4db0ce31072b9780c4c3f96d70351d5b7ef3edf924583d2c6",
"transactionIndex": "0x60",
"blockHash": "0x496788c88b61a1c74a2f06af3e42ac7eba356a938de86e492084229c33ae90e0",
"blockNumber": "0x165e2c",
"blockTimestamp": "0x572c3095"
}
TokenEvent
Properties
Name | Type | Description |
---|---|---|
transactionHash | String | REQUIRED. The transaction hash. |
transactionIndex | String | The transaction index. |
data | TokenEventData | REQUIRED. Data returned for specific transaction. Returns different properties based on event type, see examples. |
eventType | String | REQUIRED. Transfer (ERC-20 and ERC-721), Approval (ERC-20 and ERC-721), or ApprovalForAll (ERC-721 only). Defaults to hashed signature if not one of the previous. |
signature | String | REQUIRED. Method signature for the event type |
signatureHash | String | REQUIRED. Hash of the event signature |
blockHash | String | REQUIRED. The block hash. |
blockNumber | String | REQUIRED. the block number. |
blockTimestamp | String | REQUIRED. Timestamp of when block was mined. |
Example
{
"transactionHash": "0xe11f4b1dd9fbd62b5a4afe11a6f6289e4d90ba5aaf04ce75ff2031b9ebe39fa5",
"transactionIndex": "0x307830",
"data": {
"data": "514711238152814592",
"from": "0x00000000003b3cc22af3ae1eac0440bcee416b40",
"name": "Transfer",
"to": "0x8aa34c7866da901b3b55d162821ef3dae87851f3"
},
"eventType": "Transfer",
"signature": "Transfer(address, address, uint256)",
"signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"blockHash": "0x801b8afac89d96d9c6f054275bc9fc0274c831372603dc34aae7401931f58849",
"blockNumber": "0xe04dbd",
"blockTimestamp": "0x62702704"
}
TokenMetadata
Properties
Name | Type | Description |
---|---|---|
name | String | REQUIRED. Name of token |
symbol | String | REQUIRED. Symbol for token |
totalSupply | String | REQUIRED. Total amount of token |
decimals | Integer | Number of decimals |
Example
{
"name": "USD Coin",
"symbol": "USDC",
"totalSupply": "0x9e6738b1ff926e",
"decimals": 6
}
TokenEventData
Properties
Name | Type | Description |
---|---|---|
data | String | For ERC-20 this represents the value. For ERC-721 this represents the token id. |
from | String | The origin address. |
name | String | REQUIRED. Name of the event type, e.g. Transfer , Approval . |
to | String | The destination address. |
owner | String | Token owner address. |
spender | String | Token spender address. |
operator | String | Token operator address. |
approved | Boolean | true when operator receives approval, false when approval is revoked. |
topics | String | Stringified array. topics[0] is the hashed event signature. Other entries in the array may include to and from addresses. |
Example
{
"data": "514711238152814592",
"from": "0x00000000003b3cc22af3ae1eac0440bcee416b40",
"name": "Transfer",
"to": "0x8aa34c7866da901b3b55d162821ef3dae87851f3"
}