Get Started
Learn
- Tutorials
Health Check
- Health Check
EVM
- Chains
- Blocks
- Transactions
- GETGet deployment transaction
- GETList deployed contracts
- GETList ERC transfers
- GETList transactions
- GETList native transactions
- GETList ERC-20 transfers
- GETList ERC-721 transfers
- GETList ERC-1155 transfers
- GETList internal transactions
- GETGet transaction
- GETList transactions for a block
- GETList latest transactions
- GETList the latest transactions across all supported EVM chains
- GET
- Balances
- Contracts
- NFTs
Primary Network
- Network, Chains & subnet
- Validators & Delegators
- Blocks
- Vertices
- Transactions
- Balances & UTXOs
- Rewards
- Assets
ICM Services
- Teleporter
- Signature Aggregator
Operations
- Operations
Usage Metrics
- Usage Metrics
List latest transactions
Lists the latest transactions. Filterable by status.
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";
const avaCloudSDK = new AvaCloudSDK({
chainId: "43114",
network: "mainnet",
});
async function run() {
const result = await avaCloudSDK.data.evm.transactions.listLatestTransactions({
chainId: "43114",
});
for await (const page of result) {
// Handle the page
console.log(page);
}
}
run();
{
"nextPageToken": "<string>",
"transactions": [
{
"blockNumber": "339",
"blockTimestamp": 1648672486,
"blockHash": "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c",
"chainId": "43114",
"blockIndex": 0,
"txHash": "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4",
"txStatus": "1",
"txType": 1,
"gasLimit": "51373",
"gasUsed": "51373",
"gasPrice": "470000000000",
"nonce": "1",
"from": {
"name": "Wrapped AVAX",
"symbol": "WAVAX",
"decimals": 18,
"logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg",
"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
},
"to": {
"name": "Wrapped AVAX",
"symbol": "WAVAX",
"decimals": 18,
"logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg",
"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
},
"method": {
"callType": "CONTRACT_CALL",
"methodHash": "0xa9059cbb",
"methodName": "transfer(address,uint256)"
},
"value": "10000000000000000000"
}
]
}
Authorizations
Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
Path Parameters
A supported evm chain id or blockchain id. Use the /chains
endpoint to get a list of supported chain ids.
Query Parameters
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 < 100
A status filter for listed transactions.
failed
, success
Response
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.
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.
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.
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'.
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.
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";
const avaCloudSDK = new AvaCloudSDK({
chainId: "43114",
network: "mainnet",
});
async function run() {
const result = await avaCloudSDK.data.evm.transactions.listLatestTransactions({
chainId: "43114",
});
for await (const page of result) {
// Handle the page
console.log(page);
}
}
run();
{
"nextPageToken": "<string>",
"transactions": [
{
"blockNumber": "339",
"blockTimestamp": 1648672486,
"blockHash": "0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c",
"chainId": "43114",
"blockIndex": 0,
"txHash": "0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4",
"txStatus": "1",
"txType": 1,
"gasLimit": "51373",
"gasUsed": "51373",
"gasPrice": "470000000000",
"nonce": "1",
"from": {
"name": "Wrapped AVAX",
"symbol": "WAVAX",
"decimals": 18,
"logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg",
"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
},
"to": {
"name": "Wrapped AVAX",
"symbol": "WAVAX",
"decimals": 18,
"logoUri": "https://images.ctfassets.net/gcj8jwzm6086/5VHupNKwnDYJvqMENeV7iJ/fdd6326b7a82c8388e4ee9d4be7062d4/avalanche-avax-logo.svg",
"address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F"
},
"method": {
"callType": "CONTRACT_CALL",
"methodHash": "0xa9059cbb",
"methodName": "transfer(address,uint256)"
},
"value": "10000000000000000000"
}
]
}