Contracts
Contract Transactions
Query all transactions for any deployed contract on any EVM chain.
fetch( "https://api.thirdweb.com/v1/contracts/{chainId}/{address}/transactions?page=1&limit=20&sortOrder=desc", { method: "GET", headers: { "x-secret-key": "<your-project-secret-key>", }, },);x-secret-keybackendProject secret key - for backend usage only. Should not be used in frontend code.
x-client-idfrontendProject client ID - for frontend usage on authorized domains.
x-ecosystem-idoptionalEcosystem ID - for ecosystem wallets.
x-ecosystem-partner-idoptionalEcosystem partner ID - for ecosystem wallets.
chainIdintegerRequiredThe blockchain network identifier where the contract is deployed.
addressstringRequiredThe smart contract address or ENS name.
filterFromAddressstringFilter by transaction sender address
filterToAddressstringFilter by transaction recipient address
filterBlockTimestampGteintegerFilter by block timestamp (Unix timestamp) greater than or equal to this value
filterBlockTimestampLteintegerFilter by block timestamp (Unix timestamp) less than or equal to this value
filterBlockNumberGteintegerFilter by block number greater than or equal to this value
filterBlockNumberLteintegerFilter by block number less than or equal to this value
filterValueGtstringFilter by transaction value (in wei) greater than this value
filterFunctionSelectorstringFilter by function selector (4-byte method ID), e.g., '0xa9059cbb' for ERC-20 transfer
pagenumberCurrent page number
Example:
1limitnumberNumber of items per page
Example:
20sortOrderstringSort order: 'asc' for ascending, 'desc' for descending
Example:
desc{ "result": { "data": [ { "blockHash": "string", "blockNumber": 0, "blockTimestamp": 0, "chainId": "string", "data": "string", "fromAddress": "string", "functionSelector": "string", "gas": 0, "gasPrice": "string", "hash": "string", "nonce": 0, "status": 0, "toAddress": "string", "transactionIndex": 0, "value": "string", "contractAddress": "string", "cumulativeGasUsed": 0, "decoded": { "inputs": { "property": "value" }, "name": "string", "signature": "string" } } ], "pagination": { "hasMore": true, "limit": 20, "page": 1 } }}