Documentation Index
Fetch the complete documentation index at: https://polymarketcn.com/llms.txt
Use this file to discover all available pages before exploring further.
法律合規提醒:在使用 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_count | number | 總交易數 |
volume | string | 總交易量(USDC) |
pnl | string | 盈虧(USDC) |
win_rate | string | 勝率(0-1) |
獲取用戶持倉
positions = profile['positions']
for position in positions:
print(f"市場: {position['question']}")
print(f"持倉: {position['size']} USDC")