用户信息 (Profile)
获取当前登录用户的账户详情。
接口信息
- Method:
GET - Path:
/api/v1/account/profile - Authentication: 需要身份验证
响应示例
{
"address": "0x742d35cc6634c0532925a3b844bc9e7595f0beb",
"referral_code": "ZTDX1234",
"referrer_address": "0x123...",
"created_at": "2024-01-01T00:00:00Z"
}
响应字段说明
| 字段 | 类型 | 描述 |
|---|---|---|
| address | string | 用户 Ethereum 地址(小写) |
| referral_code | string | null | 用户的推荐码(如已创建) |
| referrer_address | string | null | 推荐人地址(如已绑定) |
| created_at | string | 账户创建时间(ISO 8601 格式) |
说明
- 如果用户首次访问,系统会自动创建用户记录
referral_code需要用户主动创建才会有值referrer_address在用户绑定推荐码后会填充
获取用户订单历史
接口信息
- Method:
GET - Path:
/api/v1/account/orders - Authentication: 需要身份验证
查询参数
| 参数 | 类型 | 必须 | 描述 |
|---|---|---|---|
| symbol | string | 否 | 交易对筛选 |
| status | string | 否 | 状态筛选(open/filled/cancelled) |
| limit | number | 否 | 返回数量(默认 50,最大 200) |
| offset | number | 否 | 偏移量(默认 0) |
响应示例
{
"orders": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"symbol": "BTCUSDT",
"side": "buy",
"order_type": "limit",
"price": "65000.00",
"amount": "0.1",
"filled_amount": "0.1",
"leverage": 10,
"status": "filled",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:05:00Z"
}
],
"total": 150
}