法律合規提醒:在使用 Polymarket 服務或 API 前,請確認您所在地區的法律規定。Polymarket 目前不支援比利時、法國、新加坡、泰國、中國大陸等地區,政策可能隨時變化。
學習如何搜索和獲取市場數據。
獲取所有市場
import requests
response = requests.get('https://gamma-api.polymarket.com/markets')
markets = response.json()
過濾市場
response = requests.get('https://gamma-api.polymarket.com/markets', params={
'active': 'true',
'closed': 'false',
'limit': 10
})
下一步