Skip to main content

Don't have an API key yet?

Sign-up to Moralis to get your free API key and start building today.

Get Your Free API Key
Version: 2.0

Get transactions

GEThttps://mainnet-aptos-api.moralis.io/transactions

Get latest transactions or from a specific account sequence number.

QUERY PARAMS
limitnumber

Max number of transactions to retrieve. If not provided, defaults to default page size

startstring

Account sequence number to start list of transactions. If not provided, defaults to showing the latest transactions

Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.AptosApi.transactions.getTransactions({
"limit": 5
});

console.log(response);
} catch (e) {
console.error(e);
}
Response Example
[
{
"hash": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
"sender": "0x88fbd33f54e1126269769780feb24480428179f552e2313fbe571b72e62a1ca1",
"sequence_number": "32425224034",
"max_gas_amount": "32425224034",
"gas_unit_price": "32425224034",
"expiration_timestamp_secs": "32425224034",
"payload": {
"type": "",
"function": "",
"type_arguments": [
""
],
"arguments": [
""
]
},
"signature": {
"type": "",
"signature": "",
"public_key": ""
}
}
]