kiwoom-api

Authenticate with Kiwoom REST API and manage tokens across mock and production environments.

4|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/zln02/quant-agent --skill kiwoom-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kiwoom-api
Source: https://github.com/zln02/quant-agent/tree/main/skills/kiwoom-api
Command: npx skills add https://github.com/zln02/quant-agent --skill kiwoom-api

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

Kiwoom REST API integration is complex; this skill provides a structured client to fetch stock data, manage accounts, authenticate via OAuth, and switch between mock and production trading environments.

Core Features & Use Cases

  • OAuth2 authentication and token caching
  • Fetch stock info (ka10001), account evaluation (kt00004), daily balance (ka01690), settlement balance (kt00005)
  • Environment management (mock vs prod) and error handling with a reusable client template

Quick Start

Start by copying .env.example to .env, fill in your Kiwoom API keys, and run the KiwoomAPIClient to fetch a sample stock info.

Frequently Asked Questions about kiwoom-api

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

FAQPage Schema
How do I authenticate and manage tokens for the Kiwoom REST API in Python?

To authenticate with the Kiwoom REST API, use a Python client that implements OAuth2 authentication and token caching. You copy the .env.example file to .env, fill in your Kiwoom API keys, and the client automatically handles token management across mock and production environments.

Can I switch between mock and production environments for stock trading automation?

Yes, you can switch between mock and production environments for stock trading automation. The client provides environment management features, allowing you to test trading strategies in a mock setup before deploying to the live Kiwoom production API.

What's the best way to fetch stock info and account balances from Kiwoom in Python?

The best way to fetch stock info and account balances is using a structured Python client targeting Kiwoom endpoints like stkinfo, ka01690, and kt00005. It handles rate limiting, retries, and structured error handling to ensure reliable data retrieval.

Does the Kiwoom API client handle rate limiting and retries for REST API requests?

Yes, the Kiwoom API client handles rate limiting and retries for REST API requests. It implements structured error handling and automated retry logic to ensure reliable automation when fetching stock data or interacting with account endpoints.

Why do I need OAuth2 authentication for KRX stock trading automation?

You need OAuth2 authentication for KRX stock trading automation to securely access Kiwoom's REST API endpoints. It allows the client to manage token caching and environment switching, ensuring authorized and reliable data retrieval for trading workflows.

What Kiwoom REST API endpoints are supported for account evaluation and daily balance?

Supported Kiwoom REST API endpoints include ka10001 for stock info, kt00004 for account evaluation, ka01690 for daily balance, and kt00005 for settlement balance. The client structures these calls with consistent error handling and environment management.