creon

package module
v0.2.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2021 License: MIT Imports: 10 Imported by: 0

README

creon

===== 이 패키지는 대신증권의 creonplus(cybosplus) API를 golang에서 사용할 수 있도록 한 것입니다.

github.com/ippoeyeslhw/cpgo 를 수정하여 만들었습니다.

수정내용

  1. coclass들 중 자주 사용하는 일부는 별도로 정의 하였습니다. CpClass만 정의 된 상태에서는 coclass에 없는 함수를 호출하더라도 실행전에는 에러를 확인할 수 없어 CpClass를 임베딩하여 선언하고 각각의 coclass별로 함수를 선언합니다.

  2. 공통적으로 사용하는 setValue 등은 CpClass에 선언하여 coclass들도 사용할 수 있도록 했습니다.

  3. cpgo 패키지에 없는 coclass의 함수들을 추가할 예정입니다.

  4. CpClass 구조체의 obj 가 외부에서 참조할 수 없도록 되어 있어 Obj로 수정하여 외부에서 호출할 수 있도록 수정하여 패키지 내에 정의되지 않은 함수도 사용할 수 있도록 하였습니다.

v0에서는 하나의 오브젝트에 있는 함수를 다 추가하면 마이너 버전을 올릴 예정입니다. - 주식 거래만 (선물이나 elw등은 제외함) 선물 등은 추후 v1에나 추가할 예정입니다.

버전별

v0
v0.0.0 - CpCodeMgr 일부
V0.1.0 - CpCodeMgr + CpCybos
V0.2.1 - CpStockMst, CpStockCode, CpTdUtil 추가

작업을 시작한 단계로 정상적인 작동은 보장하지 않습니다.

필요한것들

설치

go get github.com/hspan/creon

사용법

프로그램 시작

err := ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED)
if err != nil {panic(err)}
defer ole.CoUninitialize()

위와 같은 내용을 creon plus를 사용하는 최상위 함수(보통 main)에 호출해야 합니다. ole.CoInitialize(0)의 경우에는 에러가 발생하는 경우가 있었으며 멀티스레딩을 사용하지 못하는 것이므로 위와 같이 멀티스레딩이 가능하도록 호출하는 것이 좋을 것 같습니다.

객체 생성

  1. 패키지에 정의된 coclass
codeMgr := &creon.CpCodeMgr{}
codeMgr.Create()

위와 같이 &creon.coclass명{}으로 선언하고 Create 함수로 생성합니다.

  1. 패키지에 없는 coclass
object := &creon.CpClass{}
object.Create("CpTrade.CpTd0311")

(CpTd0311는 이 패키지 내에 정의 되어 있지만 위와 같은 방식으로 선언하여 사용하는 것도 가능합니다.)

정의되지 않은 함수를 사용할 경우

예) 해외 전종목 코드 조회

// 객체 생성
CpUsCode := &creon.CpClass{}
CpUsCode.Create("CpUtil.CpUsCode")

// 함수 호출
list := creon.StrSlice(GetUsCodeList(CpUsCode, 1))
// GetUsCodeList 호출 함수
func GetUsCodeList(c *creon.CpClass, USTYPE int) (r *ole.VARIANT) {
	return oleutil.MustCallMethod(c.Obj, "GetUsCodeList", USTYPE)
}

리턴된 인터페이스를 각 타입으로 변환함수

RetSS - []string으로 변환 RetInt - int32로 반환된 값을 int로 다시 변환하여 반환 RetStr - string 반환 RetBool - 불 값 반환 RetLong - Long형태의 정수를 int64로 반환함 위 5개는 추후 버전이 올라가면 삭제할 예정입니다. 아래의 함수를 사용하십시오.

크레온 반환값에 따른 함수선택 short. long : Int, Int32 short. long, longlong : Int64 float : Float32 double : Float64 bool : Bool string : String string배열 : StrSlice

주의사항

creon plus(cybos plus)는 32bit입니다. 이를 사용하기 위해서는 32bit로 컴파일 하여야 합니다.

