Skip to main content
Glama

KIS REST API MCP Server

by migusdn

韓国投資証券 REST API MCP (Model Context Protocol)

韓国投資証券(KIS)のREST APIを使用して株式取引および相場情報を照会するMCP(Model Context Protocol)サーバーです。国内および海外の株式取引、相場照会、口座管理など、さまざまな金融取引機能を提供します。

✨主な機能

  • 🇰🇷国内株式取引
    • リアルタイムカレントビュー
    • 枚数/売り注文
    • 残高照会
    • 湖が情報を見る
    • 注文履歴の照会
  • 🌏海外株取引
    • 米国、日本、中国、香港、ベトナムなどの主要市場をサポート
    • リアルタイムカレントビュー
    • 枚数/売り注文
  • 特徴
    • 非同期処理による高速応答
    • リアルタイム相場と締結情報
    • 安定したエラー処理
    • 拡張可能な設計

⚠️の注意事項

このプロジェクトはまだ開発中の未完成プロジェクトです。実際の投資に使用する前に十分なテストを行ってください。

  • このプロジェクトを使用して発生したすべての損失と責任は、完全にユーザーにあります。
  • APIを使用する場合は、韓国投資証券の利用規約を遵守する必要があります。
  • 実際の口座使用には注意が必要であり、模擬投資口座で十分なテストをお勧めします。
  • API呼び出しの制限に関する制約を必ず確認してください。

Requirements

  • Python >= 3.13
  • uv(Python packaging tool)

Installation

# 1. Install uv if not already installed pip install uv # 2. Create and activate virtual environment uv venv source .venv/bin/activate # Linux/MacOS # or .venv\\Scripts\\activate # Windows # 3. Install dependencies uv pip install -e . # 4. Set environment variables export KIS_APP_KEY="앱키" export KIS_APP_SECRET="시크릿키" export KIS_ACCOUNT_TYPE="VIRTUAL" # 또는 "REAL" export KIS_CANO="계좌번호"

Functions

Domestic Stock Trading

  • inquery_stock_price - 株価現在の検索
    • symbol : 種目コード (例: "005930") (string, required)
    • Returns: 現在価、前日比、等落率、取引量など
  • order_stock - 在庫購入/売り注文
    • symbol : 種目コード (string, required)
    • quantity : 注文数量 (number, required)
    • price : 注文価格 (0: 市場価格) (number, required)
    • order_type : 注文タイプ ("buy" または "sell") (string, required)
  • inquery_balance - 口座残高照会
    • Returns: 保有種目、評価金額、損益現況など
  • inquery_order_list - 毎日の注文履歴の照会
    • start_date : 照会開始日 (YYYYMMDD) (string, required)
    • end_date : 照会終了日 (YYYYMMDD) (string, required)
  • inquery_order_detail - 注文詳細履歴の照会
    • order_no : 注文番号 (string, required)
    • order_date : 注文日 (YYYYMMDD) (string, required)
  • inquery_stock_ask - 号価情報の照会
    • symbol : 種目コード (string, required)
    • Returns: 売り/枚数 好価、好価数量など

Overseas Stock Trading

  • order_overseas_stock - 海外株式の購入/売り注文
    • symbol : 種目コード (例: "AAPL") (string, required)
    • quantity : 注文数量 (number, required)
    • price : 注文価格 (number, required)
    • order_type : 注文タイプ ("buy" または "sell") (string, required)
    • market : マーケットコード (string, required)
      • 「NASD」:ナスダック
      • 「NYSE」:ニューヨーク
      • 「AMEX」:アメックス
      • 「SEHK」:香港
      • 「SHAA」:中国上海
      • 「SZAA」:中国深セン
      • 「TKSE」:日本
      • 「HASE」:ベトナムハノイ
      • 「VNSE」:ベトナムホーチミン
  • inquery_overseas_stock_price - 海外株式の現在のビュー
    • symbol : 種目コード (string, required)
    • market : マーケットコード (string, required)

リソース

構成

環境変数を介してAPIキーとアカウント情報を設定します。

  • KIS_APP_KEY :韓国投資証券アプリキー
  • KIS_APP_SECRET :韓国投資証券秘密鍵
  • KIS_ACCOUNT_TYPE : 口座タイプ(「REAL」または「VIRTUAL」)
  • KIS_CANO :口座番号

Trading Hours

国内在庫:

  • 正規場:09:00~15:30
  • 時間外単価:15:40~16:00

海外在庫:

  • アメリカ(ナスダック/ニューヨーク):22:30〜05:00(韓国時間)
  • 日本:09:00~15:10
  • 中国:10:30~16:00
  • 香港:10:30~16:00
  • ベトナム:11:15~16:15

エラーハンドリング

API呼び出し時に発生する可能性がある主なエラー:

  • 認証エラー:APIキーまたは秘密鍵が間違っている場合
  • 残高不足: 注文金額が口座残高より大きい場合
  • 時間制限:取引時間ではない場合
  • 注文制限:注文数量または金額が制限を超えた場合

About

  • 拡張可能な設計
  • 非同期処理による高速応答
  • リアルタイム相場と締結情報
  • 安定したエラー処理

ライセンス

MITライセンス

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A Model Context Protocol server for interacting with Korea Investment & Securities (KIS) REST API, enabling domestic and foreign stock trading, price checks, and account management.

  1. ✨主な機能
    1. ⚠️の注意事項
      1. Requirements
        1. Installation
          1. Functions
            1. Domestic Stock Trading
            2. Overseas Stock Trading
          2. リソース
            1. 構成
            2. Trading Hours
          3. エラーハンドリング
            1. About
              1. ライセンス

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server providing tools for querying A-share stock market data, including historical prices, financial reports, market indices, and macroeconomic indicators.
                  Last updated -
                  28
                  178
                  Python
                  MIT License
                • -
                  security
                  -
                  license
                  -
                  quality
                  A Model Context Protocol server that provides tools for interacting with Yahoo Finance, allowing users to retrieve stock prices, company information, and perform financial data comparisons.
                  Last updated -
                  Python
                  MIT License
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server that provides intelligent stock data assistance through Tushare's financial data API, enabling users to query comprehensive stock information, financial data, and market indices through natural language.
                  Last updated -
                  6
                  Python
                  MIT License
                  • Linux
                  • Apple
                • -
                  security
                  F
                  license
                  -
                  quality
                  A custom Model Context Protocol server that provides real-time financial analysis tools including stock monitoring, portfolio management, market summaries, and automated price alerts with Telegram notifications.
                  Last updated -
                  Python

                View all related MCP servers

                MCP directory API

                We provide all the information about MCP servers via our MCP API.

                curl -X GET 'https://glama.ai/api/mcp/v1/servers/migusdn/KIS_MCP_Server'

                If you have feedback or need assistance with the MCP directory API, please join our Discord server