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

# 用戶資料

> 獲取用戶資料和統計數據

<Callout type="success">
  還沒有帳號？[點擊這裡註冊 Polymarket](https://polymarket.com/?r=2026VIP) 並完成入金，才能用錢包私鑰為訂單籤名、實際成交。
</Callout>

<Warning>
  **法律合規提醒**：在使用 Polymarket 服務或 API 前，請確認您所在地區的法律規定。Polymarket 目前不支援比利時、法國、新加坡、泰國、中國大陸等地區，政策可能隨時變化。
</Warning>

用戶資料端點返回用戶的公開資料信息。

## 端點

```
GET https://gamma-api.polymarket.com/profiles/{address}
```

## 請求示例

```python theme={null}
import requests

address = "0x1234567890123456789012345678901234567890"
response = requests.get(
    f'https://gamma-api.polymarket.com/profiles/{address}'
)

profile = response.json()
print(f"用戶名: {profile['username']}")
print(f"交易數: {profile['trades_count']}")
print(f"盈虧: ${profile['pnl']}")
```

## 響應示例

```json theme={null}
{
  "address": "0x1234...",
  "username": "trader123",
  "avatar_url": "https://...",
  "bio": "專業交易者",
  "stats": {
    "trades_count": 150,
    "volume": "50000.00",
    "pnl": "5000.00",
    "win_rate": "0.65"
  },
  "positions": [
    {
      "market_id": "...",
      "question": "...",
      "size": "100.00"
    }
  ],
  "created_at": "2023-01-01T00:00:00Z"
}
```

## 用戶統計

| 欄位             | 類型     | 描述         |
| -------------- | ------ | ---------- |
| `trades_count` | number | 總交易數       |
| `volume`       | string | 總交易量（USDC） |
| `pnl`          | string | 盈虧（USDC）   |
| `win_rate`     | string | 勝率（0-1）    |

## 獲取用戶持倉

```python theme={null}
positions = profile['positions']
for position in positions:
    print(f"市場: {position['question']}")
    print(f"持倉: {position['size']} USDC")
```
