get_account_balance
Retrieve account balance details including held stocks, current prices, purchase prices, and total investment amounts from Kiwoom Securities accounts.
Instructions
보유 주식 목록, 현재가, 매입가, 매입금액 등 계좌 잔고를 조회합니다
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_no | No | 계좌번호 (미입력시 기본 계좌 사용) |
Implementation Reference
- src/index.ts:151-156 (handler)The underlying API request method for fetching account balance.
async getAccountBalance(accountNo: string) { return this.request("/api/dostk/acnt", "ka10085", { acc_no: accountNo, stex_tp: "0", }); } - src/index.ts:512-526 (registration)The MCP tool registration for 'get_account_balance'.
server.tool( "get_account_balance", "보유 주식 목록, 현재가, 매입가, 매입금액 등 계좌 잔고를 조회합니다", { account_no: accountNoSchema }, { readOnlyHint: true }, async ({ account_no }) => { try { const acct = resolveAccountNo(account_no); const data = await client.getAccountBalance(acct); return textContent(formatBalance(data)); } catch (error) { return errorContent(formatError(error)); } } );