Skip to main content

Creon Plus

대신증권에서 제공하는 Creon Plus API를 사용하기 쉽게 재구성한 패키지입니다.

jihogrammer@gmail.com

현재 이 패키지는 개발 중입니다.

TODO

  • requirements.txt 명시
  • Windows에서 테스트 및 예제 개선
  • pywin32 종속성과 충돌 없는지 파악
  • Creon Plus 자동 로그인
  • Creon Plus 장애 발생 시 복구 및 예외처리

Example - 실시간 가격 구독

테스트 안 됨 - OSX에서 구현해서 Windows에서 확인해야 함

패키지 내 examples 폴더에서 확인할 수 있으며, 주석은 pydoc이 익숙해지면 추가하겠습니다.

현재 내용은 일종의 슈도코드(Pseudocode) 정도입니다.

class MyHandler(LivePriceHandler):
    '''Creon Plus가 발생시키는 이벤트를 감지하는 함수 - 함수명은 반드시 "OnReceived"으로 고정'''
    def OnReceived(self) -> None:
        dto = LivePrice(
            self.__module.GetHeaderValue(0),
            self.__module.GetHeaderValue(1),
            self.__module.GetHeaderValue(13),
            self.__module.GetHeaderValue(18),
        )
        print(dto)


class Subscriber:
    __module: 'Module'

    def __init__(self):
        # Creon 모듈 생성
        self.__module = get_stock_cur_module()
        # 이벤트 등록
        self.__handler = bind_module_with_eventhandler(self.__module, MyHandler)
        # 핸들러에 모듈 등록
        self.__handler.init(self.__module)

    def subscribe(self):
        self.__handler.subscribe()


def example():
    '''실행 예시 - 실제로는 Creon 로그인과 pythoncom 핸들링이 필요함'''
    Subscriber().subscribe()

Metadata

Release files for creon-plus 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for creon-plus 0.0.2
File Size Uploaded
creon-plus-0.0.2.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for creon-plus 0.0.2
File Interpreter ABI Platform
creon_plus-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / creon-plus-0.0.2.tar.gz

Download URL creon-plus-0.0.2.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4c3123db22e83020fa91971aaec5346173160846528cccacfe7b825456611116
BLAKE2b-256 checksum
How to use checksums
0b37d3a214d5bb4a0bd6a693b740c21a329172d2c7181082cd28ba28f35ff76a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / creon_plus-0.0.2-py3-none-any.whl

Download URL creon_plus-0.0.2-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b91852c30e050f187aa161a32c600b60ce4056ec0a2a4d30d287d6c0ec16a28
BLAKE2b-256 checksum
How to use checksums
172ace9034bb612ff0ab41dc12890a91b862cc88f93549155221c1e26b73f32c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page