> ## Documentation Index
> Fetch the complete documentation index at: https://polymarketcn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 獲取市場

> 如何從 Gamma API 獲取市場數據

<Callout type="success">
  還沒有帳號？[點擊這裡註冊 Polymarket](https://polymarket.com/?r=2026VIP) 並完成入金，才能用錢包私鑰為訂單籤名、實際成交。
</Callout>

<Warning>
  **法律合規提醒**：在使用 Polymarket 服務或 API 前，請確認您所在地區的法律規定。Polymarket 目前不支援比利時、法國、新加坡、泰國、中國大陸等地區，政策可能隨時變化。
</Warning>

學習如何搜索和獲取市場數據。

## 獲取所有市場

```python theme={null}
import requests

response = requests.get('https://gamma-api.polymarket.com/markets')
markets = response.json()
```

## 過濾市場

```python theme={null}
response = requests.get('https://gamma-api.polymarket.com/markets', params={
    'active': 'true',
    'closed': 'false',
    'limit': 10
})
```

## 下一步

<CardGroup cols={2}>
  <Card title="Markets API" icon="database" href="/api-tutorial/gamma-endpoints/markets">
    Markets 端點參考
  </Card>

  <Card title="Events API" icon="calendar" href="/api-tutorial/gamma-endpoints/events">
    Events 端點
  </Card>
</CardGroup>
