欢迎使用全新的 WEEX API 文档。需要查看旧版本?切换到旧版文档
WEEX

划转

  • POST /api/v3/wallet/transfer/self

权重(IP): 20

在当前认证用户自己的资金、现货 Pro 和合约账户之间划转资产,需要 TRANSFER 划转权限。用户身份来自 API Key 鉴权结果,不接受请求参数指定用户 UID。

请求体(Request Body)

参数名参数类型是否必须描述
amountString是划转数量,必须大于 0,精度不得超过币种配置精度,超出返回 -1160。
fromAccountTypeString是划出账户类型:UNIMARGIN(合约账户)、SPOT(现货账户)、FUNDING(资金账户)。
toAccountTypeString是划入账户类型,枚举同 fromAccountType,且不能与划出账户相同。
coinString是币种编码。
bizIdString否业务 ID。传入时业务部分必须为 16-32 位 ASCII 字母或数字,可带 openapi_ 前缀;无前缀时服务端自动补齐后存储和回传。不传时生成 openapi_ 加 32 位随机串。
paramsString否业务备注或扩展说明。

请求示例

JSONCode
{ "amount": "20", "fromAccountType": "SPOT", "toAccountType": "FUNDING", "coin": "USDT", "params": "test", "bizId": "openapi_NzqVr0AGj1uDYUp20260903102825" }

返回参数

字段名类型字段说明
codeInteger业务码,0 表示成功。
msgString响应信息。
data.bizIdString实际使用的业务 ID。
data.resultBooleantrue 表示划转成功。
data.transferIdString划转 ID,有可能为 Null。

返回示例

JSONCode
{ "code": 0, "msg": "success", "data": { "bizId": "openapi_NzqVr0AGj1uDYUp20260903102825", "result": true, "transferId": null } }

错误码

错误码Message
-2413Insufficient balance.
-2442Asset transfer failed.
-2443Asset transfer is processing. Retry with the same bizId.
-2444fromAccountType and toAccountType cannot be the same.
-2445bizId already exists. Reuse it only with the original request parameters.
-2446Legacy spot account is not supported. Use SPOT instead.
-2447bizId must contain 16 to 32 ASCII letters or digits, optionally prefixed with 'openapi_'.
-2452Exceeds the maximum amount available for transfer.
-1160Decimal precision error.

其他钱包与前置校验错误见钱包接口错误码。