Granite Upgrade Activates in11d:16h:53m:08s
Transactions

List latest transactions

Lists the latest transactions on one of the Primary Network chains.

Transactions are filterable by addresses, txTypes, and timestamps. When querying for latest transactions without an address parameter, filtering by txTypes and timestamps is not supported. An address filter must be provided to utilize txTypes and timestamp filters.

For P-Chain, you can fetch all L1 validators related transactions like ConvertSubnetToL1Tx, IncreaseL1ValidatorBalanceTx etc. using the unique L1 validation ID. These transactions are further filterable by txTypes and timestamps as well.

Given that each transaction may return a large number of UTXO objects, bounded only by the maximum transaction size, the query may return less transactions than the provided page size. The result will contain less results than the page size if the number of utxos contained in the resulting transactions reach a performance threshold.

GET
/v1/networks/{network}/blockchains/{blockchainId}/transactions
x-glacier-api-key<token>

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://build.avax.network/console/utilities/data-api-keys.

In: header

Path Parameters

blockchainIdstring

A primary network blockchain id or alias.

Value in"11111111111111111111111111111111LpoYY" | "2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM" | "2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm" | "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5" | "yH8D7ThNJkxmtkuv2jgBa4P1Rn3Qpr4pPr7QYNfcdoS6k6HWp" | "p-chain" | "x-chain" | "c-chain"
networkstring

Either mainnet or testnet/fuji.

Value in"mainnet" | "fuji" | "testnet"

Query Parameters

addresses?string

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". Also accepts EVM formatted addresses starting with "0x" for C-Chain-related atomic transaction lookups.

l1ValidationId?string
txTypes?array<PrimaryNetworkTxType>

Query param for filtering items based on transaction types.

startTimestamp?integer

Query param for retrieving items after a specific timestamp.

Range0 <= value
endTimestamp?integer

Query param for retrieving items before a specific timestamp.

Range0 <= value
pageToken?string

A page token, received from a previous list call. Provide this to retrieve the subsequent page.

pageSize?integer

The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.

Default10
Range1 <= value <= 100
sortOrder?string

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.

