API Reference
DocumentationLog In

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 is 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

This is the server endpoint URL for Ethereum Mainnet.

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

Constraints:

  • Only up to 10 addresses are supported per API call. Only up to 10 tokens are supported per address per API call. These limits will be increased with pagination support incrementally.
  • Balances can be fetched for a single protocol and network using this API. Future variants may support fetching balance across networks for a protocol, or even across all supported protocols.

Parameters

NameTypeDescription
addressAndContractListAddressAndContract[]REQUIRED. List of account or contract addresses and token identifiers. For Ethereum the token identifier is the token contract address.
blockchainStringE.g. Ethereum, Polygon, Optimism, Arbitrum, etc. Currently only supports Ethereum.
networkStringE.g. Mainnet, Testnet. Currently only supports Mainnet.

Returns

TypeDescription
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 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"
      }
    ],
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getBalances",
  "params": {
    "addressAndContractList": [
      {
        "address": "0x00000000DF0635793e91d4f8e7426dbd9ed08471186f428D",
        "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
      },
      {
        "address": "0xdf0635793e91d4f8e7426dbd9ed08471186f428d",
        "contract": "0x6b175474e89094c44da98b954eedeac495271d0f"
      }
    ],
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": [
    {
      "blockHeight": "0xea6204",
      "address": "0xdf0635793e91d4f8e7426dbd9ed08471186f428d",
      "nativeAmount": "0x1a06c95fd28d60",
      "nativeUnit": "Wei",
      "tokenBalances": [
        {
          "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
          "amount": "0x579dd3c7",
          "decimals": 6
        },
        {
          "contract": "0x6b175474e89094c44da98b954eedeac495271d0f",
          "amount": "0x7b5053643c5fcb0c",
          "decimals": 18
        }
      ]
    }
  ]
}

NFT (ERC-721)

Retrieve NFT tokens.

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": [
    {
      "blockHeight": "0xea6209",
      "address": "0xa3e90da6c1d5ea0b1b4e881d1eaaaaaaf3c25cc2",
      "nativeAmount": "0x7401be2fe3d85f1",
      "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

NameTypeDescription
addressStringREQUIRED. An account address or a contract address.
contractStringREQUIRED. Token identifier. For Ethereum the token identifier is the token contract address.
blockchainStringE.g. Ethereum, Polygon, Optimism, Arbitrum, etc. Currently only supports Ethereum.
networkStringE.g. Mainnet, Testnet. Currently only supports Mainnet.

Returns

TypeDescription
SingleBalanceBalance 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 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",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getSingleBalance",
  "params": {
    "address": "0x00000000DF0635793e91d4f8e7426dbd9ed08471186f428D",
    "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "blockHeight": "0xea620e",
    "address": "0xdf0635793e91d4f8e7426dbd9ed08471186f428d",
    "nativeAmount": "0x1a06c95fd28d60",
    "nativeUnit": "Wei",
    "tokenBalance": {
      "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "amount": "0x579dd3c7",
      "decimals": 6
    }
  }
}

NFT (ERC-721)

Retrieve NFT tokens.

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",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getSingleBalance",
  "params": {
    "address": "0xa3e90da6c1d5ea0b1b4e881d1eaaaaaaf3c25cc2",
    "contract": "0x5180db8F5c931aaE63c74266b211F580155ecac8",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "blockHeight": "0xea6135",
    "address": "0xa3e90da6c1d5ea0b1b4e881d1eaaaaaaf3c25cc2",
    "nativeAmount": "0x7401be2fe3d85f1",
    "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

NameTypeDescription
allowancesAllowance[]REQUIRED. List of owner addresses, spender addresses, and token identifiers. For Ethereum, the token identifier is the token contract address.
blockchainStringE.g. Ethereum, Polygon, Optimism, Arbitrum, etc. Currently only supports Ethereum.
networkStringE.g. Mainnet, Testnet. Currently only supports Mainnet.

Returns

TypeDescription
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 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": "411256436224324320870982430867023952481793415358246197400146659",
              "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.

Use cases:

  • Get all the transactions (external and internal) for a given address
  • Get all token transfers for a given address
  • Get transactions and transfers in specific block ranges
  • Filter transactions by send and/or receive

Constraints:

  • The API returns up to 1000 transactions and transfers combined OR all the relevant transactions and transfers within a single block; whichever is greater.
  • Static calls among smart contracts can result in zero balance transfers in Ethereum. Such transfers are excluded from the output.

Pagination support:

  • Clients can use block ranges to iterate through transactions and transfers if there are more than 1000.
  • If there are more than 1000 relevant transactions, the API will return at least 1000 transactions, including internal transactions. In order to deliver a full block, it may return > 1000 transactions.
  • Transactions are returned in reverse chronological order.

Example: A client wants to get all the transactions from genesis to the latest block. Assume 100 is the latest block:

API CallsInputOutput
1Block range: 0 -> latest,Block range scanned: 98 -> 100
2Block range: 0 -> 97,Block range scanned: 34 -> 97
3Block range: 0 -> 33,Block range scanned: 0 -> 33

Done. All data is returned for the range 0 -> 100.

Note that in this example, the first API call only returns 2 blocks because those blocks contained 1000+ transactions. In the second API call we return 63 blocks to get 1000+ transactions.

Parameters

NameTypeDescription
addressStringREQUIRED. Account address.
blockStartStringREQUIRED. Start of block range to scan for transactions.
blockEndStringEnd of block range to scan for transactions. Defaults to latest. See Pagination support for more information.
addressFilterStringFilter transactions by SENDER_ONLY, RECEIVER_ONLY, or SENDER_OR_RECEIVER. Defaults to SENDER_OR_RECEIVER.
blockchainStringE.g. Ethereum, Polygon, Optimism, Arbitrum, etc. Currently only supports Ethereum.
networkStringE.g. Mainnet, Testnet. Currently only supports Mainnet.

Returns

TypeDescription
TransactionsByAddressA list of blocks for which transactions were found, each with a list of transactions found for the address in that block.

Examples

ERC-20

Retrieve transactions for ERC-20 tokens.

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": "0x3cd751e6b0078be393132286c442345e5dc49699",
    "blockStart": "0xdc3500",
    "blockEnd": "0xdc3501",
    "addressFilter": "SENDER_OR_RECEIVER",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getTransactionsByAddress",
  "params": {
    "address": "0x3cd751e6b0078be393132286c442345e5dc49699",
    "blockStart": "0xdc3500",
    "blockEnd": "0xdc3501",
    "addressFilter": "SENDER_OR_RECEIVER",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "blockStart": "0xdc3500",
    "blockEnd": "0xdc3501",
    "blocks": [
      {
        "blockHash": "0x2c52d4bb68c6e56272974d21bd5afc7a01ec33093249d9d5ec0b74048a8389d5",
        "blockNumber": "0xdc3501",
        "blockTimestamp": "0x6238ccde",
        "transactions": [
          {
            "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"
          },
          {
            "transactionHash": "0x8409c799d35dbb1500f7083f99a7373aee8308bf39e543a95a9de16e70315d31",
            "transactionIndex": "0x4a",
            "from": "0x3cd751e6b0078be393132286c442345e5dc49699",
            "to": "0x3f54e2d84e42b113af00ab489c01adb0c5cf62d2",
            "value": "0x5805a406f48000",
            "gasLimit": "0x5208",
            "gasPrice": "0x82c6fff33",
            "gasUsed": "0x5208",
            "cumulativeGasUsed": "0x524ad4",
            "status": "0x1",
            "input": "0x",
            "nonce": "0x686b2a",
            "blockHash": "0x2c52d4bb68c6e56272974d21bd5afc7a01ec33093249d9d5ec0b74048a8389d5",
            "blockNumber": "0xdc3501",
            "blockTimestamp": "0x6238ccde"
          }
        ]
      },
      {
        "blockHash": "0x1939a88b2da89f1512e134e6d17a08e71c7fcd352cff2ddee942c4d79140055f",
        "blockNumber": "0xdc3500",
        "blockTimestamp": "0x6238ccd9",
        "transactions": [
          {
            "transactionHash": "0x8e7012bccb57ed34fb576868a5376f4983f243e41664bf20220efc1d19006d52",
            "transactionIndex": "0x37",
            "from": "0x3cd751e6b0078be393132286c442345e5dc49699",
            "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "value": "0x0",
            "gasLimit": "0x3d090",
            "gasPrice": "0x8bb794f4c",
            "gasUsed": "0xf6e9",
            "cumulativeGasUsed": "0x1b4594",
            "status": "0x1",
            "input": "0xa9059cbb000000000000000000000000aaadde03849e05ef4425b750a680168bfc0fa08a00000000000000000000000000000000000000000000000000000000281ba3a0",
            "nonce": "0x686b28",
            "blockHash": "0x1939a88b2da89f1512e134e6d17a08e71c7fcd352cff2ddee942c4d79140055f",
            "blockNumber": "0xdc3500",
            "blockTimestamp": "0x6238ccd9",
            "tokenTransfers": [
              {
                "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
                "tokenType": "erc20",
                "from": "0x3cd751e6b0078be393132286c442345e5dc49699",
                "to": "0xaaadde03849e05ef4425b750a680168bfc0fa08a",
                "value": "0x281ba3a0",
                "transactionHash": "0x8e7012bccb57ed34fb576868a5376f4983f243e41664bf20220efc1d19006d52",
                "transactionIndex": "0x37"
              }
            ]
          }
        ]
      }
    ]
  }
}

coinbaseCloud_getTokenTransfersByAddress

Get token transfers for a given address (in reverse chronological order). Includes activity from and to the input address.

Use cases:

  • Get all token transfers for a given address
  • Get token transfers in specific block ranges

Constraints:

  • The API returns up to 1000 token transfers OR all the token transfers within a single block; whichever is greater.
  • Static calls among smart contracts can result in zero balance transfers in Ethereum. Such transfers are excluded from the output.

Pagination support:

  • Clients can use block ranges to iterate through transfers if there are more than 1000.
  • If there are more than 1000 relevant transfers, the API will return at least 1000 transfers. In order to deliver a full block, it may return > 1000 transfers.
  • Transfers are returned in reverse chronological order.

Example: A client wants to get all the token transfers from genesis to the latest block. In this example, assume 100 is the latest block:

API CallsInputOutput
1Block range: 0 -> latest,Block range scanned: 98 -> 100
2Block range: 0 -> 97,Block range scanned: 34 -> 97
3Block range: 0 -> 33,Block range scanned: 0 -> 33

Done. All data is returned for the range 0 -> 100.

Note that in this example, the first API call only returns 2 blocks because those blocks contained 1000+ transactions. In the second API call we return 63 blocks to get 1000+ transactions.

Parameters

NameTypeDescription
addressStringREQUIRED. Account address.
blockStartStringREQUIRED. Inclusive of specified block.
blockEndStringInclusive of specified block. Defaults to latest. See Pagination support for more information
addressFilterStringFilter transactions by SENDER_ONLY, RECEIVER_ONLY, or SENDER_OR_RECEIVER. Defaults to SENDER_OR_RECEIVER.
blockchainStringE.g. Ethereum, Polygon, Optimism, Arbitrum, etc. Currently only supports Ethereum.
networkStringE.g. Mainnet, Testnet. Currently only supports Mainnet.

Returns

TypeDescription
TokenTransfersByAddressA list of blocks for which transactions were found, each with a list of token transfers found for the address in that block.

Examples

ERC-20 and ERC-721 token transfers

