@jasset/kis
v0.1.2
Published
[KOR](README-KO.md)
Downloads
20
Readme
@jasset/kis
Typescript client for KIS API(KoreaInvestment OpenAPI).
Installation
npm install @jasset/kisHow to use
import { createKisClient } from "@jasset/kis";
async function main() {
const client = createKisClient({
appKey: process.env.KIS_APP_KEY,
appSecret: process.env.KIS_APP_SECRET,
env: "demo", // or 'real'
});
// 1. (Optional) Get Access Token manually
// The client will automatically fetch and reuse the token if not set.
// const { access_token } = await client.getAccessToken();
// client.setAccessToken(access_token);
// 2. Call API (e.g. Check Domestic Holiday)
// Token is automatically handled!
// New: APIs are organized under namespaces
const result = await client.domestic.checkHoliday({
bassDt: "20231225",
});
console.log(result.holidays);
}
main();Features
- Typed Request/Response: All request and response bodies are fully typed.
- Auto Pagination: Automatically fetch all pages for paginated APIs (can be disabled).
- Environment Support: Easy switch between Real and Demo environments.
- Client Methods: APIs accessible via
client.domesticandclient.overseas.
API Status
Domestic Stock
| Type | Name | Method | Path | Status | | :--- | :--- | :--- | :--- | :--- | | REST | 국내휴장일조회 | GET | /uapi/domestic-stock/v1/quotations/chk-holiday | ✅ | | REST | 주식기본조회 | GET | /uapi/domestic-stock/v1/quotations/search-stock-info | ✅ | | ... | ... | ... | ... | ... |
(See full list in docs or type definitions)
Playground
playground is demo client and server for example.
