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

# 代表使用者存取

> Broker 私有介面中 X-User-Wallet-Address 的使用範圍與錢包歸屬要求。

Broker 代旗下使用者存取私有介面時，使用 Broker API Key 證明 Broker 身份，並通過請求頭 `X-User-Wallet-Address` 指定本次請求對應的終端使用者錢包。平台會校驗該錢包與當前 Broker 的歸屬關係。無需提供終端使用者的個人 API Key 或使用者 UID。

## 何時傳遞錢包地址

| 介面範圍 | `X-User-Wallet-Address` |
| - | - |
| DexBuilder 平台的資產配置查詢 | 不需要 |
| DexBuilder 平台的使用者、充值與提現介面 | 必需 |
| 事件市場的 Broker 私有 REST 介面 | 必需 |
| 事件合約的 Broker 私有 REST 介面 | 必需 |
| 事件市場和事件合約的公開行情介面 | 不需要 |

事件市場和事件合約的公開行情繼續使用各自的公開路徑；訂單、持倉、賬戶等私有請求使用 Broker 路徑。路徑前綴見[API 使用說明](https://dexbuilder.mintlify.site/zh-TW/api-reference/common/overview.md)。錢包地址未綁定到當前 Broker，或 Key 不具備相應權限時，請求會被拒絕。

## DexBuilder 平台介面清單

以下路徑均以 `/api/v4/dexbuilder` 為前綴。所有介面都需要 Broker API Key 和簽名；表中的“錢包地址”表示是否還需傳遞 `X-User-Wallet-Address`。

| 類別 | 錢包地址 | 介面路徑 |
| - | - | - |
| 資產配置 | 不需要 | `GET /assets`、`GET /networks`、`GET /dw_status`、`GET /fee`、`GET /withdraw_limit` |
| 使用者 | 必需 | `GET /user/info`、`GET /wallet/list`、`GET /user/balance`、`GET /fund_stats` |
| 充值 | 必需 | `POST /deposit/fee`、`POST /deposit/sign_data`、`GET /deposit/status`、`GET /deposit/history` |
| 提現 | 必需 | `POST /withdraw/sign_data`、`POST /withdraw/submit`、`POST /withdraw/ata/check-and-build`、`GET /withdraw/status`、`GET /withdraw/history` |

資產配置介面查詢當前 Broker 的配置，不指定終端使用者；使用者、充值和提現介面需要錢包地址。部分介面還有額外請求頭或冪等鍵要求，詳見對應介面頁。

## 發送請求

例如查詢使用者資訊時，請在簽名請求中附加錢包地址：

```http theme={null}
GET /api/v4/dexbuilder/user/info HTTP/1.1
Host: api.dexbuilder.com
KEY: <BROKER_API_KEY>
Timestamp: <UNIX_SECONDS>
SIGN: <SIGN>
X-User-Wallet-Address: <USER_WALLET_ADDRESS>
```

`X-User-Wallet-Address` 不參與 REST 簽名原文；簽名步驟見[Broker API Key 與簽名](https://dexbuilder.mintlify.site/zh-TW/api-reference/common/broker-authentication.md)。WebSocket 私有頻道的使用者身份和認證方式以對應產品的 WebSocket 文檔為準。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.