{ "openapi": "3.0.0", "info": { "title": "Korea Financial Supervisory Service Stock Price Information API", "description": "Provides stock price information from the Korea Exchange (KRX).", "version": "1.0.0" }, "servers": [ { "url": "https://apis.data.go.kr/1160100/service/GetStockSecuritiesInfoService", "description": "Production server" } ], "paths": { "/getStockPriceInfo": { "get": { "operationId": "getStockPriceInfo", "summary": "Get stock price information", "parameters": [ { "name": "serviceKey", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Authentication key issued by the public data portal" }, { "name": "numOfRows", "in": "query", "required": false, "schema": { "type": "integer" }, "description": "Number of rows per page" }, { "name": "pageNo", "in": "query", "required": false, "schema": { "type": "integer" }, "description": "Page number" }, { "name": "resultType", "in": "query", "required": false, "schema": { "type": "string", "enum": ["json", "xml"] }, "description": "Format of the result data (json or xml). Default is xml." }, { "name": "basDt", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Base date for searching data" }, { "name": "likeSrtnCd", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Searches data that includes the input short code" } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StockPriceInfoResponse" } } } } } } } }, "components": { "schemas": { "StockPriceInfoResponse": { "type": "object", "properties": { "resultCode": { "type": "string", "description": "Result code of API call" }, "resultMsg": { "type": "string", "description": "Result message of API call" }, "numOfRows": { "type": "integer", "description": "Number of rows per page" }, "pageNo": { "type": "integer", "description": "Page number" }, "totalCount": { "type": "integer", "description": "Total number of results" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/StockItem" } } } }, "StockItem": { "type": "object", "properties": { "basDt": { "type": "string", "description": "Base date of the stock information" }, "srtnCd": { "type": "string", "description": "Short code of the stock" }, "isinCd": { "type": "string", "description": "International Securities Identification Number" }, "itmsNm": { "type": "string", "description": "Name of the stock item" }, "mrktCtg": { "type": "string", "description": "Market category of the stock" }, "clpr": { "type": "integer", "description": "Closing price of the stock" }, "vs": { "type": "integer", "description": "Comparison with the previous day's closing price" }, "fltRt": { "type": "float", "description": "Fluctuation rate of the stock price" }, "mkp": { "type": "integer", "description": "Market opening price of the stock" }, "hipr": { "type": "integer", "description": "Highest price of the stock for the day" }, "lopr": { "type": "integer", "description": "Lowest price of the stock for the day" }, "trqu": { "type": "integer", "description": "Trading quantity of the stock" }, "trPrc": { "type": "integer", "description": "Trading price of the stock" }, "lstgStCnt": { "type": "integer", "description": "Listing stock count" }, "mrktTotAmt": { "type": "integer", "description": "Total market value of the stock" } } } } } }