korean-trading-api

Document Korea Investment & Securities REST API authentication, hashkeys, and trading endpoints.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/Junghyun99/MagicSplit --skill korean-trading-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: korean-trading-api
Source: https://github.com/Junghyun99/MagicSplit/tree/main/.claude/skills/korean-trading-api
Command: npx skills add https://github.com/Junghyun99/MagicSplit --skill korean-trading-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a consolidated, implementation-focused reference for integrating Korea Investment & Securities (KIS) REST APIs so developers can authenticate, build correct headers, generate hashkeys, and call order, quote, balance, and trade endpoints for both live and mock environments without repeatedly consulting fragmented docs.

Core Features & Use Cases

  • Authentication & HashKey: Describes the token issuance flow and the separate hashkey generation step required for POST orders, plus recommended header composition and required string-typed parameters.
  • Order and Market Calls: Documents endpoints and TR ID mappings for overseas and domestic workflows including current price, best bid/ask, order placement, order correction/cancellation, pending orders, balances, and trade history with live vs mock TR ID variants.
  • Pagination & Exchange Mapping: Explains pagination tokens, rate-limit guidance, and the differing exchange code mappings between price queries and order/balance APIs; useful when extending broker adapters or implementing KisDomesticBrokerBase/KisBrokerBase abstractions.

Quick Start

Use this skill as a reference to implement authenticated KIS REST API calls for token generation, hashkey creation, placing and cancelling orders, and querying balances and trades in your broker integration.

Frequently Asked Questions about korean-trading-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a hashkey for Korea Investment & Securities POST order requests?

The token issuance flow for KIS REST APIs requires your app key and app secret to request an access token. You compose this token into the authorization header for all subsequent authenticated trading and market query calls.

What TR IDs do I need for overseas and domestic stock trading with KIS APIs?

TR IDs for KIS APIs map to specific domestic and overseas workflows including current price, order placement, cancellation, balances, and trade history. Each endpoint requires live or mock environment TR ID variants for proper routing.

Do I need different exchange code mappings for KIS price queries versus order and balance APIs?

Yes, KIS APIs use differing exchange code mappings between price queries and order or balance APIs. You must apply the correct exchange code mapping based on whether you are querying market data or placing orders for domestic and overseas trading.

How does pagination work when querying trade history and pending orders through the KIS REST API?

Pagination for KIS REST API trade history and pending orders uses pagination tokens to fetch subsequent result sets. You must handle these tokens and observe rate-limit guidance to avoid exceeding request thresholds during broker integration.

Can I use this Skill to build an automated trading bot for both live and mock Korean stock environments?

Yes, this Skill provides implementation-focused reference for building automated trading bots and broker adapters in both live and mock Korean stock environments. It covers token issuance, header composition, and endpoint paths for authenticated trading.