Get Started
Learn
- Tutorials
Health Check
- Health Check
EVM
- Chains
- Blocks
- Transactions
- Balances
- Contracts
- NFTs
Primary Network
- Network, Chains & subnet
- Validators & Delegators
- Blocks
- Vertices
- Transactions
- Balances & UTXOs
- Rewards
- Assets
ICM Services
- Teleporter
- Interchain Messaging
- Signature Aggregator
Operations
- Operations
Usage Metrics
- Usage Metrics
List staking transactions
Lists active staking transactions on the P-Chain for the supplied addresses.
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";
const avaCloudSDK = new AvaCloudSDK({
serverURL: "https://api.example.com",
chainId: "43114",
network: "mainnet",
});
async function run() {
const result = await avaCloudSDK.data.primaryNetwork.transactions.listActiveStakingTransactions({
addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg",
txTypes: [
"AddValidatorTx",
],
startTimestamp: 1689541049,
endTimestamp: 1689800249,
blockchainId: "p-chain",
network: "mainnet",
sortOrder: "asc",
});
for await (const page of result) {
// Handle the page
console.log(page);
}
}
run();
{
"nextPageToken": "<string>",
"transactions": [
{
"txHash": "3P91K6nuDFvDodcRuJTsgdf9SvYe5pMiKk38HppsoeAiEztCP",
"txType": "AddDelegatorTx",
"blockTimestamp": 1648672486,
"blockNumber": "<string>",
"blockHash": "<string>",
"consumedUtxos": [
{
"addresses": [
"avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"
],
"asset": {
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
},
"consumedOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"consumingTxHash": "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c",
"createdOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"utxoId": "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC",
"amount": "<string>",
"assetId": "<string>",
"blockNumber": "<string>",
"blockTimestamp": 123,
"consumingBlockNumber": "<string>",
"consumingBlockTimestamp": 123,
"platformLocktime": 123,
"outputIndex": 123,
"rewardType": "VALIDATOR",
"stakeableLocktime": 123,
"staked": true,
"threshold": 123,
"txHash": "<string>",
"utxoEndTimestamp": 123,
"utxoStartTimestamp": 123,
"utxoType": "STAKE"
}
],
"emittedUtxos": [
{
"addresses": [
"avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"
],
"asset": {
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
},
"consumedOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"consumingTxHash": "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c",
"createdOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"utxoId": "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC",
"amount": "<string>",
"assetId": "<string>",
"blockNumber": "<string>",
"blockTimestamp": 123,
"consumingBlockNumber": "<string>",
"consumingBlockTimestamp": 123,
"platformLocktime": 123,
"outputIndex": 123,
"rewardType": "VALIDATOR",
"stakeableLocktime": 123,
"staked": true,
"threshold": 123,
"txHash": "<string>",
"utxoEndTimestamp": 123,
"utxoStartTimestamp": 123,
"utxoType": "STAKE"
}
],
"sourceChain": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"destinationChain": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"value": [
{
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
}
],
"amountBurned": [
{
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
}
],
"amountStaked": [
{
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
}
],
"amountL1ValidatorBalanceBurned": [
{
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
}
],
"startTimestamp": 123,
"endTimestamp": 123,
"delegationFeePercent": "<string>",
"nodeId": "<string>",
"subnetId": "<string>",
"l1ValidatorManagerDetails": {
"blockchainId": "<string>",
"contractAddress": "<string>"
},
"l1ValidatorDetails": [
{
"validationId": "<string>",
"validationIdHex": "<string>",
"nodeId": "<string>",
"subnetId": "<string>",
"weight": 123,
"remainingBalance": 123,
"balanceChange": 123,
"blsCredentials": {}
}
],
"estimatedReward": "<string>",
"rewardTxHash": "<string>",
"rewardAddresses": [
"<string>"
],
"memo": "<string>",
"stakingTxHash": "<string>",
"subnetOwnershipInfo": {
"locktime": 0,
"threshold": 1,
"addresses": [
"avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"
]
},
"blsCredentials": {
"publicKey": "<string>",
"proofOfPossession": "<string>"
}
}
],
"chainInfo": {
"chainName": "p-chain",
"network": "mainnet"
}
}
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 primary network blockchain id or alias.
11111111111111111111111111111111LpoYY
, p-chain
Either mainnet or testnet/fuji.
mainnet
, fuji
, testnet
Query Parameters
A comma separated list of X-Chain or P-Chain wallet addresses, starting with "avax"/"fuji", "P-avax"/"P-fuji" or "X-avax"/"X-fuji".
Query param for filtering items based on transaction types.
AddValidatorTx
, AddSubnetValidatorTx
, AddDelegatorTx
, CreateChainTx
, CreateSubnetTx
, ImportTx
, ExportTx
, AdvanceTimeTx
, RewardValidatorTx
, RemoveSubnetValidatorTx
, TransformSubnetTx
, AddPermissionlessValidatorTx
, AddPermissionlessDelegatorTx
, BaseTx
, TransferSubnetOwnershipTx
, ConvertSubnetToL1Tx
, RegisterL1ValidatorTx
, SetL1ValidatorWeightTx
, DisableL1ValidatorTx
, IncreaseL1ValidatorBalanceTx
, UNKNOWN
, CreateAssetTx
, OperationTx
Query param for retrieving items after a specific timestamp.
x >= 0
Query param for retrieving items before a specific timestamp.
x >= 0
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
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
Response
The response is of type object
.
Was this page helpful?
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";
const avaCloudSDK = new AvaCloudSDK({
serverURL: "https://api.example.com",
chainId: "43114",
network: "mainnet",
});
async function run() {
const result = await avaCloudSDK.data.primaryNetwork.transactions.listActiveStakingTransactions({
addresses: "avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg",
txTypes: [
"AddValidatorTx",
],
startTimestamp: 1689541049,
endTimestamp: 1689800249,
blockchainId: "p-chain",
network: "mainnet",
sortOrder: "asc",
});
for await (const page of result) {
// Handle the page
console.log(page);
}
}
run();
{
"nextPageToken": "<string>",
"transactions": [
{
"txHash": "3P91K6nuDFvDodcRuJTsgdf9SvYe5pMiKk38HppsoeAiEztCP",
"txType": "AddDelegatorTx",
"blockTimestamp": 1648672486,
"blockNumber": "<string>",
"blockHash": "<string>",
"consumedUtxos": [
{
"addresses": [
"avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"
],
"asset": {
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
},
"consumedOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"consumingTxHash": "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c",
"createdOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"utxoId": "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC",
"amount": "<string>",
"assetId": "<string>",
"blockNumber": "<string>",
"blockTimestamp": 123,
"consumingBlockNumber": "<string>",
"consumingBlockTimestamp": 123,
"platformLocktime": 123,
"outputIndex": 123,
"rewardType": "VALIDATOR",
"stakeableLocktime": 123,
"staked": true,
"threshold": 123,
"txHash": "<string>",
"utxoEndTimestamp": 123,
"utxoStartTimestamp": 123,
"utxoType": "STAKE"
}
],
"emittedUtxos": [
{
"addresses": [
"avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"
],
"asset": {
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
},
"consumedOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"consumingTxHash": "3j9JpF1aGuQtLLbo3YkvvKkWrCZViXZjdeJQWUSEY5hcqUn2c",
"createdOnChainId": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"utxoId": "68vLva9kfKUsX88ZPM8jdbf8qHUZRoZSFH6NdpAVTspkfrXDC",
"amount": "<string>",
"assetId": "<string>",
"blockNumber": "<string>",
"blockTimestamp": 123,
"consumingBlockNumber": "<string>",
"consumingBlockTimestamp": 123,
"platformLocktime": 123,
"outputIndex": 123,
"rewardType": "VALIDATOR",
"stakeableLocktime": 123,
"staked": true,
"threshold": 123,
"txHash": "<string>",
"utxoEndTimestamp": 123,
"utxoStartTimestamp": 123,
"utxoType": "STAKE"
}
],
"sourceChain": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"destinationChain": "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM",
"value": [
{
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
}
],
"amountBurned": [
{
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
}
],
"amountStaked": [
{
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
}
],
"amountL1ValidatorBalanceBurned": [
{
"assetId": "th5aLdWLi32yS9ED6uLGoMMubqHjzMsXhKWwzP6yZTYQKYzof",
"name": "Avalanche",
"symbol": "AVAX",
"denomination": 9,
"type": "secp256k1",
"amount": "5001000"
}
],
"startTimestamp": 123,
"endTimestamp": 123,
"delegationFeePercent": "<string>",
"nodeId": "<string>",
"subnetId": "<string>",
"l1ValidatorManagerDetails": {
"blockchainId": "<string>",
"contractAddress": "<string>"
},
"l1ValidatorDetails": [
{
"validationId": "<string>",
"validationIdHex": "<string>",
"nodeId": "<string>",
"subnetId": "<string>",
"weight": 123,
"remainingBalance": 123,
"balanceChange": 123,
"blsCredentials": {}
}
],
"estimatedReward": "<string>",
"rewardTxHash": "<string>",
"rewardAddresses": [
"<string>"
],
"memo": "<string>",
"stakingTxHash": "<string>",
"subnetOwnershipInfo": {
"locktime": 0,
"threshold": 1,
"addresses": [
"avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"
]
},
"blsCredentials": {
"publicKey": "<string>",
"proofOfPossession": "<string>"
}
}
],
"chainInfo": {
"chainName": "p-chain",
"network": "mainnet"
}
}