> ## 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 健康檢查

> 檢查 Gamma API 服務狀態

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

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

Gamma API 健康檢查端點用於驗證服務是否正常運行。

## 端點

```
GET https://gamma-api.polymarket.com/health
```

## 請求示例

### cURL

```bash theme={null}
curl https://gamma-api.polymarket.com/health
```

### Python

```python theme={null}
import requests

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

### TypeScript

```typescript theme={null}
const response = await fetch('https://gamma-api.polymarket.com/health');
const data = await response.json();
console.log(data);
```

## 響應示例

```json theme={null}
{
  "status": "ok",
  "timestamp": "2024-01-15T10:30:00Z"
}
```

## 響應欄位

| 欄位          | 類型     | 描述                     |
| ----------- | ------ | ---------------------- |
| `status`    | string | API 狀態（"ok" 或 "error"） |
| `timestamp` | string | 響應時間戳（ISO 8601 格式）     |

## 使用場景

* 監控 API 可用性
* 自動化健康檢查
* 負載均衡器健康探針

## 監控腳本

```python theme={null}
import requests
import time

def monitor_gamma_health():
    while True:
        try:
            response = requests.get('https://gamma-api.polymarket.com/health')
            if response.status_code == 200:
                print(f"✓ Gamma API 正常 - {response.json()['timestamp']}")
            else:
                print(f"✗ Gamma API 異常 - 狀態碼: {response.status_code}")
        except Exception as e:
            print(f"✗ 連接失敗: {e}")
        
        time.sleep(60)  # 每分鐘檢查一次
```
