Skip to main content

Initiate Withdrawal

API Description

This interface is used to initiate withdrawals, supporting both on-chain transfers and internal transfers between CoinW users. The required parameters include amount, address, chain, and memo.

Note: Initiate withdrawl is only available via RESTful API.

Precautions

None

Authentication

This is a private interface and requires authentication. For details on using the RESTful API, refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.

Request Method

POST

Endpoint

/api/v1/private?command=doWithdraw

Frequency limit

The frequency limit for this interface is 3 requests/s per user ID. In addition to this per-interface limit, a global rate limit is also enforced.

For detailed information on Global rate limits and API Rate Limiting Policy, please refer to the "Frequency Limit" section at click here

Request Parameters

ParameterMandatoryTypeDescription
memoTrueStringMemo
typeFalseStringordinary_withdraw , internal_transfer Default: ordinary_withdraw
amountTrueStringWithdrawal quantity
currencyTrueStringCurrency
addressTrueStringWithdrawal address: When "type" is "ordinary_withdraw, provide the blockchain address. When "type" is internal_transfer, provide the user ID, email address or mobile phone number based on "innerToType".
chainTrueStringBlockchain name., e.g., ERC20,TRC20,BSC
innerToTypeTrueIntegerInternal withdrawal address type.When type is internal_transfer, 1. User ID, 2. Mobile phone number, 3. Email address are required.

Response Parameters

ParameterTypeDescription
depositNumberStringUnique ID

Request Example

The following Python code shows how to withdraw.

Note: For a complete code example, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.

api_url = "/api/v1/private?command=doWithdraw"
method = "post"
params = {
"memo" : "None" ,
"type" : "internal_transfer" ,
"amount" : "0.001" ,
"currency" : "BTC" ,
"address" : "3491077",
"chain" : "BTC" ,
"innerToType" : 1 ,
}
SpotRestfulPrivate(host, api_url, method, api_key, params, secret_key) # function SpotRestfulPrivate() is defined in section (Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface)

Note: For a complete Java code example, please refer to Introduction > Authentication & Code Snippet > Spot > RESTful Private Interface.

Response Example

The following is an example response returned by the above Python request:

{'code': '200', 'data': {'depositNumber': '23705'}, 'msg': 'SUCCESS'}