컴퓨터에 설치된 go가 64bit일 경우 32bit로 크로스 컴파일 하여야 합니다. windows의 명령프롬프트에서는

set goarch=386

파워쉘의 경우에는

$env:GOARCH="386"

한 후 컴파일 하십시오.

64비트로 컴파일 한 후 실행할 경우

panic: 클래스가 등록되지 않았습니다.

에러가 발생합니다.

char

입력할 변수의 형이 char일 경우 golang의 Rune (작은 따옴표로 묶인 문자)를 사용해야 함

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// 이벤트 IID
	IID_IDibEvents, _    = ole.CLSIDFromString("{B8944520-09C3-11D4-8232-00105A7C4F8C}")
	IID_IDibSysEvents, _ = ole.CLSIDFromString("{60D7702A-57BA-4869-AF3F-292FDC909D75}")
	IID_IDibTrEvents, _  = ole.CLSIDFromString("{8B55AD34-73A3-4C33-B8CD-C95ED13823CB}")
	IID_CpCybosEvents, _ = ole.CLSIDFromString("{17F70631-56E5-40FC-B94F-44ADD3A850B1}")

	// CpCybos의 LimitType 값들
	LT_TRADE_REQUEST    = 0
	LT_NONTRADE_REQUEST = 1
	LT_SUBSCRIBE        = 2
)

peekmessage 로드, 이벤트 iid

Functions

func Bool added in v0.2.9

func Bool(r *ole.VARIANT) (ret bool)

Bool 참/거짓 반환

func CallMethod added in v0.2.9

func CallMethod(cp *CpClass, name string, params ...interface{}) (result *ole.VARIANT, err error)

CallMethod calls method on IDispatch with parameters.

func Check_VT added in v0.2.9

func Check_VT(r *ole.VARIANT) (ret string)

func Float32 added in v0.2.9

func Float32(r *ole.VARIANT) (ret float32)

Float32 : 반환형이 float일때

func Float64 added in v0.2.9

func Float64(r *ole.VARIANT) (ret float64)

Float64 : 반환형이 double일때 사용

func Int added in v0.2.9

func Int(r *ole.VARIANT) (ret int)

Int - 각 종 정수형값을 int로 반환함 (32bit)

func Int32 added in v0.2.9

func Int32(r *ole.VARIANT) (ret int32)

Int32 - 각 종 정수형값을 int32로 반환함

func Int64 added in v0.2.9

func Int64(r *ole.VARIANT) (ret int64)

Int64 - 각 종 정수형값을 int64로 반환함 주의사항 - ulonglong의 경우 오류가 있을 수 도 있음(매우 큰 값(2^63 이상의 값))

  • 반환값이 int가 아님을 주의

func IsUserAnAdmin added in v0.2.2

func IsUserAnAdmin() (bool, error)

func MustCallMethod added in v0.2.9

func MustCallMethod(cp *CpClass, name string, params ...interface{}) (result *ole.VARIANT)

MustCallMethod calls method on IDispatch with parameters or panics.

func PeekMessage

func PeekMessage(msg *ole.Msg, hwnd uint32, MsgFilterMin uint32, MsgFilterMax uint32, RemoveMsg uint32) (ret int32, err error)

PeekMessage 구현

func PumpWaitingMessages

func PumpWaitingMessages() int32

메시지 펌핑 (파이선 pythoncom.PumpWatingMessges 의 golang구현) WM_QUIT 로 종료되었을시 int32(1) 이 리턴됩니다.

func RetBool added in v0.2.3

func RetBool(r *ole.VARIANT) (ret bool)

RetBool 참/거짓 반환

func RetInt added in v0.2.3

func RetInt(r *ole.VARIANT) (ret int)

RetInt (long) 값을 int로 반환 32bit로 작동하므로 int = int32임

func RetLong added in v0.2.5

func RetLong(r *ole.VARIANT) (ret int64)

RetLong long long 를 int64로 반환함

func RetSS added in v0.2.3

func RetSS(r *ole.VARIANT) (ret []string)

