API Reference
DocumentationLog In

getBalances

USDC & DAI (ERC-20)

Retrieve balances for USDC and DAI. Note that this example shows how Advanced APIs normalize input and accept 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_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
        }
      ]
    }
  ]
}

getSingleBalance

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

getTokenAllowances

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
            }
          ]
        }
      ]
    }
  ]
}

getTransactionsByAddress

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"
              }
            ]
          }
        ]
      }
    ]
  }
}

getTokenTransfersByAddress

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"
          }
        ]
      }
    ]
  }
}

getTransactionByHash

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"
        }
      ]
    }
  }
}

getTokenStandardEvents

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."
      }
    ]
  }
}

getTokenMetadata

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"
    }
  }
}