Value in"asc" | "desc"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://data-api.avax.network/v1/networks/mainnet/blockchains/p-chain/transactions?addresses=avax1h2ccj9f5ay5acl6tyn9mwmw32p8wref8vl8ctg&txTypes=AddValidatorTx&startTimestamp=1689541049&endTimestamp=1689800249&pageSize=10&sortOrder=asc"
{
  "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",
          "utxoBytes": "string",
          "amount": "string",
          "assetId": "string",
          "blockNumber": "string",
          "blockTimestamp": 0,
          "consumingBlockNumber": "string",
          "consumingBlockTimestamp": 0,
          "platformLocktime": 0,
          "outputIndex": 0,
          "rewardType": "VALIDATOR",
          "stakeableLocktime": 0,
          "staked": true,
          "threshold": 0,
          "txHash": "string",
          "utxoEndTimestamp": 0,
          "utxoStartTimestamp": 0,
          "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",
          "utxoBytes": "string",
          "amount": "string",
          "assetId": "string",
          "blockNumber": "string",
          "blockTimestamp": 0,
          "consumingBlockNumber": "string",
          "consumingBlockTimestamp": 0,
          "platformLocktime": 0,
          "outputIndex": 0,
          "rewardType": "VALIDATOR",
          "stakeableLocktime": 0,
          "staked": true,
          "threshold": 0,
          "txHash": "string",
          "utxoEndTimestamp": 0,
          "utxoStartTimestamp": 0,
          "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": 0,
      "endTimestamp": 0,
      "delegationFeePercent": "string",
      "nodeId": "string",
      "subnetId": "string",
      "l1ValidatorManagerDetails": {
        "blockchainId": "string",
        "contractAddress": "string"
      },
      "l1ValidatorDetails": [
        {
          "validationId": "string",
          "validationIdHex": "string",
          "nodeId": "string",
          "subnetId": "string",
          "weight": 0,
          "remainingBalance": 0,
          "balanceChange": 0,
          "blsCredentials": {}
        }
      ],
      "estimatedReward": "string",
      "rewardTxHash": "string",
      "rewardAddresses": [
        "string"
      ],
      "memo": "string",
      "stakingTxHash": "string",
      "subnetOwnershipInfo": {
        "locktime": 0,
        "threshold": 1,
        "addresses": [
          "avax1qm2a25eytsrj235hxg6jc0mwk99tss64eqevsw"
        ]
      },
      "blsCredentials": {
        "publicKey": "string",
        "proofOfPossession": "string"
      },
      "blockchainInfo": {
        "chainName": "string",
        "vmId": "string",
        "genesisData": {
          "airdropAmount": null,
          "airdropHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "alloc": {
            "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd": {
              "balance": "0x52b7d2dcc80cd2e4000000",
              "code": "0x6080604052...",
              "storage": {
                "0x0": "0x1"
              }
            }
          },
          "baseFeePerGas": null,
          "blobGasUsed": null,
          "coinbase": "0x0000000000000000000000000000000000000000",
          "config": {
            "berlinBlock": 0,
            "byzantiumBlock": 0,
            "chainId": 43114,
            "constantinopleBlock": 0,
            "eip150Block": 0,
            "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0",
            "eip155Block": 0,
            "eip158Block": 0,
            "feeConfig": {
              "baseFeeChangeDenominator": 36,
              "blockGasCostStep": 200000,
              "gasLimit": 12000000,
              "maxBlockGasCost": 1000000,
              "minBaseFee": 25000000000,
              "minBlockGasCost": 0,
              "targetBlockRate": 2,
              "targetGas": 60000000
            },
            "homesteadBlock": 0,
            "istanbulBlock": 0,
            "londonBlock": 0,
            "muirGlacierBlock": 0,
            "petersburgBlock": 0,
            "subnetEVMTimestamp": 0,
            "allowFeeRecipients": false,
            "warpConfig": {
              "blockTimestamp": 1690000000,
              "quorumNumerator": 67,
              "requirePrimaryNetworkSigners": true
            },
            "txAllowListConfig": {
              "blockTimestamp": 0,
              "adminAddresses": [
                "0x1234..."
              ],
              "managerAddresses": [
                "0x5678..."
              ],
              "enabledAddresses": [
                "0x9abc..."
              ]
            },
            "contractDeployerAllowListConfig": {
              "blockTimestamp": 0,
              "adminAddresses": [
                "0x1234..."
              ],
              "managerAddresses": [
                "0x5678..."
              ],
              "enabledAddresses": [
                "0x9abc..."
              ]
            },
            "contractNativeMinterConfig": {
              "blockTimestamp": 0,
              "adminAddresses": [
                "0x1234..."
              ],
              "managerAddresses": [
                "0x5678..."
              ],
              "enabledAddresses": [
                "0x9abc..."
              ]
            },
            "feeManagerConfig": {
              "blockTimestamp": 0,
              "adminAddresses": [
                "0x1234..."
              ],
              "managerAddresses": [
                "0x5678..."
              ],
              "enabledAddresses": [
                "0x9abc..."
              ]
            },
            "rewardManagerConfig": {
              "blockTimestamp": 0,
              "adminAddresses": [
                "0x1234..."
              ],
              "managerAddresses": [
                "0x5678..."
              ],
              "enabledAddresses": [
                "0x9abc..."
              ]
            }
          },
          "difficulty": "0x0",
          "excessBlobGas": null,
          "extraData": "0x",
          "gasLimit": "0xb71b00",
          "gasUsed": "0x0",
          "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "nonce": "0x0",
          "number": "0x0",
          "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "timestamp": "0x64f0a000"
        }
      }
    }
  ],
  "chainInfo": {
    "chainName": "p-chain",
    "network": "mainnet"
  }
}
{
  "message": "string",
  "statusCode": 400,
  "error": "Bad Request"
}
{
  "message": "string",
  "statusCode": 401,
  "error": "Unauthorized"
}
{
  "message": "string",
  "statusCode": 403,
  "error": "Forbidden"
}
{
  "message": "string",
  "statusCode": 404,
  "error": "Not Found"
}
{
  "message": "string",
  "statusCode": 429,
  "error": "Too Many Requests"
}
{
  "message": "string",
  "statusCode": 500,
  "error": "Internal Server Error"
}
{
  "message": "string",
  "statusCode": 502,
  "error": "Bad Gateway"
}
{
  "message": "string",
  "statusCode": 503,
  "error": "Service Unavailable"
}

Is this guide helpful?