估算交易所需费用
估算交易所需费用
application/json
Request Body
operationType string required
交易类型 必填 TRANSFER :转账 CONTRACT_CALL :web3合约调用
from string required
from地址
to string required
to地址 必填 如果是合约调用,则填写合约地址
assetId string
资产id,如果交易类型为TRANSFER必填。
chainSymbol string required
链标识
amount string
转账金额 如果所属链为btc like,则amount必传。
inputData string
如果交易类型为CONTRACT_CALL合约调用时,inputData必填
Responses
- 200
successful operation
application/json
Schema
Example (from schema)
Schema
code integer
msg string
data object
transactionFee object required
slowFee string required
低档交易费
averageFee string required
中档交易费
fastFee string required
高档交易费
feePerByte string
每个字节的费用 btc like链会返回
gasFee object
对于ETH及EVM兼容链,预估费用详情
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...