KB์ฆ๊ถ
KB์ฆ๊ถ ยท GPT ใขใฏใทใงใณ
KB Securities Comprehensive API
Comprehensive API for interacting with KB Securities services, including stock ticker search, current stock price information, and overseas stocks price information.
POST /v1.1/REST03/issueOauthTokenIssue OAuth TokenPOST /v1.0/KSP/fndSmartInqSmart Fund InquiryPOST /v1.0/NIVS01/realDomesticRank๊ตญ๋ด ์ค์๊ฐ ๋ญํน ์กฐํPOST /v2.0/NIVS01/GSA10110ํด์ธ ์ค์๊ฐ ๋ญํน ์กฐํPOST /v1.1/KSV/research/inquiryKBRsrchRcmnStkInquiry about recommended stocksPOST /v1.1/REST03/cmsDailyListCMS ์ผ์ผ ๋ชฉ๋ก ์กฐํPOST /v1.1/REST03/cmsDailyDetailPost daily CMS details
ๅ ใฎ API ในใญใผใ
{
"openapi": "3.1.0",
"info": {
"title": "KB Securities Comprehensive API",
"description": "Comprehensive API for interacting with KB Securities services, including stock ticker search, current stock price information, and overseas stocks price information.",
"version": "v2.0"
},
"servers": [
{
"url": "https://oapi.kbsec.com",
"description": "KB Securities Official API Server"
}
],
"paths": {
"/v1.1/REST03/issueOauthToken": {
"post": {
"summary": "Issue OAuth Token",
"operationId": "issueOauthToken",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataBody": {
"type": "object"
},
"dataHeader": {
"type": "object"
}
}
},
"example": {
"dataBody": {},
"dataHeader": {}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataHeader": {
"type": "object",
"properties": {
"successCode": {
"type": "string"
},
"category": {
"type": "string"
},
"resultCode": {
"type": "string"
},
"resultMessage": {
"type": "string"
},
"processFlag": {
"type": "string"
},
"processCode": {
"type": "string"
},
"processMessage": {
"type": "string"
}
}
},
"dataBody": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"scope": {
"type": "string"
},
"token_type": {
"type": "string"
},
"expires_in": {
"type": "integer"
},
"jti": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"/v1.0/KSP/fndSmartInq": {
"post": {
"summary": "Smart Fund Inquiry",
"operationId": "fndSmartInq",
"tags": [
"Fund Inquiry"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataBody": {
"type": "object",
"properties": {
"prcptnFeeF": {
"type": "string"
},
"rsvTypSvngPsblF": {
"type": "string"
},
"inqCcd": {
"type": "string"
},
"srchCndt1": {
"type": "string"
},
"srchCndt2": {
"type": "string"
},
"srchCndt3": {
"type": "string"
},
"srchCndt4": {
"type": "string"
},
"srchCndt5": {
"type": "string"
},
"minErnR": {
"type": "string"
},
"mxErnR": {
"type": "string"
},
"gridCnt": {
"type": "string"
},
"wrkngCoCd": {
"type": "string"
},
"rpcsFeeF": {
"type": "string"
},
"fndNm": {
"type": "string"
},
"pgNo": {
"type": "string"
},
"rskGrdCcd": {
"type": "string"
},
"mxTlRcpsRP4": {
"type": "string"
},
"mnEstAmt": {
"type": "string"
},
"srtCcd": {
"type": "string"
},
"rcmnTypCd": {
"type": "string"
},
"csInvstDspstn": {
"type": "string"
},
"srtSq": {
"type": "string"
},
"mxEstAmt": {
"type": "string"
},
"minTlRcpsRP4": {
"type": "string"
},
"fndGrdCd": {
"type": "string"
},
"rcmnCcd": {
"type": "string"
}
}
},
"dataHeader": {
"type": "object",
"properties": {}
}
}
}
}
}
}
}
},
"/v1.0/NIVS01/realDomesticRank": {
"post": {
"summary": "๊ตญ๋ด ์ค์๊ฐ ๋ญํน ์กฐํ",
"operationId": "realDomesticRank",
"tags": [
"๋ญํน ์กฐํ"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataBody": {
"type": "object",
"required": [
"mktClsf",
"inqCnt",
"rankType"
],
"properties": {
"mktClsf": {
"type": "string",
"example": "2"
},
"inqCnt": {
"type": "string",
"example": "5"
},
"rankType": {
"type": "string",
"example": "0"
}
}
},
"dataHeader": {
"type": "object",
"example": {}
}
}
}
}
}
},
"responses": {
"200": {
"description": "์ ์์ ์ผ๋ก ์กฐํ๊ฐ ์๋ฃ๋์์ต๋๋ค.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataHeader": {
"type": "object",
"properties": {
"category": {
"type": "string"
},
"resultCode": {
"type": "string"
},
"resultMessage": {
"type": "string"
},
"processFlag": {
"type": "string"
},
"processCode": {
"type": "string"
},
"processMessage": {
"type": "string"
},
"successCode": {
"type": "string"
}
}
},
"dataBody": {
"type": "object",
"properties": {
"resCd": {
"type": "string"
},
"isC": {
"type": "string"
},
"out2": {
"type": "array",
"items": {
"type": "object",
"properties": {
"nowPrc": {
"type": "string"
},
"bdyCmpr": {
"type": "string"
},
"bdyCmprCcd": {
"type": "string"
},
"isNm": {
"type": "string"
},
"upDwnRP2": {
"type": "string"
},
"isCd": {
"type": "string"
},
"rnk": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/v2.0/NIVS01/GSA10110": {
"post": {
"summary": "ํด์ธ ์ค์๊ฐ ๋ญํน ์กฐํ",
"operationId": "realOverseasRank",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataBody": {
"type": "object",
"properties": {
"clsf": {
"type": "string",
"example": "2"
},
"krxClsf": {
"type": "string",
"example": "0"
},
"inqStd": {
"type": "string",
"example": "0"
},
"rnk": {
"type": "string",
"example": "1"
},
"isCnt": {
"type": "string",
"example": "5"
}
}
},
"dataHeader": {
"type": "object",
"properties": {}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataHeader": {
"type": "object",
"properties": {
"category": {
"type": "string",
"example": "API"
},
"resultCode": {
"type": "string",
"example": "200"
},
"resultMessage": {
"type": "string",
"example": "์ ์"
},
"processFlag": {
"type": "string",
"example": "A"
},
"processCode": {
"type": "string",
"example": "0024"
},
"processMessage": {
"type": "string",
"example": "์ ์์ ์ผ๋ก ์กฐํ๊ฐ ์๋ฃ๋์์ต๋๋ค."
},
"processTime": {
"type": "integer",
"example": 86
},
"successCode": {
"type": "string",
"example": "0"
}
}
},
"dataBody": {
"type": "array",
"items": {
"type": "object",
"properties": {
"msg": {
"type": "string",
"example": "์ ์์ ์ผ๋ก ์กฐํ๊ฐ ์๋ฃ๋์์ต๋๋ค."
},
"out2": {
"type": "array",
"items": {
"type": "object",
"properties": {}
}
},
"clsfP": {
"type": "string"
},
"isCnt": {
"type": "string"
},
"lngth": {
"type": "string"
},
"RecordSize": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"/v1.1/KSV/research/inquiryKBRsrchRcmnStk": {
"post": {
"summary": "Inquiry about recommended stocks",
"operationId": "inquiryKBRsrchRcmnStk",
"tags": [
"Research"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataBody": {
"type": "object"
},
"dataHeader": {
"type": "object"
}
}
},
"example": {
"dataBody": {},
"dataHeader": {}
}
}
}
},
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataBody": {
"type": "object",
"properties": {
"absltErnTypRcmnIs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Recommendation"
}
},
"midSstkRcmnIs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Recommendation"
}
},
"usaStkRcmnIs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Recommendation"
}
},
"chinaStkRcmnIs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Recommendation"
}
},
"vietnamStkRcmnIs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Recommendation"
}
},
"japanStkRcmnIs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Recommendation"
}
}
}
},
"dataHeader": {
"$ref": "#/components/schemas/DataHeader"
}
}
}
}
}
}
}
}
},
"/v1.1/REST03/cmsDailyList": {
"post": {
"summary": "CMS ์ผ์ผ ๋ชฉ๋ก ์กฐํ",
"operationId": "cmsDailyList",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataBody": {
"type": "object",
"properties": {
"authorization": {
"type": "string"
},
"area": {
"type": "string"
},
"pageRange": {
"type": "object",
"properties": {
"start": {
"type": "string"
},
"results": {
"type": "string"
}
}
},
"meta": {
"type": "object",
"properties": {
"createdFrom": {
"type": "string"
}
}
},
"pagePath": {
"type": "object",
"properties": {
"base": {
"type": "string"
}
}
}
}
},
"dataHeader": {
"type": "object",
"example": {}
}
}
}
}
}
},
"responses": {
"200": {
"description": "์ฑ๊ณต์ ์ธ ์๋ต",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataHeader": {
"type": "object",
"properties": {
"successCode": {
"type": "string"
},
"category": {
"type": "string"
},
"resultCode": {
"type": "string"
},
"resultMessage": {
"type": "string"
},
"processFlag": {
"type": "string"
},
"processCode": {
"type": "string"
},
"processMessage": {
"type": "string"
}
}
},
"dataBody": {
"type": "object",
"properties": {
"totalResults": {
"type": "integer"
},
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"authorEmail": {
"type": "string"
},
"thumbnail": {
"type": "string"
},
"created": {
"type": "string"
},
"authorName": {
"type": "string"
},
"contentId": {
"type": "string"
},
"lastModified": {
"type": "string"
},
"title": {
"type": "string"
},
"pagePath": {
"type": "string"
},
"templateId": {
"type": "string"
}
}
}
},
"resultCode": {
"type": "integer"
},
"returnResults": {
"type": "integer"
},
"resultMessage": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
},
"/v1.1/REST03/cmsDailyDetail": {
"post": {
"summary": "Post daily CMS details",
"operationId": "postCmsDailyDetail",
"tags": [
"CMS"
],
"security": [
{
"ApiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataBody": {
"type": "object",
"properties": {
"authorization": {
"type": "string"
},
"area": {
"type": "string"
},
"format": {
"type": "string"
},
"page": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
}
}
},
"dataHeader": {
"type": "object"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"dataHeader": {
"type": "object",
"properties": {
"successCode": {
"type": "string"
},
"category": {
"type": "string"
},
"resultCode": {
"type": "string"
},
"resultMessage": {
"type": "string"
},
"processFlag": {
"type": "string"
},
"processCode": {
"type": "string"
},
"processMessage": {
"type": "string"
}
}
},
"dataBody": {
"type": "object",
"properties": {
"data": {
"type": "string"
},
"resultCode": {
"type": "integer"
},
"resultMessage": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"ApiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "apikey"
}
},
"schemas": {
"Recommendation": {
"type": "object",
"properties": {
"sec": {
"type": "string"
},
"nowPrc": {
"type": "string"
},
"upDwnR": {
"type": "string"
},
"bDyCmpr": {
"type": "string"
},
"isNm": {
"type": "string"
},
"bdyClsPrc": {
"type": "string"
},
"cntnt": {
"type": "string"
},
"isCd": {
"type": "string"
},
"rgstPrcCmprR": {
"type": "string"
},
"rgstPrc": {
"type": "string"
},
"rgstDt": {
"type": "string"
}
}
},
"DataHeader": {
"type": "object",
"properties": {
"successCode": {
"type": "string"
},
"category": {
"type": "string"
},
"resultCode": {
"type": "string"
},
"resultMessage": {
"type": "string"
},
"processFlag": {
"type": "string"
},
"processCode": {
"type": "string"
},
"processMessage": {
"type": "string"
}
}
}
}
},
"security": [
{
"ApiKeyAuth": []
}
]
}