Gas Price from network for solana accounts
Get Gas Price info from network for solana accounts
Supported on: Ethereum Base Solana BNB Chain Polygon Linea Sonic Unichain Arbitrum Avalanche ZKsync Gnosis Optimism
Parameters
chain
* number pathRequest Body
Request body for getting gas prices for specific Solana accounts
accounts
* array List of account addresses
items
string 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
25
26
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/gas-price/v1.6/{chain}/accounts';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {},
paramsSerializer: {
indexes: null,
},
};
const body = {
accounts: ['HyZ2nPL19eGRN8fGYbG5sMaWQMJpoQCGgvqr2znYKyPm'],
};
try {
const response = await axios.post(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200
Solana gas price response with base fee and priority levels
baseFee
* string Base fee in lamports for Solana transactions
lowPriority
* string Low priority fee in lamports for economical transactions
highPriority
* string High priority fee in lamports for faster confirmation
instantPriority
* string Instant priority fee in lamports for immediate confirmation
JSON
Copy
1
2
3
4
5
6
7
{
"baseFee": "5000",
"lowPriority": "1000",
"highPriority": "10000",
"instantPriority": "50000"
}