Skip to main content
Glama
migusdn

KIS REST API MCP Server

inquery-order-list

Retrieve daily order lists from Korea Investment & Securities by specifying start and end dates using the KIS REST API MCP Server.

Instructions

Get daily order list from Korea Investment & Securities

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_dateYes
start_dateYes

Implementation Reference

  • The handler function that implements the core logic for the 'inquery-order-list' tool. It makes an API call to the Korea Investment & Securities endpoint for daily order lists using the provided date range.
    async def inquery_order_list(start_date: str, end_date: str): """ Get daily order list from Korea Investment & Securities Args: start_date: Start date (YYYYMMDD) end_date: End date (YYYYMMDD) Returns: Dictionary containing order list information """ async with httpx.AsyncClient() as client: token = await get_access_token(client) # Prepare request data request_data = { "CANO": os.environ["KIS_CANO"], # 계좌번호 "ACNT_PRDT_CD": "01", # 계좌상품코드 "INQR_STRT_DT": start_date, # 조회시작일자 "INQR_END_DT": end_date, # 조회종료일자 "SLL_BUY_DVSN_CD": "00", # 매도매수구분 "INQR_DVSN": "00", # 조회구분 "PDNO": "", # 종목코드 "CCLD_DVSN": "00", # 체결구분 "ORD_GNO_BRNO": "", # 주문채번지점번호 "ODNO": "", # 주문번호 "INQR_DVSN_3": "00", # 조회구분3 "INQR_DVSN_1": "", # 조회구분1 "CTX_AREA_FK100": "", # 연속조회검색조건100 "CTX_AREA_NK100": "", # 연속조회키100 } response = await client.get( f"{TrIdManager.get_domain('order_list')}{ORDER_LIST_PATH}", headers={ "content-type": CONTENT_TYPE, "authorization": f"{AUTH_TYPE} {token}", "appkey": os.environ["KIS_APP_KEY"], "appsecret": os.environ["KIS_APP_SECRET"], "tr_id": TrIdManager.get_tr_id("order_list") }, params=request_data ) if response.status_code != 200: raise Exception(f"Failed to get order list: {response.text}") return response.json()
  • server.py:407-410 (registration)
    The @mcp.tool decorator registers the 'inquery-order-list' tool with the MCP server, specifying its name and description.
    @mcp.tool( name="inquery-order-list", description="Get daily order list from Korea Investment & Securities", )
  • The docstring provides the input schema (parameters: start_date, end_date as strings in YYYYMMDD format) and output description for the tool.
    """ Get daily order list from Korea Investment & Securities Args: start_date: Start date (YYYYMMDD) end_date: End date (YYYYMMDD) Returns: Dictionary containing order list information """
  • TR ID for order_list operation in real account.
    "order_list": "TTTC8001R", # 일별주문체결조회
  • TR ID for order_list operation in virtual account.
    "order_list": "VTTC8001R", # 일별주문체결조회

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/migusdn/KIS_MCP_Server'

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