Return all ERC-20 and ERC-721 token transfers to the burn wallet.

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",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getTokenTransfersByAddress",
  "params": {
    "address": "0x0000000000000000000000000000000000000000",
    "blockStart": "0x1",
    "blockEnd": "0x16bc50",
    "addressFilter": "RECEIVER_ONLY",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "blockStart": "0x1",
    "blockEnd": "0x16bc50",
    "blocks": [
      {
        "blockHash": "0x496788c88b61a1c74a2f06af3e42ac7eba356a938de86e492084229c33ae90e0",
        "blockNumber": "0x165e2c",
        "blockTimestamp": "0x572c3095",
        "tokenTransfers": [
          {
            "tokenAddress": "0x7789d991d2552f94066a9b273cd65c8cd763c227",
            "tokenType": "erc20",
            "from": "0xa044efd7b193444ced74a521a6104f7920d436fd",
            "to": "0x0000000000000000000000000000000000000000",
            "value": "0x3",
            "transactionHash": "0xa3ee71f1a4b50f4ea1dc163d6a8419ed4c3f17768e190a9602548724dea67486",
            "transactionIndex": "0x5"
          }
        ]
      },
      {
        "blockHash": "0x138efe004f40abeb4b00ca68034add511f9313dc3cfea66b574133c7ceeebf59",
        "blockNumber": "0x15ee0e",
        "blockTimestamp": "0x5725e384",
        "tokenTransfers": [
          {
            "tokenAddress": "0xd25753116e068eeb7a1f8d11370aa6794c73728c",
            "tokenType": "erc20",
            "from": "0xd25753116e068eeb7a1f8d11370aa6794c73728c",
            "to": "0x0000000000000000000000000000000000000000",
            "value": "0x0",
            "transactionHash": "0x1b7b06f8bef5e032183dfed1f733dbd3fa54c496c470fa6c849c47da0ea2233f",
            "transactionIndex": "0x13"
          },
          {
            "...": "output truncated."
          }
        ]
      },
      {
        "...": "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 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": "0x3d31c409c48fee50c2e5b9a85820291b1e859a9e",
    "blockStart": "0x1",
    "blockEnd": "0xdb0db3",
    "addressFilter": "SENDER_OR_RECEIVER",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getTokenTransfersByAddress",
  "params": {
    "address": "0x3d31c409c48fee50c2e5b9a85820291b1e859a9e",
    "blockStart": "0x1",
    "blockEnd": "0xdb0db3",
    "addressFilter": "SENDER_OR_RECEIVER",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "blockStart": "0x1",
    "blockEnd": "0xdb0db3",
    "blocks": [
      {
        "blockHash": "0x84210a366e05d2cb7ac1674901e259620c5485ccfa079618c2b07d5c5466dc3d",
        "blockNumber": "0xdb0db3",
        "blockTimestamp": "0x62294683",
        "tokenTransfers": [
          {
            "tokenAddress": "0x4bb08998a697d0db666783ba5b56e85b33ba262f",
            "tokenType": "erc721",
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0x3d31c409c48fee50c2e5b9a85820291b1e859a9e",
            "tokenID": "4404",
            "value": "0x0",
            "transactionHash": "0xedb1cd88557ca9f4c5057ad2b237b1427208bc6820005e73535466c1b2bc1884",
            "transactionIndex": "0x5a"
          },
          {
            "tokenAddress": "0x4bb08998a697d0db666783ba5b56e85b33ba262f",
            "tokenType": "erc721",
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0x3d31c409c48fee50c2e5b9a85820291b1e859a9e",
            "tokenID": "4405",
            "value": "0x0",
            "transactionHash": "0xedb1cd88557ca9f4c5057ad2b237b1427208bc6820005e73535466c1b2bc1884",
            "transactionIndex": "0x5a"
          },
          {
            "tokenAddress": "0x4bb08998a697d0db666783ba5b56e85b33ba262f",
            "tokenType": "erc721",
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0x3d31c409c48fee50c2e5b9a85820291b1e859a9e",
            "tokenID": "4406",
            "value": "0x0",
            "transactionHash": "0xedb1cd88557ca9f4c5057ad2b237b1427208bc6820005e73535466c1b2bc1884",
            "transactionIndex": "0x5a"
          }
        ]
      },
      {
        "blockHash": "0x8bd752211bba14183246d8a687dac639ee5aed168a3edd3603617e16a206f478",
        "blockNumber": "0xd70f18",
        "blockTimestamp": "0x61f3df08",
        "tokenTransfers": [
          {
            "tokenAddress": "0xec6a29f6b2df9fedadcf77932ff4919d80c92310",
            "tokenType": "erc721",
            "from": "0x3d31c409c48fee50c2e5b9a85820291b1e859a9e",
            "to": "0x9b8753ac5a975708a654d16f7a1c1fc9a7b98828",
            "tokenID": "211",
            "value": "0x0",
            "transactionHash": "0x71abe6dcac45049a635e702aaa237fd6f6c6c26c92d4e5e8dbbc00a960a08799",
            "transactionIndex": "0x146"
          }
        ]
      },
      {
        "blockHash": "0x74500b700ffef42325d26c5e2a0c09944c0a0f1bb6b5dd809646b4547a135359",
        "blockNumber": "0xd651fb",
        "blockTimestamp": "0x61e9fc7c",
        "tokenTransfers": [
          {
            "tokenAddress": "0xec6a29f6b2df9fedadcf77932ff4919d80c92310",
            "tokenType": "erc721",
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0x3d31c409c48fee50c2e5b9a85820291b1e859a9e",
            "tokenID": "211",
            "value": "0x0",
            "transactionHash": "0x187f7b8a83f2b39e5e3c9cbd96bd2ea1a9d57612951a12604d79043171577e7b",
            "transactionIndex": "0x7e"
          }
        ]
      }
    ]
  }
}

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

NameTypeDescription
transactionHashStringREQUIRED. Transaction hash.
blockchainStringE.g. Ethereum, Polygon, Optimism, Arbitrum, etc. Currently only supports Ethereum.
networkStringE.g. Mainnet, Testnet. Currently only supports Mainnet.

Returns

TypeDescription
TransactionThe given transaction with all associated internal transactions and token transfers.

Examples

ETH transfer

Return transactions resulting from an ETH transfer.

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": "0xb407e98dcbf5c2a3b22809940784440cb1d909d9177d0f7dd859a21672ca65a3"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getTransactionByHash",
  "params": {
    "transactionHash": "0xb407e98dcbf5c2a3b22809940784440cb1d909d9177d0f7dd859a21672ca65a3"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "transaction": {
      "transactionHash": "0xb407e98dcbf5c2a3b22809940784440cb1d909d9177d0f7dd859a21672ca65a3",
      "transactionIndex": "0x54",
      "from": "0x848176950e1ddf51085f264617203e6696d9a36c",
      "to": "0xf66ced605fb69b3fa490cb83b713fcb2f554b512",
      "value": "0x1b8e562123e7702",
      "gasLimit": "0x5208",
      "gasPrice": "0x7b2bfa8d0",
      "gasUsed": "0x5208",
      "cumulativeGasUsed": "0x779421",
      "status": "0x1",
      "input": "0x",
      "nonce": "0x1b",
      "blockHash": "0x34f7c346ce0cc29dd1c3f645b6816e04c9856dc66dab2e6f27c4748e192a102c",
      "blockNumber": "0xdb214b",
      "blockTimestamp": "0x622a4cb7"
    }
  }
}

ERC-721 transfer

Return transactions resulting from an ERC-721 transfer.

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": "0xdd0971856280e6e4db0ce31072b9780c4c3f96d70351d5b7ef3edf924583d2c6",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getTransactionByHash",
  "params": {
    "transactionHash": "0xdd0971856280e6e4db0ce31072b9780c4c3f96d70351d5b7ef3edf924583d2c6",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "transaction": {
      "transactionHash": "0xdd0971856280e6e4db0ce31072b9780c4c3f96d70351d5b7ef3edf924583d2c6",
      "transactionIndex": "0x60",
      "from": "0xf88ad3b265a92acfc9f7157f927950dc5317cae5",
      "to": "0x00000000a50bb64b4bbeceb18715748dface08af",
      "value": "0x2386f26fc10000",
      "gasLimit": "0x3a968",
      "gasPrice": "0x5665a1449",
      "gasUsed": "0x34940",
      "cumulativeGasUsed": "0x680559",
      "status": "0x1",
      "input": "0x0da642e3ed481b119cc212b6f1c9bef04e3211ab03b6622941eeaf5760607ead7e0a152f8b9987e95174fc32af701beb95fc2c3158ae81f246fb6f7cabbcbb0ced7b2f4272d9d02bd1da8a91f77658516e7bc301c009ff4bd73f5a65c0fe4ac0ede825c96467d54573f3df0e8b974f000000000000000000000000000000000000000000000000000000000000043962326ebd31040358f1366dbadb386e898cfea9c9d2e741697be05272dc33b5b543f3fb46000000002386f26fc10000",
      "nonce": "0x82",
      "blockHash": "0x84210a366e05d2cb7ac1674901e259620c5485ccfa079618c2b07d5c5466dc3d",
      "blockNumber": "0xdb0db3",
      "blockTimestamp": "0x62294683",
      "internalTransactions": [
        {
          "traceType": "CALL_0",
          "from": "0x00000000a50bb64b4bbeceb18715748dface08af",
          "to": "0x7f268357a8c2552623316e2562d90e642bb538e5",
          "value": "0x2386f26fc10000",
          "gasLimit": "0x3196d"
        },
        {
          "traceType": "CALL_0_2",
          "from": "0x7f268357a8c2552623316e2562d90e642bb538e5",
          "to": "0x5b3256965e7c3cf26e11fcaf296dfc8807c01073",
          "value": "0x360051c896000",
          "gasLimit": "0x8fc"
        },
        {
          "traceType": "CALL_0_3",
          "from": "0x7f268357a8c2552623316e2562d90e642bb538e5",
          "to": "0xaf5760607ead7e0a152f8b9987e95174fc32af70",
          "value": "0x2026ed5337a000",
          "gasLimit": "0x8fc"
        }
      ],
      "tokenTransfers": [
        {
          "tokenAddress": "0x0da642e3ed481b119cc212b6f1c9bef04e3211ab",
          "tokenType": "erc721",
          "from": "0xaf5760607ead7e0a152f8b9987e95174fc32af70",
          "to": "0xf88ad3b265a92acfc9f7157f927950dc5317cae5",
          "tokenID": "1081",
          "value": "0x0",
          "transactionHash": "0xdd0971856280e6e4db0ce31072b9780c4c3f96d70351d5b7ef3edf924583d2c6",
          "transactionIndex": "0x60"
        }
      ]
    }
  }
}