RetSS - VARIANT를 []string 타입으로 변환하여 리턴한다. 입력 : *ole.VARIANT 리턴 : []string

func RetStr added in v0.2.3

func RetStr(r *ole.VARIANT) (ret string)

RetStr 문자열 반환

func StrSlice added in v0.2.9

func StrSlice(r *ole.VARIANT) (ret []string)

StrSlice : 문자열 슬라이스 반환

func String added in v0.2.9

func String(r *ole.VARIANT) (ret string)

String : 문자열 반환

Types

type CpClass

type CpClass struct {
	Obj *ole.IDispatch
	// contains filtered or unexported fields
}

사이보스플러스 객체

func (*CpClass) BindEvent

func (c *CpClass) BindEvent(callback Receiver)

이벤트를 지정할때 사용합니다. Receiver 인터페이스를 구현한 콜백을 지정하여 이벤트 수신시 콜백을 호출되게 지정할수 있습니다.

func (*CpClass) BlockRequest

func (c *CpClass) BlockRequest() (result *ole.VARIANT)

사이보스플러스 BlockRequest 메서드 Wrapper

func (*CpClass) BlockRequest2 added in v0.2.8

func (c *CpClass) BlockRequest2(option int) (result *ole.VARIANT)

사이보스플러스 BlockRequest2 메서드 Wrapper

func (*CpClass) Create

func (c *CpClass) Create(name string)

사이보스플러스 객체 생성 "Library.coclass" 문자열을 넣어 객체를 생성합니다. "CpDib.StockMst" 와 같은 식으로 사용합니다.

func (*CpClass) GetContinue

func (c *CpClass) GetContinue() (r *ole.VARIANT)

사이보스플러스 Property Getter 메서드입니다. Continue 프로퍼티 값을 얻어옵니다.

func (*CpClass) GetDataValue

func (c *CpClass) GetDataValue(typ int, idx int) (result *ole.VARIANT)

사이보스플러스 GetDataValue 메서드 Wrapper

func (*CpClass) GetDibMsg1 added in v0.2.8

func (c *CpClass) GetDibMsg1() (result *ole.VARIANT)

사이보스플러스 GetDibMsg1 메서드 Wrapper

func (*CpClass) GetDibStatus added in v0.2.8

func (c *CpClass) GetDibStatus() (result *ole.VARIANT)

사이보스플러스 GetDibStatus 메서드 Wrapper

func (*CpClass) GetHeaderValue

func (c *CpClass) GetHeaderValue(typ int) (result *ole.VARIANT)

사이보스플러스 GetHeaderValue 메서드 Wrapper

func (*CpClass) GetIDsOfName added in v0.2.9

func (v *CpClass) GetIDsOfName(names []string) (dispid []int32, err error)

func (*CpClass) GetSingleIDOfName added in v0.2.9

func (v *CpClass) GetSingleIDOfName(name string) (displayID int32, err error)

GetSingleIDOfName is a helper that returns single display ID for IDispatch name.

This replaces the common pattern of attempting to get a single name from the list of available IDs. It gives the first ID, if it is available.

func (*CpClass) Invoke added in v0.2.9

func (v *CpClass) Invoke(dispid int32, dispatch int16, params ...interface{}) (result *ole.VARIANT, err error)

func (*CpClass) InvokeWithOptionalArgs added in v0.2.9

func (v *CpClass) InvokeWithOptionalArgs(name string, dispatch int16, params []interface{}) (result *ole.VARIANT, err error)

InvokeWithOptionalArgs accepts arguments as an array, works like Invoke.

Accepts name and will attempt to retrieve Display ID to pass to Invoke.

Passing params as an array is a workaround that could be fixed in later versions of Go that prevent passing empty params. During testing it was discovered that this is an acceptable way of getting around not being able to pass params normally.

func (*CpClass) IsConnect added in v0.2.0

func (c *CpClass) IsConnect() (r *ole.VARIANT)

Property

func (*CpClass) LimitRequestRemainTime added in v0.2.0

