Intraday Candles BETA
取得期權價格K線(依商品查詢)
GET /intraday/candles/{symbol}
Parameters
Name | Type | Description |
---|---|---|
symbol * | string | 期權代碼 |
session | string | session 類型,可選 afterhours 夜盤 |
timeframe | string | K線週期,可選 1 1分K;5 5分K;10 10分K;15 15分K;30 30分K;60 60分K |
Response
Name | Type | Description |
---|---|---|
date * | string | 日期 |
type * | string | Ticker 類型 |
exchange * | string | 交易所 |
market | string | 市場別 |
symbol * | string | 期權代碼 |
timeframe * | number | 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/futopt/intraday/candles/TXFC5?timeframe=30' \
-H 'X-API-KEY: <YOUR_API_KEY>'
from fugle_marketdata import RestClient
client = RestClient(api_key = 'YOUR_API_KEY')
futopt = client.futopt
futopt.intraday.candles(symbol='TXFC5', timeframe='30')
const { RestClient } = require("@fugle/marketdata");
const client = new RestClient({ apiKey:"YOUR_API_KEY" });
client.futopt.intraday
.candles({ symbol:"TXFC5", timeframe:"30" })
.then((data) => console.log(data));
Response Body:
{
"date": "2024-06-18",
"type": "FUTURE",
"exchange": "TAIFEX",
"symbol": "TXFC5",
"timeframe": "30",
"data": [
{
"date": "2024-06-18T08:30:00.000+08:00",
"open": 22530,
"high": 22530,
"low": 22530,
"close": 22530,
"volume": 1,
"average": 22530
},
{
"date": "2024-06-18T09:00:00.000+08:00",
"open": 22492,
"high": 22492,
"low": 22492,
"close": 22492,
"volume": 1,
"average": 22511
},
{
"date": "2024-06-18T10:00:00.000+08:00",
"open": 22558,
"high": 22558,
"low": 22558,
"close": 22558,
"volume": 1,
"average": 22526.67
},
{
"date": "2024-06-18T10:30:00.000+08:00",
"open": 22560,
"high": 22560,
"low": 22560,
"close": 22560,
"volume": 1,
"average": 22535
},
{
"date": "2024-06-18T11:00:00.000+08:00",
"open": 22560,
"high": 22576,
"low": 22560,
"close": 22576,
"volume": 3,
"average": 22548
},
{
"date": "2024-06-18T11:30:00.000+08:00",
"open": 22550,
"high": 22550,
"low": 22550,
"close": 22550,
"volume": 1,
"average": 22548.25
},
{
"date": "2024-06-18T12:00:00.000+08:00",
"open": 22570,
"high": 22570,
"low": 22570,
"close": 22570,
"volume": 1,
"average": 22550.67
}
]
}