Skip to content

Instantly share code, notes, and snippets.

@esstory
esstory / replaceall.py
Last active Feb 6, 2018
(REPLACEALL)지정된 폴더/확장자에서 텍스트를 찾아 일괄 변경한다
View replaceall.py
import sys
import win32con, win32api, os
import codecs # utf-8 읽어 오기 위해
class CReplaceAllText():
def __init__(self, path, fromText, toText):
self.cntFiles = 0
self.path = path
self.FromText = fromText
self.ToText = toText
# lookupExt : 대상 확장자(.java)
@esstory
esstory / simpleMinChart.py
Created Jan 10, 2018
PLUS 예제 - 분차트 생성
View simpleMinChart.py
import sys
from PyQt5.QtWidgets import *
import win32com.client
import ctypes
################################################
# PLUS 공통 OBJECT
g_objCodeMgr = win32com.client.Dispatch('CpUtil.CpCodeMgr')
g_objCpStatus = win32com.client.Dispatch('CpUtil.CpCybos')
g_objCpTrade = win32com.client.Dispatch('CpTrade.CpTdUtil')
@esstory
esstory / 6033_2.py
Created Jan 8, 2018
PLUS 주식 잔고 실시간 처리 예제
View 6033_2.py
import sys
from PyQt5.QtWidgets import *
import win32com.client
import ctypes
################################################
# PLUS 공통 OBJECT
g_objCodeMgr = win32com.client.Dispatch('CpUtil.CpCodeMgr')
g_objCpStatus = win32com.client.Dispatch('CpUtil.CpCybos')
g_objCpTrade = win32com.client.Dispatch('CpTrade.CpTdUtil')
@esstory
esstory / folderSize.py
Created Dec 30, 2017
폴더 크기 구하기 예제
View folderSize.py
import operator
import sys
import os
from PyQt5.QtWidgets import *
import pandas as pd
gExcelFile = 'foldersize.xlsx'
@esstory
esstory / OvrFutureOrder.py
Created Dec 19, 2017
해외선물 주문 예제 - CYBOS PLUS/CREON PLU
View OvrFutureOrder.py
import ctypes
import sys
import time
from PyQt5.QtWidgets import *
import win32com.client
# cp object
g_objCodeMgr = win32com.client.Dispatch("CpUtil.CpCodeMgr")
g_objCpStatus = win32com.client.Dispatch("CpUtil.CpCybos")
@esstory
esstory / 8092.py
Created Dec 13, 2017
CYBOS PLUS/CREON PLUS 특징주 포착 예제
View 8092.py
import sys
from PyQt5.QtWidgets import *
import win32com.client
import ctypes
import pandas as pd
import os
g_objCodeMgr = win32com.client.Dispatch('CpUtil.CpCodeMgr')
g_objCpStatus = win32com.client.Dispatch('CpUtil.CpCybos')
g_objCpTrade = win32com.client.Dispatch('CpTrade.CpTdUtil')
@esstory
esstory / allsell.py
Created Dec 5, 2017
보유 잔고 일괄 매도 예제 - CYBOS/CREON PLUS
View allsell.py
import sys
from PyQt5.QtWidgets import *
import win32com.client
import ctypes
g_objCodeMgr = win32com.client.Dispatch('CpUtil.CpCodeMgr')
g_objCpStatus = win32com.client.Dispatch('CpUtil.CpCybos')
g_objCpTrade = win32com.client.Dispatch('CpTrade.CpTdUtil')
def InitPlusCheck():
@esstory
esstory / ioctest.py
Last active Nov 22, 2017
IOC/FOK 주문 테스트 - CYBOS PLUS/CREON PLUS 테스트 예제
View ioctest.py
import sys
from PyQt5.QtWidgets import *
from enum import Enum
import win32com.client
g_objCpStatus = win32com.client.Dispatch('CpUtil.CpCybos')
g_objCpTrade = win32com.client.Dispatch('CpTrade.CpTdUtil')
g_objCodeMgr = win32com.client.Dispatch('CpUtil.CpCodeMgr')
# ioc 주문 테스트
@esstory
esstory / ovfJango.py
Created Nov 17, 2017
CYBOS/CREON PLUS - 해외선물 잔고 실시간 잔고(잔고 및 현재가 실시간 반영) 예제
View ovfJango.py
import sys
from PyQt5.QtWidgets import *
import win32com.client
from pandas import Series, DataFrame
import pandas as pd
import locale
import os
locale.setlocale(locale.LC_ALL, '')
# cp object
@esstory
esstory / 8537.py
Created Nov 17, 2017
CYBOS/CROEN PLUS 예제 - 종목검색(#8537) 예제 전략 리스트 조회 및 예제 전략 조회
View 8537.py
import sys
from PyQt5.QtWidgets import *
import win32com.client
import pandas as pd
import os
g_objCodeMgr = win32com.client.Dispatch('CpUtil.CpStockCode')
g_objCpStatus = win32com.client.Dispatch('CpUtil.CpCybos')
g_objCpTrade = win32com.client.Dispatch('CpTrade.CpTdUtil')
You can’t perform that action at this time.