npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

krx-stock-api

v1.0.0

Published

KRX Stock API

Downloads

12

Readme

krx-stock-api

npm npm npm

krx-stock-api는 간편하게 한국거래소(KRX)의 API를 사용할 수 있는 라이브러리입니다.

주의사항

라이브러리의 사용으로 발생한 문제(투자 실패 등)에 대해서는 사용자 본인에게 책임이 있습니다.

사양

TypeScript로 개발된 라이브러리로, 정확한 타입 정보를 얻을 수 있습니다.

Stock Class

Stock 데이터를 종합한 클래스입니다.

  • queryTime (string) : 조회시간
  • name (string) : 종목명
  • price (number) : 현재가격
  • change (number) : 전일 대비
  • previousPrice (number) : 전일 종가
  • volume (number) : 거래량
  • tradingVolume (number) : 거래대금
  • start (number) : 시가
  • high (number) : 고가
  • low (number) : 저가
  • high52 (number) : 52주 고가
  • low52 (number) : 52주 저가
  • up (number) : 상한가
  • down (number) : 하한가
  • per (number) : PER
  • amount (number) : 상장 주식 수
  • faceValue (number) : 액면가
  • daily (Array<dailyInformation>) : 일자별 시세
  • institutionalInvestorAsk (Array<InstitutionalInvestorOffer>) : 기관 매도 상위
  • institutionalInvestorBid (Array<InstitutionalInvestorOffer>) : 기관 매수 상위
  • ask (Array<Offer>) : 매도 호가
  • bid (Array<Offer>) : 매수 호가
  • transactions (Array<Transaction>) : 시간대별 체결가
  • kospi (Market) : KOSPI 지수
  • kosdaq (Market) : KOSDAQ 지수
  • marketOpen (boolean) : 개장 여부
  • krx100 (Market) : KRX100 지수
  • kospi200 (Market) : KOSPI200 지수

DailyInformation Class

  • date (string) : 일자
  • price (number) : 종가
  • change (number) : 전일 대비
  • volume (number) : 거래량
  • amount (number) : 거래대금
  • start (number) : 시가
  • high (number) : 고가
  • low (number) : 저가

InstitutionalInvestorOffer Class

  • name (string) : 기관명
  • volume (number) : 거래량

Market Class

  • name (string) : 지수명
  • price (number) : 지수
  • change (number) : 전일 대비

Offer Class

  • price (number) : 호가
  • amount (number) : 잔량

Transaction Class

  • time (string) : 시간
  • transactionPrice (number) : 체결과
  • change (number) : 전일 대비
  • sellPrice (number) : 매도 호가
  • buyPrice (number) : 매수 호가
  • amount (number) : 체결량

예제

import krx from 'krx-stock-api';

(async () => console.log(await krx.getStock('종목코드')))();