ERC-20 swap

Return transactions resulting from an ERC-20 swap.

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": "0xb7ff063e414059e41ab3acc69e4a08b18438df49c847977ca5bdcd012121c1b9"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getTransactionByHash",
  "params": {
    "transactionHash": "0xb7ff063e414059e41ab3acc69e4a08b18438df49c847977ca5bdcd012121c1b9"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "transaction": {
      "transactionHash": "0xb7ff063e414059e41ab3acc69e4a08b18438df49c847977ca5bdcd012121c1b9",
      "transactionIndex": "0xe",
      "from": "0x8e8f818d3371f797a2db7edb32803607c8b3c6a9",
      "to": "0x98c3d3183c4b8a650614ad179a1a98be0a8d6b8e",
      "value": "0x0",
      "gasLimit": "0x493e0",
      "gasPrice": "0xdc7a66c67",
      "gasUsed": "0x1860b",
      "cumulativeGasUsed": "0x874bb",
      "status": "0x1",
      "input": "0xce2e62ff000000000000000000000000000000000000000000000355a627675139e0000000000000000000000000000000000000000000000000000021f31cc480121600000000000000000000000000611cde65dea90918c0078ac0400a72b0d25b9bb1000000000000000000000000408e41876cccdc0f92210600ef50372656052a3800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000062294499",
      "nonce": "0x2b7b",
      "blockHash": "0x78956753e993db281b4e8217229b74a64e095135f06cf4ef23606de934651605",
      "blockNumber": "0xdb0d89",
      "blockTimestamp": "0x62294455",
      "tokenTransfers": [
        {
          "tokenAddress": "0x408e41876cccdc0f92210600ef50372656052a38",
          "tokenType": "erc20",
          "from": "0x98c3d3183c4b8a650614ad179a1a98be0a8d6b8e",
          "to": "0x611cde65dea90918c0078ac0400a72b0d25b9bb1",
          "value": "0x355a627675139e00000",
          "transactionHash": "0xb7ff063e414059e41ab3acc69e4a08b18438df49c847977ca5bdcd012121c1b9",
          "transactionIndex": "0xe"
        },
        {
          "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
          "tokenType": "erc20",
          "from": "0x611cde65dea90918c0078ac0400a72b0d25b9bb1",
          "to": "0x98c3d3183c4b8a650614ad179a1a98be0a8d6b8e",
          "value": "0x21f9b0155cd16a54",
          "transactionHash": "0xb7ff063e414059e41ab3acc69e4a08b18438df49c847977ca5bdcd012121c1b9",
          "transactionIndex": "0xe"
        }
      ]
    }
  }
}

ERC-721 sale

