Estimate transaction fee
Estimate transaction fee
application/json
Request Body
operationType string required
Transaction type, required TRANSFER: Transfer CONTRACT_CALL: web3 contract call
from string required
from address
to string required
to address, required, if it is a contract call, fill in the contract address
assetId string
Asset id, required if the transaction type is TRANSFER.
chainSymbol string required
Chain Identification
amount string
Transfer amount, if the chain belongs to btc like, the amount must be provided.
inputData string
If the transaction type is CONTRACT_CALL contract call, inputData is required.
Responses
- 200
successful operation
application/json
Schema
Example (from schema)
Schema
code integer
msg string
data object
transactionFee object required
slowFee string required
Low transaction fees
averageFee string required
Mid-range transaction fee
fastFee string required
High-end transaction fees
feePerByte string
The cost per byte is returned by btc like chain.
gasFee object
Estimated cost details for ETH and EVM compatible chains
slow object
gasPrice string
gasPrice
gasLimit string
gasLimit
average object
gasPrice string
gasPrice
gasLimit string
gasLimit
fast object
gasPrice string
gasPrice
gasLimit string
gasLimit
success boolean
{
"code": 200,
"msg": "",
"data": {
"transactionFee": {
"slowFee": "200",
"averageFee": "1111",
"fastFee": "2222",
"feePerByte": "1111"
},
"gasFee": {
"slow": {
"gasPrice": "string",
"gasLimit": "string"
},
"average": {
"gasPrice": "string",
"gasLimit": "string"
},
"fast": {
"gasPrice": "string",
"gasLimit": "string"
}
}
},
"success": true
}
Loading...