Intraday Candles
取得股票價格K線(依代碼查詢)
GET /intraday/candles/{symbol}
Parameters
Name | Type | Description |
---|---|---|
symbol * | string | 股票代碼 |
type | string | Ticker 類型,可選 oddlot 盤中零股 |
timeframe | string | K線週期,可選 1 1分K;3 3分K;5 5分K;10 10分K;15 15分K;30 30分K;60 60分K |
sort | string | 時間排序,預設為 asc 升冪 ; 可選 desc 降冪 |
Response
Name | Type | Description |
---|---|---|
date * | string | 日期 |
type * | string | Ticker 類型 |
exchange * | string | 交易所 |
market | string | 市場別 |
symbol * | string | 股票代號 |
timeframe * | string | K線週期 |
data * | object[] | K線資料 |
data[0].date | string | K線時間 |
data[0].open | number | K線開盤價 |
data[0].high | number | K線最高價 |
data[0].low | number | K線最低價 |
data[0].close | number | K線收盤價 |
data[0].volume | number | K線成交量(整股:成交張數;興櫃股票及盤中零股:成交股數;指數:成交金額) |
data[0].average | number | 成交均價 |
Example
- cURL
- Python
- Node.js
curl -X 'GET' \
'https://api.fugle.tw/marketdata/v1.0/stock/intraday/candles/2330' \
-H 'X-API-KEY: <YOUR_API_KEY>'
from fugle_marketdata import RestClient
client = RestClient(api_key='YOUR_API_KEY')
stock = client.stock
stock.intraday.candles(symbol='2330')
const { RestClient } = require('@fugle/marketdata');
const client = new RestClient({ apiKey: 'YOUR_API_KEY' });
client.stock.intraday.candles({ symbol: '2330' })
.then(data => console.log(data));
Response Body:
{
"date": "2023-05-29",
"type": "EQUITY",
"exchange": "TWSE",
"market": "TSE",
"symbol": "2330",
"data": [
{
"date": "2023-05-29T09:00:00.000+08:00",
"open": 574,
"high": 574,
"low": 572,
"close": 572,
"volume": 8450,
"average": 573.82
},
{
"date": "2023-05-29T09:01:00.000+08:00",
"open": 572,
"high": 573,
"low": 571,
"close": 571,
"volume": 594,
"average": 573.68
},
{
"date": "2023-05-29T09:02:00.000+08:00",
"open": 572,
"high": 572,
"low": 569,
"close": 570,
"volume": 1372,
"average": 573.26
},
......
]
}