Return transactions resulting from an ERC-721 sale.

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": "0xb67be27ff44ba97f39fa68953350adade5fdbd983571a3b2b81080565d7744a3",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getTransactionByHash",
  "params": {
    "transactionHash": "0xb67be27ff44ba97f39fa68953350adade5fdbd983571a3b2b81080565d7744a3",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "transaction": {
      "transactionHash": "0xb67be27ff44ba97f39fa68953350adade5fdbd983571a3b2b81080565d7744a3",
      "transactionIndex": "0xe1",
      "from": "0xeb016b0b8976a8a9b56d0d48c98d2cffb0459226",
      "to": "0x7f268357a8c2552623316e2562d90e642bb538e5",
      "value": "0x566017061a08000",
      "gasLimit": "0x3f235",
      "gasPrice": "0x53ed35d79",
      "gasUsed": "0x2f5c8",
      "cumulativeGasUsed": "0x14624c9",
      "status": "0x1",
      "input": "0xab834bab0000000000000000000000007f268357a8c2552623316e2562d90e642bb538e5000000000000000000000000eb016b0b8976a8a9b56d0d48c98d2cffb0459226000000000000000000000000605dd719317f9236277fd4dcc7e8cadff38d1dcb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000baf2127b49fc93cbca6269fade0f7f31df4c88a7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f268357a8c2552623316e2562d90e642bb538e5000000000000000000000000605dd719317f9236277fd4dcc7e8cadff38d1dcb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000005b3256965e7c3cf26e11fcaf296dfc8807c01073000000000000000000000000baf2127b49fc93cbca6269fade0f7f31df4c88a70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000566017061a08000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000622943ca00000000000000000000000000000000000000000000000000000000000000002a3740ff6f969f359068cc9d9f12340bb634b3b24c9d79067af4f9b2b3f1ca0800000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000566017061a080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006229346b0000000000000000000000000000000000000000000000000000000062325850bc19a3b1b00ae00728e35de79af17c5b0abb96195b8f320136beaa4abfd7da4f0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000007c000000000000000000000000000000000000000000000000000000000000008e00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000b200000000000000000000000000000000000000000000000000000000000000b20000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000001bbef4356df39df54574e8a1c4aebd0add6c2534880b29972fd0de014b7f71f11a5ebd6da0ea7ac2cc11bda801fe5fd6c923e9afe6a89dbc8794288e5359e38763bef4356df39df54574e8a1c4aebd0add6c2534880b29972fd0de014b7f71f11a5ebd6da0ea7ac2cc11bda801fe5fd6c923e9afe6a89dbc8794288e5359e38763000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4fb16a5950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eb016b0b8976a8a9b56d0d48c98d2cffb04592260000000000000000000000008d609bd201beaea7dccbfbd9c22851e23da686910000000000000000000000000000000000000000000000000000000000000901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4fb16a595000000000000000000000000605dd719317f9236277fd4dcc7e8cadff38d1dcb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000008d609bd201beaea7dccbfbd9c22851e23da686910000000000000000000000000000000000000000000000000000000000000901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e400000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x24",
      "blockHash": "0x78956753e993db281b4e8217229b74a64e095135f06cf4ef23606de934651605",
      "blockNumber": "0xdb0d89",
      "blockTimestamp": "0x62294455",
      "internalTransactions": [
        {
          "traceType": "CALL_2",
          "from": "0x7f268357a8c2552623316e2562d90e642bb538e5",
          "to": "0x5b3256965e7c3cf26e11fcaf296dfc8807c01073",
          "value": "0x8a335809c34000",
          "gasLimit": "0x8fc"
        },
        {
          "traceType": "CALL_3",
          "from": "0x7f268357a8c2552623316e2562d90e642bb538e5",
          "to": "0x605dd719317f9236277fd4dcc7e8cadff38d1dcb",
          "value": "0x4dbce1857dd4000",
          "gasLimit": "0x8fc"
        }
      ],
      "tokenTransfers": [
        {
          "tokenAddress": "0x8d609bd201beaea7dccbfbd9c22851e23da68691",
          "tokenType": "erc721",
          "from": "0x605dd719317f9236277fd4dcc7e8cadff38d1dcb",
          "to": "0xeb016b0b8976a8a9b56d0d48c98d2cffb0459226",
          "tokenID": "2305",
          "value": "0x0",
          "transactionHash": "0xb67be27ff44ba97f39fa68953350adade5fdbd983571a3b2b81080565d7744a3",
          "transactionIndex": "0xe1"
        }
      ]
    }
  }
}

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.

Use cases:

  • Get events for smart contracts that implement standard token interfaces
  • Get historical events
  • Get events in an easy to read format

Constraints:

  • Only ERC20 and ERC721 token standards are supported. More (e.g. ERC1155) will be added incrementally.
  • Up to 1000 events are returned or all events within a single transaction; whichever is greater.

Pagination support:

Clients can use block ranges to iterate through transactions and transfers if there are more than 1000.

Example: A client wants to get all the transactions from genesis to the latest block. In this example, assume 100 is the latest block:

API CallsInputOutput
1Block range: 0 -> latest,Block range scanned: 98 -> 100
2Block range: 0 -> 97,Block range scanned: 34 -> 97
3Block range: 0 -> 33,Block range scanned: 0 -> 33

Done. All data is returned for the range 0 -> 100.

Parameters

NameTypeDescription
contractStringREQUIRED. The token contract.
blockStartStringREQUIRED. Start of block range to scan for transactions.
blockEndStringEnd of block range to scan for transactions. Defaults to latest. Can be used for pagination. See Pagination support for more information.
eventSignatureHashesString[]List of event signature hashes. Defaults to all standard events for ERC-20/ERC-721 (Transfer, Approval, ApprovalForAll)
blockchainStringE.g. Ethereum, Polygon, Optimism, Arbitrum, etc. Currently only supports Ethereum.
networkStringE.g. Mainnet, Testnet. Currently only supports Mainnet.

Returns

