Coder Social home page Coder Social logo

Comments (2)

mr-yoo avatar mr-yoo commented on August 14, 2024

KRX는 내부적으로 ISIN을 사용하기 때문에 이를 얻기위해 "주식검색기"를 스크래핑 함.

따라서 "상장종목" 페이지의 정보와는 다를 수 있음


"종목검색기"의 정보는 ISIN을 확인한 뒤 일부 데이터를 저장함

  • 증권(7)과 사용자 영역 선택해서 저장

df = df[(df.ISIN.str[2] >= '7')]

예를들어 헝셩그룹은 ISIN이 다음과 같다.
HK0000214814

현재 코드에서는 문자열 2번 위치의 값이 조건에 들어오지 않으므로 데이터를 제거한다. 2번 위치는 ISIN의 속성을 의미하며 1부터 Z까지만 사용되는줄 알고 있었으나 0번도 사용될 수 있다. 이와 유사한 형태로 검색되지 않던 티커는 아래와 같다.

900290
900260
900080
900300
900340
900110
900040
900310
900270

from pykrx.

mr-yoo avatar mr-yoo commented on August 14, 2024

모듈 업데이트

import pykrx
print(pykrx.__version__)

0.1.37

API 동작 확인

from pykrx import stock

tickers = stock.get_market_ticker_list("20190405", market="ALL")
print(len(tickers))

2272

위 코드는 웹 페이지에서 다음과 같이 선택한 것과 같음

from pykrx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.