Skip to content

Create Withdrawal Order (v1)

A newer v2 endpoint is available and recommended. It processes orders asynchronously to avoid request timeouts that may occur with v1.

If API Order Web-Based Approval is enabled by the administrator for the business line, any withdrawal amount that exceeds the configured Single Order Review Threshold (USD) will require review. The order will only be processed after all required approval stages are completed. Users with checker permission can approve the order either through the web portal or via the Review Order API.

Endpoint

POST https://api.mycactus.dev/custody/v1/api/projects/{b_id}/order/create
POST https://api.mycactus.com/custody/v1/api/projects/{b_id}/order/create

Parameters

Path Parameters

Field Type Description

b_id
Required

String Business 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). To ensure idempotency.
from_address StringFrom address of the withdrawal transaction.
Required when: (1) withdrawing from a DeFi wallet, or (2) performing an address-based withdrawal from a segregated wallet.
Optional when performing wallet-level withdrawals (Only applicable for segregate wallets).

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.

contract_transfer
Optional
BooleanEnable smart contract batch transfer
Allowed values: false, true
contract_aggre
Optional
BooleanEnable smart contract batch aggregation
Allowed values: false, true
resource_rental
Optional
BooleanAttempts to rent energy on the TRON network. If energy rental fails, the system will automatically use TRX to complete the transaction
force_rental
Optional
BooleanAttempts to rent energy on the TRON network; if unsuccessful, the order fails.
dest_address_item_list
Required
Object[]Destination address list details

dest_address_item_list (object)

FieldTypeDescription
dest_address
Required
StringDestination address
amount
Required
DecimalWithdrawal amount. Enter a whole number with no decimal places (e.g. 49500000, not 49500000.00000000). The value is in the coin's smallest unit; refer to the Decimals column in the Supported Token list, or the decimals field from the Get Supported Asset Information endpoint.

Not required if is_all_withdrawal is set to true.
is_all_withdrawal
Required
BooleanIf the order is full balance withdrawal.
Allowed values: false, true
memo_type
Optional
StringMemo type. Applicable to Stellar only. Allowed values: MEMO_NONE, MEMO_TEXT, MEMO_HASH
memo
Optional
StringMemo or destination tag. An extra identifier attached to a transaction.
The following chains support memo: STELLAR, RIPPLE, TON, VAULTA, COSMOS, KAVA, MANTRA, BABYLON, DYDX.
remark
Optional
StringRemark (max 50 characters).

Login cactus and click here to see the details about smart contract transfer and smart contract aggregation.

Funds may be frozen for other reasons, such as KYT or compliance requirements. Therefore, it is important to always use the available balance (available_amount) when initiating withdrawals, rather than the total balance.

Request Body Example

{
    "from_address": "mioNv7xz1es2waP77gLQYypXesBbkT8BeX",
    "from_wallet_code": "CHBTC4813422686",
    "coin_name": "ETH",
    "order_no": "TX00012345",
    "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

Field Type Description
code Integer Response code (0 = success)
message String Response message
successful Boolean Whether the request was successful
data Object Shows withdrawal order number (see data object details below)

data (object)

Field Type Description
OrderNo String Order ID

Response Example

{
    "code": 0,
    "message": "",
    "successful": true,
    "data": {
        "OrderNo": "555222000000001"
    }
}