Gas Price from network
Get Gas Price info from network
Supported on: Ethereum Base Solana BNB Chain ZKsync Gnosis Optimism Polygon Linea Sonic Unichain Arbitrum Avalanche
Parameters
chain
* number pathRequest Body
This request doesn’t have any request body.
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/gas-price/v1.6/{chain}';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {};
try {
const response = await axios.get(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200
EIP-1559 gas price response with base fee and priority recommendations
baseFee
* string Current network base fee in wei
low
* any Low priority gas price recommendation
allOf[0]
Eip1559GasValueResponse object EIP-1559 gas value with max priority fee and max fee per gas
maxPriorityFeePerGas
* string Maximum priority fee per gas (tip to validators) in wei
maxFeePerGas
* string Maximum total fee per gas (base fee + priority fee) in wei
medium
* any Medium priority gas price recommendation
allOf[0]
Eip1559GasValueResponse object EIP-1559 gas value with max priority fee and max fee per gas
maxPriorityFeePerGas
* string Maximum priority fee per gas (tip to validators) in wei
maxFeePerGas
* string Maximum total fee per gas (base fee + priority fee) in wei
high
* any High priority gas price recommendation
allOf[0]
Eip1559GasValueResponse object EIP-1559 gas value with max priority fee and max fee per gas
maxPriorityFeePerGas
* string Maximum priority fee per gas (tip to validators) in wei
maxFeePerGas
* string Maximum total fee per gas (base fee + priority fee) in wei
instant
* any Instant priority gas price recommendation
allOf[0]
Eip1559GasValueResponse object EIP-1559 gas value with max priority fee and max fee per gas
maxPriorityFeePerGas
* string Maximum priority fee per gas (tip to validators) in wei
maxFeePerGas
* string Maximum total fee per gas (base fee + priority fee) in wei
JSON
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
"baseFee": "15000000000",
"low": {
"maxPriorityFeePerGas": "1000000000",
"maxFeePerGas": "20000000000"
},
"medium": {
"maxPriorityFeePerGas": "1000000000",
"maxFeePerGas": "20000000000"
},
"high": {
"maxPriorityFeePerGas": "1000000000",
"maxFeePerGas": "20000000000"
},
"instant": {
"maxPriorityFeePerGas": "1000000000",
"maxFeePerGas": "20000000000"
}
}