Skip to main content
Version: 2.0

Submit transaction

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

Submit a transaction to the Aptos Network.

BODY PARAM
senderstring
A hex encoded 32 byte Aptos account address.
sequence_numberstring
A string containing a 64-bit unsigned integer.
max_gas_amountstring
A string containing a 64-bit unsigned integer.
gas_unit_pricestring
A string containing a 64-bit unsigned integer.
expiration_timestamp_secsstring
A string containing a 64-bit unsigned integer returned in milliseconds.
payloadjson
An enum of the possible transaction payloads
signaturejson
Responses
API KEY
import Moralis from 'moralis';

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

const response = await Moralis.AptosApi.transactions.submitTransaction({});

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": "",
"signature": ""
}