TypeDescription
TokenStandardEventsA 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 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": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "blockStart": "0x1",
    "blockEnd": "0xe04dbd",
    "eventSignatureHashes": [
      "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
    ],
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getTokenStandardEvents",
  "params": {
    "contract": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "blockStart": "0x1",
    "blockEnd": "0xe04dbd",
    "eventSignatureHashes": [
      "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
    ],
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "blockStart": "0xe04d94",
    "blockEnd": "0xe04dbd",
    "events": [
      {
        "blockHash": "0x801b8afac89d96d9c6f054275bc9fc0274c831372603dc34aae7401931f58849",
        "blockNumber": "0xe04dbd",
        "blockTimestamp": "0x62702704",
        "events": [
          {
            "transactionHash": "0xe11f4b1dd9fbd62b5a4afe11a6f6289e4d90ba5aaf04ce75ff2031b9ebe39fa5",
            "transactionIndex": "0x307830",
            "data": {
              "data": "514711238152814592",
              "from": "0x00000000003b3cc22af3ae1eac0440bcee416b40",
              "name": "Transfer",
              "to": "0x8aa34c7866da901b3b55d162821ef3dae87851f3"
            },
            "eventType": "Transfer",
            "signature": "Transfer(address, address, uint256)",
            "signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
          },
          {
            "transactionHash": "0x1db9620f152626ed8f964971e8f86f8a861ba0a0712f9c105404c7f41bb1cd94",
            "transactionIndex": "0x307831",
            "data": {
              "data": "1195169635397992762",
              "from": "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
              "name": "Transfer",
              "to": "0x8aa34c7866da901b3b55d162821ef3dae87851f3"
            },
            "eventType": "Transfer",
            "signature": "Transfer(address, address, uint256)",
            "signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
          },
          {
            "transactionHash": "0xc272abff0db861a07499accc6f27f2b31fc3a5d823ed74b8921e70808491d9e1",
            "transactionIndex": "0x307832",
            "data": {
              "data": "666767006594236416",
              "from": "0x8aa34c7866da901b3b55d162821ef3dae87851f3",
              "name": "Transfer",
              "to": "0x00000000003b3cc22af3ae1eac0440bcee416b40"
            },
            "eventType": "Transfer",
            "signature": "Transfer(address, address, uint256)",
            "signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
          },
          {
            "...": "output truncated."
          }
        ]
      },
      {
        "blockHash": "0xc977a5cc4b0580dcbf2acc5a89404d516cf11d20b4e16a3217c029fc87cbb229",
        "blockNumber": "0xe04dbb",
        "blockTimestamp": "0x627026fa",
        "events": [
          {
            "transactionHash": "0x818de41b4a83ea0d902f69a51f9eedc541041cb49b5624e024de057401a3baf0",
            "transactionIndex": "0x307830",
            "data": {
              "data": "186174816314904516734",
              "from": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
              "name": "Transfer",
              "to": "0x56178a0d5f301baf6cf3e1cd53d9863437345bf9"
            },
            "eventType": "Transfer",
            "signature": "Transfer(address, address, uint256)",
            "signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
          },
          {
            "transactionHash": "0x937d08c73a28618410aec6e06f7abe5c76b116adcc2b86adcfddd5aabada69b1",
            "transactionIndex": "0x307864",
            "data": {
              "data": "1224000000000000000",
              "from": "0x759ec1b3326de6fd4ba316f65a6f689c4e4c3092",
              "name": "Transfer",
              "to": "0x6bee0f0dea573ec04a77ff3547691f2edccf2a7c"
            },
            "eventType": "Transfer",
            "signature": "Transfer(address, address, uint256)",
            "signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
          },
          {
            "transactionHash": "0x7446a45a7c5f67201c40d5d75e8efc15b9c4e7f8da113a94c70eddf4c0b56250",
            "transactionIndex": "0x307865",
            "data": {
              "data": "2100000000000000000",
              "from": "0x16e75b7b8bea3787da601ba8291fc601f31c800c",
              "name": "Transfer",
              "to": "0xbe71372995e8e920e4e72a29a51463677a302e8d"
            },
            "eventType": "Transfer",
            "signature": "Transfer(address, address, uint256)",
            "signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
          },
          {
            "...": "output truncated."
          }
        ]
      },
      {
        "...": "output truncated. Returns enough blocks to return 1000+ transactions."
      }
    ]
  }
}

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

NameTypeDescription
contractStringREQUIRED. The token contract.
blockchainStringE.g. Ethereum, Polygon, Optimism, Arbitrum, etc. Currently only supports Ethereum.
networkStringE.g. Mainnet, Testnet. Currently only supports Mainnet.

Returns

TypeDescription
TokenContractMetadataToken metadata (ERC-20 or ERC-721) based on the input.

Examples

USDC (ERC-20)

Retrieve token metadata for USDC.

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",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}'
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "coinbaseCloud_getTokenMetadata",
  "params": {
    "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "blockchain": "Ethereum",
    "network": "Mainnet"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "blockHeight": "0xea62cc",
    "tokenMetadata": {
      "name": "USD Coin",
      "symbol": "USDC",
      "totalSupply": "0x9e6738b1ff926e",
      "decimals": 6
    }
  }
}

NFT (ERC-721)

Retrieve token metadata for an NFT.

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": "0xea62cc",
    "tokenMetadata": {
      "name": "Cool Cats",
      "symbol": "COOL",
      "totalSupply": "0x26e0"
    }
  }
}

Types

AddressAndContract

Properties

NameTypeDescription
addressStringREQUIRED. Account address.
contractStringREQUIRED. Token identifier.

Example

{
  "address": "0x00000000DF0635793e91d4f8e7426dbd9ed08471186f428D",
  "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
}

MultiTokenBalance

Properties

NameTypeDescription
blockHeightStringREQUIRED. The end block in which the balances were computed. The start block is genesis.
addressStringREQUIRED. Account address.
nativeAmountStringREQUIRED. 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.
nativeUnitStringREQUIRED. Unit the balance is returned in. Currently Wei-only.
tokenBalancesTokenBalance[]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

NameTypeDescription
blockHeightStringREQUIRED. The end block in which the balances were computed. The start block is genesis.
addressStringREQUIRED. Account address.
nativeAmountStringREQUIRED. 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.
nativeUnitStringREQUIRED. Unit the balance is returned in. Currently Wei-only.
tokenBalanceTokenBalanceThe token balance.

Example

{
  "blockHeight": "0xea620e",
  "address": "0xdf0635793e91d4f8e7426dbd9ed08471186f428d",
  "nativeAmount": "0x1a06c95fd28d60",
  "nativeUnit": "Wei",
  "tokenBalance": {
    "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "amount": "0x579dd3c7",
    "decimals": 6
  }
}

Allowance

Properties

NameTypeDescription
ownerStringREQUIRED. The owner address.
spenderStringREQUIRED. The spender address.
contractsString[]REQUIRED. List of contract addresses.

Example

{
  "owner": "0xa646147bda82a866eba03568f363fc9c90185c6e",
  "spender": "0xadd0e097b961572b2a1f5de572c622eef97e3d82",
  "contracts": [
    "0xdac17f958d2ee523a2206206994597c13d831ec7"
  ]
}

TokenAllowance

Properties

NameTypeDescription
blockHeightStringREQUIRED. The end block in which the balances were computed. The start block is genesis.
ownerStringREQUIRED. The owner address.
spenderStringREQUIRED. The spender address.
tokenAllowancesTokenBalance[]REQUIRED. List of token balances.