func (c *CpClass) LimitRequestRemainTime() (r *ole.VARIANT)

func (*CpClass) PlusDisconnect added in v0.2.0

func (c *CpClass) PlusDisconnect()

func (*CpClass) Release

func (c *CpClass) Release()

Create 메서드로 생성한 객체 헤제할떄 사용합니다.

func (*CpClass) Request

func (c *CpClass) Request()

사이보스플러스 BlockRequest 메서드 Wrapper

func (*CpClass) ServerType added in v0.2.0

func (c *CpClass) ServerType() (r *ole.VARIANT)

func (*CpClass) SetInputValue

func (c *CpClass) SetInputValue(typ int, val interface{})

사이보스플러스 SetInputValue 메서드 Wrapper

func (*CpClass) Subscribe

func (c *CpClass) Subscribe()

사이보스플러스 Subscribe 메서드 Wrapper

func (*CpClass) SubscribeLastest

func (c *CpClass) SubscribeLastest()

사이보스플러스 SubscribeLastest 메서드 Wrapper

func (*CpClass) UnbindEvent

func (c *CpClass) UnbindEvent()

지정된 이벤트 헤제

func (*CpClass) Unsubscribe

func (c *CpClass) Unsubscribe()

사이보스플러스 Unsubscribe 메서드 Wrapper

type CpCodeMgr added in v0.2.0

type CpCodeMgr struct {
	CpClass
}

func (*CpCodeMgr) CodeToName added in v0.2.0

func (c *CpCodeMgr) CodeToName(code string) (r *ole.VARIANT)

func (*CpCodeMgr) Create added in v0.2.0

func (c *CpCodeMgr) Create()

func (*CpCodeMgr) GetEndTime added in v0.2.0

