Skip to main content

daishin creon api

Project description

creon-api

  • 대신증권 크레온 API
  • 반드시 python 32bit를 사용해야합니다.

설치

pip install creon-api

사용 예시

examples -> example_daily_routine.py 참고

import creon_api.utils as utils
import creon_api.scripts.crawl_code_list
import creon_api.scripts.crawl_daily_stock_adj_info
import creon_api.scripts.crawl_daily_price
import creon_api.scripts.crawl_daily_minute_price
import creon_api.scripts.processing_adj_info


if __name__ == "__main__":
    # 주식시장 종목리스트 다운로드
    creon_api.scripts.crawl_code_list.save_recent_stock_code_list_file()

    code_list = [
        *utils.load_krx_code_list(),
        *utils.index_code_list
    ]

    # 권리락 정보 다운로드
    creon_api.scripts.crawl_daily_stock_adj_info.update_stock_adj_info_file(code_list)

    # 일별데이터 다운로드
    creon_api.scripts.crawl_daily_price.update_daily_stock_file(code_list)

    # 분봉데이터 다운로드
    creon_api.scripts.crawl_daily_minute_price.save_daily_minute_price_file(code_list)

    # 수정주가 계산 및 저장
    code_list = utils.get_adj_file_code_list()
    for i, code in enumerate(code_list):
        print(f"{code} {i + 1}/{len(code_list)}")
        processed_adj_price_df = creon_api.scripts.processing_adj_info.get_processed_adj_price_df(code)
        creon_api.scripts.processing_adj_info.save_processed_df_to_file(processed_adj_price_df, code)

사용자 저장 경로 지정하기(optional)

main 프로그램 폴더 내에 creon_config.json 생성

{
  "DATA_FOLDER_PATH": "./cybos_data",
  "LOG_PATH": "./cybos_log"
}

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

creon_api-1.1-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file creon_api-1.1-py3-none-any.whl.

File metadata

  • Download URL: creon_api-1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6

File hashes

Hashes for creon_api-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1007fb7f3dafcb0e3abf174aaa9a6285075fabc2a288b3b270ffeb79a9846495
MD5 bd321b8fc6c7cece3775c9574a223aa2
BLAKE2b-256 de903898fa8ab9ee82f67a41ea50e1e4ab812521ec2cf50045ebcecf00c97a59

See more details on using hashes here.

Supported by

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