Get the status of a transaction sent to the network.
Supported on Avalanche C-Chain (mainnet) only.
Parameters
txID
- string - The transaction ID. It should be in cb58 format.
Returns
status
- string - status is one of the following:
Accepted
- string - The transaction is (or will be) accepted by every node.
Processing
- string - The transaction is being voted on by this node.
Rejected
- string - The transaction will never be accepted by any node in the network.
Unknown
- string - The transaction hasn’t been seen by this node.blockHeight
- string - Returned when status is accepted.
API Endpoint
The format of an Avalanche C-Chain API endpoint is
https://open-platform.nodereal.io/{{apiKey}}/avalanche-c/ext/bc/C/rpc
- for RPC API
https://open-platform.nodereal.io/{{apiKey}}/avalanche-c/ext/bc/C/avax
- for AVAX API
Here is an example:
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/avalanche-c/ext/bc/C/rpc
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/avalanche-c/ext/bc/C/avax
Example
Request
curl --location --request POST https://open-platform.nodereal.io/{{apiKey}}/avalanche-c/ext/bc/C/avax \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"id": 1,
"method": "avax.getAtomicTxStatus",
"params": {
"txID": "2QouvFWUbjuySRxeX5xMbNCuAaKWfbk5FeEa2JmoF85RKLk2dD"
}
}'
Result
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"status": "Accepted",
"blockHeight": "1"
}
}