Skip to main content
Glama
ChunSam

kiwoom-mcp-server

by ChunSam

프로그램 매매 조회

get_program_trading

Retrieve program trading rankings and trends for KOSPI/KOSDAQ, including top net buy/sell stocks, market daily/intraday trends, and stock-specific daily/intraday flows with arbitrage balance.

Instructions

프로그램 매매 상위 종목과 추이를 조회합니다 (키움 ka90003/ka90004/ka90010/ka90005/ka90013/ka90008/ka90006). view: top(당일 순매수/순매도 상위 종목, 기본) / date_rank(지정한 날짜의 순매수/순매도 상위 종목 — top과 달리 과거 날짜를 볼 수 있고 매수·매도 금액과 '거래비중'(그 종목 거래에서 프로그램이 차지한 비율)까지 나옵니다. 당일 순위는 top이 서버 집계라 더 정확합니다) / market_daily(시장 전체 일자별 추이) / market_intraday(당일 시간대별 누적 추이) / stock_daily(특정 종목의 일자별 추이 — stock_code 필수) / stock_intraday(특정 종목의 시간대별 누적 추이 — stock_code 필수, 초 단위이며 순매수 '수량'까지 나옵니다. 최근 거래일만 제공되어 base_date가 적용되지 않습니다) / arbitrage_balance(차익거래 잔고 추이 — 매매가 아니라 미청산 보유 물량이라 다른 view로는 알 수 없습니다). 한 종목의 프로그램 수급이 장중 언제 뒤집혔는지를 보려면 stock_intraday, 날짜별 흐름은 stock_daily입니다. direction은 top·date_rank에, unit은 view=top에만, market은 top·date_rank·market_daily·market_intraday에만 적용됩니다 (종목 단위 view와 arbitrage_balance에는 적용되지 않습니다). market: kospi(기본)/kosdaq — 전체(all) 옵션이 없습니다. 추이 금액 단위는 백만원입니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNo표시할 종목/행 수 (기본값 20, 최대 50) — view=date_rank는 순위를 조회 범위 안에서 매기므로 20로 제한됩니다
unitNoview=top의 금액/수량 기준 (기본값: amount)
viewNo조회 종류 (기본값: top)
marketNo시장 구분 (기본값: kospi) — 종목 단위 view와 arbitrage_balance에는 적용되지 않습니다. date_rank는 전체(all) 조회를 제공하지 않는 TR이라 시장을 하나 골라야 합니다
base_dateNo추이 조회 기준일 — 이 날짜부터 과거로 조회 (기본값: 오늘/최근일). view=stock_intraday에는 적용되지 않습니다
directionNoview=top / date_rank의 순매수/순매도 (기본값: net_buy)
stock_codeNoview=stock_daily / stock_intraday 전용 — 조회할 6자리 종목코드
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so excellently. It discloses that date_rank allows past dates with extra fields, stock_intraday only provides the most recent trading day and ignores base_date, amounts are in million won, and market has no 'all' option. It also notes arbitrage_balance represents unclosed positions, not trades, which is critical behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every clause carries unique information—view definitions, constraints, units, and exceptions. It is front-loaded with the primary purpose and logically organized from view enumeration to parameter applicability. There is no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Without an output schema, the description indicates key output dimensions for several views (e.g., date_rank includes amount and trade weight; stock_intraday includes quantity) and sets expectations about accuracy and date limitations. However, views like market_daily and market_intraday are only described as '추이' without specifying output fields, leaving a slight gap for a complex multi-view tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. However, the description adds significant inter-parameter constraints: 'direction은 top·date_rank에, unit은 view=top에만, market은 top·date_rank·market_daily·market_intraday에만 적용됩니다 (종목 단위 view와 arbitrage_balance에는 적용되지 않습니다).' This goes beyond per-parameter schema definitions and clarifies combinations, which is highly valuable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with '프로그램 매매 상위 종목과 추이를 조회합니다', clearly stating the tool retrieves program trading top stocks and trends. It then enumerates seven distinct views, differentiating the resource and scope. This is specific and distinguishes it from sibling tools like get_institution_trend or get_foreign_intraday.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use guidance: '한 종목의 프로그램 수급이 장중 언제 뒤집혔는지를 보려면 stock_intraday, 날짜별 흐름은 stock_daily입니다.' It also clarifies accuracy trade-offs ('당일 순위는 top이 서버 집계라 더 정확합니다') and parameter applicability exclusions. This is exemplary.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/ChunSam/kiwoom-mcp-server'

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