Skip to main content
還沒有帳號?點擊這裡註冊 Polymarket 並完成入金,才能用錢包私鑰為訂單籤名、實際成交。
法律合規提醒:在使用 Polymarket 服務或 API 前,請確認您所在地區的法律規定。Polymarket 目前不支援比利時、法國、新加坡、泰國、中國大陸等地區,政策可能隨時變化。
用戶資料端點返回用戶的公開資料信息。

端點

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

請求示例

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']}")

響應示例

{
  "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_countnumber總交易數
volumestring總交易量(USDC)
pnlstring盈虧(USDC)
win_ratestring勝率(0-1)

獲取用戶持倉

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