func (c *CpCodeMgr) GetEndTime(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetGroupCodeList added in v0.2.0

func (c *CpCodeMgr) GetGroupCodeList(code int) (r *ole.VARIANT)

func (*CpCodeMgr) GetGroupName added in v0.2.0

func (c *CpCodeMgr) GetGroupName(code int) (r *ole.VARIANT)

func (*CpCodeMgr) GetIndustryList added in v0.2.0

func (c *CpCodeMgr) GetIndustryList() (r *ole.VARIANT)

func (*CpCodeMgr) GetIndustryName added in v0.2.0

func (c *CpCodeMgr) GetIndustryName(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetMarketEndTime added in v0.2.0

func (c *CpCodeMgr) GetMarketEndTime() (r *ole.VARIANT)

func (*CpCodeMgr) GetMarketStartTime added in v0.2.0

func (c *CpCodeMgr) GetMarketStartTime() (r *ole.VARIANT)

func (*CpCodeMgr) GetMemberList added in v0.2.0

func (c *CpCodeMgr) GetMemberList() (r *ole.VARIANT)

func (*CpCodeMgr) GetMemberName added in v0.2.0

func (c *CpCodeMgr) GetMemberName(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetMiniFutureList added in v0.2.0

func (c *CpCodeMgr) GetMiniFutureList() (r *ole.VARIANT)

func (*CpCodeMgr) GetMiniOptionList added in v0.2.0

func (c *CpCodeMgr) GetMiniOptionList() (r *ole.VARIANT)

func (*CpCodeMgr) GetOverHeating added in v0.2.8

func (c *CpCodeMgr) GetOverHeating(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStartTime added in v0.2.0

func (c *CpCodeMgr) GetStartTime(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockCapital added in v0.2.0

func (c *CpCodeMgr) GetStockCapital(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockControlKind added in v0.2.0

func (c *CpCodeMgr) GetStockControlKind(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockElwBasketCodeList added in v0.2.0

func (c *CpCodeMgr) GetStockElwBasketCodeList(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockElwBasketCompList added in v0.2.0

func (c *CpCodeMgr) GetStockElwBasketCompList(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockFiscalMonth added in v0.2.0

func (c *CpCodeMgr) GetStockFiscalMonth(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockFutureBaseCode added in v0.2.0

func (c *CpCodeMgr) GetStockFutureBaseCode(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockFutureBaseList added in v0.2.0

func (c *CpCodeMgr) GetStockFutureBaseList() (r *ole.VARIANT)

func (*CpCodeMgr) GetStockFutureList added in v0.2.0

func (c *CpCodeMgr) GetStockFutureList() (r *ole.VARIANT)

func (*CpCodeMgr) GetStockFutureListByBaseCode added in v0.2.0

func (c *CpCodeMgr) GetStockFutureListByBaseCode(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockGroupCode added in v0.2.0

func (c *CpCodeMgr) GetStockGroupCode(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockIndustryCode added in v0.2.0

func (c *CpCodeMgr) GetStockIndustryCode(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockKospi200Kind added in v0.2.0

func (c *CpCodeMgr) GetStockKospi200Kind(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockLacKind added in v0.2.0

func (c *CpCodeMgr) GetStockLacKind(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockListByMarket added in v0.2.0

func (c *CpCodeMgr) GetStockListByMarket(marketcode int) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockListedDate added in v0.2.0

func (c *CpCodeMgr) GetStockListedDate(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockMarginRate added in v0.2.0

func (c *CpCodeMgr) GetStockMarginRate(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockMarketKind added in v0.2.0

func (c *CpCodeMgr) GetStockMarketKind(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockMaxPrice added in v0.2.0

func (c *CpCodeMgr) GetStockMaxPrice(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockMemeMin added in v0.2.0

func (c *CpCodeMgr) GetStockMemeMin(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockMinPrice added in v0.2.0

func (c *CpCodeMgr) GetStockMinPrice(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockParPrice added in v0.2.0

func (c *CpCodeMgr) GetStockParPrice(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockParPriceChageType added in v0.2.0

func (c *CpCodeMgr) GetStockParPriceChageType(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockSectionKind added in v0.2.0

func (c *CpCodeMgr) GetStockSectionKind(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockStatusKind added in v0.2.0

func (c *CpCodeMgr) GetStockStatusKind(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockStdPrice added in v0.2.0

func (c *CpCodeMgr) GetStockStdPrice(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockSupervisionKind added in v0.2.0

func (c *CpCodeMgr) GetStockSupervisionKind(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockYdClosePrice added in v0.2.0

func (c *CpCodeMgr) GetStockYdClosePrice(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockYdHighPrice added in v0.2.0

func (c *CpCodeMgr) GetStockYdHighPrice(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockYdLowPrice added in v0.2.0

func (c *CpCodeMgr) GetStockYdLowPrice(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetStockYdOpenPrice added in v0.2.0

func (c *CpCodeMgr) GetStockYdOpenPrice(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetTickUnit added in v0.2.0

func (c *CpCodeMgr) GetTickUnit(code string) (r *ole.VARIANT)

func (*CpCodeMgr) GetTickValue added in v0.2.0

func (c *CpCodeMgr) GetTickValue(code string) (r *ole.VARIANT)

func (*CpCodeMgr) IsBigListingStock added in v0.2.8

func (c *CpCodeMgr) IsBigListingStock(code string) (r *ole.VARIANT)

func (*CpCodeMgr) IsFrnMember added in v0.2.0

func (c *CpCodeMgr) IsFrnMember(code string) (r *ole.VARIANT)

func (*CpCodeMgr) IsSPAC added in v0.2.0

func (c *CpCodeMgr) IsSPAC(code string) (r *ole.VARIANT)

func (*CpCodeMgr) IsStockArrgSby added in v0.2.8

func (c *CpCodeMgr) IsStockArrgSby(code string) (r *ole.VARIANT)

func (*CpCodeMgr) IsStockCreditEnable added in v0.2.0

func (c *CpCodeMgr) IsStockCreditEnable(code string) (r *ole.VARIANT)

func (*CpCodeMgr) IsStockIoi added in v0.2.8

func (c *CpCodeMgr) IsStockIoi(code string) (r *ole.VARIANT)

func (*CpCodeMgr) IsTradeCondition added in v0.2.0

func (c *CpCodeMgr) IsTradeCondition(code string) (r *ole.VARIANT)

func (*CpCodeMgr) OvFutCodeToName added in v0.2.0

func (c *CpCodeMgr) OvFutCodeToName(code string) (r *ole.VARIANT)

func (*CpCodeMgr) OvFutGetAllCodeList added in v0.2.0

func (c *CpCodeMgr) OvFutGetAllCodeList() (r *ole.VARIANT)

func (*CpCodeMgr) OvFutGetExchCode added in v0.2.0

func (c *CpCodeMgr) OvFutGetExchCode(code string) (r *ole.VARIANT)

func (*CpCodeMgr) OvFutGetExchList added in v0.2.0

func (c *CpCodeMgr) OvFutGetExchList() (r *ole.VARIANT)

func (*CpCodeMgr) OvFutGetLastTradeDate added in v0.2.0

func (c *CpCodeMgr) OvFutGetLastTradeDate(code string) (r *ole.VARIANT)

func (*CpCodeMgr) OvFutGetProdCode added in v0.2.0

func (c *CpCodeMgr) OvFutGetProdCode(code string) (r *ole.VARIANT)

func (*CpCodeMgr) ReLoadPortData added in v0.2.0

func (c *CpCodeMgr) ReLoadPortData() (r *ole.VARIANT)

type CpCybos added in v0.2.0

type CpCybos struct {
	CpClass
}

func (*CpCybos) Create added in v0.2.0

func (c *CpCybos) Create()

func (*CpCybos) GetLimitRemainCount added in v0.2.0

func (c *CpCybos) GetLimitRemainCount(limitType int)

Method

type CpStockCode added in v0.2.0

type CpStockCode struct {
	CpClass
}

func (*CpStockCode) CodeToFullCode added in v0.2.0

func (c *CpStockCode) CodeToFullCode(code string) (r *ole.VARIANT)

func (*CpStockCode) CodeToIndex added in v0.2.0

func (c *CpStockCode) CodeToIndex(code string) (r *ole.VARIANT)

func (*CpStockCode) CodeToName added in v0.2.0

func (c *CpStockCode) CodeToName(code string) (r *ole.VARIANT)

func (*CpStockCode) Create added in v0.2.0

func (c *CpStockCode) Create()

func (*CpStockCode) FullCodeToCode added in v0.2.0

func (c *CpStockCode) FullCodeToCode(fullcode string) (r *ole.VARIANT)

func (*CpStockCode) FullCodeToName added in v0.2.0

func (c *CpStockCode) FullCodeToName(fullcode string) (r *ole.VARIANT)

func (*CpStockCode) GetCount added in v0.2.0

func (c *CpStockCode) GetCount() (r *ole.VARIANT)

func (*CpStockCode) GetData added in v0.2.0

func (c *CpStockCode) GetData(typ int, idx int) (r *ole.VARIANT)

func (*CpStockCode) GetPriceUnit added in v0.2.0

func (c *CpStockCode) GetPriceUnit(code string, basePrice int64, directionUp bool) (r *ole.VARIANT)

func (*CpStockCode) NameToCode added in v0.2.0

func (c *CpStockCode) NameToCode(name string) (r *ole.VARIANT)

type CpTd0311 added in v0.2.9

type CpTd0311 struct {
	CpClass
}

func (*CpTd0311) Buy added in v0.2.9

func (c *CpTd0311) Buy(acc, accFlag, code string, vol int64, price int64, order_cond string, hoga_cond string) (err error)

func (*CpTd0311) Buy_Base added in v0.2.9

func (c *CpTd0311) Buy_Base(acc, accFlag, code string, vol int64, price int64)

func (*CpTd0311) Buy_at_Price added in v0.2.9

func (c *CpTd0311) Buy_at_Price(acc, accFlag, code string, vol int64, price int64) (err error)

func (*CpTd0311) Buy_at_Price_with_Fok added in v0.2.9

func (c *CpTd0311) Buy_at_Price_with_Fok(acc, accFlag, code string, vol int64, price int64) (err error)

func (*CpTd0311) Buy_at_Price_with_Ioc added in v0.2.9

func (c *CpTd0311) Buy_at_Price_with_Ioc(acc, accFlag, code string, vol int64, price int64) (err error)

func (*CpTd0311) Check_Order_Status added in v0.2.9

func (c *CpTd0311) Check_Order_Status() (err error)

func (*CpTd0311) Create added in v0.2.9

func (c *CpTd0311) Create()

func (*CpTd0311) Order_Base added in v0.2.9

func (c *CpTd0311) Order_Base(acc, accFlag, code string, vol int64, price int64)

func (*CpTd0311) Sell added in v0.2.9

func (c *CpTd0311) Sell(acc, accFlag, code string, vol int64, price int64, order_cond string, hoga_cond string) (err error)

func (*CpTd0311) Sell_Base added in v0.2.9

func (c *CpTd0311) Sell_Base(acc, accFlag, code string, vol int64, price int64)

func (*CpTd0311) Sell_at_Price added in v0.2.9

func (c *CpTd0311) Sell_at_Price(acc, accFlag, code string, vol int64, price int64) (err error)

func (*CpTd0311) Sell_at_Price_with_Fok added in v0.2.9

func (c *CpTd0311) Sell_at_Price_with_Fok(acc, accFlag, code string, vol int64, price int64) (err error)

func (*CpTd0311) Sell_at_Price_with_Ioc added in v0.2.9

func (c *CpTd0311) Sell_at_Price_with_Ioc(acc, accFlag, code string, vol int64, price int64) (err error)

type CpTd6033 added in v0.2.9

type CpTd6033 struct {
	CpClass
}

func (*CpTd6033) Create added in v0.2.9

func (c *CpTd6033) Create()

type CpTdUtil added in v0.2.0

type CpTdUtil struct {
	CpClass
}

func (*CpTdUtil) AccountNumber added in v0.2.0

func (c *CpTdUtil) AccountNumber() (r *ole.VARIANT)

property

func (*CpTdUtil) Create added in v0.2.0

func (c *CpTdUtil) Create()

func (*CpTdUtil) GoodsList added in v0.2.9

func (c *CpTdUtil) GoodsList(acc_no string, filter int) (r *ole.VARIANT)

func (*CpTdUtil) TradeInit added in v0.2.0

func (c *CpTdUtil) TradeInit() (r *ole.VARIANT)

method 함수 인자를 전달받도록 되어 있으나 0으로만 사용하므로 인자 없이 사용함

type DISPPARAMS added in v0.2.9

type DISPPARAMS struct {
	// contains filtered or unexported fields
}

DISPPARAMS are the arguments that passed to methods or property.

type EXCEPINFO added in v0.2.9

type EXCEPINFO struct {
	// contains filtered or unexported fields
}

EXCEPINFO defines exception info.

func (EXCEPINFO) Error added in v0.2.9

func (e EXCEPINFO) Error() string

Error implements error interface and returns error string.

type MarketEye added in v0.2.9

type MarketEye struct {
	CpClass
}

func (*MarketEye) Create added in v0.2.9

func (c *MarketEye) Create()

type Receiver

type Receiver interface {
	Received(*CpClass)
}

사이보스플러스의 콜백메서드 인터페이스

type StockChart added in v0.2.3

type StockChart struct {
	CpClass
}

func (*StockChart) Create added in v0.2.3

func (c *StockChart) Create()

type StockMst added in v0.2.0

type StockMst struct {
	CpClass
}

func (*StockMst) Create added in v0.2.0

func (c *StockMst) Create()

type StockMst2 added in v0.2.9

type StockMst2 struct {
	CpClass
}

func (*StockMst2) Create added in v0.2.9

func (c *StockMst2) Create()

type StockMstM added in v0.2.9

type StockMstM struct {
	CpClass
}

func (*StockMstM) Create added in v0.2.9

func (c *StockMstM) Create()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL