POSTkaia_getLogs

Retrieves logs matching the specified filter criteria. Query directly with filter conditions in the request without creating a separate filter and querying by filter ID.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
fromBlockstring

Use one of block number or block tag to specify the block.

  • Block number: Hexadecimal string (e.g. "0x1")
  • Block tag: Enum string (e.g. "latest", "earliest", "pending")
    • earliest: The oldest available block on the chain.
    • finalized: A recently finalized block that can no longer be changed. Primarily used in proof-of-stake (PoS) blockchains.
    • safe: A recent block considered safe by the network (immune to reorgs).
    • latest: The most recent block on the chain (may be subject to reorgs).
    • pending: The next block to be mined, including pending transactions in the mempool.

Block number represents the order of blocks in the chain. It is expressed as a hexadecimal string.

toBlockstring

Use one of block number or block tag to specify the block.

  • Block number: Hexadecimal string (e.g. "0x1")
  • Block tag: Enum string (e.g. "latest", "earliest", "pending")
    • earliest: The oldest available block on the chain.
    • finalized: A recently finalized block that can no longer be changed. Primarily used in proof-of-stake (PoS) blockchains.
    • safe: A recent block considered safe by the network (immune to reorgs).
    • latest: The most recent block on the chain (may be subject to reorgs).
    • pending: The next block to be mined, including pending transactions in the mempool.

Block number represents the order of blocks in the chain. It is expressed as a hexadecimal string.

addressstring[]

Enter addresses to filter as an array.

topicsstring[]

Topics is an array of topics for filtering transaction logs. Each topic is expressed as a 32-byte hexadecimal string.

Responses
addressstring

The address of the contract that emitted this log

topicsstring[]

Array of event signature hash and indexed parameters (up to 4 entries)

datastring

Non-indexed event parameter data (hex encoded)

blockNumberstring

Block number containing this log (hex)

transactionHashstring

Hash of the transaction that created this log

transactionIndexstring

Transaction position index within the block (hex)

blockHashstring

Hash of the block containing this log

logIndexstring

Log position index within the block (hex)

removedboolean

True if the log was removed due to a chain reorganization

X-API-KEY
RequestCU66
cURL
curl -X POST "https://kaia-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "kaia_getLogs",
  "params": [
    {
      "fromBlock": "latest"
    }
  ]
}'
Response
Example · 200
[
  {
    "address": "string",
    "topics": [
      "string"
    ],
    "data": "string",
    "blockNumber": "string",
    "transactionHash": "string",
    "transactionIndex": "string",
    "blockHash": "string",
    "logIndex": "string",
    "removed": true
  }
]