Skip to main content
Version: 2.2

Estimate gas price

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

Estimate gas price based on current network load.

Responses
API KEY
import Moralis from 'moralis';

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

const response = await Moralis.AptosApi.transactions.estimateGasPrice({
"network": "mainnet"
});

console.log(response);
} catch (e) {
console.error(e);
}
Response Example
{
"deprioritized_gas_estimate": "",
"gas_estimate": "",
"prioritized_gas_estimate": ""
}