PaymentDigital Wallet

创建数币钱包

POST
/openapi/v1/digital-wallets

创建数币钱包。数币钱包是多资产容器,创建时不传币种和网络。

幂等键走 Idempotency-Key 请求头。创建成功返回 ACTIVE,若渠道仍在创建中返回 PENDING。

Authorization

bearerAuth
headerAuthorizationBearer <token>

通过 POST /oauth2/token 获取的 access_token。请求头格式为 Authorization: Bearer {accessToken}。

Header Parameters

X-Channel-Provider*string

渠道提供商标识,如 GLDB

Idempotency-Key*string

唯一请求标识,用于防止重复操作(建议使用 UUID)。有效期 24 小时。三个转账 POST、LEGEND 创建法币账户、创建数币钱包、生成充值地址,每次请求使用唯一的 Key。切勿为不同操作复用同一 Key。同一 Key 在有效期内再次提交会被拒绝。规则见 Payment 产品指南

Request Body

application/json
  1. body
providerCustomerId*string

渠道侧客户标识,由调用方传入。Legend 即 user_short_id。

Response Body

返回钱包详情。

application/json
  1. response
code?integer

业务状态码

message?string
traceId?string

请求追踪 ID。联系技术支持时请提供

data?

数币钱包详情。

Example Request
curl -X POST 'https://api.test.stabofx.com/openapi/v1/digital-wallets' \  -H 'X-Channel-Provider: GLDB' \  -H 'Idempotency-Key: 7f3c2c0e-5b1a-4f6e-9d2a-0a1b2c3d4e5f' \  -H 'Content-Type: application/json' \  -d '{  "providerCustomerId": "usr_user123"}'
Example Response
{  "code": 200,  "message": "操作成功",  "traceId": "t_xxxxxxxx",  "data": {    "walletId": "wlt_xyz789",    "providerCustomerId": "usr_user123",    "status": "ACTIVE",    "createdAt": "2026-11-06T10:30:00Z",    "addresses": []  }}