Technical KDJ BETA
取得特定股票在指定時間範圍內的隨機指標 (KDJ)
GET /technical/kdj/{symbol}
Parameters
Name | Type | Description |
---|---|---|
symbol * | string | 股票代碼 |
from * | string | 開始日期(格式:yyyy-MM-dd ) |
to * | string | 結束日期(格式:yyyy-MM-dd ) |
timeframe * | string | K線週期,可選 1 1分K;3 3分K;5 5分K;10 10分K;15 15分K;30 30分K;60 60分K;D 日K;W 週K;M 月K |
rPeriod * | number | KDJ 週期 |
kPeriod * | number | %K 週期 |
dPeriod * | number | %D 週期 |
caution
目前分K無法指定開始日期(from) 與 結束日期(to),一律回傳近 30 日資料。
Response
Name | Type | Description |
---|---|---|
symbol * | string | 股票代號 |
from * | string | 開始日期 |
to * | string | 結束日期 |
timeframe * | string | K線週期 |
rPeriod * | number | KDJ 週期 |
kPeriod * | number | %K 週期 |
dPeriod * | number | %D 週期 |
data * | object[] | KDJ 資料 |
data[0].date * | string | 資料時間 |
data[0].k * | number | K |
data[0].d * | number | D |
data[0].j * | number | J |
Example
- cURL
- Python
- Node.js
curl -X 'GET' \
'https://api.fugle.tw/marketdata/v1.0/stock/technical/kdj/2330?from=2024-08-01&to=2024-08-10&timeframe=D&rPeriod=9&kPeriod=3&dPeriod=3' \
-H 'X-API-KEY: <YOUR_API_KEY>'
from fugle_marketdata import RestClient
client = RestClient(api_key = 'YOUR_API_KEY') # 輸入您的 API key
stock = client.stock # Stock REST API client
stock.technical.kdj(**{"symbol": "2330", "from": "2024-08-01", "to": "2024-08-10","timeframe":"D", "rPeriod": 9, "kPeriod":3, "dPeriod":3})
const { RestClient } = require('@fugle/marketdata');
const client = new RestClient({ apiKey: 'YOUR_API_KEY' });
client.stock.technical.kdj({ symbol: '2330', from: '2024-08-01', to: '2024-08-10', timeframe: 'D', rPeriod: 9, kPeriod: 3, dPeriod: 3 })
.then(data => console.log(data));
Response Body:
{
"symbol": "2330",
"from": "2024-08-01",
"to": "2024-08-10",
"timeframe": "D",
"rPeriod": 9,
"kPeriod": 3,
"dPeriod": 3,
"data": [
{
"date": "2024-08-01",
"k": 32.96296296296297,
"d": 27.77777777777779,
"j": 43.333333333333336
},
{
"date": "2024-08-02",
"k": 23.703703703703713,
"d": 27.901234567901245,
"j": 15.308641975308653
},
{
"date": "2024-08-05",
"k": 17.068273092369484,
"d": 24.578313253012055,
"j": 2.048192771084345
},
{
"date": "2024-08-06",
"k": 13.855421686746999,
"d": 18.20913282760673,
"j": 5.147999405027534
},
{
"date": "2024-08-07",
"k": 36.718669549994864,
"d": 22.547454776370447,
"j": 65.0610990972437
},
{
"date": "2024-08-08",
"k": 54.05210585933478,
"d": 34.87539903202555,
"j": 92.40551951395325
},
{
"date": "2024-08-09",
"k": 66.45299145299147,
"d": 52.40792228744038,
"j": 94.54312978409367
}
]
}