chain

Get Events

Retrieves blockchain events emitted within a specified ledger range (up to 10 hours from the latest ledger), providing detailed information on event types, ledger numbers, closing times, and unique identifiers. It returns structured data with topics and values that help developers monitor on-chain activities, debug smart contract interactions, and track blockchain state changes.

💡 Compute Unit Value: 10 (Fixed)

get/defi/v1/chain/getevents

Request

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

Query parameters

chainId'1700' | '1701' | '1500' | '1501'

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

Example:1700
chainSymbolstring

The abbreviated chain name for queries or transactions.

Example:ETH
contractAddressstring required

Public address of the user.

Example:0xfad57d2039c21811c8f2b5d5b65308aa99d31559
sortOrder'desc' | 'asc'

Comma-separated value of tokens to retrieve. Maximum of 10 at a time.

Example:desc
pageTokenstring

Cursor to fetch the next page of results from the response.

Example:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYWdlIjoxLCJjb250cmFjdEFkZHJlc3MiOiIweGZhZThlNjRjZGRlNzM1NTBlN2Q3ZjA0Njk1NTdhMzNhNDE3YjI4NjgiLCJjb250cmFjdFR5cGUiOiJlcmMyMCIsImFwcHJvdmVyQWRkcmVzcyI6IjB4NjVhOGYwN2JkOWE4NTk4ZTFiNWI2YzBhODhmNDc3OWRiYzA3NzY3NSIsInNwZW5kZXJBZGRyZXNzIjoiMHgxMTExMTExMjU0ZmI2YzQ0YmFjMGJlZDI4NTRlNzZmOTA2NDMwOTdkIiwiaWF0IjoxNzMzMzkzODE2fQ.y7FANxpXgtdgk83CIqPHHk2jutj1NZrueTu4XR39jnk
startBlockstring

Sequence number of the ledger. By default, the latest ledger.

Example:100000
contractsstring

Comma-separated values of contract IDs to query for events.

Example:0xfad57d2039c21811c8f2b5d5b65308aa99d31559
topics1string

Topic the event was emitted with.

Example:AAAADgAAAAxTb3Jvc3dhcFBhaXI%3D%2CAAAADwAAAARzeW5j
topics2string

Topic the event was emitted with.

Example:AAAADgAAAAxTb3Jvc3dhcFBhaXI%3D%2CAAAADwAAAARzeW5j
topics3string

Topic the event was emitted with.

Example:AAAADgAAAAxTb3Jvc3dhcFBhaXI%3D%2CAAAADwAAAARzeW5j
topics4string

Topic the event was emitted with.

Example:AAAADgAAAAxTb3Jvc3dhcFBhaXI%3D%2CAAAADwAAAARzeW5j
topics5string

Topic the event was emitted with.

Example:AAAADgAAAAxTb3Jvc3dhcFBhaXI%3D%2CAAAADwAAAARzeW5j
type'Approval' | 'Transfer'

Comma-separated list of event types (system, contract, or diagnostic). If omitted, all types are included.

Example:Approval

Response

Successful response

