Documentation ¶
Index ¶
- Constants
- Variables
- func CastSlice[T any](vArray []*ole.VARIANT, cast func(*ole.VARIANT) T) []T
- func DateToUInt(date time.Time) uint64
- func GetEventIID(name string) *ole.GUID
- func InitCOM()
- func IsUserAnAdmin() (bool, error)
- func NewDate(year int, month int, day int) time.Time
- func ParseTimeHMSUInt(value uint64) (hour int, min int, sec int)
- func ReleaseCOM()
- func SafeArrayCreateVector(variantType ole.VT, lowerBound int32, length uint32) (safearray *ole.SafeArray, err error)
- func SafeArrayFromInt32Slice[T ~int32](slice []T) *ole.SafeArray
- func SafeArrayPutElement(safeArray *ole.SafeArray, index int64, element uintptr)
- func Stock(stockCode string) string
- func StockIndex(indexCode string) string
- func ToBool(r *ole.VARIANT) bool
- func ToDate(value *ole.VARIANT) time.Time
- func ToFloat32(r *ole.VARIANT) float32
- func ToFloat64(r *ole.VARIANT) float64
- func ToInt32(r *ole.VARIANT) int32
- func ToInt64(r *ole.VARIANT) int64
- func ToRune(r *ole.VARIANT) rune
- func ToSS(r *ole.VARIANT) []string
- func ToStr(r *ole.VARIANT) string
- func ToTimeHM(value *ole.VARIANT) time.Time
- func ToTimeHMS(value *ole.VARIANT) time.Time
- func ToUInt32(r *ole.VARIANT) uint32
- func ToUInt64(r *ole.VARIANT) uint64
- func UIntToDate(value uint64) time.Time
- func UIntToTimeHM(value uint64) time.Time
- func UIntToTimeHMS(value uint64) time.Time
- func VariantInt32Slice[T ~int32](s []T) ole.VARIANT
- type ConclusionType
- type CpCybos
- func (c *CpCybos) Create()
- func (c *CpCybos) GetLimitRemainCount(limitType LimitType) *ole.VARIANT
- func (c *CpCybos) GetLimitRemainTime(limitType LimitType) *ole.VARIANT
- func (c *CpCybos) IsConnect() *ole.VARIANT
- func (c *CpCybos) LimitRequestRemainTime() *ole.VARIANT
- func (c *CpCybos) PlusDisconnect()
- func (c *CpCybos) ServerType() *ole.VARIANT
- type CpReceiver
- type CpStockChart
- func (c *CpStockChart) Create(fields *ole.VARIANT)
- func (c *CpStockChart) GetHeaderValue(hType StockChartHeaderType) *ole.VARIANT
- func (c *CpStockChart) SetInputCode(code string)
- func (c *CpStockChart) SetInputCount(count uint64)
- func (c *CpStockChart) SetInputCountType(countType StockChartCountType)
- func (c *CpStockChart) SetInputDataType(dataType StockChartDataType)
- func (c *CpStockChart) SetInputDateEnd(date time.Time)
- func (c *CpStockChart) SetInputDateStart(date time.Time)
- func (c *CpStockChart) SetInputGapType(gapType StockChartGapType)
- func (c *CpStockChart) SetInputPeriod(period uint16)
- func (c *CpStockChart) SetInputPriceType(priceType StockChartPriceType)
- func (c *CpStockChart) SetInputValue(iType stockChartInputType, value any)
- func (c *CpStockChart) SetInputVolumeType(volumeType StockChartVolumeType)
- type CpStockCur
- type CpStockWeek
- type CpTrait
- func (t *CpTrait) BindEvent(callback CpReceiver)
- func (t *CpTrait) BlockRequest() (result *ole.VARIANT)
- func (t *CpTrait) BlockRequest2(option int16) *ole.VARIANT
- func (t *CpTrait) Continue() (result *ole.VARIANT)
- func (t *CpTrait) Create(name string) (err error)
- func (t *CpTrait) Data() *ole.VARIANT
- func (t *CpTrait) GetDataArray(dType int32, total int32) []*ole.VARIANT
- func (t *CpTrait) GetDataValue(dType int32, index int32) (result *ole.VARIANT)
- func (t *CpTrait) GetDibMsg1() *ole.VARIANT
- func (t *CpTrait) GetDibStatus() *ole.VARIANT
- func (t *CpTrait) GetHeaderValue(hType int32) (result *ole.VARIANT)
- func (t *CpTrait) Header() *ole.VARIANT
- func (t *CpTrait) Release()
- func (t *CpTrait) Request()
- func (t *CpTrait) SetInputValue(iType int32, value any)
- func (t *CpTrait) Subscribe()
- func (t *CpTrait) SubscribeLatest()
- func (t *CpTrait) UnbindEvent()
- func (t *CpTrait) Unsubscribe()
- type ICpEvent
- type ICpEventVTable
- type LimitType
- type StockChartCountType
- type StockChartDataType
- type StockChartField
- type StockChartGapType
- type StockChartHeaderType
- type StockChartPriceType
- type StockChartVolumeType
- type StockCurHeaderType
- type StockWeekDataType
- type StockWeekHeaderType
Constants ¶
View Source
const ( StockCurHeaderCode StockCurHeaderType = iota StockCurHeaderName StockCurHeaderDelta StockCurHeaderTimeHM StockCurHeaderOpen StockCurHeaderHigh StockCurHeaderLow StockCurHeaderAskPrice StockCurHeaderBidPrice StockCurHeaderVolumeTotal StockCurHeaderValueTotal StockCurHeaderClose = iota + 2 StockCurHeaderConConclusionType StockCurHeaderVolumeConSellTotal StockCurHeaderVolumeConBuyTotal StockCurHeaderVolume = iota + 2 StockCurHeaderTimeHMS StockCurHeaderPreMarketVolume = iota + 4 StockCurHeaderBidConclusionType = iota + 8 StockCurHeaderVolumeBidSellTotal StockCurHeaderVolumeBidBuyTotal )
View Source
const ( KOSPI = "001" KOSDAQ = "201" )
View Source
const (
StockCurInputCode = 0
)
View Source
const (
StockWeekInputCode = 0
)
Variables ¶
View Source
var (
// IID_CpCybosEvents, _ = ole.CLSIDFromString("{17F70631-56E5-40FC-B94F-44ADD3A850B1}") Not working
IID_DibEvents, _ = ole.CLSIDFromString("{B8944520-09C3-11D4-8232-00105A7C4F8C}")
)
Functions ¶
func DateToUInt ¶
func GetEventIID ¶
func GetEventIID(name string) *ole.GUID
func IsUserAnAdmin ¶
func ReleaseCOM ¶
func ReleaseCOM()
func SafeArrayCreateVector ¶
func SafeArrayFromInt32Slice ¶
func SafeArrayFromInt32Slice[T ~int32](slice []T) *ole.SafeArray
func SafeArrayPutElement ¶
func StockIndex ¶
func UIntToDate ¶
func UIntToTimeHM ¶
func UIntToTimeHMS ¶
func VariantInt32Slice ¶
func VariantInt32Slice[T ~int32](s []T) ole.VARIANT
Types ¶
type ConclusionType ¶
type ConclusionType rune
const ( ConclusionTypeBuy ConclusionType = '1' ConclusionTypeSell ConclusionType = '2' )
func ToConclusionType ¶
func ToConclusionType(value *ole.VARIANT) ConclusionType
type CpCybos ¶
type CpCybos struct {
CpTrait
}
func (*CpCybos) GetLimitRemainCount ¶
func (*CpCybos) GetLimitRemainTime ¶
func (*CpCybos) LimitRequestRemainTime ¶
func (c *CpCybos) LimitRequestRemainTime() *ole.VARIANT
func (*CpCybos) PlusDisconnect ¶
func (c *CpCybos) PlusDisconnect()
func (*CpCybos) ServerType ¶
func (c *CpCybos) ServerType() *ole.VARIANT
type CpReceiver ¶
type CpReceiver interface {
Received()
}
type CpStockChart ¶
type CpStockChart struct { CpTrait // contains filtered or unexported fields }
func (*CpStockChart) Create ¶
func (c *CpStockChart) Create(fields *ole.VARIANT)
func (*CpStockChart) GetHeaderValue ¶
func (c *CpStockChart) GetHeaderValue(hType StockChartHeaderType) *ole.VARIANT
func (*CpStockChart) SetInputCode ¶
func (c *CpStockChart) SetInputCode(code string)
func (*CpStockChart) SetInputCount ¶
func (c *CpStockChart) SetInputCount(count uint64)
func (*CpStockChart) SetInputCountType ¶
func (c *CpStockChart) SetInputCountType(countType StockChartCountType)
func (*CpStockChart) SetInputDataType ¶
func (c *CpStockChart) SetInputDataType(dataType StockChartDataType)
func (*CpStockChart) SetInputDateEnd ¶
func (c *CpStockChart) SetInputDateEnd(date time.Time)
func (*CpStockChart) SetInputDateStart ¶
func (c *CpStockChart) SetInputDateStart(date time.Time)
func (*CpStockChart) SetInputGapType ¶
func (c *CpStockChart) SetInputGapType(gapType StockChartGapType)
func (*CpStockChart) SetInputPeriod ¶
func (c *CpStockChart) SetInputPeriod(period uint16)
func (*CpStockChart) SetInputPriceType ¶
func (c *CpStockChart) SetInputPriceType(priceType StockChartPriceType)
func (*CpStockChart) SetInputValue ¶
func (c *CpStockChart) SetInputValue(iType stockChartInputType, value any)
func (*CpStockChart) SetInputVolumeType ¶
func (c *CpStockChart) SetInputVolumeType(volumeType StockChartVolumeType)
type CpStockCur ¶
type CpStockCur struct {
CpTrait
}
func (*CpStockCur) Create ¶
func (c *CpStockCur) Create()
func (*CpStockCur) GetHeaderValue ¶
func (c *CpStockCur) GetHeaderValue(hType StockCurHeaderType) *ole.VARIANT
func (*CpStockCur) SetInputCode ¶
func (c *CpStockCur) SetInputCode(code string)
type CpStockWeek ¶
type CpStockWeek struct {
CpTrait
}
func (*CpStockWeek) Create ¶
func (c *CpStockWeek) Create()
func (*CpStockWeek) GetDataValue ¶
func (c *CpStockWeek) GetDataValue(dType StockWeekDataType, index int32) *ole.VARIANT
func (*CpStockWeek) GetHeaderValue ¶
func (c *CpStockWeek) GetHeaderValue(hType StockWeekHeaderType) *ole.VARIANT
func (*CpStockWeek) GetValue ¶
func (c *CpStockWeek) GetValue(index int32) uint64
func (*CpStockWeek) SetInputCode ¶
func (c *CpStockWeek) SetInputCode(code string)
type CpTrait ¶
type CpTrait struct { Object *ole.Dispatch // contains filtered or unexported fields }
func (*CpTrait) BindEvent ¶
func (t *CpTrait) BindEvent(callback CpReceiver)
func (*CpTrait) BlockRequest ¶
func (t *CpTrait) BlockRequest() (result *ole.VARIANT)
func (*CpTrait) BlockRequest2 ¶
func (*CpTrait) GetDataArray ¶
func (*CpTrait) GetDataValue ¶
func (*CpTrait) GetDibMsg1 ¶
func (t *CpTrait) GetDibMsg1() *ole.VARIANT
func (*CpTrait) GetDibStatus ¶
func (t *CpTrait) GetDibStatus() *ole.VARIANT
func (*CpTrait) GetHeaderValue ¶
func (*CpTrait) SetInputValue ¶
func (*CpTrait) SubscribeLatest ¶
func (t *CpTrait) SubscribeLatest()
func (*CpTrait) UnbindEvent ¶
func (t *CpTrait) UnbindEvent()
func (*CpTrait) Unsubscribe ¶
func (t *CpTrait) Unsubscribe()
type ICpEventVTable ¶
type ICpEventVTable struct {
// contains filtered or unexported fields
}
type StockChartCountType ¶
type StockChartCountType rune
const ( StockChartCountTypePeriod StockChartCountType = '1' StockChartCountTypeNum StockChartCountType = '2' )
type StockChartDataType ¶
type StockChartDataType rune
const ( StockChartDataTypeDay StockChartDataType = 'D' StockChartDataTypeMonth StockChartDataType = 'M' StockChartDataTypeMinute StockChartDataType = 'm' StockChartDataTypeWeek StockChartDataType = 'W' StockChartDataTypeTick StockChartDataType = 'T' )
type StockChartField ¶
type StockChartField int32
const ( StockChartFieldDate StockChartField = iota StockChartFieldTime StockChartFieldOpen StockChartFieldHigh StockChartFieldLow StockChartFieldClose StockChartFieldPriceDelta StockChartFieldVolume StockChartField = 1 + iota StockChartFieldValue StockChartFieldVolumeBidSellTotal StockChartFieldVolumeBidBuyTotal StockChartFieldMarketCap StockChartFieldPriceDeltaSign = 37 StockChartFieldVolumeConSellTotal = 62 StockChartFieldVolumeConBuyTotal = 63 )
type StockChartGapType ¶
type StockChartGapType rune
const ( StockChartGapNoCorrection StockChartGapType = '0' StockChartGapCorrection StockChartGapType = '1' )
type StockChartHeaderType ¶
type StockChartHeaderType int32
const ( StockChartHeaderCode StockChartHeaderType = iota //string StockChartHeaderFieldCount //short StockChartHeaderFieldNames //string array StockChartHeaderDataCount //long StockChartHeaderLastTickCount //ushort StockChartHeaderLastTradeDay //ulong StockChartHeaderPrevClose StockChartHeaderCurrentPrice StockChartHeaderPriceDeltaType StockChartHeaderPriceDelta StockChartHeaderVolume StockChartHeaderAskPrice StockChartHeaderBidPrice StockChartHeaderOpen StockChartHeaderHigh StockChartHeaderLow StockChartHeaderValue StockChartHeaderStatus StockChartHeaderCapital // 자본금 StockChartHeaderPrevVolume StockChartHeaderLastUpdateTimeHM StockChartHeaderMaxPrice StockChartHeaderMinPrice )
type StockChartPriceType ¶
type StockChartPriceType rune
const ( StockChartPriceNoAmend StockChartPriceType = '0' StockChartPriceAmend StockChartPriceType = '1' )
type StockChartVolumeType ¶
type StockChartVolumeType rune
const ( StockChartVolumeContainAll StockChartVolumeType = '1' StockChartVolumeContainAfter StockChartVolumeType = '2' StockChartVolumeOnlyMarket StockChartVolumeType = '3' StockChartVolumeContainBefore StockChartVolumeType = '4' )
type StockCurHeaderType ¶
type StockCurHeaderType int32
type StockWeekDataType ¶
type StockWeekDataType int32
const ( StockWeekDataDate StockWeekDataType = iota StockWeekDataOpen StockWeekDataHigh StockWeekDataLow StockWeekDataClose StockWeekDataDelta StockWeekDataVolume StockWeekDataDeltaRatio = 10 StockWeekDataValue = 20 )
type StockWeekHeaderType ¶
type StockWeekHeaderType int32
const ( StockWeekHeaderCode StockWeekHeaderType = iota StockWeekHeaderCount StockWeekHeaderDate )
Click to show internal directories.
Click to hide internal directories.