GetTransaction
Gets the details of a transaction.
Note
This action will return transaction details for all transactions that are confirmed on the blockchain, even if they have not reached finality.
Request Syntax
POST /get-transaction HTTP/1.1
Content-type: application/json
{
"network": "string
",
"transactionHash": "string
",
"transactionId": "string
"
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- network
-
The blockchain network where the transaction occurred.
Type: String
Valid Values:
ETHEREUM_MAINNET | ETHEREUM_SEPOLIA_TESTNET | BITCOIN_MAINNET | BITCOIN_TESTNET
Required: Yes
- transactionHash
-
The hash of a transaction. It is generated when a transaction is created.
Type: String
Pattern:
(0x[A-Fa-f0-9]{64}|[A-Fa-f0-9]{64})
Required: No
- transactionId
-
The identifier of a Bitcoin transaction. It is generated when a transaction is created.
Note
transactionId
is only supported on the Bitcoin networks.Type: String
Pattern:
(0x[A-Fa-f0-9]{64}|[A-Fa-f0-9]{64})
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"transaction": {
"blockHash": "string",
"blockNumber": "string",
"confirmationStatus": "string",
"contractAddress": "string",
"cumulativeGasUsed": "string",
"effectiveGasPrice": "string",
"executionStatus": "string",
"from": "string",
"gasUsed": "string",
"network": "string",
"numberOfTransactions": number,
"signatureR": "string",
"signatureS": "string",
"signatureV": number,
"to": "string",
"transactionFee": "string",
"transactionHash": "string",
"transactionId": "string",
"transactionIndex": number,
"transactionTimestamp": number
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- transaction
-
Contains the details of the transaction.
Type: Transaction object
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
The AWS account doesn’t have access to this resource.
HTTP Status Code: 403
- InternalServerException
-
The request processing has failed because of an internal error in the service.
HTTP Status Code: 500
- ResourceNotFoundException
-
The resource was not found.
HTTP Status Code: 404
- ServiceQuotaExceededException
-
The service quota has been exceeded for this resource.
HTTP Status Code: 402
- ThrottlingException
-
The request or operation couldn't be performed because a service is throttling requests. The most common source of throttling errors is when you create resources that exceed your service limit for this resource type. Request a limit increase or delete unused resources, if possible.
HTTP Status Code: 429
- ValidationException
-
The resource passed is invalid.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: