import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.data.evm.address.transactions.list({
pageSize: 10,
startBlock: 6479329,
endBlock: 6479330,
address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
sortOrder: "asc",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"transactions": [
{
"nativeTransaction": {
"blockNumber": "<string>",
"blockTimestamp": 123,
"blockHash": "<string>",
"chainId": "<string>",
"blockIndex": 123,
"txHash": "<string>",
"txStatus": "<string>",
"txType": 123,
"gasLimit": "<string>",
"gasUsed": "<string>",
"gasPrice": "<string>",
"nonce": "<string>",
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"value": "<string>",
"method": {
"callType": "NATIVE_TRANSFER",
"methodHash": "<string>",
"methodName": "<string>"
}
},
"erc20Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"value": "<string>",
"erc20Token": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"ercType": "ERC-20",
"logoUri": "<string>",
"price": {
"currencyCode": "usd",
"value": 123
}
}
}
],
"erc721Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"erc721Token": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"ercType": "ERC-721",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"indexStatus": "UNKNOWN",
"metadataLastUpdatedTimestamp": 123,
"name": "<string>",
"symbol": "<string>",
"imageUri": "<string>",
"description": "<string>",
"animationUri": "<string>",
"externalUrl": "<string>",
"background": "<string>",
"attributes": "<string>"
},
"ownerAddress": "<string>"
}
}
],
"erc1155Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"value": "<string>",
"erc1155Token": {
"address": "<string>",
"ercType": "ERC-1155",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"indexStatus": "UNKNOWN",
"metadataLastUpdatedTimestamp": 123,
"name": "<string>",
"symbol": "<string>",
"imageUri": "<string>",
"description": "<string>",
"animationUri": "<string>",
"externalUrl": "<string>",
"background": "<string>",
"decimals": 123,
"properties": "<string>"
}
}
}
],
"internalTransactions": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"internalTxType": "UNKNOWN",
"value": "<string>",
"isReverted": true,
"gasUsed": "<string>",
"gasLimit": "<string>"
}
]
}
],
"nextPageToken": "<string>"
}Returns a list of transactions where the given wallet address had an on-chain interaction for the given chain. The ERC-20 transfers, ERC-721 transfers, ERC-1155, and internal transactions returned are only those where the input address had an interaction. Specifically, those lists only inlcude entries where the input address was the sender (from field) or the receiver (to field) for the sub-transaction. Therefore the transactions returned from this list may not be complete representations of the on-chain data. For a complete view of a transaction use the /chains/:chainId/transactions/:txHash endpoint.
Filterable by block ranges.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
chainId: "43114",
});
async function run() {
const result = await avalanche.data.evm.address.transactions.list({
pageSize: 10,
startBlock: 6479329,
endBlock: 6479330,
address: "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
sortOrder: "asc",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"transactions": [
{
"nativeTransaction": {
"blockNumber": "<string>",
"blockTimestamp": 123,
"blockHash": "<string>",
"chainId": "<string>",
"blockIndex": 123,
"txHash": "<string>",
"txStatus": "<string>",
"txType": 123,
"gasLimit": "<string>",
"gasUsed": "<string>",
"gasPrice": "<string>",
"nonce": "<string>",
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"value": "<string>",
"method": {
"callType": "NATIVE_TRANSFER",
"methodHash": "<string>",
"methodName": "<string>"
}
},
"erc20Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"value": "<string>",
"erc20Token": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"ercType": "ERC-20",
"logoUri": "<string>",
"price": {
"currencyCode": "usd",
"value": 123
}
}
}
],
"erc721Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"erc721Token": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"ercType": "ERC-721",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"indexStatus": "UNKNOWN",
"metadataLastUpdatedTimestamp": 123,
"name": "<string>",
"symbol": "<string>",
"imageUri": "<string>",
"description": "<string>",
"animationUri": "<string>",
"externalUrl": "<string>",
"background": "<string>",
"attributes": "<string>"
},
"ownerAddress": "<string>"
}
}
],
"erc1155Transfers": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"logIndex": 123,
"value": "<string>",
"erc1155Token": {
"address": "<string>",
"ercType": "ERC-1155",
"tokenId": "<string>",
"tokenUri": "<string>",
"metadata": {
"indexStatus": "UNKNOWN",
"metadataLastUpdatedTimestamp": 123,
"name": "<string>",
"symbol": "<string>",
"imageUri": "<string>",
"description": "<string>",
"animationUri": "<string>",
"externalUrl": "<string>",
"background": "<string>",
"decimals": 123,
"properties": "<string>"
}
}
}
],
"internalTransactions": [
{
"from": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"to": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>",
"decimals": 123,
"logoUri": "<string>"
},
"internalTxType": "UNKNOWN",
"value": "<string>",
"isReverted": true,
"gasUsed": "<string>",
"gasLimit": "<string>"
}
]
}
],
"nextPageToken": "<string>"
}Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
A supported evm chain id or blockchain id. Use the /chains endpoint to get a list of supported chain ids.
A wallet address.
A page token, received from a previous list call. Provide this to retrieve the subsequent page.
The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1 <= x <= 100The block range start number, inclusive. If endBlock is not defined when startBlock is defined, the end of the range will be the most recent block.
The block range end number, exclusive. If startBlock is not defined when endBlock is defined, the start of the range will be the genesis block.
The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the sortBy query parameter, if provided.
asc, desc Successful response
Show child attributes
The native (top-level) transaction details.
Show child attributes
The block number on the chain.
The block finality timestamp.
The block hash identifier.
The EVM chain ID on which the transaction occured.
The index at which the transaction occured in the block (0-indexed).
The transaction hash identifier.
The transaction status, which is either 0 (failed) or 1 (successful).
The transaction type.
The gas limit set for the transaction.
The amount of gas used.
The gas price denominated by the number of decimals of the native token.
The nonce used by the sender of the transaction.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
The contract call type. NATIVE_TRANSFER indicates a transfer of the native token without any smart-contract interaction. CONTRACT_CALL indicates a smart-contract interaction. CONTRACT_CREATION indicates a smart-contract creation.
NATIVE_TRANSFER, CONTRACT_CALL, CONTRACT_CREATION The contract method hash identifier. The method hash is only set if the callType is CONTRACT_CALL.
The contract method name including parameter types. If the callType is NATIVE_TRANSFER this is set to 'Native Transfer'. If the callType is CONTRACT_CREATION this is set to 'Contract Created'.
The list of ERC-20 transfers.
Show child attributes
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
ERC-20 The logo uri for the address.
The token price, if available.
Show child attributes
The list of ERC-721 transfers.
Show child attributes
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
ERC-721 Show child attributes
The metadata indexing status of the nft.
UNKNOWN, MISSING_TOKEN, INVALID_TOKEN_URI, INVALID_TOKEN_URI_SCHEME, UNREACHABLE_TOKEN_URI, THROTTLED_TOKEN_URI, METADATA_CONTENT_TOO_LARGE, INVALID_METADATA, INVALID_METADATA_JSON, INDEXED, UNINDEXED A wallet or contract address in mixed-case checksum encoding.
The list of ERC-1155 transfers.
Show child attributes
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
ERC-1155 Show child attributes
The metadata indexing status of the nft.
UNKNOWN, MISSING_TOKEN, INVALID_TOKEN_URI, INVALID_TOKEN_URI_SCHEME, UNREACHABLE_TOKEN_URI, THROTTLED_TOKEN_URI, METADATA_CONTENT_TOO_LARGE, INVALID_METADATA, INVALID_METADATA_JSON, INDEXED, UNINDEXED The list of internal transactions. Note that this list only includes CALL and CALLCODE internal transactions that had a non-zero value and CREATE/CREATE2/CREATE3 calls. Use a client provider to recieve a full debug trace of the transaction.
Show child attributes
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
Show child attributes
A wallet or contract address in mixed-case checksum encoding.
The contract name.
The contract symbol.
The number of decimals the token uses. For example 6, means to divide the token amount by 1000000 to get its user representation.
The logo uri for the address.
UNKNOWN, CALL, CREATE, CREATE2, CREATE3, CALLCODE, DELEGATECALL, STATICCALL True if the internal transaction was reverted.
A token, which can be sent as pageToken to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
Was this page helpful?