statusinteger
msgstring
dataobject

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "events": [
      {
        "type": "diagnostic",
        "ledger": 52309741,
        "ledgerClosedAt": 1719473442000,
        "id": "0224668626857975808-0000000000",
        "topic": [
          [
            {
              "type": "ScVal",
              "value": "[scvSymbol]",
              "nodes": [
                {
                  "type": "sym",
                  "value": "fn_call"
                }
              ]
            }
          ],
          [
            {
              "type": "ScVal",
              "value": "[scvBytes]",
              "nodes": [
                {
                  "type": "bytes",
                  "value": "Array[32]",
                  "nodes": [
                    {
                      "type": "[0]",
                      "value": "221"
                    },
                    {
                      "type": "[1]",
                      "value": "29"
                    },
                    {
                      "type": "[2]",
                      "value": "192"
                    },
                    {
                      "type": "[3]",
                      "value": "122"
                    },
                    {
                      "type": "[4]",
                      "value": "253"
                    },
                    {
                      "type": "[5]",
                      "value": "128"
                    },
                    {
                      "type": "[6]",
                      "value": "2"
                    },
                    {
                      "type": "[7]",
                      "value": "242"
                    },
                    {
                      "type": "[8]",
                      "value": "106"
                    },
                    {
                      "type": "[9]",
                      "value": "227"
                    },
                    {
                      "type": "[10]",
                      "value": "29"
                    },
                    {
                      "type": "[11]",
                      "value": "189"
                    },
                    {
                      "type": "[12]",
                      "value": "204"
                    },
                    {
                      "type": "[13]",
                      "value": "208"
                    },
                    {
                      "type": "[14]",
                      "value": "188"
                    },
                    {
                      "type": "[15]",
                      "value": "125"
                    },
                    {
                      "type": "[16]",
                      "value": "23"
                    },
                    {
                      "type": "[17]",
                      "value": "180"
                    },
                    {
                      "type": "[18]",
                      "value": "13"
                    },
                    {
                      "type": "[19]",
                      "value": "109"
                    },
                    {
                      "type": "[20]",
                      "value": "86"
                    },
                    {
                      "type": "[21]",
                      "value": "236"
                    },
                    {
                      "type": "[22]",
                      "value": "107"
                    },
                    {
                      "type": "[23]",
                      "value": "255"
                    },
                    {
                      "type": "[24]",
                      "value": "182"
                    },
                    {
                      "type": "[25]",
                      "value": "175"
                    },
                    {
                      "type": "[26]",
                      "value": "90"
                    },
                    {
                      "type": "[27]",
                      "value": "251"
                    },
                    {
                      "type": "[28]",
                      "value": "53"
                    },
                    {
                      "type": "[29]",
                      "value": "79"
                    },
                    {
                      "type": "[30]",
                      "value": "175"
                    },
                    {
                      "type": "[31]",
                      "value": "235"
                    }
                  ]
                }
              ]
            }
          ],
          [
            {
              "type": "ScVal",
              "value": "[scvSymbol]",
              "nodes": [
                {
                  "type": "sym",
                  "value": "add_prices"
                }
              ]
            }
          ]
        ],
        "value": [
          {
            "type": "ScVal",
            "value": "[scvVec]",
            "nodes": [
              {
                "type": "vec",
                "value": "Array[4]",
                "nodes": [
                  {
                    "type": "[0]",
                    "value": "[scvMap]",
                    "nodes": [
                      {
                        "asset": [
                          "Other",
                          "EURC"
                        ],
                        "asset_u32": 8,
                        "price": "83200000000000000",
                        "source": 0,
                        "timestamp": "1719473400"
                      }
                    ]
                  },
                  {
                    "type": "[1]",
                    "value": "[scvMap]",
                    "nodes": [
                      {
                        "asset": [
                          "Other",
                          "IDR"
                        ],
                        "asset_u32": 33,
                        "price": "1474740500000000000000",
                        "source": 0,
                        "timestamp": "1719473400"
                      }
                    ]
                  },
                  {
                    "type": "[2]",
                    "value": "[scvMap]",
                    "nodes": [
                      {
                        "asset": [
                          "Other",
                          "ARS"
                        ],
                        "asset_u32": 31,
                        "price": "81806632600000000000",
                        "source": 0,
                        "timestamp": "1719473400"
                      }
                    ]
                  },
                  {
                    "type": "[3]",
                    "value": "[scvMap]",
                    "nodes": [
                      {
                        "asset": [
                          "Other",
                          "NGN"
                        ],
                        "asset_u32": 32,
                        "price": "137763976000000000000",
                        "source": 0,
                        "timestamp": "1719473400"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ],
        "inSuccessfulContractCall": true,
        "contract": "",
        "transactionHash": "f6cb1d2c9e6e2a0e2c3370aa678957de39621e2573e7f760d437a6ecbd26ce08"
      }
    ]
  }
}

Changes

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