UNPKG

efriend

Version:
1,439 lines (1,438 loc) 5.44 MB
"use strict"; /** * TR_ID (트랜잭션 ID)별로 생선된 metadata * 자동 생성되는 소스이니 수정하지 마세요. * * @file packages/EFriendExpert/efriends/efriend.constant.js * @version 0.0.1 * @license GNU General Public License v3.0 * @copyright 2017~2023, EFriendExport Community Team * @author gye hyun james kim <pnuskgh@gmail.com> */ Object.defineProperty(exports, "__esModule", { value: true }); exports.EFriend_JSON_TRID = void 0; const EFriend_JSON_TRID = { "Approval_실전": { "info": { "category": "OAuth 인증", "name": "실시간 (웹소켓) 접속키 발급", "version": "실시간-000", "method": "post", "url": "/oauth2/Approval", "format": "JSON", "contentType": "", "verifyDate": "2023-07-01T00:00:00.000Z", "downloadDate": "2023-06-01T00:00:00.000Z", "memo": "", "domain": "https://openapi.koreainvestment.com:9443", "trid": "Approval", "isProduct": true, "description": "실시간 (웹소켓) 접속키 발급" }, "request": { "header": [ { "code": "content-type", "name": "컨텐츠타입", "type": "string", "required": false, "length": 40, "description": [ "application/json; utf-8" ], "default": "application/json; charset=utf-8" } ], "body": [ { "code": "grant_type", "name": "권한부여타입", "type": "string", "required": true, "length": 18, "description": [ "\"client_credentials\"" ], "default": "client_credentials" }, { "code": "appkey", "name": "앱키", "type": "string", "required": true, "length": 36, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "secretkey", "name": "시크릿키", "type": "string", "required": true, "length": 180, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" } ] }, "response": { "header": [], "body": [ { "code": "approval_key", "name": "웹소켓 접속키", "type": "string", "required": true, "length": 286, "description": [ "웹소켓 이용 시 발급받은 웹소켓 접속키를 appkey와 appsecret 대신 헤더에 넣어 API 호출합니다." ], "default": "" } ] } }, "Approval_모의": { "info": { "category": "OAuth 인증", "name": "실시간 (웹소켓) 접속키 발급", "version": "실시간-000", "method": "post", "url": "/oauth2/Approval", "format": "JSON", "contentType": "", "verifyDate": "2023-07-01T00:00:00.000Z", "downloadDate": "2023-06-01T00:00:00.000Z", "memo": "", "domain": "https://openapivts.koreainvestment.com:29443", "trid": "Approval", "isProduct": false, "description": "실시간 (웹소켓) 접속키 발급" }, "request": { "header": [ { "code": "content-type", "name": "컨텐츠타입", "type": "string", "required": false, "length": 40, "description": [ "application/json; utf-8" ], "default": "application/json; charset=utf-8" } ], "body": [ { "code": "grant_type", "name": "권한부여타입", "type": "string", "required": true, "length": 18, "description": [ "\"client_credentials\"" ], "default": "client_credentials" }, { "code": "appkey", "name": "앱키", "type": "string", "required": true, "length": 36, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "secretkey", "name": "시크릿키", "type": "string", "required": true, "length": 180, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" } ] }, "response": { "header": [], "body": [ { "code": "approval_key", "name": "웹소켓 접속키", "type": "string", "required": true, "length": 286, "description": [ "웹소켓 이용 시 발급받은 웹소켓 접속키를 appkey와 appsecret 대신 헤더에 넣어 API 호출합니다." ], "default": "" } ] } }, "hashkey_실전": { "info": { "category": "OAuth 인증", "name": "Hashkey", "version": "", "method": "post", "url": "/uapi/hashkey", "format": "JSON", "contentType": "application/json", "verifyDate": "2023-07-01T00:00:00.000Z", "downloadDate": "2023-06-01T00:00:00.000Z", "memo": "", "domain": "https://openapi.koreainvestment.com:9443", "trid": "hashkey", "isProduct": true, "description": "Hashkey" }, "request": { "header": [ { "code": "content-type", "name": "컨텐츠타입", "type": "string", "required": false, "length": 40, "description": [ "application/json; charset=utf-8" ], "default": "application/json; charset=utf-8" }, { "code": "appkey", "name": "앱키", "type": "string", "required": true, "length": 36, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "appsecret", "name": "앱시크릿키", "type": "string", "required": true, "length": 180, "description": [ "한국투자증권 홈페이지에서 발급받은 appsecret (절대 노출되지 않도록 주의해주세요.)" ], "default": "" } ], "body": [ { "code": "JsonBody", "name": "요청값", "type": "object", "required": true, "length": null, "description": [ "검증할 post로 보낼 request body 전체. JsonBody는 사용하지 않는다.", "POST로 보낼 body값", "ex)", "datas = {", "\"CANO\": '00000000',", "\"ACNT_PRDT_CD\": \"01\",", "\"OVRS_EXCG_CD\": \"SHAA\"", "}" ], "default": "", "enum": [ { "code": "CANO", "name": "00000000," }, { "code": "ACNT_PRDT_CD", "name": "01," }, { "code": "OVRS_EXCG_CD", "name": "SHAA" } ] } ] }, "response": { "header": [], "body": [ { "code": "BODY", "name": "요청값", "type": "object", "required": true, "length": -1, "description": [ "요청한 JsonBody" ], "default": "", "fields": [] }, { "code": "HASH", "name": "해쉬키", "type": "string", "required": true, "length": 256, "description": [ "[POST API 대상] Client가 요청하는 Request Body를 hashkey api로 생성한 Hash값", "* API문서 > hashkey 참조" ], "default": "" } ] } }, "hashkey_모의": { "info": { "category": "OAuth 인증", "name": "Hashkey", "version": "", "method": "post", "url": "/uapi/hashkey", "format": "JSON", "contentType": "application/json", "verifyDate": "2023-07-01T00:00:00.000Z", "downloadDate": "2023-06-01T00:00:00.000Z", "memo": "", "domain": "https://openapivts.koreainvestment.com:29443", "trid": "hashkey", "isProduct": false, "description": "Hashkey" }, "request": { "header": [ { "code": "content-type", "name": "컨텐츠타입", "type": "string", "required": false, "length": 40, "description": [ "application/json; charset=utf-8" ], "default": "application/json; charset=utf-8" }, { "code": "appkey", "name": "앱키", "type": "string", "required": true, "length": 36, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "appsecret", "name": "앱시크릿키", "type": "string", "required": true, "length": 180, "description": [ "한국투자증권 홈페이지에서 발급받은 appsecret (절대 노출되지 않도록 주의해주세요.)" ], "default": "" } ], "body": [ { "code": "JsonBody", "name": "요청값", "type": "object", "required": true, "length": null, "description": [ "검증할 post로 보낼 request body 전체. JsonBody는 사용하지 않는다.", "POST로 보낼 body값", "ex)", "datas = {", "\"CANO\": '00000000',", "\"ACNT_PRDT_CD\": \"01\",", "\"OVRS_EXCG_CD\": \"SHAA\"", "}" ], "default": "", "enum": [ { "code": "CANO", "name": "00000000," }, { "code": "ACNT_PRDT_CD", "name": "01," }, { "code": "OVRS_EXCG_CD", "name": "SHAA" } ] } ] }, "response": { "header": [], "body": [ { "code": "BODY", "name": "요청값", "type": "object", "required": true, "length": -1, "description": [ "요청한 JsonBody" ], "default": "", "fields": [] }, { "code": "HASH", "name": "해쉬키", "type": "string", "required": true, "length": 256, "description": [ "[POST API 대상] Client가 요청하는 Request Body를 hashkey api로 생성한 Hash값", "* API문서 > hashkey 참조" ], "default": "" } ] } }, "tokenP_실전": { "info": { "category": "OAuth 인증", "name": "접근토큰발급(P)", "version": "인증-001", "method": "post", "url": "/oauth2/tokenP", "format": "JSON", "contentType": "application/json; charset=UTF-8", "verifyDate": "2023-07-01T00:00:00.000Z", "downloadDate": "2023-06-01T00:00:00.000Z", "memo": "", "domain": "https://openapi.koreainvestment.com:9443", "trid": "tokenP", "isProduct": true, "description": "접근토큰발급(P)" }, "request": { "header": [], "body": [ { "code": "grant_type", "name": "권한부여 Type", "type": "string", "required": true, "length": 18, "description": [ "client_credentials" ], "default": "client_credentials" }, { "code": "appkey", "name": "앱키", "type": "string", "required": true, "length": 36, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "appsecret", "name": "앱시크릿키", "type": "string", "required": true, "length": 180, "description": [ "한국투자증권 홈페이지에서 발급받은 appsecret (절대 노출되지 않도록 주의해주세요.)" ], "default": "" } ] }, "response": { "header": [], "body": [ { "code": "access_token", "name": "접근토큰", "type": "string", "required": true, "length": 400, "description": [ "OAuth 토큰이 필요한 API 경우 발급한 Access token", "일반고객/일반법인고객(Access token 유효기간 1일, OAuth 2.0의 Client Credentials Grant 절차를 준용)", "제휴법인(Access token 유효기간 3개월, Refresh token 유효기간 1년, OAuth 2.0의 Authorization Code Grant 절차를 준용)", "※ 일정시간 이내에 재호출 시에는 직전 토큰값을 리턴" ], "default": "" }, { "code": "token_type", "name": "접근토큰유형", "type": "string", "required": true, "length": 20, "description": [ "접근토큰유형 \"Bearer\"" ], "default": "Bearer" }, { "code": "expires_in", "name": "접근토큰 유효기간", "type": "number", "required": true, "length": 10, "description": [ "유효기간(초). 86400" ], "default": "" }, { "code": "access_token_token_expired", "name": "접근 토큰 유효 일시", "type": "string", "required": true, "length": 19, "description": [ "유효기간 마지막 일시: Format - \"YYYY-MM-DD HH:mm:ss\"" ], "default": "" } ] } }, "tokenP_모의": { "info": { "category": "OAuth 인증", "name": "접근토큰발급(P)", "version": "인증-001", "method": "post", "url": "/oauth2/tokenP", "format": "JSON", "contentType": "application/json; charset=UTF-8", "verifyDate": "2023-07-01T00:00:00.000Z", "downloadDate": "2023-06-01T00:00:00.000Z", "memo": "", "domain": "https://openapivts.koreainvestment.com:29443", "trid": "tokenP", "isProduct": false, "description": "접근토큰발급(P)" }, "request": { "header": [], "body": [ { "code": "grant_type", "name": "권한부여 Type", "type": "string", "required": true, "length": 18, "description": [ "client_credentials" ], "default": "client_credentials" }, { "code": "appkey", "name": "앱키", "type": "string", "required": true, "length": 36, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "appsecret", "name": "앱시크릿키", "type": "string", "required": true, "length": 180, "description": [ "한국투자증권 홈페이지에서 발급받은 appsecret (절대 노출되지 않도록 주의해주세요.)" ], "default": "" } ] }, "response": { "header": [], "body": [ { "code": "access_token", "name": "접근토큰", "type": "string", "required": true, "length": 400, "description": [ "OAuth 토큰이 필요한 API 경우 발급한 Access token", "일반고객/일반법인고객(Access token 유효기간 1일, OAuth 2.0의 Client Credentials Grant 절차를 준용)", "제휴법인(Access token 유효기간 3개월, Refresh token 유효기간 1년, OAuth 2.0의 Authorization Code Grant 절차를 준용)", "※ 일정시간 이내에 재호출 시에는 직전 토큰값을 리턴" ], "default": "" }, { "code": "token_type", "name": "접근토큰유형", "type": "string", "required": true, "length": 20, "description": [ "접근토큰유형 \"Bearer\"" ], "default": "Bearer" }, { "code": "expires_in", "name": "접근토큰 유효기간", "type": "number", "required": true, "length": 10, "description": [ "유효기간(초). 86400" ], "default": "" }, { "code": "access_token_token_expired", "name": "접근 토큰 유효 일시", "type": "string", "required": true, "length": 19, "description": [ "유효기간 마지막 일시: Format - \"YYYY-MM-DD HH:mm:ss\"" ], "default": "" } ] } }, "revokeP_실전": { "info": { "category": "OAuth 인증", "name": "접근토큰폐기(P)", "version": "인증-002", "method": "post", "url": "/oauth2/revokeP", "format": "JSON", "contentType": "application/json; charset=UTF-8", "verifyDate": "2023-07-01T00:00:00.000Z", "downloadDate": "2023-06-01T00:00:00.000Z", "memo": "", "domain": "https://openapi.koreainvestment.com:9443", "trid": "revokeP", "isProduct": true, "description": "접근토큰폐기(P)" }, "request": { "header": [], "body": [ { "code": "appkey", "name": "고객 앱Key", "type": "string", "required": true, "length": 36, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "appsecret", "name": "고객 앱Secret", "type": "string", "required": true, "length": 180, "description": [ "한국투자증권 홈페이지에서 발급받은 appsecret (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "token", "name": "접근토큰", "type": "string", "required": true, "length": 400, "description": [ "OAuth 토큰이 필요한 API 경우 발급한 Access token", "일반고객(Access token 유효기간 1일, OAuth 2.0의 Client Credentials Grant 절차를 준용)", "법인(Access token 유효기간 3개월, Refresh token 유효기간 1년, OAuth 2.0의 Authorization Code Grant 절차를 준용)" ], "default": "" } ] }, "response": { "header": [], "body": [ { "code": "code", "name": "응답코드", "type": "string", "required": false, "length": 8, "description": [ "HTTP 응답코드" ], "default": 200 }, { "code": "message", "name": "응답메세지", "type": "string", "required": false, "length": 450, "description": [ "응답메세지" ], "default": "접근토큰 폐기에 성공하였습니다." } ] } }, "revokeP_모의": { "info": { "category": "OAuth 인증", "name": "접근토큰폐기(P)", "version": "인증-002", "method": "post", "url": "/oauth2/revokeP", "format": "JSON", "contentType": "application/json; charset=UTF-8", "verifyDate": "2023-07-01T00:00:00.000Z", "downloadDate": "2023-06-01T00:00:00.000Z", "memo": "", "domain": "https://openapivts.koreainvestment.com:29443", "trid": "revokeP", "isProduct": false, "description": "접근토큰폐기(P)" }, "request": { "header": [], "body": [ { "code": "appkey", "name": "고객 앱Key", "type": "string", "required": true, "length": 36, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "appsecret", "name": "고객 앱Secret", "type": "string", "required": true, "length": 180, "description": [ "한국투자증권 홈페이지에서 발급받은 appsecret (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "token", "name": "접근토큰", "type": "string", "required": true, "length": 400, "description": [ "OAuth 토큰이 필요한 API 경우 발급한 Access token", "일반고객(Access token 유효기간 1일, OAuth 2.0의 Client Credentials Grant 절차를 준용)", "법인(Access token 유효기간 3개월, Refresh token 유효기간 1년, OAuth 2.0의 Authorization Code Grant 절차를 준용)" ], "default": "" } ] }, "response": { "header": [], "body": [ { "code": "code", "name": "응답코드", "type": "string", "required": false, "length": 8, "description": [ "HTTP 응답코드" ], "default": 200 }, { "code": "message", "name": "응답메세지", "type": "string", "required": false, "length": 450, "description": [ "응답메세지" ], "default": "접근토큰 폐기에 성공하였습니다." } ] } }, "TTTC0802U_실전": { "info": { "category": "국내주식주문", "name": "주식주문(현금)", "version": "v1_국내주식-001", "method": "post", "url": "/uapi/domestic-stock/v1/trading/order-cash", "format": "JSON", "contentType": "application/json; charset=UTF-8", "verifyDate": "2023-09-27T00:00:00.000Z", "downloadDate": "2023-06-01T00:00:00.000Z", "memo": "", "domain": "https://openapi.koreainvestment.com:9443", "trid": "TTTC0802U", "isProduct": true, "description": "주식 현금 매수 주문" }, "request": { "header": [ { "code": "content-type", "name": "컨텐츠타입", "type": "string", "required": false, "length": 40, "description": [ "application/json; charset=utf-8" ], "default": "" }, { "code": "authorization", "name": "접근토큰", "type": "string", "required": true, "length": 400, "description": [ "OAuth 토큰이 필요한 API 경우 발급한 Access token", "일반고객(Access token 유효기간 1일, OAuth 2.0의 Client Credentials Grant 절차를 준용)", "법인(Access token 유효기간 3개월, Refresh token 유효기간 1년, OAuth 2.0의 Authorization Code Grant 절차를 준용)", "※ 토큰 지정시 토큰 타입(\"Bearer\") 지정 필요. 즉, 발급받은 접근토큰 앞에 앞에 \"Bearer\" 붙여서 호출", "EX) \"Bearer eyJ..........8GA\"" ], "default": "" }, { "code": "appkey", "name": "앱키", "type": "string", "required": true, "length": 36, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "appsecret", "name": "앱시크릿키", "type": "string", "required": true, "length": 180, "description": [ "한국투자증권 홈페이지에서 발급받은 appsecret (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "personalseckey", "name": "고객식별키", "type": "string", "required": false, "length": 180, "description": [ "[법인 필수] 제휴사 회원 관리를 위한 고객식별키" ], "default": "" }, { "code": "tr_id", "name": "거래ID", "type": "string", "required": true, "length": 13, "description": [ "[실전투자]", "TTTC0802U : 주식 현금 매수 주문", "TTTC0801U : 주식 현금 매도 주문", "[모의투자]", "VTTC0802U : 주식 현금 매수 주문", "VTTC0801U : 주식 현금 매도 주문" ], "default": "", "enum": [ { "code": "TTTC0802U", "name": "주식 현금 매수 주문" }, { "code": "TTTC0801U", "name": "주식 현금 매도 주문" }, { "code": "VTTC0802U", "name": "주식 현금 매수 주문" }, { "code": "VTTC0801U", "name": "주식 현금 매도 주문" } ] }, { "code": "tr_cont", "name": "연속 거래 여부", "type": "string", "required": false, "length": 1, "description": [ "공백 : 초기 조회", "N : 다음 데이터 조회 (output header의 tr_cont가 M일 경우)" ], "default": "", "enum": [ { "code": " ", "name": "초기 조회" }, { "code": "N", "name": "다음 데이터 조회 (output header의 tr_cont가 M일 경우)" } ] }, { "code": "custtype", "name": "고객타입", "type": "string", "required": false, "length": 1, "description": [ "B : 법인", "P : 개인" ], "default": "", "enum": [ { "code": "B", "name": "법인" }, { "code": "P", "name": "개인" } ] }, { "code": "seq_no", "name": "일련번호", "type": "string", "required": false, "length": 2, "description": [ "[법인 필수] 01" ], "default": "" }, { "code": "mac_address", "name": "맥주소", "type": "string", "required": false, "length": 12, "description": [ "법인고객 혹은 개인고객의 Mac address 값" ], "default": "" }, { "code": "phone_number", "name": "핸드폰번호", "type": "string", "required": false, "length": 12, "description": [ "[법인 필수] 제휴사APP을 사용하는 경우 사용자(회원) 핸드폰번호", "ex) 01011112222 (하이픈 등 구분값 제거)" ], "default": "" }, { "code": "ip_addr", "name": "접속 단말 공인 IP", "type": "string", "required": false, "length": 12, "description": [ "[법인 필수] 사용자(회원)의 IP Address" ], "default": "" }, { "code": "hashkey", "name": "해쉬키", "type": "string", "required": false, "length": 256, "description": [ "※ 입력 불필요" ], "default": "" }, { "code": "gt_uid", "name": "Global UID", "type": "string", "required": false, "length": 32, "description": [ "[법인 필수] 거래고유번호로 사용하므로 거래별로 UNIQUE해야 함" ], "default": "" } ], "body": [ { "code": "CANO", "name": "종합계좌번호", "type": "string", "required": true, "length": 8, "description": [ "계좌번호 체계(8-2)의 앞 8자리" ], "default": "" }, { "code": "ACNT_PRDT_CD", "name": "계좌상품코드", "type": "string", "required": true, "length": 2, "description": [ "계좌번호 체계(8-2)의 뒤 2자리" ], "default": "" }, { "code": "PDNO", "name": "종목코드(6자리)", "type": "string", "required": true, "length": 12, "description": [ "종목코드(6자리)" ], "default": "" }, { "code": "ORD_DVSN", "name": "주문구분", "type": "string", "required": true, "length": 2, "description": [ "00 : 지정가", "01 : 시장가", "02 : 조건부지정가", "03 : 최유리지정가", "04 : 최우선지정가", "05 : 장전 시간외 (08:20~08:40)", "06 : 장후 시간외 (15:30~16:00)", "07 : 시간외 단일가(16:00~18:00)", "08 : 자기주식", "09 : 자기주식S-Option", "10 : 자기주식금전신탁", "11 : IOC지정가 (즉시체결,잔량취소)", "12 : FOK지정가 (즉시체결,전량취소)", "13 : IOC시장가 (즉시체결,잔량취소)", "14 : FOK시장가 (즉시체결,전량취소)", "15 : IOC최유리 (즉시체결,잔량취소)", "16 : FOK최유리 (즉시체결,전량취소)" ], "default": "", "enum": [ { "code": "00", "name": "지정가" }, { "code": "01", "name": "시장가" }, { "code": "02", "name": "조건부지정가" }, { "code": "03", "name": "최유리지정가" }, { "code": "04", "name": "최우선지정가" }, { "code": "08", "name": "자기주식" }, { "code": "09", "name": "자기주식S-Option" }, { "code": "10", "name": "자기주식금전신탁" }, { "code": "11", "name": "IOC지정가 (즉시체결,잔량취소)" }, { "code": "12", "name": "FOK지정가 (즉시체결,전량취소)" }, { "code": "13", "name": "IOC시장가 (즉시체결,잔량취소)" }, { "code": "14", "name": "FOK시장가 (즉시체결,전량취소)" }, { "code": "15", "name": "IOC최유리 (즉시체결,잔량취소)" }, { "code": "16", "name": "FOK최유리 (즉시체결,전량취소)" } ] }, { "code": "ORD_QTY", "name": "주문수량", "type": "string", "required": true, "length": 10, "description": [ "주문주식수" ], "default": "" }, { "code": "ORD_UNPR", "name": "주문단가", "type": "string", "required": true, "length": 19, "description": [ "1주당 가격", "* 장전 시간외, 장후 시간외, 시장가의 경우 1주당 가격을 공란으로 비우지 않음 \"0\"으로 입력 권고" ], "default": "" }, { "code": "ALGO_NO", "name": "알고리즘번호", "type": "string", "required": false, "length": 10, "description": [ "미사용" ], "default": "" } ] }, "response": { "header": [ { "code": "content-type", "name": "컨텐츠타입", "type": "string", "required": true, "length": 40, "description": [ "application/json; charset=utf-8" ], "default": "" }, { "code": "tr_id", "name": "거래ID", "type": "string", "required": true, "length": 13, "description": [ "요청한 tr_id" ], "default": "" }, { "code": "tr_cont", "name": "연속 거래 여부", "type": "string", "required": true, "length": 1, "description": [ "F or M : 다음 데이터 있음", "D or E : 마지막 데이터" ], "default": "", "enum": [ { "code": "", "name": "다음 데이터 없음" }, { "code": "F", "name": "다음 데이터 있음" }, { "code": "M", "name": "다음 데이터 있음" }, { "code": "D", "name": "마지막 데이터" }, { "code": "E", "name": "마지막 데이터" } ] }, { "code": "gt_uid", "name": "Global UID", "type": "string", "required": true, "length": 32, "description": [ "거래고유번호" ], "default": "" } ], "body": [ { "code": "rt_cd", "name": "성공 실패 여부", "type": "string", "required": true, "length": 1, "description": [ "0 : 성공", "0 이외의 값 : 실패" ], "default": "", "enum": [ { "code": "0", "name": "성공" }, { "code": "0 이외의 값", "name": "실패" } ] }, { "code": "msg_cd", "name": "응답코드", "type": "string", "required": true, "length": 8, "description": [ "응답코드" ], "default": "" }, { "code": "msg", "name": "msg", "type": "string", "required": true, "length": 80, "description": [ "응답메세지" ], "default": "" }, { "code": "output", "name": "응답상세", "type": "array", "required": true, "length": -1, "description": [ "" ], "default": "", "fields": [ { "code": "KRX_FWDG_ORD_ORGNO", "name": "한국거래소전송주문조직번호", "type": "string", "required": true, "length": 5, "description": [ "주문시 한국투자증권 시스템에서 지정된 영업점코드" ], "default": "" }, { "code": "ODNO", "name": "주문번호", "type": "string", "required": true, "length": 10, "description": [ "주문시 한국투자증권 시스템에서 채번된 주문번호" ], "default": "" }, { "code": "ORD_TMD", "name": "주문시각", "type": "string", "required": true, "length": 6, "description": [ "주문시각(시분초HHMMSS)" ], "default": "" } ] } ] } }, "TTTC0801U_실전": { "info": { "category": "국내주식주문", "name": "주식주문(현금)", "version": "v1_국내주식-001", "method": "post", "url": "/uapi/domestic-stock/v1/trading/order-cash", "format": "JSON", "contentType": "application/json; charset=UTF-8", "verifyDate": "2023-09-27T00:00:00.000Z", "downloadDate": "2023-06-01T00:00:00.000Z", "memo": "", "domain": "https://openapi.koreainvestment.com:9443", "trid": "TTTC0801U", "isProduct": true, "description": "주식 현금 매도 주문" }, "request": { "header": [ { "code": "content-type", "name": "컨텐츠타입", "type": "string", "required": false, "length": 40, "description": [ "application/json; charset=utf-8" ], "default": "" }, { "code": "authorization", "name": "접근토큰", "type": "string", "required": true, "length": 400, "description": [ "OAuth 토큰이 필요한 API 경우 발급한 Access token", "일반고객(Access token 유효기간 1일, OAuth 2.0의 Client Credentials Grant 절차를 준용)", "법인(Access token 유효기간 3개월, Refresh token 유효기간 1년, OAuth 2.0의 Authorization Code Grant 절차를 준용)", "※ 토큰 지정시 토큰 타입(\"Bearer\") 지정 필요. 즉, 발급받은 접근토큰 앞에 앞에 \"Bearer\" 붙여서 호출", "EX) \"Bearer eyJ..........8GA\"" ], "default": "" }, { "code": "appkey", "name": "앱키", "type": "string", "required": true, "length": 36, "description": [ "한국투자증권 홈페이지에서 발급받은 appkey (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "appsecret", "name": "앱시크릿키", "type": "string", "required": true, "length": 180, "description": [ "한국투자증권 홈페이지에서 발급받은 appsecret (절대 노출되지 않도록 주의해주세요.)" ], "default": "" }, { "code": "personalseckey", "name": "고객식별키", "type": "string", "required": false, "length": 180, "description": [ "[법인 필수] 제휴사 회원 관리를 위한 고객식별키" ], "default": "" }, { "code": "tr_id", "name": "거래ID", "type": "string", "required": true, "length": 13, "description": [ "[실전투자]", "TTTC0802U : 주식 현금 매수 주문", "TTTC0801U : 주식 현금 매도 주문", "[모의투자]", "VTTC0802U : 주식 현금 매수 주문", "VTTC0801U : 주식 현금 매도 주문"