Snapshot Quotes
股票行情快照(依市場別)
snapshot/quotes/{market}
Parameters
| Name | Type | Description |
|---|---|---|
market* | string | 市場別,可選 TSE 上市;OTC 上櫃;ESB 興櫃一般板;TIB 臺灣創新板;PSB 興櫃戰略新板 |
Response
| Name | Type | Description |
|---|---|---|
date* | string | 日期 |
time* | string | 時間 |
market* | string | 市場別 |
data* | object[] | 快照資料 |
data[i].type | string | Ticker 類型 |
data[i].symbol | string | 股票代碼 |
data[i].name | string | 股票簡稱 |
data[i].openPrice | number | 開盤價 |
data[i].highPrice | number | 最高價 |
data[i].lowPrice | number | 最低價 |
data[i].closePrice | number | 收盤價 |
data[i].change | number | 漲跌 |
data[i].changePercent | number | 漲跌幅 |
data[i].tradeVolume | number | 成交量 |
data[i].tradeValue | number | 成交金額 |
data[i].lastUpdated | number | 快照時間 |
Example
- Python
- Node.js
from configparser import ConfigParser
from esun_marketdata import EsunMarketdata
config = ConfigParser()
config.read('/path/to/config.ini')
sdk = EsunMarketdata(config)
sdk.login()
rest_stock = sdk.rest_client.stock
rest_stock.snapshot.quotes(market='TSE')
const { EsunMarketdata } = require("@esun/marketdata");
(async () => {
const sdk = new EsunMarketdata({
configPath: "/path/to/config.ini",
});
await sdk.login();
const stock = sdk.restClient.stock;
const data = await stock.snapshot.quotes({ market: "TSE" });
console.log(data);
})();
Response Body:
{
"date": "2023-05-29",
"time": "133500",
"market": "TSE",
"data": [
{
"type": "EQUITY",
"symbol": "0050",
"name": "元大台灣50",
"openPrice": 127.45,
"highPrice": 127.55,
"lowPrice": 126.5,
"closePrice": 126.75,
"change": 0.8,
"changePercent": 0.64,
"tradeVolume": 14444,
"tradeValue": 1832941850,
"lastUpdated": 1685338200000000
},
{
"type": "EQUITY",
"symbol": "0051",
"name": "元大中型100",
"openPrice": 61,
"highPrice": 62.2,
"lowPrice": 61,
"closePrice": 62,
"change": 1.3,
"changePercent": 2.14,
"tradeVolume": 191,
"tradeValue": 11816050,
"lastUpdated": 1685338200000000
},
{
"type": "EQUITY",
"symbol": "0052",
"name": "玉山科技",
"openPrice": 111.8,
"highPrice": 112.1,
"lowPrice": 111.1,
"closePrice": 111.7,
"change": 1.2,
"changePercent": 1.09,
"tradeVolume": 565,
"tradeValue": 63088400,
"lastUpdated": 1685338200000000
},
......
]
}