Historical Stats
取得近 52 週股價數據(依代碼查詢)
GET /historical/stats/{symbol}
Parameters
Name | Type | Description |
---|---|---|
symbol * | string | 股票代碼 |
Response
Name | Type | Description |
---|---|---|
date * | string | 日期 |
type * | string | Ticker 類型 |
exchange * | string | 交易所 |
market * | string | 市場別 |
symbol * | string | 股票代碼 |
name * | string | 股票簡稱 |
openPrice * | number | 最後交易日開盤價 |
highPrice * | number | 最後交易日最高價 |
lowPrice * | number | 最後交易日最低價 |
closePrice * | number | 最後交易日收盤價 |
change * | number | 最後交易日漲跌 |
changePercent * | number | 最後交易日漲跌幅 |
tradeVolume * | number | 最後交易日成交量 |
tradeValue * | number | 最後交易日成交金額 |
previousClose * | number | 前一交易日收盤價 |
week52High * | number | 近 52 週高點 |
week52Low * | number | 近 52 週低點 |
Example
- cURL
- Python
- Node.js
curl -X 'GET' \
'https://api.fugle.tw/marketdata/v1.0/stock/historical/stats/0050' \
-H 'X-API-KEY: <YOUR_API_KEY>'
from fugle_marketdata import RestClient
client = RestClient(api_key = 'YOUR_KEY') # 輸入您的 API key
stock = client.stock # Stock REST API client
stock.historical.stats(symbol = "0050")
const { RestClient } = require('@fugle/marketdata');
const client = new RestClient({ apiKey: 'YOUR_API_KEY' });
client.stock.historical.stats({ symbol: '0050' })
.then(data => console.log(data));
Response Body:
{
"date": "2023-02-09",
"type": "EQUITY",
"exchange": "TWSE",
"market": "TSE",
"symbol": "0050",
"name": "元大台灣50",
"openPrice": 120.5,
"highPrice": 121,
"lowPrice": 120.3,
"closePrice": 120.9,
"change": 0.05,
"changePercent": 0.04,
"tradeVolume": 5032245,
"tradeValue": 607543546,
"previousClose": 120.85000000000001,
"week52High": 145.05,
"week52Low": 96.5
}