Get fees

Get the current fees (for EVM based chains: gasprice) for a certain chain.

Request Endpoint: reference

GET /api/transactions/{secretType}/fees
ParameterParam TypeDescriptionData TypeMandatory
secretTypeBodyThe blockchain to query the gas fee forString

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.