avm.getTxStatus - AVAX

Example code for the avm.getTxStatus JSON-RPC method. Complete guide on how to use avm.getTxStatus JSON-RPC in GetBlock Web3 documentation.

Returns the status of an X-Chain transaction: Accepted (final), Processing, Rejected, or Unknown. X-Chain uses Avalanche DAG-based consensus, so finality is sub-second.

Parameters

Parameter
Type
Required
Description

txID

string

Yes

Transaction ID (CB58)

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/ext/bc/X' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "avm.getTxStatus",
    "params": {
        "txID": "2kxwWpHvZPhMsJcSTmM7a3Da7sExB8pPyF7t4cr2NSwnYqNHni"
    },
    "id": "getblock.io"
}'

Response Example

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "status": "Accepted"
    }
}

Response Parameters

Field
Type
Description

result.status

string

Status — Accepted, Processing, Rejected, or Unknown

Use Cases

  • Polling for transaction finality on the X-Chain

  • Wallet flows that wait for X-Chain transfer confirmation

  • Cross-chain transfer monitoring

Error Handling

Status Code
Error Message
Cause

404

Not found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?