Skip to content

Get Estimate Gas Fee

Endpoint

POST https://api.mycactus.dev/custody/v1/api/projects/{b_id}/estimate-miner-fee
POST https://api.mycactus.com/custody/v1/api/projects/{b_id}/estimate-miner-fee

Parameters

Path Parameters

FieldTypeDescription
b_id
Required
StringBusiness line ID

Body Parameters

FieldTypeDescription
from_wallet_code
Required
StringFrom Wallet ID
coin_name
Required
StringCoin name
Allowed Value: Refer to Coin Name (API) column in Supported Token
order_no
Required
StringOrder number (max 50 characters).
from_address
Optional
StringFrom address (for segregated address)
description
Optional
StringOrder description (max 50 characters).
fee_rate_level
Optional
StringFor BTC/ETH series
Allowed values: NORMAL, HIGHER, LOW, CUSTOM
fee_rate
Optional
Decimal

For BTC/ETH series, you need to provide the rate when using the CUSTOM for fee_rate_level.
The valid range can be obtained from the Get Current Fee Rate Range API.

For EIP1559 series, this parameter corresponds to the MaxFeeRate.

dest_address_item_list
Required
Object[]Destination address list

dest_address_item_list (object)

FieldTypeDescription
dest_addressStringDestination address
amountDecimalWithdrawal amount (the smallest unit)
is_all_withdrawalBooleanIf the order is full balance withdrawal
Allowed values: false, true
memo_type
Optional
StringMemo type
Allowed values: MEMO_NONE, MEMO_TEXT, MEMO_HASH
memo
Optional
StringMemo (for XLM series).
remark
Optional
StringRemark (max 50 characters).

Request Body Example

request.json
{
    "from_address": "mioNv7xz1es2waP77gLQYypXesBbkT8BeX",
    "from_wallet_code": "CHBTC4813422686",
    "coin_name": "BTC",
    "order_no": "EST00012345",
    "description": "test order create",
    "dest_address_item_list": [
        {
            "amount": 65000,
            "dest_address": "mioNv7xz1es2waP77gLQYypXesBbkT8BeX",
            "memo_type": "MEMO_TEXT",
            "memo": "text",
            "is_all_withdrawal": false,
            "remark": "test order item"
        }
    ]
}

Response

Response Body

FieldTypeDescription
codeIntegerResponse code (0 = success)
messageStringResponse message
successfulBooleanWhether the request was successful
dataIntegerEstimated gas fee

Response Example

{
    "code": 0,
    "message": "",
    "data": 8003000,
    "successful": true
}