{
  "openapi": "3.0.3",
  "info": {
    "title": "NH투자증권 Open API — 해외주식 (Global Stock)",
    "version": "v1",
    "description": "NH투자증권 Open API 중 **해외주식 (Global Stock)** 자산군의 REST 및 실시간(WebSocket) API 문서입니다. (기준: API명세서 260730 / N2 환경 · 필드명은 명세서 C열 기준)\n\n- REST: POST + JSON, 요청 Input_0 / 응답 Output_0(+Output_1·Output_2 …) + message. 응답 블록의 타입은 API 마다 다릅니다(객체=집계 / 배열=목록). 블록은 데이터가 있을 때만 내려옵니다.\n- 실시간: WebSocket, 푸시=JSON. x-realtime-channels.protocol 참조.\n- 📄 종목마스터: 전 종목 목록·종목명 조회 REST API 는 없습니다. 정적 종목정보는 https://www.n2plug.com/instruments/<파일명>.mst (CP949 고정길이, 인증 불필요). 상세는 x-instruments 참조.\n- 🏦 계좌 선택: /n2/acctinfo 의 acct_type 이 01(일반)·02(주문대리인) 이면 운영(api.n2plug.com:8443) 전용, 03 이면 모의투자(moapi.n2plug.com:8443) 전용 계좌입니다. 대상 환경과 맞는 계좌를 사용하세요.\n- 🔑 토큰 재사용: access token 은 24시간(expires_in=86400) 유효. 매 호출 재발급 금지 — 공유 캐시에 저장해 재사용(재발급은 보안 알림 유발). 재발급은 401 일 때만, 429 재시도엔 기존 토큰 사용.\n- 인증: POST /oauth2/token → REST 는 Authorization/x-client-id/x-client-secret, WS 는 header.token.\n- 환경 제공: 이 자산군 API 는 **모의투자·운영 모두 제공**. (접근토큰발급만 공통에서 운영 전용)"
  },
  "servers": [
    {
      "url": "https://api.n2plug.com:8443",
      "description": "🔴 운영 (Live) — 실제 주문 체결 [기본]"
    },
    {
      "url": "https://moapi.n2plug.com:8443",
      "description": "🟢 모의투자 (Mock) — 교육이수·개발·검증"
    }
  ],
  "security": [
    {
      "BearerAuth": [],
      "ClientId": [],
      "ClientSecret": []
    }
  ],
  "x-environments": {
    "portal": "https://www.n2plug.com",
    "note": "기본 환경은 **운영(live)** 입니다. 운영은 주문이 실제로 체결됩니다. 테스트·검증은 모의투자(mock)를 사용하세요. N2 기준(N2 추후).",
    "mock": {
      "desc": "모의투자 — 교육이수·개발검증",
      "rest": "https://moapi.n2plug.com:8443",
      "websocket": "wss://moapi.n2plug.com:17070"
    },
    "live": {
      "desc": "운영 — 실제 주문 체결",
      "rest": "https://api.n2plug.com:8443",
      "websocket": "wss://api.n2plug.com:7080"
    }
  },
  "tags": [
    {
      "name": "주문 (Order)"
    },
    {
      "name": "조회 (Inquiry)"
    },
    {
      "name": "시세 (Market Data)"
    },
    {
      "name": "실시간 (Realtime)"
    }
  ],
  "paths": {
    "/gbstock/order/v1/buy": {
      "post": {
        "tags": [
          "주문 (Order)"
        ],
        "operationId": "gbstockOrderBuy",
        "summary": "해외주식 주문매수",
        "description": "해외주식 매수주문 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / 계좌번호 입력 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "fc_sec_trd_nat_cd": {
                        "type": "string",
                        "description": "외화증권거래국가코드 / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "티커종목코드 / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "orr_qty": {
                        "type": "integer",
                        "format": "int64",
                        "description": "주문수량 / 길이 18 / 주문수량"
                      },
                      "fc_orr_uit_pr": {
                        "type": "number",
                        "format": "double",
                        "description": "외화주문단가 / 길이 15.6 / 주문단가 - 소수점 2자리까지(향후변경예정) \"현물호가유형코드\" 00,11,12,61,62,63 시 필수"
                      },
                      "ahi_nmn_pr_tp_cd": {
                        "type": "string",
                        "description": "현물호가유형코드 / 길이 2 / 00.지정가 03.시장가 61.프리마켓(지정가) 62.애프터마켓(지정가) 63.주간거래(지정가) 11.LOO(장개시 지정가) 12.LOC(장마감 지정가) 13.MOO(장개시 시장가) 14.MOC(장마감 시장가) TW.TWAP(시장가) VW.VWAP(시장가) TL.TWAP(지정가) VL.VWAP(지정가)"
                      },
                      "wtm_cur_knd_cd": {
                        "type": "string",
                        "description": "증거금통화종류코드 / 길이 1 / 1.해당통화 2.원화"
                      }
                    },
                    "required": [
                      "act_no",
                      "fc_sec_trd_nat_cd",
                      "iem_cd",
                      "orr_qty",
                      "ahi_nmn_pr_tp_cd",
                      "wtm_cur_knd_cd"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "object",
                      "properties": {
                        "amn_tab_cd": {
                          "type": "string",
                          "description": "관리팀점코드 / 길이 4"
                        },
                        "orr_no": {
                          "type": "integer",
                          "format": "int64",
                          "description": "주문번호 / 길이 10"
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gbstock/order/v1/sell": {
      "post": {
        "tags": [
          "주문 (Order)"
        ],
        "operationId": "gbstockOrderSell",
        "summary": "해외주식 주문매도",
        "description": "해외주식 매도주문 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / 계좌번호 입력 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "fc_sec_trd_nat_cd": {
                        "type": "string",
                        "description": "외화증권거래국가코드 / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "티커종목코드 / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "orr_qty": {
                        "type": "integer",
                        "format": "int64",
                        "description": "주문수량 / 길이 18 / 주문수량"
                      },
                      "fc_orr_uit_pr": {
                        "type": "number",
                        "format": "double",
                        "description": "외화주문단가 / 길이 15.6 / 주문단가 - 소수점 2자리까지(향후변경예정) \"현물호가유형코드\" 00,11,12,16,61,62,63 시 필수"
                      },
                      "ahi_nmn_pr_tp_cd": {
                        "type": "string",
                        "description": "현물호가유형코드 / 길이 2 / 00.지정가 03.시장가 61.프리마켓(지정가) 62.애프터마켓(지정가) 63.주간거래(지정가) 11.LOO(장개시 지정가) 12.LOC(장마감 지정가) 13.MOO(장개시 시장가) 14.MOC(장마감 시장가) 15.STOP(시장가) 16.STOP LIMIT(지정가) TW.TWAP(시장가) VW.VWAP(시장가) TL.TWAP(지정가) VL.VWAP(지정가)"
                      }
                    },
                    "required": [
                      "act_no",
                      "fc_sec_trd_nat_cd",
                      "iem_cd",
                      "orr_qty",
                      "ahi_nmn_pr_tp_cd"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "object",
                      "properties": {
                        "amn_tab_cd": {
                          "type": "string",
                          "description": "관리팀점코드 / 길이 4"
                        },
                        "orr_no": {
                          "type": "integer",
                          "format": "int64",
                          "description": "주문번호 / 길이 10"
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gbstock/order/v1/modify": {
      "post": {
        "tags": [
          "주문 (Order)"
        ],
        "operationId": "gbstockOrderModify",
        "summary": "해외주식 정정취소주문정정",
        "description": "해외주식 정정주문 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / 계좌번호 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "fc_sec_trd_nat_cd": {
                        "type": "string",
                        "description": "외화증권거래국가코드 / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "티커종목코드 / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "org_orr_no": {
                        "type": "integer",
                        "format": "int64",
                        "description": "원주문번호 / 길이 10 / 정정대상 주문번호"
                      },
                      "fc_orr_uit_pr": {
                        "type": "number",
                        "format": "double",
                        "description": "외화주문단가 / 길이 15.6 / 주문단가 - 소수점 2자리까지(향후변경예정)"
                      },
                      "fc_stop_orr_bse_pr": {
                        "type": "number",
                        "format": "double",
                        "description": "외화STOP주문기준가격 / 길이 15.6 / 호가유형이 15.STOP, 16.STOP LIMIT 일 때 필수 그 외 미입력"
                      }
                    },
                    "required": [
                      "act_no",
                      "fc_sec_trd_nat_cd",
                      "iem_cd",
                      "org_orr_no",
                      "fc_orr_uit_pr"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "object",
                      "properties": {
                        "amn_tab_cd": {
                          "type": "string",
                          "description": "관리팀점코드 / 길이 4"
                        },
                        "orr_no": {
                          "type": "integer",
                          "format": "int64",
                          "description": "주문번호 / 길이 10"
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gbstock/order/v1/cancel": {
      "post": {
        "tags": [
          "주문 (Order)"
        ],
        "operationId": "gbstockOrderCancel",
        "summary": "해외주식 정정취소주문취소",
        "description": "해외주식 취소주문 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / 계좌번호 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "org_orr_no": {
                        "type": "integer",
                        "format": "int64",
                        "description": "원주문번호 / 길이 10 / 취소대상 주문번호"
                      },
                      "fc_sec_trd_nat_cd": {
                        "type": "string",
                        "description": "외화증권거래국가코드 / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "티커종목코드 / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "can_qty": {
                        "type": "integer",
                        "format": "int64",
                        "description": "취소수량 / 길이 18 / 취소수량"
                      },
                      "all_pat_dit_cd": {
                        "type": "string",
                        "description": "전체일부구분코드 / 길이 1 / 1:전체, 2:일부"
                      }
                    },
                    "required": [
                      "act_no",
                      "org_orr_no",
                      "fc_sec_trd_nat_cd",
                      "iem_cd",
                      "all_pat_dit_cd"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "object",
                      "properties": {
                        "amn_tab_cd": {
                          "type": "string",
                          "description": "관리팀점코드 / 길이 4"
                        },
                        "orr_no": {
                          "type": "integer",
                          "format": "int64",
                          "description": "주문번호 / 길이 10"
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gbstock/order/v1/reservedSubmit": {
      "post": {
        "tags": [
          "주문 (Order)"
        ],
        "operationId": "gbstockOrderReservedSubmit",
        "summary": "해외주식 예약주문접수",
        "description": "해외주식 예약주문(매수/매도) API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "act_no / 길이 11 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "fc_sec_trd_nat_cd": {
                        "type": "string",
                        "description": "fc_sec_trd_nat_cd / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "tck_iem_cd / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "oss_sby_dit_cd": {
                        "type": "string",
                        "description": "oss_sby_dit_cd / 길이 1 / 1.매도 2.매수"
                      },
                      "orr_qty": {
                        "type": "integer",
                        "format": "int64",
                        "description": "orr_qty / 길이 18"
                      },
                      "fc_orr_uit_pr": {
                        "type": "number",
                        "format": "double",
                        "description": "fc_orr_uit_pr / 길이 15.6"
                      },
                      "nmn_pr_tp_cd": {
                        "type": "string",
                        "description": "nmn_pr_tp_cd / 길이 2 / 00.지정가 03.시장가 61.프리마켓(지정가) 11.LOO(장개시 지정가) 12.LOC(장마감 지정가) 13.MOO(장개시 시장가) 14.MOC(장마감 시장가) 15.STOP(시장가) 16.STOP LIMIT(지정가) TW.TWAP(시장가) VW.VWAP(시장가) TL.TWAP(지정가) VL.VWAP(지정가)"
                      },
                      "oss_orr_knd_cd": {
                        "type": "string",
                        "description": "oss_orr_knd_cd / 길이 1 / 1.GTS주문(해외투자전략코드가 0 또는 미국시장주문) 2.기타자동주문"
                      },
                      "ose_ivs_sgy_cd": {
                        "type": "string",
                        "description": "ose_ivs_sgy_cd / 길이 1 / 0.일반 1.VWAP(미국만 가능) 2.TWAP(미국만 가능)"
                      },
                      "bkg_orr_tp_cd": {
                        "type": "string",
                        "description": "bkg_orr_tp_cd / 길이 1 / 1.일반예약 2.잔량주문 3.지정수량주문"
                      },
                      "bkg_orr_sta_dt": {
                        "type": "string",
                        "description": "bkg_orr_sta_dt / 길이 8 / YYYYMMDD"
                      },
                      "bkg_orr_end_dt": {
                        "type": "string",
                        "description": "bkg_orr_end_dt / 길이 8 / YYYYMMDD"
                      },
                      "wtm_cur_knd_cd": {
                        "type": "string",
                        "description": "wtm_cur_knd_cd / 길이 1 / 1.거래국가통화 2.원화"
                      },
                      "fc_stop_orr_bse_pr": {
                        "type": "number",
                        "format": "double",
                        "description": "fc_stop_orr_bse_pr / 길이 15.6 / 호가유형코드 15.STOP(시장가), 16.STOP LIMIT(지정가) 의 경우에만 입력"
                      },
                      "orr_pdt_dit_cd": {
                        "type": "string",
                        "description": "orr_pdt_dit_cd / 길이 2 / 00.해당없음 02.교체예약주문 03.미국Stop예약주문"
                      },
                      "lon_dt": {
                        "type": "string",
                        "description": "lon_dt / 길이 8 / YYYYMMDD"
                      },
                      "cfd_lon_cd": {
                        "type": "string",
                        "description": "cfd_lon_cd / 길이 2 / 00.현금 19.해외주식담보대출"
                      }
                    },
                    "required": [
                      "act_no",
                      "fc_sec_trd_nat_cd",
                      "iem_cd",
                      "oss_sby_dit_cd",
                      "orr_qty",
                      "nmn_pr_tp_cd"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "object",
                      "properties": {
                        "bkg_rtn_orr_no": {
                          "type": "integer",
                          "format": "int64",
                          "description": "예약접수주문번호 / 길이 10"
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gbstock/order/v1/reservedCancel": {
      "post": {
        "tags": [
          "주문 (Order)"
        ],
        "operationId": "gbstockOrderReservedCancel",
        "summary": "해외주식 예약주문접수취소",
        "description": "해외주식 예약취소주문 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "fc_mkt_dit_cd": {
                        "type": "string",
                        "description": "외화시장구분코드 / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                      },
                      "bkg_orr_dt": {
                        "type": "string",
                        "description": "예약주문일자 / 길이 8"
                      },
                      "bkg_rtn_orr_no": {
                        "type": "integer",
                        "format": "int64",
                        "description": "예약접수주문번호 / 길이 10"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "티커종목코드 / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "orr_pdt_dit_cd": {
                        "type": "string",
                        "description": "주문상품구분코드 / 길이 2 / 00.해당없음 02.교체예약주문 03.미국Stop예약주문"
                      }
                    },
                    "required": [
                      "act_no",
                      "fc_mkt_dit_cd",
                      "bkg_orr_dt",
                      "bkg_rtn_orr_no"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "object",
                      "properties": {
                        "wrk_rlt_cd": {
                          "type": "string",
                          "description": "작업결과코드 / 길이 5"
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gbstock/inquiry/v1/buyableAmount": {
      "post": {
        "tags": [
          "조회 (Inquiry)"
        ],
        "operationId": "gbstockInquiryBuyableAmount",
        "summary": "해외주식 매수가능금액·수량 / 매도가능수량 조회",
        "description": "처리구분(pcs_dit)으로 매수·매도를 모두 조회합니다. 1.매수가능금액 2.매수가능수량 3.매도가능수량 4.예약매수금액/수량 5.예약매도수량. (국내주식은 buyableQuantity/sellableQuantity 로 API 가 분리되어 있으나, 해외주식은 이 API 하나로 통합되어 있습니다.)\n\n해외주식 매수/매도 가능 수량/금액 조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "pcs_dit": {
                        "type": "string",
                        "description": "처리구분 / 길이 1 / 1.매수가능금액조회 2.매수가능수량조회 3.매도가능수량조회 4.예약매수금액/수량 5.예약매도수량"
                      },
                      "fc_sec_trd_nat_cd": {
                        "type": "string",
                        "description": "외화증권거래국가코드 / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "종목코드 / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "fc_orr_uit_pr": {
                        "type": "number",
                        "format": "double",
                        "description": "외화주문단가 / 길이 15.6"
                      },
                      "wtm_cur_knd_cd": {
                        "type": "string",
                        "description": "증거금통화종류코드 / 길이 1 / 1.거래국가통화 2.원화 3.기타통화 4.거래국가통화(통합금거금가능금미포함)"
                      },
                      "oss_orr_knd_cd": {
                        "type": "string",
                        "description": "해외증권주문종류코드 / 길이 1 / 1.GTS(미국시장주문) 2.기타자동 3.기타수동"
                      },
                      "ahi_nmn_pr_tp_cd": {
                        "type": "string",
                        "description": "현물호가유형코드 / 길이 2 / 00.지정가 03.시장가 61.프리마켓(지정가) 62.애프터마켓(지정가) 63.주간거래(지정가) 11.LOO(장개시 지정가) 12.LOC(장마감 지정가) 13.MOO(장개시 시장가) 14.MOC(장마감 시장가) 15.STOP(시장가) 16.STOP LIMIT(지정가) TW.TWAP(시장가) VW.VWAP(시장가) TL.TWAP(지정가) VL.VWAP(지정가)"
                      },
                      "cfd_lon_cd": {
                        "type": "string",
                        "description": "신용대출코드 / 길이 2 / 00.현금 19.해외주식담보대출"
                      },
                      "lon_dt": {
                        "type": "string",
                        "description": "대출일자 / 길이 8 / YYYYMMDD"
                      }
                    },
                    "required": [
                      "act_no",
                      "pcs_dit",
                      "fc_sec_trd_nat_cd",
                      "iem_cd",
                      "wtm_cur_knd_cd",
                      "oss_orr_knd_cd",
                      "ahi_nmn_pr_tp_cd"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "object",
                      "properties": {
                        "fc_dca": {
                          "type": "number",
                          "format": "double",
                          "description": "외화예수금 / 길이 15.3"
                        },
                        "mgg_fc_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "담보외화금액 / 길이 15.3"
                        },
                        "csh_wtm": {
                          "type": "number",
                          "format": "double",
                          "description": "현금증거금 / 길이 15.3"
                        },
                        "re_use_obj_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "재사용대상금액 / 길이 15.3"
                        },
                        "re_use_rtr_use_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "재사용환원사용금액 / 길이 15.3"
                        },
                        "ect_use_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "기타사용금액 / 길이 15.3"
                        },
                        "orr_pbl_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "주문가능금액 / 길이 15.3"
                        },
                        "wtm_cur_cd": {
                          "type": "string",
                          "description": "증거금통화코드 / 길이 3"
                        },
                        "hld_qty": {
                          "type": "integer",
                          "format": "int64",
                          "description": "보유수량 / 길이 18"
                        },
                        "orr_pbl_qty": {
                          "type": "integer",
                          "format": "int64",
                          "description": "주문가능수량 / 길이 10"
                        },
                        "sll_pbl_qty": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도가능수량 / 길이 18"
                        },
                        "sll_pbl_qty1": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도가능수량1 / 길이 18"
                        },
                        "byn_cns_qty": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수체결수량 / 길이 18"
                        },
                        "sll_cns_qty": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도체결수량 / 길이 18"
                        },
                        "sll_orr_qty": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도주문수량 / 길이 18"
                        },
                        "dps_rsc_qty": {
                          "type": "integer",
                          "format": "int64",
                          "description": "처분제한수량 / 길이 18"
                        },
                        "byn_pbl_qty": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수가능수량 / 길이 18"
                        },
                        "max_pbl_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "최대가능금액 / 길이 15.3"
                        },
                        "max_pbl_qty": {
                          "type": "integer",
                          "format": "int64",
                          "description": "최대가능수량 / 길이 18"
                        },
                        "csh_wtm_rt": {
                          "type": "number",
                          "format": "double",
                          "description": "현금증거금율 / 길이 8.5"
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CtsHeader"
          }
        ]
      }
    },
    "/gbstock/inquiry/v1/unexecuted": {
      "post": {
        "tags": [
          "조회 (Inquiry)"
        ],
        "operationId": "gbstockInquiryUnexecuted",
        "summary": "해외주식 주문체결내역",
        "description": "주문별 체결수량·체결가격·미체결주문수량을 포함한 **주문·체결 내역 조회** 입니다. URI 의 `unexecuted` 는 서버 경로일 뿐이며, 실제로는 체결·미체결 내역을 모두 반환합니다. (주문 접수 API 아님, 조회 전용)\n\n해외주식 주문체결내역 조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "orr_dt": {
                        "type": "string",
                        "description": "주문일자 / 길이 8"
                      },
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "티커종목코드 / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "oss_sby_dit_cd": {
                        "type": "string",
                        "description": "해외증권매매구분코드 / 길이 1 / 0.전체 1.매도 2.매수"
                      },
                      "sot_dit": {
                        "type": "string",
                        "description": "정렬구분 / 길이 1 / 0.주문번호순 1.주문번호역순"
                      },
                      "orr_no": {
                        "type": "integer",
                        "format": "int64",
                        "description": "주문번호 / 길이 10"
                      },
                      "ost_cns_dit": {
                        "type": "string",
                        "description": "체결구분 / 길이 1 / 0.전체 1.체결 2.미체결"
                      }
                    },
                    "required": [
                      "orr_dt",
                      "act_no",
                      "oss_sby_dit_cd",
                      "sot_dit",
                      "ost_cns_dit"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rgs_tm": {
                            "type": "string",
                            "description": "등록시각 / 길이 8"
                          },
                          "oss_orr_knd_cd": {
                            "type": "string",
                            "description": "해외증권주문종류코드 / 길이 1"
                          },
                          "orr_knd_nm": {
                            "type": "string",
                            "description": "주문종류명 / 길이 10"
                          },
                          "orr_no": {
                            "type": "integer",
                            "format": "int64",
                            "description": "주문번호 / 길이 10"
                          },
                          "org_orr_no": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원주문번호 / 길이 10"
                          },
                          "oss_sby_dit_cd": {
                            "type": "string",
                            "description": "해외증권매매구분코드 / 길이 1"
                          },
                          "sby_dit_nm": {
                            "type": "string",
                            "description": "매매구분명 / 길이 4"
                          },
                          "fc_sec_trd_nat_cd": {
                            "type": "string",
                            "description": "외화증권거래국가코드 / 길이 3"
                          },
                          "mkt_dit_cd_nm": {
                            "type": "string",
                            "description": "시장구분코드명 / 길이 50"
                          },
                          "iem_cd": {
                            "type": "string",
                            "description": "종목코드 / 길이 12"
                          },
                          "iem_nm": {
                            "type": "string",
                            "description": "종목명 / 길이 60"
                          },
                          "orr_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "주문수량 / 길이 18"
                          },
                          "fc_orr_uit_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "외화주문단가 / 길이 15.6"
                          },
                          "cns_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "체결수량 / 길이 18"
                          },
                          "cns_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "체결가격 / 길이 15.6"
                          },
                          "ny_cns_orr_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "미체결주문수량 / 길이 18"
                          },
                          "cor_can_dit_cd": {
                            "type": "string",
                            "description": "정정취소구분코드 / 길이 1"
                          },
                          "cor_can_dit_nm": {
                            "type": "string",
                            "description": "정정취소구분명 / 길이 4"
                          },
                          "cor_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "정정수량 / 길이 18"
                          },
                          "can_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "취소수량 / 길이 18"
                          },
                          "oss_ato_orr_sts_cd": {
                            "type": "string",
                            "description": "해외증권자동주문상태코드 / 길이 1"
                          },
                          "orr_sts_nm": {
                            "type": "string",
                            "description": "주문상태명 / 길이 6"
                          },
                          "oms_cus_orr_no": {
                            "type": "string",
                            "description": "OMS고객주문번호 / 길이 40"
                          },
                          "rjt_rsn_cts": {
                            "type": "string",
                            "description": "거부사유내용 / 길이 500"
                          },
                          "ivs_nat_krx_dit_cd": {
                            "type": "string",
                            "description": "투자국가거래소구분코드 / 길이 4"
                          },
                          "fix_sgy_tgt_sgy_nm": {
                            "type": "string",
                            "description": "FIX전략타겟전략명 / 길이 10"
                          },
                          "fix_orr_pcs_mtd_cd": {
                            "type": "string",
                            "description": "FIX주문처리방법코드 / 길이 1"
                          },
                          "orr_pcs_mtd_cd_nm": {
                            "type": "string",
                            "description": "주문처리방법코드명 / 길이 40"
                          },
                          "rut_orr_krx_cd": {
                            "type": "string",
                            "description": "로이터주문거래소코드 / 길이 3"
                          },
                          "hts_usr_id": {
                            "type": "string",
                            "description": "HTS사용자ID / 길이 8"
                          },
                          "usr_ip_adr": {
                            "type": "string",
                            "description": "사용자IP주소 / 길이 32"
                          },
                          "cuc_mdi_cd": {
                            "type": "string",
                            "description": "통신매체코드 / 길이 2"
                          },
                          "cuc_mdi_cd_nm": {
                            "type": "string",
                            "description": "통신매체코드명 / 길이 50"
                          },
                          "ahi_nmn_pr_tp_cd": {
                            "type": "string",
                            "description": "현물호가유형코드 / 길이 2"
                          },
                          "ahi_nmn_pr_tp_cd_nm": {
                            "type": "string",
                            "description": "현물호가유형코드명 / 길이 20"
                          },
                          "fc_stop_orr_bse_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "외화STOP주문기준가격 / 길이 15.6"
                          },
                          "orr_pdt_dit_cd": {
                            "type": "string",
                            "description": "주문상품구분코드 / 길이 2"
                          },
                          "orr_dt": {
                            "type": "string",
                            "description": "주문일자 / 길이 8"
                          },
                          "csh_wtm_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "현금증거금율 / 길이 8.5"
                          },
                          "cfd_lon_cd": {
                            "type": "string",
                            "description": "신용대출코드 / 길이 2"
                          },
                          "cfd_lon_cd_nm": {
                            "type": "string",
                            "description": "신용대출코드명 / 길이 40"
                          },
                          "lon_dt": {
                            "type": "string",
                            "description": "대출일자 / 길이 8"
                          }
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CtsHeader"
          }
        ]
      }
    },
    "/gbstock/inquiry/v1/balance": {
      "post": {
        "tags": [
          "조회 (Inquiry)"
        ],
        "operationId": "gbstockInquiryBalance",
        "summary": "해외주식 잔고",
        "description": "해외주식 잔고조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "qut_iqr_dit_cd": {
                        "type": "string",
                        "description": "시세조회구분코드 / 길이 1 / 1.정규장 9.전체"
                      },
                      "fc_sec_trd_nat_cd": {
                        "type": "string",
                        "description": "외화증권거래국가코드 / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                      },
                      "cur_cd": {
                        "type": "string",
                        "description": "통화코드 / 길이 3 / KRW.전체 USD.USD CNY.CNY HKD.HKD JPY.JPY"
                      },
                      "xns_dit_cd": {
                        "type": "string",
                        "description": "비용구분코드 / 길이 1 / 0.미포함 1.포함"
                      }
                    },
                    "required": [
                      "act_no",
                      "qut_iqr_dit_cd",
                      "fc_sec_trd_nat_cd",
                      "cur_cd"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "object",
                      "properties": {
                        "abk_amt": {
                          "type": "integer",
                          "format": "int64",
                          "description": "장부금액 / 길이 18"
                        },
                        "eal_amt_sum": {
                          "type": "integer",
                          "format": "int64",
                          "description": "평가금액합계 / 길이 18"
                        },
                        "eal_pls_sum_amt": {
                          "type": "integer",
                          "format": "int64",
                          "description": "평가손익합계금액 / 길이 18"
                        },
                        "krw_pft_rt": {
                          "type": "number",
                          "format": "double",
                          "description": "원화수익율 / 길이 15.9"
                        },
                        "krw_dca": {
                          "type": "integer",
                          "format": "int64",
                          "description": "원화예수금 / 길이 18"
                        },
                        "krw_ny_stl_xcl_amt": {
                          "type": "integer",
                          "format": "int64",
                          "description": "원화미결제정산금액 / 길이 18"
                        },
                        "tot_aet_amt": {
                          "type": "integer",
                          "format": "int64",
                          "description": "총자산금액 / 길이 18"
                        },
                        "fc_abk_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "외화장부금액 / 길이 15.3"
                        },
                        "fc_eal_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "외화평가금액 / 길이 15.3"
                        },
                        "fc_eal_pls_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "외화평가손익금액 / 길이 15.3"
                        },
                        "pft_rt": {
                          "type": "number",
                          "format": "double",
                          "description": "수익율 / 길이 15.9"
                        },
                        "fc_dca": {
                          "type": "number",
                          "format": "double",
                          "description": "외화예수금 / 길이 15.3"
                        },
                        "fc_ny_stl_xcl_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "외화미결제정산금액 / 길이 15.3"
                        },
                        "fc_aet_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "외화자산금액 / 길이 15.3"
                        },
                        "ptps_ttn_amt": {
                          "type": "number",
                          "format": "double",
                          "description": "PTP과세금액 / 길이 15.3"
                        },
                        "ptps_ttn_amt1": {
                          "type": "number",
                          "format": "double",
                          "description": "PTP과세금액1 / 길이 15.3"
                        }
                      }
                    },
                    "Output_1": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fc_sec_trd_nat_cd": {
                            "type": "string",
                            "description": "외화증권거래국가코드 / 길이 3"
                          },
                          "fc_sec_trd_nat_nm": {
                            "type": "string",
                            "description": "외화증권거래국가명 / 길이 50"
                          },
                          "iem_cd": {
                            "type": "string",
                            "description": "종목코드 / 길이 12"
                          },
                          "oss_iem_eng_nm": {
                            "type": "string",
                            "description": "해외증권종목영문명 / 길이 60"
                          },
                          "iem_nm": {
                            "type": "string",
                            "description": "외화증권한글명 / 길이 60"
                          },
                          "cns_bse_bnc_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "체결기준잔고수량 / 길이 18"
                          },
                          "sll_cns_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "매도체결수량 / 길이 18"
                          },
                          "byn_cns_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "매수체결수량 / 길이 18"
                          },
                          "sll_pbl_qty1": {
                            "type": "integer",
                            "format": "int64",
                            "description": "매도가능수량1 / 길이 18"
                          },
                          "fc_abk_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화장부금액 / 길이 15.3"
                          },
                          "krw_abk_amt1": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원화장부금액1 / 길이 18"
                          },
                          "fc_phs_uit_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "외화매입단가 / 길이 15.6"
                          },
                          "phs_uit_pr": {
                            "type": "integer",
                            "format": "int64",
                            "description": "매입단가 / 길이 15"
                          },
                          "fc_sec_end_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "외화증권종가 / 길이 15.6"
                          },
                          "end_pr": {
                            "type": "integer",
                            "format": "int64",
                            "description": "종가 / 길이 15"
                          },
                          "fc_eal_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화평가금액 / 길이 15.3"
                          },
                          "krw_eal_amt": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원화평가금액 / 길이 18"
                          },
                          "fc_eal_pls_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화평가손익금액 / 길이 15.3"
                          },
                          "krw_eal_pls_amt": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원화평가손익금액 / 길이 18"
                          },
                          "eal_pft_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "평가수익율 / 길이 15.9"
                          },
                          "eal_pft_rt1": {
                            "type": "number",
                            "format": "double",
                            "description": "평가수익율1 / 길이 15.9"
                          },
                          "cur_cd": {
                            "type": "string",
                            "description": "통화코드 / 길이 3"
                          },
                          "phs_xcg_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "매입환율 / 길이 13.6"
                          },
                          "tdt_sby_bse_xcg_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "당일매매기준환율 / 길이 12.6"
                          },
                          "fc_mkt_dit_cd": {
                            "type": "string",
                            "description": "외화시장구분코드 / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                          },
                          "fc_sll_pls_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화매도손익금액 / 길이 15.3"
                          },
                          "krw_sll_pls_amt": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원화매도손익금액 / 길이 18"
                          },
                          "fc_sll_pft_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화매도수익율 / 길이 15.9"
                          },
                          "krw_sll_pft_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "원화매도수익율 / 길이 15.9"
                          },
                          "fc_cns_bse_phs_xps": {
                            "type": "number",
                            "format": "double",
                            "description": "외화체결기준매입비 / 길이 15.3"
                          },
                          "krw_cns_bse_phs_xps": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원화체결기준매입비 / 길이 18"
                          },
                          "fc_avg_phs_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "외화평균매입가격 / 길이 15.6"
                          },
                          "krw_avg_phs_pr": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원화평균매입가격 / 길이 18"
                          },
                          "fc_fee": {
                            "type": "number",
                            "format": "double",
                            "description": "외화수수료 / 길이 15.3"
                          },
                          "krw_fee": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원화수수료 / 길이 18"
                          },
                          "fc_tax_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화세금금액 / 길이 15.3"
                          },
                          "krw_tax_amt": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원화세금금액 / 길이 18"
                          },
                          "fc_pls_qtr_phs_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "외화손익분기매입가격 / 길이 15.6"
                          },
                          "krw_pls_qtr_phs_pr": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원화손익분기매입가격 / 길이 18"
                          },
                          "sby_fee_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "매매수수료율 / 길이 15.9"
                          },
                          "fc_stk_lws_sby_fee": {
                            "type": "number",
                            "format": "double",
                            "description": "외화주식최저매매수수료 / 길이 15.3"
                          },
                          "cfd_lon_cd_nm": {
                            "type": "string",
                            "description": "신용대출코드명 / 길이 8"
                          },
                          "lon_dt": {
                            "type": "string",
                            "description": "대출일자 / 길이 8"
                          },
                          "xrn_dt": {
                            "type": "string",
                            "description": "만기일자 / 길이 8"
                          }
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CtsHeader"
          }
        ]
      }
    },
    "/gbstock/inquiry/v1/reservedInquiry": {
      "post": {
        "tags": [
          "조회 (Inquiry)"
        ],
        "operationId": "gbstockInquiryReservedInquiry",
        "summary": "해외주식 예약주문조회",
        "description": "해외주식 예약주문내역 조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "fc_mkt_dit_cd": {
                        "type": "string",
                        "description": "외화시장구분코드 / 길이 3 / 000.전체 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                      },
                      "bkg_orr_dt": {
                        "type": "string",
                        "description": "예약주문일자 / 길이 8 / YYYYMMDD"
                      },
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "티커종목코드 / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "sby_dit_cd": {
                        "type": "string",
                        "description": "매매구분코드 / 길이 1 / 0.전체 1.매도 2.매수"
                      },
                      "bkg_orr_can_yn": {
                        "type": "string",
                        "description": "예약주문취소여부 / 길이 1 / 0.전체 1.접수 2.취소 3.주문전송 4.주문확인 5.실행거부 6.실행거부(현지) 7.완료"
                      },
                      "oss_orr_knd_cd": {
                        "type": "string",
                        "description": "해외증권주문종류코드 / 길이 1 / 0.전체 1.GTS(미국시장주문) 2.기타자동 3.기타수동"
                      },
                      "bkg_orr_tp_cd": {
                        "type": "string",
                        "description": "예약주문유형코드 / 길이 1 / 0.전체 1.일반예약 2.기간잔량 3.기간지정 4.증거금징수"
                      },
                      "wtm_cur_knd_cd": {
                        "type": "string",
                        "description": "증거금통화종류코드 / 길이 1 / 0.전체 1.거래국가통화 2.원화"
                      }
                    },
                    "required": [
                      "fc_mkt_dit_cd",
                      "bkg_orr_dt",
                      "act_no",
                      "sby_dit_cd",
                      "bkg_orr_can_yn",
                      "oss_orr_knd_cd",
                      "bkg_orr_tp_cd",
                      "wtm_cur_knd_cd"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "fc_mkt_dit_cd": {
                            "type": "string",
                            "description": "외화시장구분코드 / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                          },
                          "bkg_orr_dt": {
                            "type": "string",
                            "description": "예약주문일자 / 길이 8 / YYYYMMDD"
                          },
                          "act_no": {
                            "type": "string",
                            "description": "계좌번호 / 길이 11"
                          },
                          "cus_fnm": {
                            "type": "string",
                            "description": "고객성명 / 길이 40"
                          },
                          "iem_cd": {
                            "type": "string",
                            "description": "티커종목코드 / 길이 12"
                          },
                          "iem_nm": {
                            "type": "string",
                            "description": "종목명 / 길이 60"
                          },
                          "cur_cd": {
                            "type": "string",
                            "description": "통화코드 / 길이 3 / KRW.KRW USD.USD CNY.CNY HKD.HKD JPY.JPY"
                          },
                          "sby_dit_cd": {
                            "type": "string",
                            "description": "매매구분코드 / 길이 1 / 1.매도 2.매수"
                          },
                          "sby_dit_nm": {
                            "type": "string",
                            "description": "매매구분명 / 길이 4"
                          },
                          "orr_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "주문수량 / 길이 18"
                          },
                          "orr_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "주문가격 / 길이 15.6"
                          },
                          "cns_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "체결수량 / 길이 18"
                          },
                          "cns_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "체결가격 / 길이 15.6"
                          },
                          "bkg_orr_can_yn": {
                            "type": "string",
                            "description": "예약주문취소여부 / 길이 1"
                          },
                          "orr_can_dit_nm": {
                            "type": "string",
                            "description": "주문취소구분명 / 길이 50"
                          },
                          "bkg_orr_rtn_dt": {
                            "type": "string",
                            "description": "예약주문접수일자 / 길이 8 / YYYYMMDD"
                          },
                          "bkg_orr_rtn_tm": {
                            "type": "string",
                            "description": "예약주문접수시각 / 길이 8"
                          },
                          "rgs_tab_cd": {
                            "type": "string",
                            "description": "등록팀점코드 / 길이 4"
                          },
                          "rgs_emp_no": {
                            "type": "string",
                            "description": "등록사원번호 / 길이 6"
                          },
                          "rgs_emp_fnm": {
                            "type": "string",
                            "description": "등록사원성명 / 길이 40"
                          },
                          "cct_dt": {
                            "type": "string",
                            "description": "해지일자 / 길이 8 / YYYYMMDD"
                          },
                          "cct_tm": {
                            "type": "string",
                            "description": "해지시각 / 길이 8"
                          },
                          "cct_emp_no": {
                            "type": "string",
                            "description": "해지사원번호 / 길이 6"
                          },
                          "cct_emp_fnm": {
                            "type": "string",
                            "description": "해지사원성명 / 길이 40"
                          },
                          "bkg_rtn_orr_no": {
                            "type": "integer",
                            "format": "int64",
                            "description": "예약접수주문번호 / 길이 10"
                          },
                          "orr_sno": {
                            "type": "integer",
                            "format": "int64",
                            "description": "주문일련번호 / 길이 10"
                          },
                          "ost_orr_mdi": {
                            "type": "string",
                            "description": "주문매체 / 길이 2"
                          },
                          "orr_cpl_yn": {
                            "type": "string",
                            "description": "주문완료여부 / 길이 1"
                          },
                          "ost_pcs_cd": {
                            "type": "string",
                            "description": "처리코드 / 길이 5"
                          },
                          "pcs_msg_cts": {
                            "type": "string",
                            "description": "처리메시지내용 / 길이 300"
                          },
                          "aca_tel_no": {
                            "type": "string",
                            "description": "연락처전화번호 / 길이 20"
                          },
                          "ahi_nmn_pr_tp_cd": {
                            "type": "string",
                            "description": "현물호가유형코드 / 길이 2 / 00. 지정가 03. 시장가 05. 조건부지정가 09. 자사주 11. LOO(장개시 지정가) 12. LOC(장마감 지정가) 13. MOO(장개시 시장가) 14. MOC(장마감 시장가) 15. STOP(시장가) 16. STOP LIMIT(지정가) 41. 부분충족(K-OTC) 42. 전량충족(K-OTC) 61. 프리마켓(지정가) 62. 애프터마켓(지정가) 63. 주간거래(지정가) 71. 신고대량전장시가 73. 신고대량종가 81. 시간외종가 87. 시간외대량 88. 바스켓주문 89. 시간외자사주 90. 최유리지정가 91. 최우선지정가 A0. 현재가 B1. 매수우선1호가 B2. 매수우선2호가 S1. 매도우선1호가 S2. 매도우선2호가 TL. TWAP(지정가) TW. TWAP(시장가) VL. VWAP(지정가) VW. VWAP(시장가)"
                          },
                          "ahi_nmn_pr_tp_cd_nm": {
                            "type": "string",
                            "description": "현물호가유형코드명 / 길이 20"
                          },
                          "oss_orr_knd_cd_nm": {
                            "type": "string",
                            "description": "해외증권주문종류코드명 / 길이 20"
                          },
                          "ivs_sgy_cd_nm": {
                            "type": "string",
                            "description": "투자전략코드명 / 길이 10"
                          },
                          "fc_csh_wtm": {
                            "type": "number",
                            "format": "double",
                            "description": "외화현금증거금 / 길이 15.3"
                          },
                          "fc_csh_wtm_fee": {
                            "type": "number",
                            "format": "double",
                            "description": "외화현금증거금수수료 / 길이 15.3"
                          },
                          "fc_csh_wtm_tax_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화현금증거금세금금액 / 길이 15.3"
                          },
                          "fc_csh_wtm_trd_tax": {
                            "type": "number",
                            "format": "double",
                            "description": "외화현금증거금거래세 / 길이 15.3"
                          },
                          "fc_mkt_dit_cd_nm": {
                            "type": "string",
                            "description": "외화시장구분코드명 / 길이 50"
                          },
                          "bkg_orr_tp_cd": {
                            "type": "string",
                            "description": "예약주문유형코드 / 길이 1 / 1.\t일반예약주문\n2.\t잔량기준기간예약주문\n3.\t수량기준기간예약주문\n4.\t증거금징수 예약"
                          },
                          "bkg_orr_tp_cd_nm": {
                            "type": "string",
                            "description": "예약주문유형코드명 / 길이 50"
                          },
                          "orr_enf_sta_dt": {
                            "type": "string",
                            "description": "주문집행시작일자 / 길이 8 / YYYYMMDD"
                          },
                          "orr_enf_end_dt": {
                            "type": "string",
                            "description": "주문집행종료일자 / 길이 8 / YYYYMMDD"
                          },
                          "acl_cns_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "누적체결수량 / 길이 18"
                          },
                          "lst_orr_enf_dt": {
                            "type": "string",
                            "description": "최종주문집행일자 / 길이 8 / YYYYMMDD"
                          },
                          "rmn_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "잔여수량 / 길이 18"
                          },
                          "wtm_cur_knd_cd": {
                            "type": "string",
                            "description": "증거금통화종류코드 / 길이 1 / 1.거래국가통화 2.원화 3.기타통화"
                          },
                          "cd_nm": {
                            "type": "string",
                            "description": "코드명 / 길이 50"
                          },
                          "fc_stop_orr_bse_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "외화STOP주문기준가격 / 길이 15.6"
                          },
                          "orr_pdt_dit_cd": {
                            "type": "string",
                            "description": "주문상품구분코드 / 길이 2 / 00. 해당없음 01. 월배당서비스 02. 교체예약주문 03. 미국Stop예약주문 _ .해당없음"
                          },
                          "cfd_lon_cd": {
                            "type": "string",
                            "description": "신용대출코드 / 길이 2 / 00. 일반거래 01. 유통융자 02. 자기융자 03. 유통대주 04. 자기대주 20. 해외주식매도담보대출 19. 해외주식담보대출 99. 종합담보대출 _ .해당사항없음"
                          },
                          "cfd_lon_cd_nm": {
                            "type": "string",
                            "description": "신용대출코드명 / 길이 40"
                          },
                          "lon_dt": {
                            "type": "string",
                            "description": "대출일자 / 길이 8 / YYYYMMDD"
                          }
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CtsHeader"
          }
        ]
      }
    },
    "/gbstock/inquiry/v1/dailyTransaction": {
      "post": {
        "tags": [
          "조회 (Inquiry)"
        ],
        "operationId": "gbstockInquiryDailyTransaction",
        "summary": "해외주식 일별거래내역",
        "description": "해외주식 일별거래내역 조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "iqr_sta_dt": {
                        "type": "string",
                        "description": "조회시작일자 / 길이 8 / YYYYMMDD"
                      },
                      "iqr_end_dt": {
                        "type": "string",
                        "description": "조회종료일자 / 길이 8 / YYYYMMDD"
                      },
                      "act_trd_cfc_cd": {
                        "type": "string",
                        "description": "계좌거래분류코드 / 길이 2 / 00.전체 01.입금 02.출금 03.입고 04.출고 05.매수 06.매도"
                      },
                      "iem_mlf_cd": {
                        "type": "string",
                        "description": "종목중분류코드 / 길이 5 / 00001.외화주식 00002.외화채권 00003.외화Warrant 00004.외화수익증권 00005.해외수익증권"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "종목코드 / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      }
                    },
                    "required": [
                      "act_no",
                      "iqr_sta_dt",
                      "iqr_end_dt",
                      "act_trd_cfc_cd",
                      "iem_mlf_cd"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "trd_dt": {
                            "type": "string",
                            "description": "거래일자 / 길이 8"
                          },
                          "trd_sno": {
                            "type": "integer",
                            "format": "int64",
                            "description": "거래일련번호 / 길이 5"
                          },
                          "act_trd_tp_nm": {
                            "type": "string",
                            "description": "계좌거래유형명 / 길이 50"
                          },
                          "sps_cd_nm": {
                            "type": "string",
                            "description": "적요코드명 / 길이 50"
                          },
                          "iem_krl_nm": {
                            "type": "string",
                            "description": "종목한글명 / 길이 60"
                          },
                          "iem_cd": {
                            "type": "string",
                            "description": "종목코드 / 길이 12"
                          },
                          "trd_qty": {
                            "type": "number",
                            "format": "double",
                            "description": "거래수량 / 길이 21.6"
                          },
                          "trd_uit_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "거래단가 / 길이 18.6"
                          },
                          "cur_cd_nm": {
                            "type": "string",
                            "description": "통화코드명 / 길이 50"
                          },
                          "aly_xcg_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "적용환율 / 길이 12.6"
                          },
                          "trd_bf_bnc_qty": {
                            "type": "number",
                            "format": "double",
                            "description": "거래전잔고수량 / 길이 21.6"
                          },
                          "trd_af_bnc_qty": {
                            "type": "number",
                            "format": "double",
                            "description": "거래후잔고수량 / 길이 21.6"
                          },
                          "fc_trd_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화거래금액 / 길이 18.2"
                          },
                          "krw_trd_amt": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원화거래금액 / 길이 18"
                          },
                          "trd_af_fc_dca": {
                            "type": "number",
                            "format": "double",
                            "description": "거래후외화예수금 / 길이 18.2"
                          },
                          "trd_af_dca": {
                            "type": "integer",
                            "format": "int64",
                            "description": "거래후예수금 / 길이 18"
                          },
                          "trd_af_fc_mgg_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "거래후외화담보금액 / 길이 18.2"
                          },
                          "trd_af_krw_mgg_amt": {
                            "type": "integer",
                            "format": "int64",
                            "description": "거래후원화담보금액 / 길이 18"
                          },
                          "abd_sdr_xps_fc_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "국외제비용외화금액 / 길이 18.2"
                          },
                          "tsl_mgg_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "환산담보금액 / 길이 18.2"
                          },
                          "ose_fee": {
                            "type": "number",
                            "format": "double",
                            "description": "해외수수료 / 길이 18.2"
                          },
                          "dmt_fee": {
                            "type": "integer",
                            "format": "int64",
                            "description": "국내수수료 / 길이 18"
                          },
                          "icm_tax": {
                            "type": "number",
                            "format": "double",
                            "description": "소득세 / 길이 18.2"
                          },
                          "rsd_tax": {
                            "type": "number",
                            "format": "double",
                            "description": "주민세 / 길이 18.2"
                          },
                          "rgs_cuc_mdi_cd_nm": {
                            "type": "string",
                            "description": "등록통신매체코드명 / 길이 40"
                          },
                          "rgs_tm": {
                            "type": "string",
                            "description": "등록시각 / 길이 8"
                          },
                          "rgs_tab_cd": {
                            "type": "string",
                            "description": "등록팀점코드 / 길이 4"
                          },
                          "rgs_emp_no": {
                            "type": "string",
                            "description": "등록사원번호 / 길이 6"
                          },
                          "oss_iem_cd": {
                            "type": "string",
                            "description": "해외증권종목코드 / 길이 12"
                          },
                          "oss_iem_nm": {
                            "type": "string",
                            "description": "해외증권종목명 / 길이 60"
                          },
                          "trd_bf_fc_dca": {
                            "type": "number",
                            "format": "double",
                            "description": "거래전외화예수금 / 길이 15.3"
                          },
                          "trd_bf_dca": {
                            "type": "integer",
                            "format": "int64",
                            "description": "거래전예수금 / 길이 18"
                          },
                          "oss_stm_tax": {
                            "type": "number",
                            "format": "double",
                            "description": "해외증권인지세 / 길이 15.3"
                          },
                          "fc_tsl_txa": {
                            "type": "number",
                            "format": "double",
                            "description": "외화환산세액 / 길이 15.3"
                          },
                          "fc_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화금액 / 길이 15.3"
                          },
                          "krw_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "원화금액 / 길이 15.3"
                          },
                          "fc_tax_sum": {
                            "type": "number",
                            "format": "double",
                            "description": "외화세금합계 / 길이 15.3"
                          },
                          "tax_sum": {
                            "type": "integer",
                            "format": "int64",
                            "description": "세금합계 / 길이 18"
                          },
                          "fc_icm_tax": {
                            "type": "number",
                            "format": "double",
                            "description": "외화소득세 / 길이 15.3"
                          },
                          "fc_rsd_tax": {
                            "type": "number",
                            "format": "double",
                            "description": "외화주민세 / 길이 15.3"
                          },
                          "fc_sas_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화과세표준금액 / 길이 15.3"
                          },
                          "krw_sas_amt": {
                            "type": "integer",
                            "format": "int64",
                            "description": "원화과세표준금액 / 길이 18"
                          },
                          "tsl_cmu_txa": {
                            "type": "integer",
                            "format": "int64",
                            "description": "환산산출세액 / 길이 18"
                          },
                          "fc_trd_dit_cd": {
                            "type": "string",
                            "description": "외화거래구분코드 / 길이 2"
                          },
                          "ral_trd_dt": {
                            "type": "string",
                            "description": "실거래일자 / 길이 8"
                          }
                        }
                      }
                    },
                    "Output_1": {
                      "type": "object",
                      "properties": {
                        "cus_fnm": {
                          "type": "string",
                          "description": "고객성명 / 길이 40"
                        },
                        "rnm_cfm_no": {
                          "type": "string",
                          "description": "실명확인번호 / 길이 13"
                        },
                        "rpm_tal": {
                          "type": "integer",
                          "format": "int64",
                          "description": "입금총액 / 길이 18"
                        },
                        "drn_tal": {
                          "type": "integer",
                          "format": "int64",
                          "description": "출금총액 / 길이 18"
                        },
                        "amt_sum": {
                          "type": "integer",
                          "format": "int64",
                          "description": "금액합계 / 길이 18"
                        },
                        "tax_sum_amt": {
                          "type": "integer",
                          "format": "int64",
                          "description": "세금합계금액 / 길이 18"
                        },
                        "fee_sum_amt": {
                          "type": "integer",
                          "format": "int64",
                          "description": "수수료합계금액 / 길이 18"
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CtsHeader"
          }
        ]
      }
    },
    "/gbstock/inquiry/v1/periodPnl": {
      "post": {
        "tags": [
          "조회 (Inquiry)"
        ],
        "operationId": "gbstockInquiryPeriodPnl",
        "summary": "해외주식 기간손익",
        "description": "해외주식 기간별 손익 조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "iqr_dit": {
                        "type": "string",
                        "description": "조회구분 / 길이 1 / 1.거래통화기준 2.원화기준"
                      },
                      "sta_orr_dt": {
                        "type": "string",
                        "description": "시작주문일자 / 길이 8 / YYYYMMDD"
                      },
                      "end_orr_dt": {
                        "type": "string",
                        "description": "종료주문일자 / 길이 8 / YYYYMMDD"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "티커종목코드 / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "trd_cur_cd": {
                        "type": "string",
                        "description": "거래통화코드 / 길이 3 / KRW.KRW USD.USD CNY.CNY HKD.HKD JPY.JPY"
                      },
                      "fc_sec_trd_nat_cd": {
                        "type": "string",
                        "description": "외화증권거래국가코드 / 길이 3 / 000.전체 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                      }
                    },
                    "required": [
                      "act_no",
                      "iqr_dit",
                      "sta_orr_dt",
                      "end_orr_dt"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "object",
                      "properties": {
                        "act_fnm": {
                          "type": "string",
                          "description": "계좌성명 / 길이 40"
                        },
                        "byn_qty_sum": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수수량합계 / 길이 15"
                        },
                        "fc_byn_amt_sum": {
                          "type": "number",
                          "format": "double",
                          "description": "외화매수금액합계 / 길이 18.3"
                        },
                        "sll_qty_sum": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도수량합계 / 길이 15"
                        },
                        "fc_sll_amt_sum": {
                          "type": "number",
                          "format": "double",
                          "description": "외화매도금액합계 / 길이 18.3"
                        },
                        "fc_sby_pls_sum": {
                          "type": "number",
                          "format": "double",
                          "description": "외화매매손익합계 / 길이 15.3"
                        },
                        "fc_sby_pft_rt": {
                          "type": "number",
                          "format": "double",
                          "description": "외화매매수익율 / 길이 15.9"
                        },
                        "fc_sdr_xps_sum": {
                          "type": "number",
                          "format": "double",
                          "description": "외화제비용합계 / 길이 15.3"
                        },
                        "fc_rzt_pls_sum": {
                          "type": "number",
                          "format": "double",
                          "description": "외화실현손익합계 / 길이 15.3"
                        },
                        "fc_rzt_pft_rt": {
                          "type": "number",
                          "format": "double",
                          "description": "외화실현수익율 / 길이 15.9"
                        }
                      }
                    },
                    "Output_1": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orr_dt": {
                            "type": "string",
                            "description": "주문일자 / 길이 8 / YYYYMMDD"
                          },
                          "fc_sec_trd_nat_cd": {
                            "type": "string",
                            "description": "외화증권거래국가코드 / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                          },
                          "fc_sec_trd_nat_nm": {
                            "type": "string",
                            "description": "외화증권거래국가명 / 길이 50"
                          },
                          "trd_cur_cd": {
                            "type": "string",
                            "description": "거래통화코드 / 길이 3 / KRW.KRW USD.USD CNY.CNY HKD.HKD JPY.JPY"
                          },
                          "byn_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "매수수량 / 길이 18"
                          },
                          "byn_uit_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "매수단가 / 길이 15.3"
                          },
                          "fc_byn_amt1": {
                            "type": "number",
                            "format": "double",
                            "description": "외화매수금액1 / 길이 15.3"
                          },
                          "sll_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "매도수량 / 길이 18"
                          },
                          "sll_uit_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "매도단가 / 길이 15.3"
                          },
                          "fc_sll_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화매도금액 / 길이 15.3"
                          },
                          "fc_sby_pls": {
                            "type": "number",
                            "format": "double",
                            "description": "외화매매손익 / 길이 15.3"
                          },
                          "fc_sby_pft_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화매매수익율 / 길이 15.9"
                          },
                          "fc_sdr_xps": {
                            "type": "number",
                            "format": "double",
                            "description": "외화제비용 / 길이 15.3"
                          },
                          "fc_rzt_pls": {
                            "type": "number",
                            "format": "double",
                            "description": "외화실현손익 / 길이 15.3"
                          },
                          "fc_rzt_pft_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화실현수익율 / 길이 15.9"
                          }
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CtsHeader"
          }
        ]
      }
    },
    "/gbstock/inquiry/v1/periodPnlDetail": {
      "post": {
        "tags": [
          "조회 (Inquiry)"
        ],
        "operationId": "gbstockInquiryPeriodPnlDetail",
        "summary": "해외주식 기간손익 상세",
        "description": "해외주식 기간별 손익 상세조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      },
                      "iqr_dit": {
                        "type": "string",
                        "description": "조회구분 / 길이 1 / 1.거래통화기준 2.원화기준"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "티커종목코드 / 길이 12 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "orr_dt": {
                        "type": "string",
                        "description": "주문일자 / 길이 8 / YYYYMMDD"
                      },
                      "fc_sec_trd_nat_cd": {
                        "type": "string",
                        "description": "외화증권거래국가코드 / 길이 3 / 200.미국 070.일본 120.홍콩 160.상해 170.심천"
                      },
                      "trd_cur_cd": {
                        "type": "string",
                        "description": "거래통화코드 / 길이 3 / KRW.KRW USD.USD CNY.CNY HKD.HKD JPY.JPY"
                      }
                    },
                    "required": [
                      "act_no",
                      "iqr_dit",
                      "orr_dt",
                      "fc_sec_trd_nat_cd",
                      "trd_cur_cd"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "iem_cd": {
                            "type": "string",
                            "description": "종목코드 / 길이 12"
                          },
                          "iem_nm": {
                            "type": "string",
                            "description": "종목명 / 길이 60"
                          },
                          "byn_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "매수수량 / 길이 18"
                          },
                          "byn_uit_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "매수단가 / 길이 15.3"
                          },
                          "fc_byn_amt1": {
                            "type": "number",
                            "format": "double",
                            "description": "외화매수금액1 / 길이 15.3"
                          },
                          "sll_qty": {
                            "type": "integer",
                            "format": "int64",
                            "description": "매도수량 / 길이 18"
                          },
                          "sll_uit_pr": {
                            "type": "number",
                            "format": "double",
                            "description": "매도단가 / 길이 15.3"
                          },
                          "fc_sll_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화매도금액 / 길이 15.3"
                          },
                          "fc_sby_pls": {
                            "type": "number",
                            "format": "double",
                            "description": "외화매매손익 / 길이 15.3"
                          },
                          "fc_sby_pft_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화매매수익율 / 길이 15.9"
                          },
                          "fc_sdr_xps": {
                            "type": "number",
                            "format": "double",
                            "description": "외화제비용 / 길이 15.3"
                          },
                          "fc_rzt_pls": {
                            "type": "number",
                            "format": "double",
                            "description": "외화실현손익 / 길이 15.3"
                          },
                          "fc_rzt_pft_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화실현수익율 / 길이 15.9"
                          }
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CtsHeader"
          }
        ]
      }
    },
    "/gbstock/inquiry/v1/margin": {
      "post": {
        "tags": [
          "조회 (Inquiry)"
        ],
        "operationId": "gbstockInquiryMargin",
        "summary": "해외증거금 통화별조회",
        "description": "해외주식 증거금 조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "act_no": {
                        "type": "string",
                        "description": "계좌번호 / 길이 11 / /n2/acctinfo 의 acct_no 사용 (운영은 acct_type=01·02, 모의투자는 03 계좌만 유효)"
                      }
                    },
                    "required": [
                      "act_no"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "cur_cd": {
                            "type": "string",
                            "description": "통화코드 / 길이 14 / KRW.KRW USD.USD CNY.CNY HKD.HKD JPY.JPY"
                          },
                          "dca": {
                            "type": "integer",
                            "format": "int64",
                            "description": "예수금 / 길이 18"
                          },
                          "orr_wtm": {
                            "type": "integer",
                            "format": "int64",
                            "description": "주문증거금 / 길이 18"
                          },
                          "ect_mgg_amt": {
                            "type": "integer",
                            "format": "int64",
                            "description": "기타담보금액 / 길이 18"
                          },
                          "drn_pbl_amt": {
                            "type": "integer",
                            "format": "int64",
                            "description": "출금가능금액 / 길이 18"
                          },
                          "fc_dca": {
                            "type": "number",
                            "format": "double",
                            "description": "외화예수금 / 길이 15.3"
                          },
                          "fc_mgg_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화담보금액 / 길이 15.3"
                          },
                          "ect_mgg_fc_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "기타담보외화금액 / 길이 15.3"
                          },
                          "fc_drn_pbl_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "외화출금가능금액 / 길이 15.3"
                          },
                          "sby_bse_xcg_rt": {
                            "type": "number",
                            "format": "double",
                            "description": "매매기준환율 / 길이 12.6"
                          },
                          "fc_rba": {
                            "type": "number",
                            "format": "double",
                            "description": "외화미수금 / 길이 18.3"
                          },
                          "rba": {
                            "type": "integer",
                            "format": "int64",
                            "description": "미수금 / 길이 18"
                          },
                          "fc_rvb_odu_fee": {
                            "type": "number",
                            "format": "double",
                            "description": "외화미수연체료 / 길이 18.3"
                          },
                          "rvb_odu_fee": {
                            "type": "integer",
                            "format": "int64",
                            "description": "미수연체료 / 길이 18"
                          },
                          "stl_af_dca": {
                            "type": "integer",
                            "format": "int64",
                            "description": "결제후예수금 / 길이 18"
                          },
                          "stl_af_drn_pbl_amt": {
                            "type": "integer",
                            "format": "int64",
                            "description": "결제후출금가능금액 / 길이 18"
                          },
                          "stl_af_fc_dca": {
                            "type": "number",
                            "format": "double",
                            "description": "결제후외화예수금 / 길이 15.3"
                          },
                          "stl_af_fc_drn_pbl_amt": {
                            "type": "number",
                            "format": "double",
                            "description": "결제후외화출금가능금액 / 길이 15.3"
                          }
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CtsHeader"
          }
        ]
      }
    },
    "/gbstock/quote/v1/current": {
      "post": {
        "tags": [
          "시세 (Market Data)"
        ],
        "operationId": "gbstockQuoteCurrent",
        "summary": "해외주식 현재가상세",
        "description": "해외주식 현재가 조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "iem_cd": {
                        "type": "string",
                        "description": "종목코드 / 길이 15 / 예시> 미국주식 APPLE인 경우, AAPL"
                      }
                    },
                    "required": [
                      "iem_cd"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "object",
                      "properties": {
                        "iem_cd": {
                          "type": "string",
                          "description": "종목코드 / 길이 15"
                        },
                        "kor_name": {
                          "type": "string",
                          "description": "종목명 / 길이 40"
                        },
                        "industry_code": {
                          "type": "string",
                          "description": "업종코드 / 길이 4"
                        },
                        "industry_name": {
                          "type": "string",
                          "description": "업종명 / 길이 100"
                        },
                        "trdprc": {
                          "type": "number",
                          "format": "float",
                          "description": "현재가 / 길이 17"
                        },
                        "netchng_cls": {
                          "type": "string",
                          "description": "전일대비구분 / 길이 1 / 1or6.상한가 2or7.상승 3or0.보합 4or8.하한 5or9.하락 그외.보함+리버스(기세)"
                        },
                        "netchng": {
                          "type": "number",
                          "format": "float",
                          "description": "전일대비 / 길이 17"
                        },
                        "pctchng": {
                          "type": "number",
                          "format": "float",
                          "description": "전일대비율 / 길이 8"
                        },
                        "open_prc": {
                          "type": "number",
                          "format": "float",
                          "description": "시가 / 길이 17"
                        },
                        "high": {
                          "type": "number",
                          "format": "float",
                          "description": "고가 / 길이 17"
                        },
                        "low": {
                          "type": "number",
                          "format": "float",
                          "description": "저가 / 길이 17"
                        },
                        "acvol": {
                          "type": "integer",
                          "format": "int64",
                          "description": "거래량 / 길이 15"
                        },
                        "uplimit": {
                          "type": "number",
                          "format": "float",
                          "description": "상한가 / 길이 17"
                        },
                        "uplimit_rate": {
                          "type": "number",
                          "format": "float",
                          "description": "상한가비율 / 길이 8"
                        },
                        "lolimit": {
                          "type": "number",
                          "format": "float",
                          "description": "하한가 / 길이 17"
                        },
                        "lolimit_rate": {
                          "type": "number",
                          "format": "float",
                          "description": "하한가비율 / 길이 8"
                        },
                        "w52high_prc": {
                          "type": "number",
                          "format": "float",
                          "description": "52주최고가 / 길이 17"
                        },
                        "w52highprc_netchng": {
                          "type": "number",
                          "format": "float",
                          "description": "52주최고가대비 / 길이 17"
                        },
                        "w52high_date": {
                          "type": "string",
                          "description": "52주최고일자 / 길이 8"
                        },
                        "w52low_prc": {
                          "type": "number",
                          "format": "float",
                          "description": "52주최저가 / 길이 17"
                        },
                        "w52lowprc_netchng": {
                          "type": "number",
                          "format": "float",
                          "description": "52주최저가대비 / 길이 17"
                        },
                        "w52low_date": {
                          "type": "string",
                          "description": "52주최저일자 / 길이 8"
                        },
                        "quote_time": {
                          "type": "string",
                          "description": "호가시간 / 길이 6"
                        },
                        "best_ask1": {
                          "type": "number",
                          "format": "float",
                          "description": "매도1호가 / 길이 17"
                        },
                        "best_bid1": {
                          "type": "number",
                          "format": "float",
                          "description": "매수1호가 / 길이 17"
                        },
                        "best_asiz1": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도1호가수량 / 길이 15"
                        },
                        "best_bsiz1": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수1호가수량 / 길이 15"
                        },
                        "best_ask2": {
                          "type": "number",
                          "format": "float",
                          "description": "매도2호가 / 길이 17"
                        },
                        "best_bid2": {
                          "type": "number",
                          "format": "float",
                          "description": "매수2호가 / 길이 17"
                        },
                        "best_asiz2": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도2호가수량 / 길이 15"
                        },
                        "best_bsiz2": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수2호가수량 / 길이 15"
                        },
                        "best_ask3": {
                          "type": "number",
                          "format": "float",
                          "description": "매도3호가 / 길이 17"
                        },
                        "best_bid3": {
                          "type": "number",
                          "format": "float",
                          "description": "매수3호가 / 길이 17"
                        },
                        "best_asiz3": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도3호가수량 / 길이 15"
                        },
                        "best_bsiz3": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수3호가수량 / 길이 15"
                        },
                        "best_ask4": {
                          "type": "number",
                          "format": "float",
                          "description": "매도4호가 / 길이 17"
                        },
                        "best_bid4": {
                          "type": "number",
                          "format": "float",
                          "description": "매수4호가 / 길이 17"
                        },
                        "best_asiz4": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도4호가수량 / 길이 15"
                        },
                        "best_bsiz4": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수4호가수량 / 길이 15"
                        },
                        "best_ask5": {
                          "type": "number",
                          "format": "float",
                          "description": "매도5호가 / 길이 17"
                        },
                        "best_bid5": {
                          "type": "number",
                          "format": "float",
                          "description": "매수5호가 / 길이 17"
                        },
                        "best_asiz5": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도5호가수량 / 길이 15"
                        },
                        "best_bsiz5": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수5호가수량 / 길이 15"
                        },
                        "asksize": {
                          "type": "integer",
                          "format": "int64",
                          "description": "총매도잔량 / 길이 15"
                        },
                        "bidsize": {
                          "type": "integer",
                          "format": "int64",
                          "description": "총매수잔량 / 길이 15"
                        },
                        "cov_pric": {
                          "type": "number",
                          "format": "float",
                          "description": "환산가 / 길이 17"
                        },
                        "currency_prc": {
                          "type": "number",
                          "format": "float",
                          "description": "환율 / 길이 17"
                        },
                        "list_num": {
                          "type": "number",
                          "format": "float",
                          "description": "발행주식수 / 길이 17"
                        },
                        "list_amt": {
                          "type": "number",
                          "format": "float",
                          "description": "시가총액 / 길이 17"
                        },
                        "list_amt_2": {
                          "type": "number",
                          "format": "float",
                          "description": "시가총액(원화) / 길이 17"
                        },
                        "turnover": {
                          "type": "number",
                          "format": "float",
                          "description": "거래대금 / 길이 17"
                        },
                        "currency_unit": {
                          "type": "string",
                          "description": "거래통화 / 길이 3"
                        },
                        "hst_trdprc": {
                          "type": "number",
                          "format": "float",
                          "description": "전일종가 / 길이 17"
                        },
                        "capital_amt": {
                          "type": "number",
                          "format": "float",
                          "description": "자본금 / 길이 17"
                        },
                        "base_prc": {
                          "type": "number",
                          "format": "float",
                          "description": "기준가 / 길이 17"
                        },
                        "eps_date": {
                          "type": "string",
                          "description": "EPS일자 / 길이 8"
                        },
                        "eps_prc": {
                          "type": "number",
                          "format": "float",
                          "description": "EPS / 길이 17"
                        },
                        "per_prc": {
                          "type": "number",
                          "format": "float",
                          "description": "PER / 길이 17"
                        },
                        "trading_unit": {
                          "type": "number",
                          "format": "float",
                          "description": "매매단위 / 길이 17"
                        },
                        "hst_acvol": {
                          "type": "integer",
                          "format": "int64",
                          "description": "전일거래량 / 길이 15"
                        },
                        "trade_date": {
                          "type": "string",
                          "description": "거래일자 / 길이 8"
                        },
                        "exch_id": {
                          "type": "string",
                          "description": "거래소ID / 길이 3"
                        },
                        "exch_name": {
                          "type": "string",
                          "description": "거래소명 / 길이 40"
                        },
                        "com_kind": {
                          "type": "string",
                          "description": "자산구분코드 / 길이 2"
                        },
                        "com_kind_name": {
                          "type": "string",
                          "description": "자산구분명 / 길이 40"
                        },
                        "pf_jgubun": {
                          "type": "string",
                          "description": "(PF)장구분 / 길이 1"
                        },
                        "pf_trdprc": {
                          "type": "number",
                          "format": "float",
                          "description": "(PF)현재가 / 길이 17"
                        },
                        "pf_netchng_cls": {
                          "type": "string",
                          "description": "(PF)전일대비구분 / 길이 1"
                        },
                        "pf_netchng": {
                          "type": "number",
                          "format": "float",
                          "description": "(PF)전일대비 / 길이 17"
                        },
                        "pf_pctchng": {
                          "type": "number",
                          "format": "float",
                          "description": "(PF)전일대비율 / 길이 8"
                        },
                        "best_ask6": {
                          "type": "number",
                          "format": "float",
                          "description": "매도6호가 / 길이 17"
                        },
                        "best_bid6": {
                          "type": "number",
                          "format": "float",
                          "description": "매수6호가 / 길이 17"
                        },
                        "best_asiz6": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도6호가수량 / 길이 15"
                        },
                        "best_bsiz6": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수6호가수량 / 길이 15"
                        },
                        "best_ask7": {
                          "type": "number",
                          "format": "float",
                          "description": "매도7호가 / 길이 17"
                        },
                        "best_bid7": {
                          "type": "number",
                          "format": "float",
                          "description": "매수7호가 / 길이 17"
                        },
                        "best_asiz7": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도7호가수량 / 길이 15"
                        },
                        "best_bsiz7": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수7호가수량 / 길이 15"
                        },
                        "best_ask8": {
                          "type": "number",
                          "format": "float",
                          "description": "매도8호가 / 길이 17"
                        },
                        "best_bid8": {
                          "type": "number",
                          "format": "float",
                          "description": "매수8호가 / 길이 17"
                        },
                        "best_asiz8": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도8호가수량 / 길이 15"
                        },
                        "best_bsiz8": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수8호가수량 / 길이 15"
                        },
                        "best_ask9": {
                          "type": "number",
                          "format": "float",
                          "description": "매도9호가 / 길이 17"
                        },
                        "best_bid9": {
                          "type": "number",
                          "format": "float",
                          "description": "매수9호가 / 길이 17"
                        },
                        "best_asiz9": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도9호가수량 / 길이 15"
                        },
                        "best_bsiz9": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수9호가수량 / 길이 15"
                        },
                        "best_ask10": {
                          "type": "number",
                          "format": "float",
                          "description": "매도10호가 / 길이 17"
                        },
                        "best_bid10": {
                          "type": "number",
                          "format": "float",
                          "description": "매수10호가 / 길이 17"
                        },
                        "best_asiz10": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매도10호가수량 / 길이 15"
                        },
                        "best_bsiz10": {
                          "type": "integer",
                          "format": "int64",
                          "description": "매수10호가수량 / 길이 15"
                        },
                        "marketperiod_cls": {
                          "type": "string",
                          "description": "현재시장구분 / 길이 1"
                        },
                        "normal_trdprc": {
                          "type": "number",
                          "format": "float",
                          "description": "정규장종가 / 길이 17"
                        },
                        "normal_netchng_cls": {
                          "type": "string",
                          "description": "정규장대비구분 / 길이 1 / 2.상승 3.보합 5.하락"
                        },
                        "normal_netchng": {
                          "type": "number",
                          "format": "float",
                          "description": "정규장전일대비 / 길이 17"
                        },
                        "normal_pctchng": {
                          "type": "number",
                          "format": "float",
                          "description": "정규장전일대비율 / 길이 8"
                        },
                        "normal_acvol": {
                          "type": "number",
                          "format": "float",
                          "description": "정규장누적거래량 / 길이 15"
                        },
                        "normal_open_prc": {
                          "type": "number",
                          "format": "float",
                          "description": "정규장시가 / 길이 17"
                        },
                        "normal_high": {
                          "type": "number",
                          "format": "float",
                          "description": "정규장고가 / 길이 17"
                        },
                        "normal_low": {
                          "type": "number",
                          "format": "float",
                          "description": "정규장저가 / 길이 17"
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gbstock/quote/v1/executionTrend": {
      "post": {
        "tags": [
          "시세 (Market Data)"
        ],
        "operationId": "gbstockQuoteExecutionTrend",
        "summary": "해외주식 체결추이",
        "description": "해외주식 변동거래량 조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "period_type": {
                        "type": "string",
                        "description": "기간구분 / 길이 1 / 1.시간별 2.일별"
                      },
                      "req_cnt": {
                        "type": "integer",
                        "format": "int32",
                        "description": "요청건수 / 길이 4"
                      },
                      "iem_cd": {
                        "type": "string",
                        "description": "종목코드 / 길이 15 / 예시> 미국주식 APPLE인 경우, AAPL"
                      }
                    },
                    "required": [
                      "period_type",
                      "req_cnt",
                      "iem_cd"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "iem_cd": {
                            "type": "string",
                            "description": "종목코드 / 길이 15"
                          },
                          "trade_date": {
                            "type": "string",
                            "description": "체결일자 / 길이 8 / YYYYMMDD"
                          },
                          "trade_time": {
                            "type": "string",
                            "description": "체결시간 / 길이 6 / HHMMSS"
                          },
                          "trdprc": {
                            "type": "number",
                            "format": "float",
                            "description": "체결가 / 길이 17"
                          },
                          "netchng_cls": {
                            "type": "string",
                            "description": "전일대비구분 / 길이 1 / 1or6.상한가 2or7.상승 3or0.보합 4or8.하한 5or9.하락 그외.보함+리버스(기세)"
                          },
                          "netchng": {
                            "type": "number",
                            "format": "float",
                            "description": "전일대비가 / 길이 17"
                          },
                          "pctchng": {
                            "type": "number",
                            "format": "float",
                            "description": "전일대비율 / 길이 8"
                          },
                          "turnover": {
                            "type": "number",
                            "format": "float",
                            "description": "거래대금 / 길이 17"
                          },
                          "fill_size": {
                            "type": "integer",
                            "format": "int64",
                            "description": "변동량 / 길이 15"
                          },
                          "acvol": {
                            "type": "integer",
                            "format": "int64",
                            "description": "체결량 / 길이 15"
                          },
                          "open_prc": {
                            "type": "number",
                            "format": "float",
                            "description": "시가 / 길이 17"
                          },
                          "high": {
                            "type": "number",
                            "format": "float",
                            "description": "고가 / 길이 17"
                          },
                          "low": {
                            "type": "number",
                            "format": "float",
                            "description": "저가 / 길이 17"
                          },
                          "best_ask1": {
                            "type": "number",
                            "format": "float",
                            "description": "매도1호가 / 길이 17"
                          },
                          "best_bid1": {
                            "type": "number",
                            "format": "float",
                            "description": "매수1호가 / 길이 17"
                          },
                          "cont_rate": {
                            "type": "number",
                            "format": "float",
                            "description": "당일체결강도 / 길이 8"
                          },
                          "nextbutton": {
                            "type": "string",
                            "description": "NEXTBUTTON / 길이 1"
                          },
                          "ctsz18": {
                            "type": "string",
                            "description": "CTSz18 / 길이 18"
                          }
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gbstock/quote/v1/period": {
      "post": {
        "tags": [
          "시세 (Market Data)"
        ],
        "operationId": "gbstockQuotePeriod",
        "summary": "해외주식 기간별시세(개별종목)",
        "description": "해외 **개별종목**의 기간별 시세입니다. iem_cd 에 종목코드(예: AAPL, TSLA)를 입력합니다. 조회구분(gubun) 1.틱 2.분 3.일 4.주 5.월 — 틱·분 조회를 지원합니다. 조회건수는 count, 조회단위(xtick)는 일 조회 시 0001(4자리). 지수·환율 조회는 /gbstock/quote/v1/symbolIndexFxPeriod 를 사용하세요.\n\n해외주식 주기별 시세 조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "iem_cd": {
                        "type": "string",
                        "description": "종목코드 / 길이 15 / 예시> 미국주식 APPLE인 경우, AAPL"
                      },
                      "end_dt": {
                        "type": "string",
                        "description": "검색종료일 / 길이 8 / YYYYMMDD"
                      },
                      "count": {
                        "type": "string",
                        "description": "조회건수 / 길이 4"
                      },
                      "maxavg": {
                        "type": "string",
                        "description": "최대이평 / 길이 3"
                      },
                      "gubun": {
                        "type": "string",
                        "description": "조회구분 / 길이 1 / 1.틱 2.분 3.일 4.주 5.월"
                      },
                      "xtick": {
                        "type": "string",
                        "description": "조회단위 / 길이 4 / 주기구분 일인경우 0001 분/초/틱에서는 별도 설정 가능"
                      },
                      "today_cls": {
                        "type": "string",
                        "description": "당일조회 / 길이 1 / 0.종료일조회 1.당일조회"
                      },
                      "market_cls": {
                        "type": "string",
                        "description": "장시간구분 / 길이 1 / 0.전체 1.정규장"
                      }
                    },
                    "required": [
                      "iem_cd",
                      "end_dt",
                      "count",
                      "maxavg",
                      "gubun",
                      "xtick",
                      "today_cls",
                      "market_cls"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "type": "string",
                            "description": "조회날짜 / 길이 8 / YYYYMMDD"
                          },
                          "time": {
                            "type": "string",
                            "description": "조회시간 / 길이 6 / HHMMSS"
                          },
                          "iem_cd": {
                            "type": "string",
                            "description": "종목코드 / 길이 15"
                          },
                          "kor_name": {
                            "type": "string",
                            "description": "종목명 / 길이 40"
                          },
                          "trdprc": {
                            "type": "number",
                            "format": "float",
                            "description": "현재가 / 길이 17"
                          },
                          "netchng_cls": {
                            "type": "string",
                            "description": "등락부호 / 길이 1 / 1or6.상한가 2or7.상승 3or0.보합 4or8.하한 5or9.하락 그외.보함+리버스(기세)"
                          },
                          "netchng": {
                            "type": "number",
                            "format": "float",
                            "description": "대비 / 길이 17"
                          },
                          "pctchng": {
                            "type": "number",
                            "format": "float",
                            "description": "대비율 / 길이 8"
                          },
                          "acvol": {
                            "type": "number",
                            "format": "float",
                            "description": "거래량 / 길이 15"
                          },
                          "turnover": {
                            "type": "number",
                            "format": "float",
                            "description": "거래대금 / 길이 15"
                          },
                          "open_prc": {
                            "type": "number",
                            "format": "float",
                            "description": "시가 / 길이 17"
                          },
                          "high": {
                            "type": "number",
                            "format": "float",
                            "description": "고가 / 길이 17"
                          },
                          "low": {
                            "type": "number",
                            "format": "float",
                            "description": "저가 / 길이 17"
                          },
                          "per": {
                            "type": "number",
                            "format": "float",
                            "description": "PER / 길이 11"
                          },
                          "pbr": {
                            "type": "number",
                            "format": "float",
                            "description": "PBR / 길이 11"
                          },
                          "eps": {
                            "type": "number",
                            "format": "float",
                            "description": "EPS / 길이 14"
                          },
                          "list_num": {
                            "type": "number",
                            "format": "float",
                            "description": "상장주수 / 길이 18"
                          },
                          "list_amt": {
                            "type": "number",
                            "format": "float",
                            "description": "시가총액 / 길이 18"
                          },
                          "hst_open_prc": {
                            "type": "number",
                            "format": "float",
                            "description": "전일시가 / 길이 17"
                          },
                          "hst_high": {
                            "type": "number",
                            "format": "float",
                            "description": "전일고가 / 길이 17"
                          },
                          "hst_low": {
                            "type": "number",
                            "format": "float",
                            "description": "전일저가 / 길이 17"
                          },
                          "hst_trdprc": {
                            "type": "number",
                            "format": "float",
                            "description": "전일종가 / 길이 17"
                          },
                          "hst_acvol": {
                            "type": "number",
                            "format": "float",
                            "description": "전일거래량 / 길이 18"
                          },
                          "hst_acvol_rate": {
                            "type": "number",
                            "format": "float",
                            "description": "전일거래량대비 / 길이 18"
                          },
                          "best_ask": {
                            "type": "number",
                            "format": "float",
                            "description": "매도호가 / 길이 17"
                          },
                          "best_bid": {
                            "type": "number",
                            "format": "float",
                            "description": "매수호가 / 길이 17"
                          },
                          "week_open_prc": {
                            "type": "number",
                            "format": "float",
                            "description": "이번주시가 / 길이 17"
                          },
                          "week_high": {
                            "type": "number",
                            "format": "float",
                            "description": "이번주고가 / 길이 17"
                          },
                          "week_low": {
                            "type": "number",
                            "format": "float",
                            "description": "이번주저가 / 길이 17"
                          },
                          "mon_open_prc": {
                            "type": "number",
                            "format": "float",
                            "description": "이번달시가 / 길이 17"
                          },
                          "mon_high": {
                            "type": "number",
                            "format": "float",
                            "description": "이번달고가 / 길이 17"
                          },
                          "mon_low": {
                            "type": "number",
                            "format": "float",
                            "description": "이번달저가 / 길이 17"
                          },
                          "market_start_time": {
                            "type": "string",
                            "description": "장시작시간 / 길이 6 / HHMMSS"
                          },
                          "market_end_time": {
                            "type": "string",
                            "description": "장마감시간 / 길이 6 / HHMMSS"
                          },
                          "bsop_date": {
                            "type": "string",
                            "description": "영업일 / 길이 8 / YYYYMMDD"
                          },
                          "fx_rate": {
                            "type": "number",
                            "format": "float",
                            "description": "환율 / 길이 10"
                          },
                          "trading_cls": {
                            "type": "string",
                            "description": "실시간구분 / 길이 1"
                          },
                          "decimal": {
                            "type": "string",
                            "description": "소수점 / 길이 1"
                          },
                          "base_prc": {
                            "type": "number",
                            "format": "float",
                            "description": "기준가 / 길이 17"
                          },
                          "ctsz16": {
                            "type": "string",
                            "description": "검색키 / 길이 16"
                          },
                          "tick_cnt": {
                            "type": "string",
                            "description": "마지막틱봉갯수 / 길이 5"
                          },
                          "count": {
                            "type": "string",
                            "description": "조회건수 / 길이 4"
                          },
                          "marketperiod_cls": {
                            "type": "string",
                            "description": "현재시장구분 / 길이 1"
                          },
                          "r_base_prc": {
                            "type": "number",
                            "format": "float",
                            "description": "직전정규장기준가 / 길이 17"
                          }
                        }
                      }
                    },
                    "Output_1": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "trade_date": {
                            "type": "string",
                            "description": "체결일자 / 길이 8 / YYYYMMDD"
                          },
                          "trade_time": {
                            "type": "string",
                            "description": "체결시간 / 길이 6 / HHmmSS"
                          },
                          "open_prc": {
                            "type": "number",
                            "format": "float",
                            "description": "시가 / 길이 17"
                          },
                          "high": {
                            "type": "number",
                            "format": "float",
                            "description": "고가 / 길이 17"
                          },
                          "low": {
                            "type": "number",
                            "format": "float",
                            "description": "저가 / 길이 17"
                          },
                          "close_prc": {
                            "type": "string",
                            "description": "종가 / 길이 17"
                          },
                          "movolume": {
                            "type": "string",
                            "description": "변동거래량 / 길이 15"
                          },
                          "movalue": {
                            "type": "string",
                            "description": "변동거래대금 / 길이 17"
                          },
                          "netchng_cls": {
                            "type": "string",
                            "description": "등락부호 / 길이 1 / 1or6.상한가 2or7.상승 3or0.보합 4or8.하한 5or9.하락 그외.보함+리버스(기세)"
                          },
                          "bsop_date": {
                            "type": "string",
                            "description": "영업일 / 길이 8 / YYYYMMDD"
                          }
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gbstock/quote/v1/symbolIndexFxPeriod": {
      "post": {
        "tags": [
          "시세 (Market Data)"
        ],
        "operationId": "gbstockQuoteSymbolIndexFxPeriod",
        "summary": "해외주식 기간별시세(지수·환율)",
        "description": "해외 **지수·환율**의 기간별 시세입니다. iem_cd 에 지수코드/환율코드를 입력합니다(개별종목 아님). 조회구분(gubun) 1.일 2.주 3.월 — 틱·분은 지원하지 않습니다. 조회건수는 array_cnt(개별종목 API 의 count 와 필드명이 다름), 조회단위(xtick)는 일 조회 시 001(3자리). 당일조회(today_cls) 의미도 반대입니다(1.당일만조회 0.전체조회). 개별종목 조회는 /gbstock/quote/v1/period 를 사용하세요.\n\n해외주식 종목/지수/환율 주기별 시세조회 API 입니다.\n\n응답 블록은 **데이터가 있을 때만 내려옵니다.** 블록이 없을 수 있으니 존재 여부를 먼저 확인하세요.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "Input_0": {
                    "type": "object",
                    "properties": {
                      "iem_cd": {
                        "type": "string",
                        "description": "SYMBOL / 길이 14 / 지수코드"
                      },
                      "end_dt": {
                        "type": "string",
                        "description": "검색종료일 / 길이 8"
                      },
                      "array_cnt": {
                        "type": "string",
                        "description": "조회건수 / 길이 4"
                      },
                      "maxavg": {
                        "type": "string",
                        "description": "최대이평 / 길이 3"
                      },
                      "gubun": {
                        "type": "string",
                        "description": "조회구분 / 길이 1 / 1.일 2.주 3.월"
                      },
                      "xtick": {
                        "type": "string",
                        "description": "조회단위 / 길이 3 / 주기구분 일인경우 001 분/초/틱에서는 별도 설정 가능"
                      },
                      "today_cls": {
                        "type": "string",
                        "description": "당일조회 / 길이 1 / 1.당일만조회(분/초/틱에서 사용) 0.전체조회"
                      },
                      "scale_change": {
                        "type": "string",
                        "description": "단위변경 / 길이 1 / Output_1에만 적용 1.거래량천단위 그외.단주"
                      }
                    },
                    "required": [
                      "iem_cd",
                      "end_dt",
                      "array_cnt",
                      "maxavg",
                      "gubun",
                      "today_cls"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "성공",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Output_0": {
                      "type": "object",
                      "properties": {
                        "qry_date": {
                          "type": "string",
                          "description": "조회날짜 / 길이 8 / YYYYMMDD"
                        },
                        "qry_time": {
                          "type": "string",
                          "description": "조회시간 / 길이 6 / HHMMSS"
                        },
                        "data_code": {
                          "type": "string",
                          "description": "해외종목타입 / 길이 1"
                        },
                        "iem_cd": {
                          "type": "string",
                          "description": "SYMBOL / 길이 14"
                        },
                        "hts_kor_isnm": {
                          "type": "string",
                          "description": "종목명 / 길이 40"
                        },
                        "ovrs_prpr": {
                          "type": "string",
                          "description": "현재가 / 길이 10"
                        },
                        "prdy_vrss_sign": {
                          "type": "string",
                          "description": "등락부호 / 길이 1 / 1or6.상한가 2or7.상승 3or0.보합 4or8.하한 5or9.하락 그외.보함+리버스(기세)"
                        },
                        "prdy_vrss": {
                          "type": "string",
                          "description": "대비 / 길이 10"
                        },
                        "prdy_ctrt": {
                          "type": "string",
                          "description": "대비율 / 길이 10"
                        },
                        "acml_vol": {
                          "type": "string",
                          "description": "거래량 / 길이 15"
                        },
                        "acml_tr_pbmn": {
                          "type": "string",
                          "description": "거래대금 / 길이 18"
                        },
                        "prdy_clpr": {
                          "type": "string",
                          "description": "전일종가 / 길이 10"
                        },
                        "ovrs_oprc": {
                          "type": "string",
                          "description": "시가 / 길이 10"
                        },
                        "ovrs_hgpr": {
                          "type": "string",
                          "description": "고가 / 길이 10"
                        },
                        "ovrs_lwpr": {
                          "type": "string",
                          "description": "저가 / 길이 10"
                        },
                        "prdy_oprc": {
                          "type": "string",
                          "description": "전일시가 / 길이 10"
                        },
                        "prdy_hgpr": {
                          "type": "string",
                          "description": "전일고가 / 길이 10"
                        },
                        "prdy_lwpr": {
                          "type": "string",
                          "description": "전일저가 / 길이 10"
                        },
                        "prdy_prpr": {
                          "type": "string",
                          "description": "전일종가 / 길이 10"
                        },
                        "tdw_ovrs_oprc": {
                          "type": "string",
                          "description": "이번주시가 / 길이 10"
                        },
                        "tdw_ovrs_hgpr": {
                          "type": "string",
                          "description": "이번주고가 / 길이 10"
                        },
                        "tdw_ovrs_lwpr": {
                          "type": "string",
                          "description": "이번주저가 / 길이 10"
                        },
                        "tdm_ovrs_oprc": {
                          "type": "string",
                          "description": "이번달시가 / 길이 10"
                        },
                        "tdm_ovrs_hgpr": {
                          "type": "string",
                          "description": "이번달고가 / 길이 10"
                        },
                        "tdm_ovrs_lwpr": {
                          "type": "string",
                          "description": "이번달저가 / 길이 10"
                        },
                        "localtime": {
                          "type": "string",
                          "description": "현지시간 / 길이 14"
                        },
                        "bsop_date": {
                          "type": "string",
                          "description": "영업일 / 길이 8"
                        },
                        "base_ptr": {
                          "type": "string",
                          "description": "소수점자리수 / 길이 1"
                        },
                        "ctsz30": {
                          "type": "string",
                          "description": "이전키 / 길이 30"
                        },
                        "lasttickcount": {
                          "type": "string",
                          "description": "마지막N틱봉의틱묶음갯수 / 길이 5"
                        },
                        "send_cnt": {
                          "type": "string",
                          "description": "전송레코드건수 / 길이 7"
                        }
                      }
                    },
                    "Output_1": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "bsop_date": {
                            "type": "string",
                            "description": "영업일 / 길이 8"
                          },
                          "bsop_time": {
                            "type": "string",
                            "description": "시간 / 길이 6 / HHmmSS"
                          },
                          "ovrs_oprc": {
                            "type": "string",
                            "description": "시가 / 길이 10"
                          },
                          "ovrs_hgpr": {
                            "type": "string",
                            "description": "고가 / 길이 10"
                          },
                          "ovrs_lwpr": {
                            "type": "string",
                            "description": "저가 / 길이 10"
                          },
                          "ovrs_prpr": {
                            "type": "string",
                            "description": "현재가 / 길이 10"
                          },
                          "vol": {
                            "type": "string",
                            "description": "거래량 / 길이 12"
                          }
                        }
                      }
                    },
                    "message": {
                      "$ref": "#/components/schemas/Message"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-realtime-channels": {
    "endpoint": "wss://api.n2plug.com:7080",
    "endpoints": {
      "live": "wss://api.n2plug.com:7080",
      "mock": "wss://moapi.n2plug.com:17070"
    },
    "protocol": {
      "transport": "WebSocket",
      "connection": "wss 접속(국내 :7070 / 해외 :7080, 모의투자 :17070) 후 구독 메시지 전송. URI 는 /websocket.",
      "auth": "메시지 header 의 token 필드에 access token(POST /oauth2/token) 전달. REST 와 달리 Authorization/x-client-id/x-client-secret 헤더는 미사용.",
      "subscribe_message": {
        "header": {
          "token": "{access_token}",
          "tr_type": "1"
        },
        "body": {
          "tr_cd": "<채널코드>",
          "tr_key": "<구독키>"
        }
      },
      "unsubscribe": "동일 메시지에서 tr_type 을 '2' 로 전송",
      "tr_type": {
        "1": "등록(구독)",
        "2": "해제"
      },
      "push_message": {
        "format": "JSON",
        "delivery": "비정기적 — 데이터 발생 시마다 서버가 push (요청/응답 1:1 아님)",
        "structure": {
          "header": {
            "tr_cd": "채널코드",
            "tr_key": "구독키"
          },
          "body": {
            "<응답필드>": "..."
          }
        }
      },
      "heartbeat": "불필요 — 연결 유지 신호(ping/pong) 없음",
      "encryption": "없음 — 체결/주문 통보 포함 모두 평문 JSON"
    },
    "note": "실시간 시세·통보는 WebSocket. 구독=protocol.subscribe_message, 서버 푸시=JSON {header,body}. 채널별 실제 예시는 channels[].subscribe_example / push_example.",
    "channels": [
      {
        "name": "해외주식 실시간호가",
        "sheet": "API_해외_주식_실시간_호가",
        "tr_cd": "RH",
        "tr_key": {
          "name": "gicz15",
          "kor": "GIC",
          "length": "15"
        },
        "fields": [
          "gicz15",
          "exch_idz3",
          "quote_datez8",
          "quote_timez6",
          "marketperiod_clsz1",
          "best_ask1z17",
          "best_bid1z17",
          "best_asiz1z15",
          "best_bsiz1z15",
          "best_ask2z17",
          "best_bid2z17",
          "best_asiz2z15",
          "best_bsiz2z15",
          "best_ask3z17",
          "best_bid3z17",
          "best_asiz3z15",
          "best_bsiz3z15",
          "best_ask4z17",
          "best_bid4z17",
          "best_asiz4z15",
          "best_bsiz4z15",
          "best_ask5z17",
          "best_bid5z17",
          "best_asiz5z15",
          "best_bsiz5z15",
          "asksizez15",
          "bidsizez15",
          "kor_timez6",
          "bid_mmid1z3",
          "ask_mmid1z3",
          "best_ask6z17",
          "best_bid6z17",
          "best_asiz6z15",
          "best_bsiz6z15",
          "best_ask7z17",
          "best_bid7z17",
          "best_asiz7z15",
          "best_bsiz7z15",
          "best_ask8z17",
          "best_bid8z17",
          "best_asiz8z15",
          "best_bsiz8z15",
          "best_ask9z17",
          "best_bid9z17",
          "best_asiz9z15",
          "best_bsiz9z15",
          "best_ask10z17",
          "best_bid10z17",
          "best_asiz10z15",
          "best_bsiz10z15"
        ],
        "subscribe_example": {
          "header": {
            "token": "TOKEN",
            "tr_type": "1"
          },
          "body": {
            "tr_cd": "RH",
            "tr_key": "AAPL"
          }
        },
        "push_example": "{\n  \"Output_0\": [\n    {\n      \"\": \"\",\n      \"\": \"\"\n    },\n    ....\n  ],\n  \"message\": {\n    \"msg_code\": \"\",\n    \"usr_msg\": \"\",\n    \"msg_lv_code\": \"\",\n    \"dvlp_msg_yn\": \"\",\n    \"svc_nm\": \"\",\n    \"func_nm\": \"\",\n    \"line_no\": \"\",\n    \"dvlp_msg\": \"\"\n  }\n}",
        "description": "유료시세 사용 약정 고객만 이용 가능합니다."
      },
      {
        "name": "해외주식 지연호가(아시아)",
        "sheet": "API_해외_주식_실시간_호가(지연)",
        "tr_cd": "rh",
        "tr_key": {
          "name": "gicz15",
          "kor": "GIC",
          "length": "15"
        },
        "fields": [
          "gicz15",
          "exch_idz3",
          "quote_datez8",
          "quote_timez6",
          "marketperiod_clsz1",
          "best_ask1z17",
          "best_bid1z17",
          "best_asiz1z15",
          "best_bsiz1z15",
          "best_ask2z17",
          "best_bid2z17",
          "best_asiz2z15",
          "best_bsiz2z15",
          "best_ask3z17",
          "best_bid3z17",
          "best_asiz3z15",
          "best_bsiz3z15",
          "best_ask4z17",
          "best_bid4z17",
          "best_asiz4z15",
          "best_bsiz4z15",
          "best_ask5z17",
          "best_bid5z17",
          "best_asiz5z15",
          "best_bsiz5z15",
          "asksizez15",
          "bidsizez15",
          "kor_timez6",
          "bid_mmid1z3",
          "ask_mmid1z3",
          "best_ask6z17",
          "best_bid6z17",
          "best_asiz6z15",
          "best_bsiz6z15",
          "best_ask7z17",
          "best_bid7z17",
          "best_asiz7z15",
          "best_bsiz7z15",
          "best_ask8z17",
          "best_bid8z17",
          "best_asiz8z15",
          "best_bsiz8z15",
          "best_ask9z17",
          "best_bid9z17",
          "best_asiz9z15",
          "best_bsiz9z15",
          "best_ask10z17",
          "best_bid10z17",
          "best_asiz10z15",
          "best_bsiz10z15"
        ],
        "subscribe_example": {
          "header": {
            "token": "TOKEN",
            "tr_type": "1"
          },
          "body": {
            "tr_cd": "rh",
            "tr_key": "AAPL"
          }
        },
        "push_example": {
          "header": {
            "tr_cd": "rh",
            "tr_key": "USAAAPL"
          },
          "body": {
            "gicz15": "USAAAPL",
            "exch_idz3": "NQQ",
            "quote_datez8": "20260709",
            "quote_timez6": "240747",
            "marketperiod_clsz1": "3",
            "best_ask1z17": "315.2200",
            "best_bid1z17": "315.1200",
            "best_asiz1z15": "2",
            "best_bsiz1z15": "13",
            "best_ask2z17": "315.2400",
            "best_bid2z17": "315.1100",
            "best_asiz2z15": "3",
            "best_bsiz2z15": "2",
            "best_ask3z17": "315.2500",
            "best_bid3z17": "315.1000",
            "best_asiz3z15": "4",
            "best_bsiz3z15": "303",
            "best_ask4z17": "315.3100",
            "best_bid4z17": "315.0900",
            "best_asiz4z15": "5",
            "best_bsiz4z15": "3",
            "best_ask5z17": "315.3300",
            "best_bid5z17": "315.0300",
            "best_asiz5z15": "3",
            "best_bsiz5z15": "2",
            "asksizez15": "407",
            "bidsizez15": "659",
            "kor_timez6": "130747",
            "bid_mmid1z3": "",
            "ask_mmid1z3": "",
            "best_ask6z17": "315.3500",
            "best_bid6z17": "315.0000",
            "best_asiz6z15": "22",
            "best_bsiz6z15": "269",
            "best_ask7z17": "315.3900",
            "best_bid7z17": "314.9500",
            "best_asiz7z15": "1",
            "best_bsiz7z15": "17",
            "best_ask8z17": "315.4500",
            "best_bid8z17": "314.9400",
            "best_asiz8z15": "33",
            "best_bsiz8z15": "15",
            "best_ask9z17": "315.4900",
            "best_bid9z17": "314.9300",
            "best_asiz9z15": "20",
            "best_bsiz9z15": "20",
            "best_ask10z17": "315.5000",
            "best_bid10z17": "314.9100",
            "best_asiz10z15": "314",
            "best_bsiz10z15": "15"
          }
        },
        "description": "미국, 중국시장만 지연정보가 제공됩니다."
      },
      {
        "name": "해외주식 실시간체결가",
        "sheet": "API_해외_주식_실시간_체결가",
        "tr_cd": "RC",
        "tr_key": {
          "name": "gicz15",
          "kor": "GIC",
          "length": "15"
        },
        "fields": [
          "gicz15",
          "exch_idz3",
          "trade_datez8",
          "trade_timez6",
          "seq_noz4",
          "trdprc_1z17",
          "netchng_clsz1",
          "netchng_1z17",
          "pctchng_1z17",
          "acvol_1z15",
          "turnoverz17",
          "fill_sizez15",
          "open_prcz17",
          "high_1z17",
          "low_1z17",
          "open_timez6",
          "high_timez6",
          "low_timez6",
          "marketperiod_clsz1",
          "askbidfill_clsz1",
          "addavg_prcz9",
          "best_ask1z17",
          "best_asiz1z15",
          "best_bid1z17",
          "best_bsiz1z15",
          "per_prcz17",
          "eps_prcz9",
          "ask_exec_sumz15",
          "bid_exec_sumz15",
          "exec_ratez17",
          "exec_askbid_clsz1",
          "kor_timez6",
          "blkcountz15",
          "blkvolumz15",
          "trdxid_1z3"
        ],
        "subscribe_example": {
          "header": {
            "token": "TOKEN",
            "tr_type": "1"
          },
          "body": {
            "tr_cd": "RC",
            "tr_key": "<gicz15>"
          }
        },
        "push_example": "{\n  \"Output_0\": [\n    {\n      \"\": \"\",\n      \"\": \"\"\n    },\n    ....\n  ],\n  \"message\": {\n    \"msg_code\": \"\",\n    \"usr_msg\": \"\",\n    \"msg_lv_code\": \"\",\n    \"dvlp_msg_yn\": \"\",\n    \"svc_nm\": \"\",\n    \"func_nm\": \"\",\n    \"line_no\": \"\",\n    \"dvlp_msg\": \"\"\n  }\n}",
        "description": "유료시세 사용 약정 고객만 이용 가능합니다."
      },
      {
        "name": "해외주식 지연체결가",
        "sheet": "API_해외_주식_실시간_체결가(지연)",
        "tr_cd": "rc",
        "tr_key": {
          "name": "gicz15",
          "kor": "GIC",
          "length": "15"
        },
        "fields": [
          "gicz15",
          "exch_idz3",
          "trade_datez8",
          "trade_timez6",
          "seq_noz4",
          "trdprc_1z17",
          "netchng_clsz1",
          "netchng_1z17",
          "pctchng_1z17",
          "acvol_1z15",
          "turnoverz17",
          "fill_sizez15",
          "open_prcz17",
          "high_1z17",
          "low_1z17",
          "open_timez6",
          "high_timez6",
          "low_timez6",
          "marketperiod_clsz1",
          "askbidfill_clsz1",
          "addavg_prcz9",
          "best_ask1z17",
          "best_asiz1z15",
          "best_bid1z17",
          "best_bsiz1z15",
          "per_prcz17",
          "eps_prcz9",
          "ask_exec_sumz15",
          "bid_exec_sumz15",
          "exec_ratez17",
          "exec_askbid_clsz1",
          "kor_timez6",
          "blkcountz15",
          "blkvolumz15",
          "trdxid_1z3"
        ],
        "subscribe_example": {
          "header": {
            "token": "TOKEN",
            "tr_type": "1"
          },
          "body": {
            "tr_cd": "rc",
            "tr_key": "AAPL"
          }
        },
        "push_example": {
          "header": {
            "tr_cd": "rc",
            "tr_key": "USAAAPL"
          },
          "body": {
            "gicz15": "USAAAPL",
            "exch_idz3": "NQQ",
            "trade_datez8": "20260709",
            "trade_timez6": "241100",
            "seq_noz4": "0004",
            "trdprc_1z17": "315.1500",
            "netchng_clsz1": "5",
            "netchng_1z17": "-1.0700",
            "pctchng_1z17": "-0.34",
            "acvol_1z15": "48128982",
            "turnoverz17": "15169977516",
            "fill_sizez15": "1",
            "open_prcz17": "310.5100",
            "high_1z17": "316.5300",
            "low_1z17": "308.1600",
            "open_timez6": "093000",
            "high_timez6": "155500",
            "low_timez6": "093100",
            "marketperiod_clsz1": "3",
            "askbidfill_clsz1": "2",
            "addavg_prcz9": " ",
            "best_ask1z17": "315.2200",
            "best_asiz1z15": "5",
            "best_bid1z17": "315.1500",
            "best_bsiz1z15": "1",
            "per_prcz17": "38.0613",
            "eps_prcz9": "8.2338",
            "ask_exec_sumz15": "59376",
            "bid_exec_sumz15": "101867",
            "exec_ratez17": "171.562584",
            "exec_askbid_clsz1": "1",
            "kor_timez6": "131112",
            "blkcountz15": " ",
            "blkvolumz15": "6755",
            "trdxid_1z3": ""
          }
        },
        "description": "미국, 중국시장만 지연정보가 제공됩니다."
      },
      {
        "name": "해외주식 실시간체결통보",
        "sheet": "API_해외_주식_실시간_체결통보",
        "tr_cd": "d0",
        "tr_key": {
          "name": "userid",
          "kor": "사용자ID",
          "length": "8"
        },
        "fields": [
          "userid",
          "itemgb",
          "accountno",
          "orderno",
          "issuecd",
          "slbygb",
          "concgty",
          "concprc",
          "conctime",
          "ucgb",
          "rejgb",
          "fundcode",
          "sin_gb",
          "rej_cd",
          "cur_cd",
          "lon_dt",
          "qty_dit_cd",
          "dcp_cns_qty"
        ],
        "subscribe_example": {
          "header": {
            "token": "TOKEN",
            "tr_type": "1"
          },
          "body": {
            "tr_cd": "d0",
            "tr_key": ""
          }
        },
        "push_example": {
          "header": {
            "tr_cd": "d0"
          },
          "body": {
            "userid": "ID",
            "itemgb": "1",
            "accountno": "ACCOUNT NUMBER",
            "orderno": "0000549594",
            "issuecd": "AAPL",
            "slbygb": "2",
            "concgty": "0000000200",
            "concprc": "000000309380000",
            "conctime": "185900",
            "ucgb": "0",
            "rejgb": "0",
            "fundcode": "",
            "sin_gb": "00",
            "rej_cd": "",
            "cur_cd": "USD",
            "lon_dt": "00000000",
            "qty_dit_cd": "",
            "dcp_cns_qty": "0.000000"
          }
        },
        "description": "해외주식 주문 체결 시 실시간으로 수신됩니다."
      },
      {
        "name": "해외주식 실시간주문내역통보",
        "sheet": "API_해외_주식_실시간_주문내역통보",
        "tr_cd": "d1",
        "tr_key": {
          "name": "userid",
          "kor": "사용자ID",
          "length": "8"
        },
        "fields": [
          "userid",
          "itemgb",
          "accountno",
          "orderno",
          "orgordno",
          "ordercd",
          "issuecd",
          "issuename",
          "slbygb",
          "order_type",
          "ordergty",
          "orderprc",
          "procnm",
          "commcd",
          "order_cond",
          "fundcode",
          "sin_gb",
          "order_time",
          "cur_cd",
          "lon_dt",
          "qty_dit_cd",
          "dcp_cns_qty"
        ],
        "subscribe_example": {
          "header": {
            "token": "TOKEN",
            "tr_type": "1"
          },
          "body": {
            "tr_cd": "d1",
            "tr_key": ""
          }
        },
        "push_example": {
          "header": {
            "tr_cd": "d1"
          },
          "body": {
            "userid": "ID",
            "itemgb": "1",
            "accountno": "ACCOUNT NUMBER",
            "orderno": "0000549594",
            "orgordno": "0000000000",
            "ordercd": "10",
            "issuecd": "AAPL",
            "issuename": "애플",
            "slbygb": "2",
            "order_type": "00",
            "ordergty": "0000000200",
            "orderprc": "000000309380000",
            "procnm": "00",
            "commcd": "F5",
            "order_cond": "",
            "fundcode": "",
            "sin_gb": "00",
            "order_time": "185522",
            "cur_cd": "USD",
            "lon_dt": "00000000",
            "qty_dit_cd": "",
            "dcp_cns_qty": "0.000000"
          }
        },
        "description": "해외주식 주문 접수 시 실시간으로 수신됩니다."
      }
    ]
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "POST /oauth2/token 으로 발급받은 access token"
      },
      "ClientId": {
        "type": "apiKey",
        "in": "header",
        "name": "x-client-id"
      },
      "ClientSecret": {
        "type": "apiKey",
        "in": "header",
        "name": "x-client-secret"
      }
    },
    "parameters": {
      "CtsHeader": {
        "name": "cts",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "연속조회 키. 목록 조회 응답 연속키를 다음 요청 헤더에 세팅"
      }
    },
    "schemas": {
      "Message": {
        "type": "object",
        "description": "공통 응답 메시지 봉투",
        "properties": {
          "msg_code": {
            "type": "string"
          },
          "usr_msg": {
            "type": "string"
          },
          "msg_lv_code": {
            "type": "string"
          },
          "dvlp_msg_yn": {
            "type": "string"
          },
          "svc_nm": {
            "type": "string"
          },
          "func_nm": {
            "type": "string"
          },
          "line_no": {
            "type": "string"
          },
          "dvlp_msg": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-instruments": {
    "available": true,
    "note": "이 자산군의 정적 종목정보는 종목마스터 파일(.mst)로 제공됩니다. 전체 정의는 common/openapi.json 의 x-instruments 참조.",
    "files": [
      "m_gtsstock.mst (해외주식)"
    ],
    "download_url_pattern": "https://www.n2plug.com/instruments/<파일명>.mst",
    "auth_required": false,
    "format_key_points": [
      "CP949",
      "고정길이 레코드 + LF(0x0A) 종단",
      "바이너리 모드(\"rb\") 필수",
      "파일크기 % 레코드크기 == 0 검증"
    ],
    "struct_definition_url_pattern": "https://www.n2plug.com/instruments/<파일명>.h",
    "struct_definition_note": "마스터 파일(.mst)과 1:1 대응하는 .h 파일에 오프셋·길이·코드값·레코드크기가 정의되어 있습니다. 인증 불필요.",
    "struct_definition_files": [
      "m_gtsstock.h"
    ]
  }
}
