Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
獲取用戶資料和統計數據
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
volume
pnl
win_rate
positions = profile['positions'] for position in positions: print(f"市場: {position['question']}") print(f"持倉: {position['size']} USDC")