{"repo":"breadum/kiwoom","free":true,"listed":false,"github":"https://github.com/breadum/kiwoom","clone":"git clone https://github.com/breadum/kiwoom.git","description":"키움증권 OpenAPI 파이썬 심플 라이브러리","language":"Python","stars":184,"topics":["stock","trading-systems","kiwoom","openapi","algorithmic-trading"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Kiwoom Open API+ Simple Python Wrapper for Kiwoom Open API+ (Stable) News - '너의 투자를 알라' 스마트 매매일지 솔루션 알파노트를 오픈했습니다. - 껄무새는 이제 그만, 알파노트에서 쉽고 간편하게 투자 내역을 기록하고 분석하세요. - 스터디 하려고 시작한건데 어느덧 출시까지 해버렸네요. 많은 관심 부탁드립니다! - https://alphanote.io What is it? - 키움증권에서 제공하는 Open API+ 인터페이스 사용을 위한 간단한 Python Wrapper 모듈 - PyQt5를 이용해 직접 개발하고자 하는 사람을 위한 모듈로 부가적인 기능은 최대한 배제 - 기존 OCX 방식이 아닌 Async 기반 REST API 방식으로 개발하실 분은 [이곳][rest]을 참조 Main Features 1. Open API+ 함수 호출 간소화 - 함수명과 변수명을 깔끔하게 Python 방식으로 통일 - 반복되는 dynamicCall 제거 2. 간단한 기능 지원 - 로그인 기능 - loop / unloop 함수를 통해 간단히 코드 실행 / 대기 제어 - 요청 후 처리 결과를 반환하는 함수에 한해 에러 발생 시 메세지 자동 발생 python from kiwoom import # 지정번호 확인 print(config.MARKETS) # {'0': 'KOSPI', '3': 'ELW', ... } print(config.SECTORS) # {'001': '종합(KOSPI)', '002': '대형주', ... } # 다운로드 api = Kiwoom() api.histories(market='0', period='tick', start='20201001', merge=True) # KOSPI Stocks api.histories(sector='2', period='tick', start='20201001', merge=True) # KOSPI200 Index python from kiwoom import API # API 파이썬 래핑 class Kiwoom(API): # Overriding Here def init (self): super(). init () python from kiwoom import Bot # 서버에 데이터를 요청하는 클래스 (사용자 작성) class MyBot(Bot): def init (self, server): super(). init (server) # 1) Kiwoom.set connect hook(event, param) # 이벤트 OnReceiveTrData 발생 시 주어진 rq name 인자값에 따라 slot을 호출하도록 설정 # 만일 설정하지 않는다면, 하나의 이벤트에는 하나의 slot만 연결가능 self.api.set connect hook('on receive tr data', 'rq name') # 2) Kiwoom.connect(event, signal, slot, key=None) # OnReceiveTrData 이벤트에 대하여 1)에 의해 특정","default_branch":null,"files":null,"tree":[],"storefront":"/r/breadum","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/breadum/kiwoom/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}