Gas Price from network for solana accounts
Get Gas Price info from network for solana accounts
Supported on: Ethereum Base Solana BNB Chain Optimism Polygon Linea Sonic Unichain Robinhood Arbitrum Avalanche Cronos ZKsync Gnosis HyperEVM Arc Monad
Parameters
chainId
* number pathSolana chain ID (501)
Request Body
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/{chainId}/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
baseFee
* string lowPriority
* string highPriority
* string instantPriority
* string JSON
Copy
1
2
3
4
5
6
7
{
"baseFee": "string",
"lowPriority": "string",
"highPriority": "string",
"instantPriority": "string"
}