Skip to main content

자동화매매 클래스 상속, 로그, 환경 등의 핵심이되는 오픈소스

Project description

Programgarden Core

Programgarden은 AI 시대에 맞춰 파이썬을 모르는 투자자도 개인화된 시스템 트레이딩을 자동으로 수행할 수 있게 돕는 오픈소스입니다. 본 저장소는 그 중 핵심 타입, 베이스 클래스, 로깅, 한글 별칭 처리 등 엔진과 플러그인이 공통으로 사용하는 "코어" 모듈입니다. LS증권 OpenAPI를 메인으로 해외 주식/파생 거래 자동화를 목표로 하며, 타 증권사 지원은 추후 확장될 예정입니다.

주요 특징

  • 자동화 전략 실행을 위한 타입 안전한 계약 제공: System/Strategy/Order 구성 스키마를 TypedDict로 정의해 IDE 친화적이고 안전합니다.
  • 실시간 주문 처리 인터페이스: 신규/정정/취소 주문 베이스 클래스를 제공하고, 브로커 콜백 타입을 명확히 정의합니다.
  • 증권사 API 통합 전제: LS증권 OpenAPI 사용을 염두에 둔 필드/코드값을 표준화했습니다.
  • 플러그인 기반 조건: 전략 조건(BaseStrategyCondition…)을 상속해 다양한 전략 플러그인을 손쉽게 확장할 수 있습니다.
  • 한글 별칭 지원: 설정 파일에서 한글 키를 사용해도 normalize_system_config 로 표준 키로 자동 변환됩니다.
  • 컬러 로깅: pg_log, system_logger, strategy_logger 등 범주화된 컬러 로그를 기본 제공합니다.

설치

아래는 일반적인 설치 방법 예시입니다.

# PyPI에 게시된 경우
pip install programgarden-core

# Poetry 사용 시(개발 환경)
poetry add programgarden-core

요구 사항: Python 3.9+

타입과 베이스 클래스를 어디서 가져오나요?

코어는 사용 빈도가 높은 심볼들을 패키지 루트에서 재노출합니다.

from programgarden_core import (
  # 설정/전략/주문 타입
  SystemType, StrategyType, DictConditionType,
  OrderType, OrderRealResponseType,

  # 심볼/포지션 타입
  SymbolInfoOverseasStock, SymbolInfoOverseasFutures,
  HeldSymbol, NonTradedSymbol,

  # 전략 베이스
  BaseStrategyConditionOverseasStock, BaseStrategyConditionOverseasFutures,

  # 주문 베이스(신규/정정/취소)
  BaseNewOrderOverseasStock, BaseModifyOrderOverseasStock, BaseCancelOrderOverseasStock,
  BaseNewOrderOverseasFutures, BaseModifyOrderOverseasFutures, BaseCancelOrderOverseasFutures,

  # 한글 별칭 유틸
  normalize_system_config,

  # 로깅
  pg_log, system_logger, strategy_logger,
)

기여하기

이슈/토론/PR 환영합니다. 버그 리포트 시 재현 단계와 최소 예시를 함께 제공해 주시면 빠르게 대응할 수 있습니다.

변경 로그

자세한 변경 사항은 루트의 CHANGELOG.md 를 참고하세요.

Project details


Download files

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

Source Distribution

programgarden_core-0.1.8.tar.gz (33.9 kB view details)

Uploaded Source

Built Distribution

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

programgarden_core-0.1.8-py3-none-any.whl (44.3 kB view details)

Uploaded Python 3

File details

Details for the file programgarden_core-0.1.8.tar.gz.

File metadata

  • Download URL: programgarden_core-0.1.8.tar.gz
  • Upload date:
  • Size: 33.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Darwin/24.6.0

File hashes

Hashes for programgarden_core-0.1.8.tar.gz
Algorithm Hash digest
SHA256 7c1ebbb56405e074d6639de5663f867fef18c671b8517c64cb6b3acb0bb06a0e
MD5 cdace8fd922c1ba8baaba6ddbaaa0684
BLAKE2b-256 bd218f15d8e96edd918579525d7249da967b08577e2df5f5120e08b775609124

See more details on using hashes here.

File details

Details for the file programgarden_core-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: programgarden_core-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 44.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Darwin/24.6.0

File hashes

Hashes for programgarden_core-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c74dc2c535917c00bce358697f6563f7002c70de0510e246a5833f8ef4e1167f
MD5 dc5af14c36cc86c9ce4f024c2bfa4b20
BLAKE2b-256 88ef708c52aade937baf2fbd70bb0e0680f96121a20318c7be72f6aae1ebee27

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