상세 컨텐츠

본문 제목

Tessa, 주식 정보 가지고 오기

Python

by 경밤 2023. 2. 26. 20:32

본문

반응형

https://ymyke.github.io/tessa/tessa.html

 

tessa API documentation

tessa – simple, hassle-free access to price information of financial assets 📉🤓📈 tessa is a Python library to help you easily search asset identifiers (e.g., tickers) and retrieve price information for assets from different sources such as Yahoo

ymyke.github.io

tessa는 야후파이낸스에서 정보를 가지고 온다. 기존에 사용했던 investing.com은 clouldflare를 도입해서 403에러를 띄우게 했다. 그래서 investpy, investiny 모두 막혔다. 대안으로 tessa를 사용한다.

Installation.

위 예제를 사용하기 위해서는 최신 버전인 0.5.0 버전이 필요한데, 사실 보통 아나콘다를 사용하면 0.3.0이 깔릴 것이다. 그러면 tessa도 마찬가지로 403에러를 띄우게 된다. 따라서 python을 업그레이드해서 0.5.0 버전을 깔아야한다.

하지만 정확히 Python 3.9 버전을 깔아야 한다.

tessa 코드 일부에서 list[str] 로 모호하게 매개변수를 갖는데, 3.9 버전이 해결해주기 때문이다.

conda create -n 이름 python=3.9

후에, pip install tessa 를 통해 설치하자.

tessa의 심볼명은 항상 블룸버그 명칭을 따르므로 블룸버그껄 따르면 된다.

https://www.bloomberg.com/markets/stocks

 

Bloomberg - Are you a robot?

We've detected unusual activity from your computer network To continue, please click the box below to let us know you're not a robot.

www.bloomberg.com

반응형

관련글 더보기