Blockchain fees

Get the recommended fee/gas price for a blockchain

1 credit per API call

Get the recommended fee/gas price for a blockchain.

Fee is in satoshis(meaning currency(BTC, DOGE,... / 100 000 000) per byte

This API is supported for the following blockchains:

  • Bitcoin
  • Dogecoin
  • Ethereum
  • Litecoin
SecurityX-API-Key
Request
path Parameters
chain
required
string

Chain

Enum: "ETH" "BTC" "LTC" "DOGE"
Example: BTC
Responses
200

OK

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/blockchain/fee/{chain}
Request samples
Response samples
application/json
{
  • "fast": 14766927339,
  • "medium": 13333333333,
  • "slow": 12953333333,
  • "baseFee": 12657357496,
  • "time": "2022-12-08T08:42:04.518Z",
  • "block": 16138867
}

Estimate the fee for a transaction on a blockchain

10 credits per API call

Estimate the current fee for different types of transactions.

This API is supported for the following blockchains:

  • Bitcoin
  • BNB Smart Chain
  • Celo
  • Dogecoin
  • Ethereum
  • Harmony
  • Klaytn
  • Litecoin
  • Polygon
  • XinFin
SecurityX-API-Key
Request
Request Body schema: application/json
required
One of:
chain
required
string

The blockchain to estimate the fee for

Enum: "CELO" "ETH" "BSC" "XDC" "ONE" "MATIC" "KLAY"
type
required
string

The type of the transaction

Enum: "DEPLOY_ERC20" "DEPLOY_NFT" "MINT_NFT" "BURN_NFT" "TRANSFER_NFT" "TRANSFER_ERC20" "DEPLOY_AUCTION" "DEPLOY_MARKETPLACE"
sender
string = 42 characters

(Only if type=TRANSFER_ERC20) The blockchain address of the sender address

recipient
string = 42 characters

(Only if type=TRANSFER_ERC20) The blockchain address of the recipient address

contractAddress
string = 42 characters

(Only if type=TRANSFER_ERC20) The blockchain address of the smart address of the fungible token

amount
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

(Only if type=TRANSFER_ERC20) The amount of the fungible token to be sent

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to perform the required operation due to a logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/blockchain/estimate
Request samples
application/json
{
  • "chain": "CELO",
  • "type": "DEPLOY_ERC20"
}
Response samples
application/json
{
  • "fast": "0.006584",
  • "medium": "0.004584",
  • "slow": "0.002584"
}

Estimate the fee for a BNB Smart Chain transaction

2 credits per API call

Get an estimated gas price and the number of gas units needed for a BNB Smart Chain transaction. The gas price is obtained from https://explorer.bitquery.io/bsc/gas.

NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.

SecurityX-API-Key
Request
Request Body schema: application/json
required
from
required
string = 42 characters

Sender address.

to
required
string = 42 characters

Blockchain address to send assets

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent in BSC.

data
string <= 50000 characters ^(0x|0h)?[0-9A-F]+$

Additional data that can be passed to a blockchain transaction as a data property; must be in the hexadecimal format

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/bsc/gas
Request samples
application/json
{
  • "from": "0xfb99f8ae9b70a0c8cd96ae665bbaf85a7e01a2ef",
  • "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000"
}
Response samples
application/json
{
  • "gasPrice": "10000000000",
  • "gasLimit": "21000"
}

Estimate the fee for a Celo transaction

2 credits per API call

Get an estimated gas price and the number of gas units needed for a Celo transaction. The gas price is obtained from https://explorer.bitquery.io/celo_rc1/gas.

NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.

SecurityX-API-Key
Request
Request Body schema: application/json
required
from
required
string = 42 characters

Sender address.

to
required
string = 42 characters

Blockchain address to send assets

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent.

data
string <= 50000 characters ^(0x|0h)?[0-9A-F]+$

Additional data that can be passed to a blockchain transaction as a data property; must be in the hexadecimal format

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/celo/gas
Request samples
application/json
{
  • "from": "0xfb99f8ae9b70a0c8cd96ae665bbaf85a7e01a2ef",
  • "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000"
}
Response samples
application/json
{
  • "gasPrice": "10000000000",
  • "gasLimit": "21000"
}

Estimate the fee for an Elrond transaction

2 credits per API call

Get an estimated gas price and the number of gas units needed for an Elrond transaction. The gas price is obtained from https://gateway.elrond.com/network/config. The gas limit is obtains from https://gateway.elrond.com/transaction/cost.

SecurityX-API-Key
Request
Request Body schema: application/json
required
sender
required
string = 62 characters

Account address of the sender

receiver
required
string = 62 characters

Account address of the receiver or smart contract

value
required
string

Value to be sent.

data
string

Additional data that can be passed to a blockchain transaction as a data property; must be in the hexadecimal format

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/egld/gas
Request samples
application/json
{
  • "sender": "erd17k95m339aqzxzyvjjjfa3lka0yyeqgcsda50tw5z9g73ycfe2caq9e6jq7",
  • "receiver": "erd17k95m339aqzxzyvjjjfa3lka0yyeqgcsda50tw5z9g73ycfe2caq9e6jq6",
  • "value": "0.1"
}
Response samples
application/json
{
  • "gasPrice": 1000000000,
  • "gasLimit": 77000
}

Estimate the fee for an Ethereum transaction

10 credits per API call

Get an estimated gas price and the number of gas units needed for an Ethereum transaction. The gas price is obtained from multiple sources and calculated based on the latest N blocks and the current mempool state.

The fast gas price is used by default.

NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.

SecurityX-API-Key
Request
header Parameters
x-testnet-type
string
Default: ethereum-sepolia

Type of Ethereum testnet. Defaults to ethereum-sepolia.

Value: "ethereum-sepolia"
Request Body schema: application/json
required
from
required
string = 42 characters

Sender address.

to
required
string = 42 characters

Blockchain address to send assets

contractAddress
string = 42 characters

Contract address of ERC20 token, if transaction is ERC20 token

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent in Ether or ERC20.

data
string <= 50000 characters ^(0x|0h)?[0-9A-F]+$

Additional data that can be passed to a blockchain transaction as a data property; must be in the hexadecimal format

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/ethereum/gas
Request samples
application/json
{
  • "from": "0xfb99f8ae9b70a0c8cd96ae665bbaf85a7e01a2ef",
  • "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000"
}
Response samples
application/json
{
  • "gasLimit": "40000",
  • "gasPrice": "20000000000",
  • "estimations": {
    }
}

Estimate the fee for multiple Ethereum transactions

10 credits per API call + 10 credits per each gas estimation

Get an estimated gas price and the number of gas units needed for multiple Ethereum transactions. The gas price is obtained from multiple sources and calculated based on the latest N blocks and the current mempool state.

The estimations are returned in the same order as the transactions were submitted in the request.

The fast gas price is used by default.

NOTE: The estimated gas price is returned in wei. However, when making a transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.

SecurityX-API-Key
Request
header Parameters
x-testnet-type
string
Default: ethereum-sepolia

Type of Ethereum testnet. Defaults to ethereum-sepolia.

Value: "ethereum-sepolia"
Request Body schema: application/json
required
required
Array of objects (EthEstimateGas)
Array
from
required
string = 42 characters

Sender address.

to
required
string = 42 characters

Blockchain address to send assets

contractAddress
string = 42 characters

Contract address of ERC20 token, if transaction is ERC20 token

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent in Ether or ERC20.

data
string <= 50000 characters ^(0x|0h)?[0-9A-F]+$

Additional data that can be passed to a blockchain transaction as a data property; must be in the hexadecimal format

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/ethereum/gas/batch
Request samples
application/json
{
  • "estimations": [
    ]
}
Response samples
application/json
{
  • "error": true,
  • "result": [
    ]
}

Estimate Harmony transaction fees

2 credits per API call

Get an estimated gas price and the number of gas units needed for a Harmony transaction.

NOTE: The estimated gas price is returned in wei. However, when making the transaction itself, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.

SecurityX-API-Key
Request
Request Body schema: application/json
required
from
required
string = 66 characters

Sender address.

to
required
string = 42 characters

Blockchain address to send assets

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent in One.

data
string <= 50000 characters

Additional data that can be passed to a blockchain transaction as a data property; must be in the hexadecimal format

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/one/gas
Request samples
application/json
{
  • "from": "0xfb99f8ae9b70a0c8cd96ae665bbaf85a7e01a2ef",
  • "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000"
}
Response samples
application/json
{
  • "gasLimit": "21000",
  • "gasPrice": "10000000000"
}

Estimate the fee for a Klaytn transaction

2 credits per API call

Get an estimated gas price and the number of gas units needed for a Klaytn transaction. The gas price is obtained from https://explorer.bitquery.io/klaytn/gas.

NOTE: The estimated gas price is returned in peb. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gpeb. Make sure to convert the estimated gas price from peb to Gpeb before submitting your transaction.

SecurityX-API-Key
Request
Request Body schema: application/json
required
from
required
string = 42 characters

Sender address.

to
required
string = 42 characters

Blockchain address to send assets

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent in KLAY.

data
string <= 50000 characters ^(0x|0h)?[0-9A-F]+$

Additional data that can be passed to a blockchain transaction as a data property; must be in the hexadecimal format

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/klaytn/gas
Request samples
application/json
{
  • "from": "0xfb99f8ae9b70a0c8cd96ae665bbaf85a7e01a2ef",
  • "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000"
}
Response samples
application/json
{
  • "gasPrice": "20",
  • "gasLimit": "40000"
}

Estimate the fee for a KuCoin Community Chain transaction

2 credits per API call

Get an estimated gas price and the number of gas units needed for a KuCoin Community Chain transaction.

NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.

SecurityX-API-Key
Request
Request Body schema: application/json
required
from
required
string = 42 characters

Sender address.

to
required
string = 42 characters

Blockchain address to send assets

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent in KCS.

data
string <= 50000 characters ^(0x|0h)?[0-9A-F]+$

Additional data that can be passed to a blockchain transaction as a data property; must be in the hexadecimal format

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/kcs/gas
Request samples
application/json
{
  • "from": "0xfb99f8ae9b70a0c8cd96ae665bbaf85a7e01a2ef",
  • "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000"
}
Response samples
application/json
{
  • "gasPrice": "10000000000",
  • "gasLimit": "21000"
}

Estimate the fee for a Polygon transaction

2 credits per API call

Get an estimated gas price and the number of gas units needed for a Polygon transaction. The gas price is obtained from https://gasstation-mainnet.matic.network/.

NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.

SecurityX-API-Key
Request
Request Body schema: application/json
required
from
required
string = 42 characters

Sender address.

to
required
string = 42 characters

Blockchain address to send assets

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent in MATIC.

data
string <= 50000 characters ^(0x|0h)?[0-9A-F]+$

Additional data that can be passed to a blockchain transaction as a data property; must be in the hexadecimal format

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/polygon/gas
Request samples
application/json
{
  • "from": "0xfb99f8ae9b70a0c8cd96ae665bbaf85a7e01a2ef",
  • "to": "0x687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000"
}
Response samples
application/json
{
  • "gasPrice": "10000000000",
  • "gasLimit": "21000"
}

Estimate the fee for a XinFin transaction

2 credits per API call

Get an estimated gas price and the number of gas units needed for a XinFin transaction. The gas price is obtained from https://rpc.xinfin.network/gasPrice.

NOTE: The estimated gas price is returned in wei. However, when making the transaction itself and providing the custom fee, you have to provide the gas price in Gwei. Make sure to convert the estimated gas price from wei to Gwei before submitting your transaction.

SecurityX-API-Key
Request
Request Body schema: application/json
required
from
required
string [ 42 .. 43 ] characters

Sender address.

to
required
string [ 42 .. 43 ] characters

Blockchain address to send assets

amount
required
string^[+]?((\d+(\.\d*)?)|(\.\d+))$

Amount to be sent in XDC.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/xdc/gas
Request samples
application/json
{
  • "from": "xdcfb99f8ae9b70a0c8cd96ae665bbaf85a7e01a2ef",
  • "to": "xdc687422eEA2cB73B5d3e242bA5456b782919AFc85",
  • "amount": "100000"
}
Response samples
application/json
{
  • "gasPrice": "10000000000",
  • "gasLimit": "21000"
}

Estimate the gas needed for a VeChain transaction

5 credits per API call

Get an estimated amount of gas needed for a VeChain transaction.

SecurityX-API-Key
Request
Request Body schema: application/json
required
from
required
string <= 50 characters

Sender account address.

to
required
string <= 50 characters

Recipient account address.

value
required
string <= 50 characters

Amount to send.

data
string <= 10000 characters

Data to send to Smart Contract

nonce
number

Nonce

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/vet/transaction/gas
Request samples
application/json
{
  • "from": "0x5034aa590125b64023a0262112b98d72e3c8e40e",
  • "to": "0x5034aa590125b64023a0262112b98d72e3c8e40e",
  • "value": "140"
}
Response samples
application/json
21000