cURL
curl --request GET \ --url https://api.example.com/v1/metadata/gas-policies \ --header 'X-Access-Key: <x-access-key>' \ --header 'X-Signature: <x-signature>' \ --header 'X-Timestamp: <x-timestamp>'
{ "gasPolicies": [ {} ] }
Get gas estimation and pricing policies
curl -X GET "https://api.axonvault.io/v1/metadata/gas-policies?chainId=eip155:1" \ -H "X-Access-Key: ak_live_abc123" \ -H "X-Signature: sha256=..." \ -H "X-Timestamp: 2024-01-15T10:30:00Z"
{ "gasPolicies": [ { "chainId": "eip155:1", "chainName": "Ethereum Mainnet", "eip1559": true, "currentGas": { "baseFee": "15000000000", "maxPriorityFee": { "slow": "1000000000", "standard": "1500000000", "fast": "2500000000" }, "maxFee": { "slow": "20000000000", "standard": "25000000000", "fast": "35000000000" } }, "gasLimits": { "transfer": "21000", "erc20Transfer": "65000", "erc20Approve": "46000", "swap": "200000" }, "updatedAt": "2024-01-15T10:30:00Z" }, { "chainId": "eip155:8453", "chainName": "Base", "eip1559": true, "currentGas": { "baseFee": "100000000", "maxPriorityFee": { "slow": "10000000", "standard": "50000000", "fast": "100000000" }, "maxFee": { "slow": "150000000", "standard": "200000000", "fast": "300000000" } }, "gasLimits": { "transfer": "21000", "erc20Transfer": "65000", "erc20Approve": "46000", "swap": "200000" }, "updatedAt": "2024-01-15T10:30:00Z" } ] }
slow
standard
fast
const gasPolicy = gasPolicies.find(p => p.chainId === 'eip155:1'); const txParams = { maxFeePerGas: gasPolicy.currentGas.maxFee.standard, maxPriorityFeePerGas: gasPolicy.currentGas.maxPriorityFee.standard, gasLimit: gasPolicy.gasLimits.transfer };