/dart-fss

한국 금융감독원에서 운영하는 다트(Dart) 시스템 크롤링을 위한 라이브러리

Primary LanguagePythonMIT LicenseMIT

DART-FSS (Data Analysis, Retrieval and Transfer System-Financial Supervisory Service)

PyPI PyPI - Python Version Build Status Coverage Codacy Badge

대한민국 금융감독원에서 운영하는 다트(DART) 사이트 크롤링 및 재무제표 추출을 위한 라이브러리

A library for crawling and extracting financial statements of DART operated by the FSS of Korea

Features

  • Open DART의 오픈 API를 이용한 전자공시 조회 (view DART with the open API)
  • DART의 전자공시 정보를 이용한 재무제표 추출 (extract financial statements using DART)
  • DART's

Installation

pip install dart-fss

Plugins

  • Dart-Fss-Classifier: 재무제표 추출 성능 향상 (Improve performance of financial statements extraction)

Usage

DART API Key 설정 (Setting)

  • OPEN DART API Register
  • 환경 변수 DART_API_KEY 설정 또는 패키지 사용전 아래와 같이 설정
  • Setting the environment variable DART_API_KEY or before using the package as follows

Quick Starts

import dart_fss as dart

# Open DART API KEY 설정 (Setting)
api_key='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
dart.set_api_key(api_key=api_key)

# DART에 공시된 회사 리스트 불러오기
# Call a list of companies published in DART
corp_list = dart.get_corp_list()

# 삼성전자 검색
# Search for Samsung
samsung = corp_list.find_by_corp_name('삼성전자', exactly=True)[0]

# 2012년부터 연간 연결재무제표 불러오기
# Call annual consolidated financial statements from 2012
fs = samsung.extract_fs(bgn_de='20120101')

# 재무제표 검색 결과를 엑셀파일로 저장 ( 기본저장위치: 실행폴더/fsdata )
# Save the results of the financial statements search as an Excel file ( default storage location: execution folder/fsdata )
fs.save()

주의사항 (Precautions)

  • Open DART 및 DART 홈페이지의 경우 분당 1000회 이상 요청시 서비스가 제한될 수 있음.
  • For Open DART & DART homepage, service may be restricted if requested more than 1000 times per minute.
  • 관련 공지사항: [FAQ] --> [오픈 API 이용한도는 어떻게 되나요?]
  • Related Notice: [FAQ] --> [What is the usage limit of the open API?]

License

This project is licensed under the MIT License