還沒有帳號?點擊這裡註冊 Polymarket 並完成入金,才能用錢包私鑰為訂單籤名、實際成交。
端點
請求示例
響應示例
用戶統計
| 欄位 | 類型 | 描述 |
|---|---|---|
trades_count | number | 總交易數 |
volume | string | 總交易量(USDC) |
pnl | string | 盈虧(USDC) |
win_rate | string | 勝率(0-1) |
獲取用戶資料和統計數據
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")