fungibletoken

Historical Logs

Retrieves historical blockchain logs related to an ERC-20 token for a specified user address within a defined block range. It is designed to capture events such as token approvals and transfers, allowing developers and users to audit past activity, verify transaction histories, and analyze token behavior over time.

💡 Compute Unit Value: 70 (Fixed)

get/defi/v1/fungibletoken/historicallogs

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/fungibletoken/historicallogs
  • Auth
    API key in header X-API-Key

Query parameters

chainId'1' | '137' | '56' | '25' | '10' | '250' | '43114' | '42161' | '8453'

The unique ID to direct queries or transactions to the correct blockchain. Find more here.

Example:1
chainSymbolstring

The abbreviated chain name for queries or transactions.

Example:ETH
startBlockstring

The starting block of the range. Default: latestBlock - 100.

Example:100000
endBlockstring

The ending block of the range. Default: latestBlock.

Example:100010
tokenAddressstring required

The address of the ERC-20 token for which logs are being queried.

Example:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
type'Approval' | 'Transfer' required

Type of logs to fetch. Must be either Approval or Transfer.

Example:Approval
pagestring

The page number to fetch. By default, 1.

Example:1

Response

Successful response

statusinteger
msgstring
dataobject

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "logs": [
      {
        "address": "0x6b175474e89094c44da98b954eedeac495271d0f",
        "topics": [
          "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
          "0x000000000000000000000000975f7b8e68e99c04807e94f72d63e98ec21f5ad5",
          "0x0000000000000000000000001715a3e4a142d8b698131108995174f37aeba10d"
        ],
        "params": {
          "src": "0x975f7b8e68e99c04807e94f72d63e98ec21f5ad5",
          "guy": "0x1715a3e4a142d8b698131108995174f37aeba10d",
          "wad": "127000000000000000000"
        },
        "data": "0x000000000000000000000000000000000000000000000006e27aa3200a9c0000",
        "blockNumber": "17320089",
        "blockHash": "0x39b65a913a44fefa4f1432dc00927839cf8ba6bcbc778afb3effaf5c91a2a5d1",
        "timeStamp": "1684822391",
        "gasPrice": "37991235385",
        "gasUsed": "46158",
        "logIndex": "302",
        "transactionHash": "0x8b9159d1fc58b9dd33a0f8ebcb6980bca0416c3836bb08771c2cac5737dbadba",
        "transactionIndex": "109"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.