Skip to main content

A simple finance data fetching library for Naver Finance data.

Project description

text

nfinance

nfinance/
│
├── nfinance/
│   ├── __init__.py
│   └── nfinance.py
│   └── stock_listing.py
│   └── rsi.py
│
├── tests/
│   ├── __init__.py
│   └── test_nfinance.py
│
├── .gitignore
├── LICENSE
├── README.md
├── requirements.txt
└── setup.py

1. 설명

nfinance는 네이버 파이낸스의 데이터를 가져오는 Python 라이브러리입니다. rsi는 Relative Strength Index를 구하는 Python 라이브러리입니다.

2. 설치 방법

pip install nfinance

3-1. 사용 예제

from nfinance import nfinance

# Correctly calling a class method
data_day = nfinance.download(ticker="005930", start_date="2022-01-01", end_date="2022-1-31", interval="day")
data_week = nfinance.download(ticker="005930", start_date="2022-01-01", end_date="2022-3-31", interval="week")
data_month = nfinance.download(ticker="005930", start_date="2022-01-01", end_date="2022-12-31", interval="month")
print(data_day)
print(data_week)
print(data_month)

3-2. 사용 예제

import nfinance

# 코스피 전체 주식 목록 가져오기
stocks_kospi = nfinance.StockListing('KOSPI')
df_kospi = stocks_kospi.fetch_stocks()
print(df_kospi)

# 코스닥 전체 주식 목록 가져오기
stocks_kosdaq = nfinance.StockListing('KOSDAQ')
df_kosdaq = stocks_kosdaq.fetch_stocks()
print(df_kosdaq)

4. LICENSE

MIT 라이선스를 예로 듭니다. 실제로 사용하려면 올바른 라이선스를 선택해야 합니다.

MIT License

Copyright (c) 2024 lega001

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nfinance-0.2.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file nfinance-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nfinance-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for nfinance-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17a4d8ab1c8c543ff20f622e7505c76f51018ab0325322402253a0f532fa4610
MD5 f9c3623fa7b0b17f9b04f559dff55dd0
BLAKE2b-256 f544c4489b0eb0a85e7f5f9912039adbd947487adf8db2c336d27ca5b4a25b74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page