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

# 市場資料

> 行情、K 線、市場狀態、異動和交易日曆

使用 Financial Context 的 `/api/market-data` 介面存取只讀市場資料。

## 即時行情

```bash theme={null}
curl "https://openapi.fcontext.com/api/market-data/quote?symbols=AAPL.US,MSFT.US" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"
```

## 證券靜態資訊

```bash theme={null}
curl "https://openapi.fcontext.com/api/market-data/quote/static_info?symbols=AAPL.US,MSFT.US" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"
```

## K 線

```bash theme={null}
curl "https://openapi.fcontext.com/api/market-data/quote/AAPL.US/history_candlestick?period=day&count=100&adjust=none" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"
```

常用參數：

| 參數             | 說明                                                       |
| -------------- | -------------------------------------------------------- |
| `period`       | `1m`、`5m`、`15m`、`30m`、`1h`、`day`、`week`、`month` 或 `year` |
| `count`        | 偏移模式下回傳的記錄數                                              |
| `start`, `end` | 日期範圍模式，格式為 `YYYY-MM-DD`                                  |
| `adjust`       | `none` 或 `forward`                                       |

## 市場狀態

```bash theme={null}
# 市場狀態
curl "https://openapi.fcontext.com/api/market-data/market/status" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"

# 熱門異動
curl "https://openapi.fcontext.com/api/market-data/market/top_movers?market=US&count=20" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"

# 交易日
curl "https://openapi.fcontext.com/api/market-data/market/trading_days?market=US&start=2026-01-01&end=2026-01-31" \
  -H "x-api-key: YOUR_FCONTEXT_API_KEY"
```
