Get transactions
Retrieve on-chain committed transactions. The page size and start ledger version can be provided to get a specific sequence of transactions.
If the version has been pruned, then a 410 will be returned.
To retrieve a pending transaction, use /transactions/by_hash.
curl --request GET \
--url 'https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions'import requests
url = "https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"type": "pending_transaction",
"hash": "<string>",
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"<string>"
],
"arguments": [
"<unknown>"
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}
]{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}150 Compute Units.
Query Parameters
Ledger version to start list of transactions
If not provided, defaults to showing the latest transactions A string containing a 64-bit unsigned integer.
We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
"32425224034"
Max number of transactions to retrieve.
If not provided, defaults to default page size
Response
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
A transaction waiting in mempool
"pending_transaction"
A hex encoded 32 byte Aptos account address.
This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.
For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1.
"0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
A string containing a 64-bit unsigned integer.
We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
"32425224034"
A string containing a 64-bit unsigned integer.
We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
"32425224034"
A string containing a 64-bit unsigned integer.
We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
"32425224034"
A string containing a 64-bit unsigned integer.
We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
"32425224034"
Payload which runs a single entry function
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
A single Ed25519 signature
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
curl --request GET \
--url 'https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions'import requests
url = "https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions")
.asString();require 'uri'
require 'net/http'
url = URI("https://mainnet.aptos.validationcloud.io/v1/<YOUR_API_KEY_HERE>/v1/transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"type": "pending_transaction",
"hash": "<string>",
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "entry_function_payload",
"function": "0x1::aptos_coin::transfer",
"type_arguments": [
"<string>"
],
"arguments": [
"<unknown>"
]
},
"signature": {
"type": "ed25519_signature",
"public_key": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 ",
"signature": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1 "
}
}
]{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}{
"message": "<string>",
"error_code": "account_not_found",
"vm_error_code": 123
}