Example

{
  "blockHeight": "0xea613d",
  "owner": "0xa646147bda82a866eba03568f363fc9c90185c6e",
  "spender": "0xadd0e097b961572b2a1f5de572c622eef97e3d82",
  "tokenAllowances": [
    {
      "contract": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "amount": "411256436224324320870982430867023952481793415358246197400146659",
      "decimals": 6
    }
  ]
}

TransactionsByAddress

Properties

NameTypeDescription
blockStartStringREQUIRED. The starting block number.
blockEndStringREQUIRED. The ending block number.
blocksBlockTransaction[]REQUIRED. List of blocks and their associated transactions.

Example

{
  "blockStart": "0xdc3500",
  "blockEnd": "0xdc3501",
  "blocks": [
    {
      "blockHash": "0x2c52d4bb68c6e56272974d21bd5afc7a01ec33093249d9d5ec0b74048a8389d5",
      "blockNumber": "0xdc3501",
      "blockTimestamp": "0x6238ccde",
      "transactions": [
        {
          "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"
        },
        {
          "...": "output truncated."
        }
      ]
    },
    {
      "...": "output truncated."
    }
  ]
}

TokenTransfersByAddress

Properties

NameTypeDescription
blockStartStringREQUIRED. The starting block number.
blockEndStringREQUIRED. The ending block number.
blocksBlockTokens[]REQUIRED. List of blocks and their associated token transfers.

Example

{
  "blockStart": "0x1",
  "blockEnd": "0x16bc50",
  "blocks": [
    {
      "blockHash": "0x496788c88b61a1c74a2f06af3e42ac7eba356a938de86e492084229c33ae90e0",
      "blockNumber": "0x165e2c",
      "blockTimestamp": "0x572c3095",
      "tokenTransfers": [
        {
          "tokenAddress": "0x7789d991d2552f94066a9b273cd65c8cd763c227",
          "tokenType": "erc20",
          "from": "0xa044efd7b193444ced74a521a6104f7920d436fd",
          "to": "0x0000000000000000000000000000000000000000",
          "value": "0x3",
          "transactionHash": "0xa3ee71f1a4b50f4ea1dc163d6a8419ed4c3f17768e190a9602548724dea67486",
          "transactionIndex": "0x5"
        }
      ]
    },
    {
      "blockHash": "0x138efe004f40abeb4b00ca68034add511f9313dc3cfea66b574133c7ceeebf59",
      "blockNumber": "0x15ee0e",
      "blockTimestamp": "0x5725e384",
      "tokenTransfers": [
        {
          "tokenAddress": "0xd25753116e068eeb7a1f8d11370aa6794c73728c",
          "tokenType": "erc20",
          "from": "0xd25753116e068eeb7a1f8d11370aa6794c73728c",
          "to": "0x0000000000000000000000000000000000000000",
          "value": "0x0",
          "transactionHash": "0x1b7b06f8bef5e032183dfed1f733dbd3fa54c496c470fa6c849c47da0ea2233f",
          "transactionIndex": "0x13"
        },
        {
          "...": "output truncated."
        }
      ]
    },
    {
      "...": "output truncated. Returns enough blocks to return 1000+ transfers."
    }
  ]
}

Transaction

Properties

NameTypeDescription
transactionHashStringREQUIRED. The transaction hash.
transactionIndexStringREQUIRED. The transaction index.
fromStringREQUIRED. The origin address.
toStringREQUIRED. The destination address.
valueStringREQUIRED. The value in native blockchain currency.
gasLimitStringREQUIRED. The maximum gas limit of a transaction.
gasPriceStringREQUIRED. Transaction's cost per unit of gas in native blockchain currency.
gasUsedStringREQUIRED. Amount of gas actually used in transaction.
cumulativeGasUsedStringREQUIRED. Total amount of gas used in the block of the transaction.
statusStringREQUIRED. "1": Success, "0": Fail, Other return codes: Unknown.
inputStringREQUIRED. Transaction's input data.
nonceStringREQUIRED. Transaction's nonce.
blockHashStringREQUIRED. The block hash.
blockNumberStringREQUIRED. the block number.
blockTimestampStringREQUIRED. Timestamp of when block was mined.
internalTransactionsInternalTransaction[]List of internal transactions.
tokenTransfersTokenTransfer[]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"
}

TokenStandardEvents

Properties

NameTypeDescription
blockStartStringREQUIRED. The starting block number.
blockEndStringREQUIRED. The ending block number.
eventsBlockTokenEvent[]REQUIRED. List of blocks and their associated token events.

Example

{
  "blockStart": "0xe04d94",
  "blockEnd": "0xe04dbd",
  "events": [
    {
      "blockHash": "0x801b8afac89d96d9c6f054275bc9fc0274c831372603dc34aae7401931f58849",
      "blockNumber": "0xe04dbd",
      "blockTimestamp": "0x62702704",
      "events": [
        {
          "transactionHash": "0xe11f4b1dd9fbd62b5a4afe11a6f6289e4d90ba5aaf04ce75ff2031b9ebe39fa5",
          "transactionIndex": "0x307830",
          "data": {
            "data": "514711238152814592",
            "from": "0x00000000003b3cc22af3ae1eac0440bcee416b40",
            "name": "Transfer",
            "to": "0x8aa34c7866da901b3b55d162821ef3dae87851f3"
          },
          "eventType": "Transfer",
          "signature": "Transfer(address, address, uint256)",
          "signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
        },
        {
          "...": "output truncated."
        }
      ]
    },
    {
      "...": "output truncated. Returns enough blocks to return 1000+ transactions."
    }
  ]
}

TokenContractMetadata

Properties

NameTypeDescription
blockHeightStringREQUIRED. The end block in which the balances were computed. The start block is genesis.
tokenMetadataTokenMetadataREQUIRED. Metadata for a token.

Example

{
  "blockHeight": "0xea62cc",
  "tokenMetadata": {
    "name": "USD Coin",
    "symbol": "USDC",
    "totalSupply": "0x9e6738b1ff926e",
    "decimals": 6
  }
}

TokenBalance

Properties

NameTypeDescription
contractStringREQUIRED. Token identifier.
amountStringREQUIRED. Balance Amount (For ERC-721 it is the number of tokens).
decimalsIntegerREQUIRED. Unit (decimals for ERC-20).

Example

{
  "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "amount": "0x579dd3c7",
  "decimals": 6
}

BlockTransaction

Properties

NameTypeDescription
blockHashStringREQUIRED. The block hash.
blockNumberStringREQUIRED. the block number.
blockTimestampStringREQUIRED. Timestamp of when block was mined.
transactionsTransaction[]REQUIRED. List of transactions in a block.

Example

{
  "blockHash": "0x2c52d4bb68c6e56272974d21bd5afc7a01ec33093249d9d5ec0b74048a8389d5",
  "blockNumber": "0xdc3501",
  "blockTimestamp": "0x6238ccde",
  "transactions": [
    {
      "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"
    },
    {
      "...": "output truncated."
    }
  ]
}

BlockTokens

Properties

NameTypeDescription
blockHashStringREQUIRED. The block hash.
blockNumberStringREQUIRED. the block number.
blockTimestampStringREQUIRED. Timestamp of when block was mined.
tokenTransfersTokenTransfer[]REQUIRED. List of token transfers in a block.

Example

{
  "blockHash": "0x496788c88b61a1c74a2f06af3e42ac7eba356a938de86e492084229c33ae90e0",
  "blockNumber": "0x165e2c",
  "blockTimestamp": "0x572c3095",
  "tokenTransfers": [
    {
      "tokenAddress": "0x7789d991d2552f94066a9b273cd65c8cd763c227",
      "tokenType": "erc20",
      "from": "0xa044efd7b193444ced74a521a6104f7920d436fd",
      "to": "0x0000000000000000000000000000000000000000",
      "value": "0x3",
      "transactionHash": "0xa3ee71f1a4b50f4ea1dc163d6a8419ed4c3f17768e190a9602548724dea67486",
      "transactionIndex": "0x5"
    }
  ]
}

InternalTransaction

Properties

NameTypeDescription
traceTypeStringREQUIRED. Type of internal transaction, e.g. CREATE, CALL, CALLCODE, DELEGATECALL, SUICIDE
fromStringREQUIRED. The origin address.
toStringREQUIRED. The destination address.
valueStringREQUIRED. The value in native blockchain currency.
gasLimitStringThe maximum gas limit of a transaction.

Example

{
  "traceType": "CALL_0",
  "from": "0x00000000a50bb64b4bbeceb18715748dface08af",
  "to": "0x7f268357a8c2552623316e2562d90e642bb538e5",
  "value": "0x2386f26fc10000",
  "gasLimit": "0x3196d"
}

TokenTransfer

Properties

NameTypeDescription
tokenAddressStringREQUIRED. Address location for the token contract
tokenTypeStringREQUIRED. "erc20" or "erc721"
fromStringREQUIRED. The origin address.
toStringREQUIRED. The destination address.
valueStringREQUIRED. For ERC-20, gives quantity of tokens transferred. For ERC-721, gives list of token IDs of the token transferred
transactionHashStringREQUIRED. The transaction's identifying hash
transactionIndexStringREQUIRED. The transaction's index position

Example

{
  "tokenAddress": "0x0da642e3ed481b119cc212b6f1c9bef04e3211ab",
  "tokenType": "erc721",
  "from": "0xaf5760607ead7e0a152f8b9987e95174fc32af70",
  "to": "0xf88ad3b265a92acfc9f7157f927950dc5317cae5",
  "tokenID": "1081",
  "value": "0x0",
  "transactionHash": "0xdd0971856280e6e4db0ce31072b9780c4c3f96d70351d5b7ef3edf924583d2c6",
  "transactionIndex": "0x60"
}

BlockTokenEvent

Properties

NameTypeDescription
blockHashStringREQUIRED. The block hash.
blockNumberStringREQUIRED. the block number.
blockTimestampStringREQUIRED. Timestamp of when block was mined.
eventsTokenEvent[]REQUIRED. A list of token events in a block.

Example

{
  "blockHash": "0x801b8afac89d96d9c6f054275bc9fc0274c831372603dc34aae7401931f58849",
  "blockNumber": "0xe04dbd",
  "blockTimestamp": "0x62702704",
  "events": [
    {
      "transactionHash": "0xe11f4b1dd9fbd62b5a4afe11a6f6289e4d90ba5aaf04ce75ff2031b9ebe39fa5",
      "transactionIndex": "0x307830",
      "data": {
        "data": "514711238152814592",
        "from": "0x00000000003b3cc22af3ae1eac0440bcee416b40",
        "name": "Transfer",
        "to": "0x8aa34c7866da901b3b55d162821ef3dae87851f3"
      },
      "eventType": "Transfer",
      "signature": "Transfer(address, address, uint256)",
      "signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
    },
    {
      "...": "output truncated."
    }
  ]
}

TokenMetadata

Properties

NameTypeDescription
nameStringREQUIRED. Name of token
symbolStringREQUIRED. Symbol for token
totalSupplyStringREQUIRED. Total amount of token
decimalsIntegerNumber of decimals

Example

{
  "name": "USD Coin",
  "symbol": "USDC",
  "totalSupply": "0x9e6738b1ff926e",
  "decimals": 6
}

TokenEvent

Properties

NameTypeDescription
transactionHashStringREQUIRED. The transaction hash.
transactionIndexStringThe transaction index.
dataTokenEventDataREQUIRED. Data returned for specific transaction. Returns different properties based on event type, see examples.
eventTypeStringREQUIRED. 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.
signatureStringREQUIRED. Method signature for the event type
signatureHashStringREQUIRED. Hash of the event signature

Example

{
  "transactionHash": "0xe11f4b1dd9fbd62b5a4afe11a6f6289e4d90ba5aaf04ce75ff2031b9ebe39fa5",
  "transactionIndex": "0x307830",
  "data": {
    "data": "514711238152814592",
    "from": "0x00000000003b3cc22af3ae1eac0440bcee416b40",
    "name": "Transfer",
    "to": "0x8aa34c7866da901b3b55d162821ef3dae87851f3"
  },
  "eventType": "Transfer",
  "signature": "Transfer(address, address, uint256)",
  "signatureHash": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
}

TokenEventData

Properties

NameTypeDescription
dataStringFor ERC-20 this represents the value. For ERC-721 this represents the token id.
fromStringThe origin address.
nameStringREQUIRED. Name of the event type, e.g. Transfer, Approval.
toStringThe destination address.
ownerStringToken owner address.
spenderStringToken spender address.
operatorStringToken operator address.
approvedBooleantrue when operator receives approval, false when approval is revoked.
topicsStringStringified 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"
}