KIS API Setup Guide: Step-by-Step for Beginners (2026)

What is the KIS API? The KIS API (Korea Investment & Securities API) is a REST/WebSocket API that allows developers to: Get real-time stock quotes Place buy/sell orders programmatically Access account balance and portfolio data Stream real-time market data via WebSocket Prerequisites A Korea Investment & Securities brokerage account KIS API access approval Python 3.8+ installed Step 1: Open a KIS Account Visit the Korea Investment & Securities website and apply for an account. Foreigners can apply online in many cases. ...

June 21, 2026 · 2 min · Phillip

How to Get Your KIS API Key — Complete Guide (2026)

Overview Getting a KIS API key requires a Korea Investment & Securities account. This guide walks you through the entire process. Requirements Valid ID (passport for foreigners) Korean phone number OR Korea-based identity verification Bank account for funding Step 1: Create KIS Account Visit the Korea Investment & Securities website and select non-face-to-face account opening. For foreigners: Prepare your passport You may need to visit a branch in person depending on your nationality Some nationalities can complete the process online Step 2: Enable API Trading Log into HTS or the mobile app Go to the API application menu Agree to terms and conditions Select API type: Real trading or Paper trading (모의투자) Tip: Start with Paper trading to test your code before using real money. ...

June 20, 2026 · 2 min · Phillip

KIS API vs pykrx: Which Should You Use for Korean Stock Trading?

Overview If you’re building a Korean stock trading system in Python, you’ll encounter two main tools: KIS API and pykrx. Here’s a detailed breakdown of when to use each. What is pykrx? pykrx is an open-source library that scrapes publicly available data from the KRX website. It requires no account or API key. Best for: Historical data research Backtesting trading strategies Stock screening and analysis Learning and prototyping What is KIS API? KIS API is the official API from Korea Investment & Securities. It requires a brokerage account and API approval. ...

June 16, 2026 · 2 min · Phillip

How I Built an Automated Korean Stock Trading Bot (KIS API + Python)

Background I’ve been actively trading Korean stocks on the KOSPI and KOSDAQ for years. After spending too many hours watching charts, I decided to automate part of my trading strategy using the KIS API. This post shares what I built, what worked, and what I learned — including mistakes. The Strategy My bot focuses on momentum scalping on KOSPI stocks: Screen for stocks with high volume breakouts in the first 30 minutes Enter positions with defined risk (1-2% of account per trade) Exit on target profit or stop loss Maximum 3 concurrent positions System Architecture GitHub Actions (scheduler) ↓ Python Script ↓ ↓ ↓ KIS API pykrx Telegram Bot (trading) (data) (alerts) Core Components 1. Market Scanner from pykrx import stock import pandas as pd def scan_breakouts(min_volume_ratio=2.0): """Find stocks with unusual volume""" today = stock.get_market_ticker_list(market="KOSPI") breakouts = [] for ticker in today[:100]: # Limit for demo try: df = stock.get_market_ohlcv_by_date( prev_date, today_date, ticker ) if len(df) < 20: continue avg_volume = df["거래량"].mean() current_volume = df["거래량"].iloc[-1] if current_volume > avg_volume * min_volume_ratio: breakouts.append({ "ticker": ticker, "volume_ratio": current_volume / avg_volume }) except: continue return sorted(breakouts, key=lambda x: x["volume_ratio"], reverse=True) 2. Order Execution (KIS API) def place_market_order(ticker, quantity, order_type="buy", token=None): url = "https://openapi.koreainvestment.com:9443/uapi/domestic-stock/v1/trading/order-cash" tr_id = "TTTC0802U" if order_type == "buy" else "TTTC0801U" headers = { "authorization": f"Bearer {token}", "appkey": APP_KEY, "appsecret": APP_SECRET, "tr_id": tr_id } body = { "CANO": ACCOUNT_NO, "ACNT_PRDT_CD": "01", "PDNO": ticker, "ORD_DVSN": "01", # Market order "ORD_QTY": str(quantity), "ORD_UNPR": "0" } res = requests.post(url, headers=headers, json=body) return res.json() Key Lessons Learned What Worked Automating the scanning phase saved significant time Telegram alerts for signals I review manually before execution Strict position sizing rules enforced by code What Did Not Work Fully automated execution without human review (too many false signals) Running during the first 5 minutes of market open (too volatile) Ignoring market regime (bot designed for trending markets struggled in choppy conditions) Risk Management Rules Never risk more than 2% of account per trade Maximum 3 concurrent positions Hard daily loss limit of 5% — bot stops automatically No trading during major news events Current Status The bot currently runs in semi-automated mode: it scans and sends signals via Telegram, but I manually approve each trade before execution. This hybrid approach has been more profitable than either full automation or pure manual trading.

June 10, 2026 · 2 min · Phillip