Last active
December 4, 2020 05:27
-
-
Save thstarshine/e369e15e18537511fa7e97a8c6fe7972 to your computer and use it in GitHub Desktop.
stock.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"description": "### 相關說明:\n* 日期時間格式為GMT+0", | |
"version": "0.1.0", | |
"title": "Taiwan Stock OHLC Data API", | |
"contact": { | |
"email": "development@fugle.tw" | |
}, | |
"license": { | |
"name": "Apache 2.0", | |
"url": "http://www.apache.org/licenses/LICENSE-2.0.html" | |
} | |
}, | |
"tags": [ | |
{ | |
"name": "Daily" | |
} | |
], | |
"paths": { | |
"/FCNT000002": { | |
"get": { | |
"tags": [ | |
"Daily" | |
], | |
"summary": "取得個股近五年每日的開高低收資料", | |
"description": "取得個股近五年每日的開高低收資料", | |
"security": [ | |
{ | |
"bearerAuth": [] | |
} | |
], | |
"parameters": [ | |
{ | |
"$ref": "#/components/parameters/SymbolID" | |
} | |
], | |
"responses": { | |
"200": { | |
"$ref": "#/components/responses/SuccessResponse" | |
} | |
} | |
} | |
} | |
}, | |
"servers": [ | |
{ | |
"url": "https://api.fintechspace.com.tw/history/api/v2/data/new_content" | |
} | |
], | |
"components": { | |
"parameters": { | |
"SymbolID": { | |
"name": "symbol_id", | |
"in": "query", | |
"description": "個股識別代碼", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
"APIToken": { | |
"name": "apiToken", | |
"in": "query", | |
"description": "api token", | |
"required": true, | |
"schema": { | |
"type": "string", | |
"default": "demo" | |
} | |
} | |
}, | |
"responses": { | |
"SuccessResponse": { | |
"description": "成功回傳資料", | |
"content": { | |
"*/*": { | |
"schema": { | |
"$ref": "#/components/schemas/SuccessSchema" | |
} | |
} | |
} | |
} | |
}, | |
"securitySchemes": { | |
"bearerAuth": { | |
"type": "http", | |
"scheme": "bearer", | |
"bearerFormat": "JWT" | |
} | |
}, | |
"schemas": { | |
"SuccessSchema": { | |
"properties": { | |
"contentId": { | |
"type": "string", | |
"description": "資料ID" | |
}, | |
"contentIdParams": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"description": "資料接收參數" | |
} | |
}, | |
"rawContent": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"day": { | |
"type": "array", | |
"description": "日資料", | |
"items": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number", | |
"description": "成交額" | |
}, | |
"change": { | |
"type": "number", | |
"description": "漲跌價" | |
}, | |
"change_rate": { | |
"type": "number", | |
"description": "漲跌幅" | |
}, | |
"close": { | |
"type": "number", | |
"description": "收盤價" | |
}, | |
"date": { | |
"type": "string", | |
"description": "日期" | |
}, | |
"high": { | |
"type": "number", | |
"description": "最高價" | |
}, | |
"low": { | |
"type": "number", | |
"description": "最低價" | |
}, | |
"open": { | |
"type": "number", | |
"description": "開盤價" | |
}, | |
"volume": { | |
"type": "number", | |
"description": "成交量" | |
} | |
} | |
} | |
}, | |
"week": { | |
"type": "array", | |
"description": "週資料", | |
"items": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number", | |
"description": "成交額" | |
}, | |
"change": { | |
"type": "number", | |
"description": "漲跌價" | |
}, | |
"change_rate": { | |
"type": "number", | |
"description": "漲跌幅" | |
}, | |
"close": { | |
"type": "number", | |
"description": "收盤價" | |
}, | |
"date": { | |
"type": "string", | |
"description": "日期" | |
}, | |
"high": { | |
"type": "number", | |
"description": "最高價" | |
}, | |
"low": { | |
"type": "number", | |
"description": "最低價" | |
}, | |
"open": { | |
"type": "number", | |
"description": "開盤價" | |
}, | |
"volume": { | |
"type": "number", | |
"description": "成交量" | |
} | |
} | |
} | |
}, | |
"month": { | |
"type": "array", | |
"description": "月資料", | |
"items": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number", | |
"description": "成交額" | |
}, | |
"change": { | |
"type": "number", | |
"description": "漲跌價" | |
}, | |
"change_rate": { | |
"type": "number", | |
"description": "漲跌幅" | |
}, | |
"close": { | |
"type": "number", | |
"description": "收盤價" | |
}, | |
"date": { | |
"type": "string", | |
"description": "日期" | |
}, | |
"high": { | |
"type": "number", | |
"description": "最高價" | |
}, | |
"low": { | |
"type": "number", | |
"description": "最低價" | |
}, | |
"open": { | |
"type": "number", | |
"description": "開盤價" | |
}, | |
"volume": { | |
"type": "number", | |
"description": "成交量" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"specName": { | |
"type": "string", | |
"description": "資料名稱" | |
} | |
}, | |
"required": [ | |
"contentId" | |
], | |
"example": { | |
"contentId": "FCNT000002?symbol_id=2330", | |
"contentIdParams": [ | |
"symbol_id" | |
], | |
"rawContent": [ | |
{ | |
"day": [ | |
{ | |
"amount": 1578860796, | |
"change": -1, | |
"change_rate": -0.95, | |
"close": 104.5, | |
"date": "2014-01-01T16:00:00.000Z", | |
"high": 105.5, | |
"low": 103.5, | |
"open": 105, | |
"volume": 15133 | |
}, | |
{ | |
"amount": 1907188388, | |
"change": -0.5, | |
"change_rate": -0.49, | |
"close": 102, | |
"date": "2014-01-06T16:00:00.000Z", | |
"high": 103, | |
"low": 102, | |
"open": 102.5, | |
"volume": 18803 | |
} | |
] | |
}, | |
{ | |
"week": [ | |
{ | |
"amount": 1578860796, | |
"change": -1, | |
"change_rate": -0.95, | |
"close": 104.5, | |
"date": "2014-01-01T16:00:00.000Z", | |
"high": 105.5, | |
"low": 103.5, | |
"open": 105, | |
"volume": 15133 | |
}, | |
{ | |
"amount": 1907188388, | |
"change": -0.5, | |
"change_rate": -0.49, | |
"close": 102, | |
"date": "2014-01-06T16:00:00.000Z", | |
"high": 103, | |
"low": 102, | |
"open": 102.5, | |
"volume": 18803 | |
} | |
] | |
}, | |
{ | |
"month": [ | |
{ | |
"amount": 1578860796, | |
"change": -1, | |
"change_rate": -0.95, | |
"close": 104.5, | |
"date": "2014-01-01T16:00:00.000Z", | |
"high": 105.5, | |
"low": 103.5, | |
"open": 105, | |
"volume": 15133 | |
}, | |
{ | |
"amount": 1907188388, | |
"change": -0.5, | |
"change_rate": -0.49, | |
"close": 102, | |
"date": "2014-01-06T16:00:00.000Z", | |
"high": 103, | |
"low": 102, | |
"open": 102.5, | |
"volume": 18803 | |
} | |
] | |
} | |
], | |
"specName": "最近5年股價資料" | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment