> ## Documentation Index
> Fetch the complete documentation index at: https://developers.uqpay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 发起提现

> 估算费用、创建加密货币提现，并跟踪至完成。

[Stablecoin Account API 发布方声明](/zh/stablecoin-account/v1.6/guide/stablecoin-account-api-publisher-disclaimer)

提现是出金（off-ramp）动作：把加密货币从你的余额发送到外部地址。目标地址应先登记到[地址簿](/zh/stablecoin-account/v1.6/guide/address-book)中 —— 条目在创建时会进行风险评估，经特定通道的目标地址还需要先补齐 Travel Rule 数据，提现才会被受理。

<Info>
  **前置条件**

  * 通过 `x-auth-token` 请求头发送的 API token
  * 提现币种有足够的 `available_balance`
  * 目标地址已登记到[地址簿](/zh/stablecoin-account/v1.6/guide/address-book)，需要时已带上 Travel Rule `meta_data`
</Info>

<h2 id="step-1-estimate-the-network-fee">
  步骤 1：估算网络费
</h2>

网络费随链上拥堵浮动，请在用户确认前获取最新估算 —— 完整响应参见[支持的资产与网络](/zh/stablecoin-account/v1.6/guide/supported-assets-and-networks#estimate-the-network-fee)：

```bash theme={null}
curl "https://api-sandbox.uqpaytech.com/api/v1/ramp/config/network-fee?asset=USDC&network=ETH&amount=100" \
  -H "x-auth-token: YOUR_API_TOKEN"
```

如果 `network_status` 为 `MAINTENANCE`，请拦截流程；并对照该网络的 `min_withdraw_amount` 和 `withdraw_precision` 检查金额。

<h2 id="step-2-create-the-withdrawal">
  步骤 2：创建提现
</h2>

调用 [Create Withdraw](/zh/stablecoin-account/v1.6/api-reference/create-withdraw)，并携带幂等键：

```bash theme={null}
curl -X POST https://api-sandbox.uqpaytech.com/api/v1/ramp/withdraw \
  -H "x-auth-token: YOUR_API_TOKEN" \
  -H "x-idempotency-key: $(uuidgen | tr '[:upper:]' '[:lower:]')" \
  -H "Content-Type: application/json" \
  -d '{
    "currency": "USDC",
    "network": "ETH",
    "amount": "100",
    "withdraw_address": "0x0993446fBB19f4e828768515eF7A9408B5F1A000",
    "memo": "test",
    "reason": "test"
  }'
```

| 字段                 |  必填 | 描述                   |
| ------------------ | :-: | -------------------- |
| `currency`         |  是  | 提现币种，例如 `USDC`       |
| `network`          |  是  | 网络代码，例如 `ETH`        |
| `amount`           |  是  | 提现金额，十进制字符串          |
| `withdraw_address` |  是  | 目标地址                 |
| `memo`             |  否  | 地址 Memo/Tag，用于需要它的网络 |
| `reason`           |  是  | 提现备注                 |

**响应：**

```json theme={null}
{
  "code": 200,
  "message": "Success",
  "data": {
    "order_id": "f75fdee5-0cc1-4b52-818e-497dd376cced",
    "short_order_id": "WD260124-N1PAAIXX",
    "order_status": "Pending",
    "order_type": "Withdraw",
    "currency": "USDC",
    "network": "ETH",
    "amount": "100",
    "withdraw_address": "0x0993446fBB19f4e828768515eF7A9408B5F1A000",
    "network_fee": "0.66",
    "processing_fee": "0",
    "actual_amount": "99.34",
    "reason": "test",
    "create_time": "2026-01-24 11:41:37 +08:00"
  }
}
```

`actual_amount` 是扣除费用后实际到达目标地址的金额。实际收取的费用可能与步骤 1 的估算略有出入。

<Warning>
  当目标地址路由到 Binance 通道、且地址簿条目没有 Travel Rule 数据时，请求会被拒绝并返回 `missing travel_rule_data for binance withdraw`。请先通过 [Update Address Book](/zh/stablecoin-account/v1.6/api-reference/update-address-book) 补录 `meta_data` —— 参见 [Travel Rule 合规](/zh/stablecoin-account/v1.6/guide/travel-rule-compliance)。
</Warning>

<h2 id="step-3-track-the-withdrawal">
  步骤 3：跟踪提现
</h2>

状态更新通过[提现 webhook](/zh/stablecoin-account/v1.6/webhooks/withdrawal) 推送：

| 事件类型                    | 含义       |
| ----------------------- | -------- |
| `ramp.withdraw.pending` | 提现处理中    |
| `ramp.withdraw.success` | 提现已在链上完成 |
| `ramp.withdraw.failed`  | 提现失败     |

也可以用长或短订单 ID 轮询 [Retrieve Withdraw](/zh/stablecoin-account/v1.6/api-reference/retrieve-withdraw)，或用 [List Withdraws](/zh/stablecoin-account/v1.6/api-reference/list-withdraws) 批量对账。已完成的订单包含链上交易哈希（`txid`）和 `completed_time`。

```bash theme={null}
curl "https://api-sandbox.uqpaytech.com/api/v1/ramp/withdraw/f75fdee5-0cc1-4b52-818e-497dd376cced" \
  -H "x-auth-token: YOUR_API_TOKEN"
```

<h2 id="related">
  相关页面
</h2>

* [Create Withdraw API](/zh/stablecoin-account/v1.6/api-reference/create-withdraw)
* [提现 webhook](/zh/stablecoin-account/v1.6/webhooks/withdrawal)
* [地址簿](/zh/stablecoin-account/v1.6/guide/address-book)
* [Travel Rule 合规](/zh/stablecoin-account/v1.6/guide/travel-rule-compliance)
* [支持的资产与网络](/zh/stablecoin-account/v1.6/guide/supported-assets-and-networks) —— 费用估算与限额
