Get fees
Get the current fees (for EVM based chains: gasprice) for a certain chain.
Request Endpoint: reference
GET /api/transactions/{secretType}/fees
Parameter | Param Type | Description | Data Type | Mandatory |
---|---|---|---|---|
secretType | Body | The blockchain to query the gas fee for | String | ✅ |
Example Request:
GET https://api-wallet.venly.io/api/transactions/ETHEREUM/fees
Response Body:
{
"success": true,
"result": [
{
"gasPrice": 21450000000,
"defaultPrice": false
},
{
"gasPrice": 21450000000,
"defaultPrice": true
},
{
"gasPrice": 25300000000,
"defaultPrice": false
},
{
"gasPrice": 29700000000,
"defaultPrice": false
}
]
}
The
gasPrice
is return in Wei. One ETH equals 10e18 wei.The gas fee is calculated by gas limit x gas price per unit. So, if the gas limit is 20,000 and the gas price per unit is 200, then the calculation would be 20,000 x 200 = 4,000,000 gwei. We mentioned above that one gwei is equal to 0.000000001 ETH. So, this transaction cost would be approximately 0.004 ETH.
Updated 7 months ago