Documentation ¶
Index ¶
- Variables
- type AccCashInfo
- func (*AccCashInfo) Descriptor() ([]byte, []int)deprecated
- func (x *AccCashInfo) GetAvailableBalance() float64
- func (x *AccCashInfo) GetCash() float64
- func (x *AccCashInfo) GetCurrency() int32
- func (*AccCashInfo) ProtoMessage()
- func (x *AccCashInfo) ProtoReflect() protoreflect.Message
- func (x *AccCashInfo) Reset()
- func (x *AccCashInfo) String() string
- type CltRiskLevel
- func (CltRiskLevel) Descriptor() protoreflect.EnumDescriptor
- func (x CltRiskLevel) Enum() *CltRiskLevel
- func (CltRiskLevel) EnumDescriptor() ([]byte, []int)deprecated
- func (x CltRiskLevel) Number() protoreflect.EnumNumber
- func (x CltRiskLevel) String() string
- func (CltRiskLevel) Type() protoreflect.EnumType
- func (x *CltRiskLevel) UnmarshalJSON(b []byte) errordeprecated
- type CltRiskStatus
- func (CltRiskStatus) Descriptor() protoreflect.EnumDescriptor
- func (x CltRiskStatus) Enum() *CltRiskStatus
- func (CltRiskStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x CltRiskStatus) Number() protoreflect.EnumNumber
- func (x CltRiskStatus) String() string
- func (CltRiskStatus) Type() protoreflect.EnumType
- func (x *CltRiskStatus) UnmarshalJSON(b []byte) errordeprecated
- type Currency
- func (Currency) Descriptor() protoreflect.EnumDescriptor
- func (x Currency) Enum() *Currency
- func (Currency) EnumDescriptor() ([]byte, []int)deprecated
- func (x Currency) Number() protoreflect.EnumNumber
- func (x Currency) String() string
- func (Currency) Type() protoreflect.EnumType
- func (x *Currency) UnmarshalJSON(b []byte) errordeprecated
- type Funds
- func (*Funds) Descriptor() ([]byte, []int)deprecated
- func (x *Funds) GetAvailableFunds() float64
- func (x *Funds) GetAvlWithdrawalCash() float64
- func (x *Funds) GetCash() float64
- func (x *Funds) GetCashInfoList() []*AccCashInfo
- func (x *Funds) GetCurrency() int32
- func (x *Funds) GetDebtCash() float64
- func (x *Funds) GetFrozenCash() float64
- func (x *Funds) GetInitialMargin() float64
- func (x *Funds) GetLongMv() float64
- func (x *Funds) GetMaintenanceMargin() float64
- func (x *Funds) GetMarginCallMargin() float64
- func (x *Funds) GetMarketVal() float64
- func (x *Funds) GetMaxPowerShort() float64
- func (x *Funds) GetMaxWithdrawal() float64
- func (x *Funds) GetNetCashPower() float64
- func (x *Funds) GetPendingAsset() float64
- func (x *Funds) GetPower() float64
- func (x *Funds) GetRealizedPL() float64
- func (x *Funds) GetRiskLevel() int32
- func (x *Funds) GetRiskStatus() int32
- func (x *Funds) GetShortMv() float64
- func (x *Funds) GetTotalAssets() float64
- func (x *Funds) GetUnrealizedPL() float64
- func (*Funds) ProtoMessage()
- func (x *Funds) ProtoReflect() protoreflect.Message
- func (x *Funds) Reset()
- func (x *Funds) String() string
- type MaxTrdQtys
- func (*MaxTrdQtys) Descriptor() ([]byte, []int)deprecated
- func (x *MaxTrdQtys) GetLongRequiredIM() float64
- func (x *MaxTrdQtys) GetMaxBuyBack() float64
- func (x *MaxTrdQtys) GetMaxCashAndMarginBuy() float64
- func (x *MaxTrdQtys) GetMaxCashBuy() float64
- func (x *MaxTrdQtys) GetMaxPositionSell() float64
- func (x *MaxTrdQtys) GetMaxSellShort() float64
- func (x *MaxTrdQtys) GetShortRequiredIM() float64
- func (*MaxTrdQtys) ProtoMessage()
- func (x *MaxTrdQtys) ProtoReflect() protoreflect.Message
- func (x *MaxTrdQtys) Reset()
- func (x *MaxTrdQtys) String() string
- type ModifyOrderOp
- func (ModifyOrderOp) Descriptor() protoreflect.EnumDescriptor
- func (x ModifyOrderOp) Enum() *ModifyOrderOp
- func (ModifyOrderOp) EnumDescriptor() ([]byte, []int)deprecated
- func (x ModifyOrderOp) Number() protoreflect.EnumNumber
- func (x ModifyOrderOp) String() string
- func (ModifyOrderOp) Type() protoreflect.EnumType
- func (x *ModifyOrderOp) UnmarshalJSON(b []byte) errordeprecated
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetCode() string
- func (x *Order) GetCreateTime() string
- func (x *Order) GetCreateTimestamp() float64
- func (x *Order) GetFillAvgPrice() float64
- func (x *Order) GetFillOutsideRTH() bool
- func (x *Order) GetFillQty() float64
- func (x *Order) GetLastErrMsg() string
- func (x *Order) GetName() string
- func (x *Order) GetOrderID() uint64
- func (x *Order) GetOrderIDEx() string
- func (x *Order) GetOrderStatus() int32
- func (x *Order) GetOrderType() int32
- func (x *Order) GetPrice() float64
- func (x *Order) GetQty() float64
- func (x *Order) GetRemark() string
- func (x *Order) GetSecMarket() int32
- func (x *Order) GetTimeInForce() int32
- func (x *Order) GetTrdSide() int32
- func (x *Order) GetUpdateTime() string
- func (x *Order) GetUpdateTimestamp() float64
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderFill
- func (*OrderFill) Descriptor() ([]byte, []int)deprecated
- func (x *OrderFill) GetCode() string
- func (x *OrderFill) GetCounterBrokerID() int32
- func (x *OrderFill) GetCounterBrokerName() string
- func (x *OrderFill) GetCreateTime() string
- func (x *OrderFill) GetCreateTimestamp() float64
- func (x *OrderFill) GetFillID() uint64
- func (x *OrderFill) GetFillIDEx() string
- func (x *OrderFill) GetName() string
- func (x *OrderFill) GetOrderID() uint64
- func (x *OrderFill) GetOrderIDEx() string
- func (x *OrderFill) GetPrice() float64
- func (x *OrderFill) GetQty() float64
- func (x *OrderFill) GetSecMarket() int32
- func (x *OrderFill) GetStatus() int32
- func (x *OrderFill) GetTrdSide() int32
- func (x *OrderFill) GetUpdateTimestamp() float64
- func (*OrderFill) ProtoMessage()
- func (x *OrderFill) ProtoReflect() protoreflect.Message
- func (x *OrderFill) Reset()
- func (x *OrderFill) String() string
- type OrderFillStatus
- func (OrderFillStatus) Descriptor() protoreflect.EnumDescriptor
- func (x OrderFillStatus) Enum() *OrderFillStatus
- func (OrderFillStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderFillStatus) Number() protoreflect.EnumNumber
- func (x OrderFillStatus) String() string
- func (OrderFillStatus) Type() protoreflect.EnumType
- func (x *OrderFillStatus) UnmarshalJSON(b []byte) errordeprecated
- type OrderStatus
- func (OrderStatus) Descriptor() protoreflect.EnumDescriptor
- func (x OrderStatus) Enum() *OrderStatus
- func (OrderStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderStatus) Number() protoreflect.EnumNumber
- func (x OrderStatus) String() string
- func (OrderStatus) Type() protoreflect.EnumType
- func (x *OrderStatus) UnmarshalJSON(b []byte) errordeprecated
- type OrderType
- func (OrderType) Descriptor() protoreflect.EnumDescriptor
- func (x OrderType) Enum() *OrderType
- func (OrderType) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderType) Number() protoreflect.EnumNumber
- func (x OrderType) String() string
- func (OrderType) Type() protoreflect.EnumType
- func (x *OrderType) UnmarshalJSON(b []byte) errordeprecated
- type Position
- func (*Position) Descriptor() ([]byte, []int)deprecated
- func (x *Position) GetCanSellQty() float64
- func (x *Position) GetCode() string
- func (x *Position) GetCostPrice() float64
- func (x *Position) GetName() string
- func (x *Position) GetPlRatio() float64
- func (x *Position) GetPlVal() float64
- func (x *Position) GetPositionID() uint64
- func (x *Position) GetPositionSide() int32
- func (x *Position) GetPrice() float64
- func (x *Position) GetQty() float64
- func (x *Position) GetRealizedPL() float64
- func (x *Position) GetSecMarket() int32
- func (x *Position) GetTdBuyQty() float64
- func (x *Position) GetTdBuyVal() float64
- func (x *Position) GetTdPlVal() float64
- func (x *Position) GetTdSellQty() float64
- func (x *Position) GetTdSellVal() float64
- func (x *Position) GetTdTrdVal() float64
- func (x *Position) GetUnrealizedPL() float64
- func (x *Position) GetVal() float64
- func (*Position) ProtoMessage()
- func (x *Position) ProtoReflect() protoreflect.Message
- func (x *Position) Reset()
- func (x *Position) String() string
- type PositionSide
- func (PositionSide) Descriptor() protoreflect.EnumDescriptor
- func (x PositionSide) Enum() *PositionSide
- func (PositionSide) EnumDescriptor() ([]byte, []int)deprecated
- func (x PositionSide) Number() protoreflect.EnumNumber
- func (x PositionSide) String() string
- func (PositionSide) Type() protoreflect.EnumType
- func (x *PositionSide) UnmarshalJSON(b []byte) errordeprecated
- type SecurityFirm
- func (SecurityFirm) Descriptor() protoreflect.EnumDescriptor
- func (x SecurityFirm) Enum() *SecurityFirm
- func (SecurityFirm) EnumDescriptor() ([]byte, []int)deprecated
- func (x SecurityFirm) Number() protoreflect.EnumNumber
- func (x SecurityFirm) String() string
- func (SecurityFirm) Type() protoreflect.EnumType
- func (x *SecurityFirm) UnmarshalJSON(b []byte) errordeprecated
- type SimAccType
- func (SimAccType) Descriptor() protoreflect.EnumDescriptor
- func (x SimAccType) Enum() *SimAccType
- func (SimAccType) EnumDescriptor() ([]byte, []int)deprecated
- func (x SimAccType) Number() protoreflect.EnumNumber
- func (x SimAccType) String() string
- func (SimAccType) Type() protoreflect.EnumType
- func (x *SimAccType) UnmarshalJSON(b []byte) errordeprecated
- type TimeInForce
- func (TimeInForce) Descriptor() protoreflect.EnumDescriptor
- func (x TimeInForce) Enum() *TimeInForce
- func (TimeInForce) EnumDescriptor() ([]byte, []int)deprecated
- func (x TimeInForce) Number() protoreflect.EnumNumber
- func (x TimeInForce) String() string
- func (TimeInForce) Type() protoreflect.EnumType
- func (x *TimeInForce) UnmarshalJSON(b []byte) errordeprecated
- type TrdAcc
- func (*TrdAcc) Descriptor() ([]byte, []int)deprecated
- func (x *TrdAcc) GetAccID() uint64
- func (x *TrdAcc) GetAccType() int32
- func (x *TrdAcc) GetCardNum() string
- func (x *TrdAcc) GetSecurityFirm() int32
- func (x *TrdAcc) GetSimAccType() int32
- func (x *TrdAcc) GetTrdEnv() int32
- func (x *TrdAcc) GetTrdMarketAuthList() []int32
- func (*TrdAcc) ProtoMessage()
- func (x *TrdAcc) ProtoReflect() protoreflect.Message
- func (x *TrdAcc) Reset()
- func (x *TrdAcc) String() string
- type TrdAccType
- func (TrdAccType) Descriptor() protoreflect.EnumDescriptor
- func (x TrdAccType) Enum() *TrdAccType
- func (TrdAccType) EnumDescriptor() ([]byte, []int)deprecated
- func (x TrdAccType) Number() protoreflect.EnumNumber
- func (x TrdAccType) String() string
- func (TrdAccType) Type() protoreflect.EnumType
- func (x *TrdAccType) UnmarshalJSON(b []byte) errordeprecated
- type TrdEnv
- func (TrdEnv) Descriptor() protoreflect.EnumDescriptor
- func (x TrdEnv) Enum() *TrdEnv
- func (TrdEnv) EnumDescriptor() ([]byte, []int)deprecated
- func (x TrdEnv) Number() protoreflect.EnumNumber
- func (x TrdEnv) String() string
- func (TrdEnv) Type() protoreflect.EnumType
- func (x *TrdEnv) UnmarshalJSON(b []byte) errordeprecated
- type TrdFilterConditions
- func (*TrdFilterConditions) Descriptor() ([]byte, []int)deprecated
- func (x *TrdFilterConditions) GetBeginTime() string
- func (x *TrdFilterConditions) GetCodeList() []string
- func (x *TrdFilterConditions) GetEndTime() string
- func (x *TrdFilterConditions) GetIdList() []uint64
- func (*TrdFilterConditions) ProtoMessage()
- func (x *TrdFilterConditions) ProtoReflect() protoreflect.Message
- func (x *TrdFilterConditions) Reset()
- func (x *TrdFilterConditions) String() string
- type TrdHeader
- func (*TrdHeader) Descriptor() ([]byte, []int)deprecated
- func (x *TrdHeader) GetAccID() uint64
- func (x *TrdHeader) GetTrdEnv() int32
- func (x *TrdHeader) GetTrdMarket() int32
- func (*TrdHeader) ProtoMessage()
- func (x *TrdHeader) ProtoReflect() protoreflect.Message
- func (x *TrdHeader) Reset()
- func (x *TrdHeader) String() string
- type TrdMarket
- func (TrdMarket) Descriptor() protoreflect.EnumDescriptor
- func (x TrdMarket) Enum() *TrdMarket
- func (TrdMarket) EnumDescriptor() ([]byte, []int)deprecated
- func (x TrdMarket) Number() protoreflect.EnumNumber
- func (x TrdMarket) String() string
- func (TrdMarket) Type() protoreflect.EnumType
- func (x *TrdMarket) UnmarshalJSON(b []byte) errordeprecated
- type TrdSecMarket
- func (TrdSecMarket) Descriptor() protoreflect.EnumDescriptor
- func (x TrdSecMarket) Enum() *TrdSecMarket
- func (TrdSecMarket) EnumDescriptor() ([]byte, []int)deprecated
- func (x TrdSecMarket) Number() protoreflect.EnumNumber
- func (x TrdSecMarket) String() string
- func (TrdSecMarket) Type() protoreflect.EnumType
- func (x *TrdSecMarket) UnmarshalJSON(b []byte) errordeprecated
- type TrdSide
- func (TrdSide) Descriptor() protoreflect.EnumDescriptor
- func (x TrdSide) Enum() *TrdSide
- func (TrdSide) EnumDescriptor() ([]byte, []int)deprecated
- func (x TrdSide) Number() protoreflect.EnumNumber
- func (x TrdSide) String() string
- func (TrdSide) Type() protoreflect.EnumType
- func (x *TrdSide) UnmarshalJSON(b []byte) errordeprecated
Constants ¶
This section is empty.
Variables ¶
var ( TrdEnv_name = map[int32]string{ 0: "TrdEnv_Simulate", 1: "TrdEnv_Real", } TrdEnv_value = map[string]int32{ "TrdEnv_Simulate": 0, "TrdEnv_Real": 1, } )
Enum value maps for TrdEnv.
var ( TrdMarket_name = map[int32]string{ 0: "TrdMarket_Unknown", 1: "TrdMarket_HK", 2: "TrdMarket_US", 3: "TrdMarket_CN", 4: "TrdMarket_HKCC", 5: "TrdMarket_Futures", } TrdMarket_value = map[string]int32{ "TrdMarket_Unknown": 0, "TrdMarket_HK": 1, "TrdMarket_US": 2, "TrdMarket_CN": 3, "TrdMarket_HKCC": 4, "TrdMarket_Futures": 5, } )
Enum value maps for TrdMarket.
var ( TrdSecMarket_name = map[int32]string{ 0: "TrdSecMarket_Unknown", 1: "TrdSecMarket_HK", 2: "TrdSecMarket_US", 31: "TrdSecMarket_CN_SH", 32: "TrdSecMarket_CN_SZ", 41: "TrdSecMarket_SG", 51: "TrdSecMarket_JP", } TrdSecMarket_value = map[string]int32{ "TrdSecMarket_Unknown": 0, "TrdSecMarket_HK": 1, "TrdSecMarket_US": 2, "TrdSecMarket_CN_SH": 31, "TrdSecMarket_CN_SZ": 32, "TrdSecMarket_SG": 41, "TrdSecMarket_JP": 51, } )
Enum value maps for TrdSecMarket.
var ( TrdSide_name = map[int32]string{ 0: "TrdSide_Unknown", 1: "TrdSide_Buy", 2: "TrdSide_Sell", 3: "TrdSide_SellShort", 4: "TrdSide_BuyBack", } TrdSide_value = map[string]int32{ "TrdSide_Unknown": 0, "TrdSide_Buy": 1, "TrdSide_Sell": 2, "TrdSide_SellShort": 3, "TrdSide_BuyBack": 4, } )
Enum value maps for TrdSide.
var ( OrderType_name = map[int32]string{ 0: "OrderType_Unknown", 1: "OrderType_Normal", 2: "OrderType_Market", 5: "OrderType_AbsoluteLimit", 6: "OrderType_Auction", 7: "OrderType_AuctionLimit", 8: "OrderType_SpecialLimit", 9: "OrderType_SpecialLimit_All", } OrderType_value = map[string]int32{ "OrderType_Unknown": 0, "OrderType_Normal": 1, "OrderType_Market": 2, "OrderType_AbsoluteLimit": 5, "OrderType_Auction": 6, "OrderType_AuctionLimit": 7, "OrderType_SpecialLimit": 8, "OrderType_SpecialLimit_All": 9, } )
Enum value maps for OrderType.
var ( OrderStatus_name = map[int32]string{ 0: "OrderStatus_Unsubmitted", -1: "OrderStatus_Unknown", 1: "OrderStatus_WaitingSubmit", 2: "OrderStatus_Submitting", 3: "OrderStatus_SubmitFailed", 4: "OrderStatus_TimeOut", 5: "OrderStatus_Submitted", 10: "OrderStatus_Filled_Part", 11: "OrderStatus_Filled_All", 12: "OrderStatus_Cancelling_Part", 13: "OrderStatus_Cancelling_All", 14: "OrderStatus_Cancelled_Part", 15: "OrderStatus_Cancelled_All", 21: "OrderStatus_Failed", 22: "OrderStatus_Disabled", 23: "OrderStatus_Deleted", 24: "OrderStatus_FillCancelled", } OrderStatus_value = map[string]int32{ "OrderStatus_Unsubmitted": 0, "OrderStatus_Unknown": -1, "OrderStatus_WaitingSubmit": 1, "OrderStatus_Submitting": 2, "OrderStatus_SubmitFailed": 3, "OrderStatus_TimeOut": 4, "OrderStatus_Submitted": 5, "OrderStatus_Filled_Part": 10, "OrderStatus_Filled_All": 11, "OrderStatus_Cancelling_Part": 12, "OrderStatus_Cancelling_All": 13, "OrderStatus_Cancelled_Part": 14, "OrderStatus_Cancelled_All": 15, "OrderStatus_Failed": 21, "OrderStatus_Disabled": 22, "OrderStatus_Deleted": 23, "OrderStatus_FillCancelled": 24, } )
Enum value maps for OrderStatus.
var ( OrderFillStatus_name = map[int32]string{ 0: "OrderFillStatus_OK", 1: "OrderFillStatus_Cancelled", 2: "OrderFillStatus_Changed", } OrderFillStatus_value = map[string]int32{ "OrderFillStatus_OK": 0, "OrderFillStatus_Cancelled": 1, "OrderFillStatus_Changed": 2, } )
Enum value maps for OrderFillStatus.
var ( PositionSide_name = map[int32]string{ 0: "PositionSide_Long", -1: "PositionSide_Unknown", 1: "PositionSide_Short", } PositionSide_value = map[string]int32{ "PositionSide_Long": 0, "PositionSide_Unknown": -1, "PositionSide_Short": 1, } )
Enum value maps for PositionSide.
var ( ModifyOrderOp_name = map[int32]string{ 0: "ModifyOrderOp_Unknown", 1: "ModifyOrderOp_Normal", 2: "ModifyOrderOp_Cancel", 3: "ModifyOrderOp_Disable", 4: "ModifyOrderOp_Enable", 5: "ModifyOrderOp_Delete", } ModifyOrderOp_value = map[string]int32{ "ModifyOrderOp_Unknown": 0, "ModifyOrderOp_Normal": 1, "ModifyOrderOp_Cancel": 2, "ModifyOrderOp_Disable": 3, "ModifyOrderOp_Enable": 4, "ModifyOrderOp_Delete": 5, } )
Enum value maps for ModifyOrderOp.
var ( TrdAccType_name = map[int32]string{ 0: "TrdAccType_Unknown", 1: "TrdAccType_Cash", 2: "TrdAccType_Margin", } TrdAccType_value = map[string]int32{ "TrdAccType_Unknown": 0, "TrdAccType_Cash": 1, "TrdAccType_Margin": 2, } )
Enum value maps for TrdAccType.
var ( Currency_name = map[int32]string{ 0: "Currency_Unknown", 1: "Currency_HKD", 2: "Currency_USD", 3: "Currency_CNH", 4: "Currency_JPY", } Currency_value = map[string]int32{ "Currency_Unknown": 0, "Currency_HKD": 1, "Currency_USD": 2, "Currency_CNH": 3, "Currency_JPY": 4, } )
Enum value maps for Currency.
var ( CltRiskLevel_name = map[int32]string{ -1: "CltRiskLevel_Unknown", 0: "CltRiskLevel_Safe", 1: "CltRiskLevel_Warning", 2: "CltRiskLevel_Danger", 3: "CltRiskLevel_AbsoluteSafe", 4: "CltRiskLevel_OptDanger", } CltRiskLevel_value = map[string]int32{ "CltRiskLevel_Unknown": -1, "CltRiskLevel_Safe": 0, "CltRiskLevel_Warning": 1, "CltRiskLevel_Danger": 2, "CltRiskLevel_AbsoluteSafe": 3, "CltRiskLevel_OptDanger": 4, } )
Enum value maps for CltRiskLevel.
var ( TimeInForce_name = map[int32]string{ 0: "TimeInForce_DAY", 1: "TimeInForce_GTC", } TimeInForce_value = map[string]int32{ "TimeInForce_DAY": 0, "TimeInForce_GTC": 1, } )
Enum value maps for TimeInForce.
var ( SecurityFirm_name = map[int32]string{ 0: "SecurityFirm_Unknown", 1: "SecurityFirm_FutuSecurities", 2: "SecurityFirm_FutuInc", } SecurityFirm_value = map[string]int32{ "SecurityFirm_Unknown": 0, "SecurityFirm_FutuSecurities": 1, "SecurityFirm_FutuInc": 2, } )
Enum value maps for SecurityFirm.
var ( SimAccType_name = map[int32]string{ 0: "SimAccType_Unknown", 1: "SimAccType_Stock", 2: "SimAccType_Option", } SimAccType_value = map[string]int32{ "SimAccType_Unknown": 0, "SimAccType_Stock": 1, "SimAccType_Option": 2, } )
Enum value maps for SimAccType.
var ( CltRiskStatus_name = map[int32]string{ 0: "CltRiskStatus_Unknown", 1: "CltRiskStatus_Level1", 2: "CltRiskStatus_Level2", 3: "CltRiskStatus_Level3", 4: "CltRiskStatus_Level4", 5: "CltRiskStatus_Level5", 6: "CltRiskStatus_Level6", 7: "CltRiskStatus_Level7", 8: "CltRiskStatus_Level8", 9: "CltRiskStatus_Level9", } CltRiskStatus_value = map[string]int32{ "CltRiskStatus_Unknown": 0, "CltRiskStatus_Level1": 1, "CltRiskStatus_Level2": 2, "CltRiskStatus_Level3": 3, "CltRiskStatus_Level4": 4, "CltRiskStatus_Level5": 5, "CltRiskStatus_Level6": 6, "CltRiskStatus_Level7": 7, "CltRiskStatus_Level8": 8, "CltRiskStatus_Level9": 9, } )
Enum value maps for CltRiskStatus.
var File_Trd_Common_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AccCashInfo ¶
type AccCashInfo struct { Currency *int32 `protobuf:"varint,1,opt,name=currency" json:"currency,omitempty"` // 货币类型,取值参考 Currency Cash *float64 `protobuf:"fixed64,2,opt,name=cash" json:"cash,omitempty"` // 现金结余 AvailableBalance *float64 `protobuf:"fixed64,3,opt,name=availableBalance" json:"availableBalance,omitempty"` // 现金可提金额 // contains filtered or unexported fields }
账户现金信息,目前仅用于期货账户
func (*AccCashInfo) Descriptor
deprecated
func (*AccCashInfo) Descriptor() ([]byte, []int)
Deprecated: Use AccCashInfo.ProtoReflect.Descriptor instead.
func (*AccCashInfo) GetAvailableBalance ¶
func (x *AccCashInfo) GetAvailableBalance() float64
func (*AccCashInfo) GetCash ¶
func (x *AccCashInfo) GetCash() float64
func (*AccCashInfo) GetCurrency ¶
func (x *AccCashInfo) GetCurrency() int32
func (*AccCashInfo) ProtoMessage ¶
func (*AccCashInfo) ProtoMessage()
func (*AccCashInfo) ProtoReflect ¶
func (x *AccCashInfo) ProtoReflect() protoreflect.Message
func (*AccCashInfo) Reset ¶
func (x *AccCashInfo) Reset()
func (*AccCashInfo) String ¶
func (x *AccCashInfo) String() string
type CltRiskLevel ¶
type CltRiskLevel int32
账户风险控制等级
const ( CltRiskLevel_CltRiskLevel_Unknown CltRiskLevel = -1 // 未知 CltRiskLevel_CltRiskLevel_Safe CltRiskLevel = 0 // 安全 CltRiskLevel_CltRiskLevel_Warning CltRiskLevel = 1 // 预警 CltRiskLevel_CltRiskLevel_Danger CltRiskLevel = 2 // 危险 CltRiskLevel_CltRiskLevel_AbsoluteSafe CltRiskLevel = 3 // 绝对安全 CltRiskLevel_CltRiskLevel_OptDanger CltRiskLevel = 4 // 危险, 期权相关 )
func (CltRiskLevel) Descriptor ¶
func (CltRiskLevel) Descriptor() protoreflect.EnumDescriptor
func (CltRiskLevel) Enum ¶
func (x CltRiskLevel) Enum() *CltRiskLevel
func (CltRiskLevel) EnumDescriptor
deprecated
func (CltRiskLevel) EnumDescriptor() ([]byte, []int)
Deprecated: Use CltRiskLevel.Descriptor instead.
func (CltRiskLevel) Number ¶
func (x CltRiskLevel) Number() protoreflect.EnumNumber
func (CltRiskLevel) String ¶
func (x CltRiskLevel) String() string
func (CltRiskLevel) Type ¶
func (CltRiskLevel) Type() protoreflect.EnumType
func (*CltRiskLevel) UnmarshalJSON
deprecated
func (x *CltRiskLevel) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type CltRiskStatus ¶
type CltRiskStatus int32
风险状态,共分 9 个等级,LEVEL1是最安全,LEVEL9是最危险
const ( CltRiskStatus_CltRiskStatus_Unknown CltRiskStatus = 0 //未知 CltRiskStatus_CltRiskStatus_Level1 CltRiskStatus = 1 //非常安全 CltRiskStatus_CltRiskStatus_Level2 CltRiskStatus = 2 //安全 CltRiskStatus_CltRiskStatus_Level3 CltRiskStatus = 3 //较安全 CltRiskStatus_CltRiskStatus_Level4 CltRiskStatus = 4 //较低风险 CltRiskStatus_CltRiskStatus_Level5 CltRiskStatus = 5 //中等风险 CltRiskStatus_CltRiskStatus_Level6 CltRiskStatus = 6 //较高风险 CltRiskStatus_CltRiskStatus_Level7 CltRiskStatus = 7 //预警 CltRiskStatus_CltRiskStatus_Level8 CltRiskStatus = 8 //预警 CltRiskStatus_CltRiskStatus_Level9 CltRiskStatus = 9 //预警 )
func (CltRiskStatus) Descriptor ¶
func (CltRiskStatus) Descriptor() protoreflect.EnumDescriptor
func (CltRiskStatus) Enum ¶
func (x CltRiskStatus) Enum() *CltRiskStatus
func (CltRiskStatus) EnumDescriptor
deprecated
func (CltRiskStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use CltRiskStatus.Descriptor instead.
func (CltRiskStatus) Number ¶
func (x CltRiskStatus) Number() protoreflect.EnumNumber
func (CltRiskStatus) String ¶
func (x CltRiskStatus) String() string
func (CltRiskStatus) Type ¶
func (CltRiskStatus) Type() protoreflect.EnumType
func (*CltRiskStatus) UnmarshalJSON
deprecated
func (x *CltRiskStatus) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Currency ¶
type Currency int32
货币种类
func (Currency) Descriptor ¶
func (Currency) Descriptor() protoreflect.EnumDescriptor
func (Currency) EnumDescriptor
deprecated
func (Currency) Number ¶
func (x Currency) Number() protoreflect.EnumNumber
func (Currency) Type ¶
func (Currency) Type() protoreflect.EnumType
func (*Currency) UnmarshalJSON
deprecated
type Funds ¶
type Funds struct { Power *float64 `protobuf:"fixed64,1,req,name=power" json:"power,omitempty"` //最大购买力(做多),3位精度,下同。 TotalAssets *float64 `protobuf:"fixed64,2,req,name=totalAssets" json:"totalAssets,omitempty"` //资产净值 Cash *float64 `protobuf:"fixed64,3,req,name=cash" json:"cash,omitempty"` //现金 MarketVal *float64 `protobuf:"fixed64,4,req,name=marketVal" json:"marketVal,omitempty"` //证券市值, 仅证券账户适用 FrozenCash *float64 `protobuf:"fixed64,5,req,name=frozenCash" json:"frozenCash,omitempty"` //冻结资金 DebtCash *float64 `protobuf:"fixed64,6,req,name=debtCash" json:"debtCash,omitempty"` //计息金额 AvlWithdrawalCash *float64 `protobuf:"fixed64,7,req,name=avlWithdrawalCash" json:"avlWithdrawalCash,omitempty"` //现金可提,仅证券账户适用 Currency *int32 `protobuf:"varint,8,opt,name=currency" json:"currency,omitempty"` //币种,本结构体资金相关的货币类型,取值参见 Currency,期货适用 AvailableFunds *float64 `protobuf:"fixed64,9,opt,name=availableFunds" json:"availableFunds,omitempty"` //可用资金,期货适用 UnrealizedPL *float64 `protobuf:"fixed64,10,opt,name=unrealizedPL" json:"unrealizedPL,omitempty"` //未实现盈亏,期货适用 RealizedPL *float64 `protobuf:"fixed64,11,opt,name=realizedPL" json:"realizedPL,omitempty"` //已实现盈亏,期货适用 RiskLevel *int32 `protobuf:"varint,12,opt,name=riskLevel" json:"riskLevel,omitempty"` //风控状态,参见 CltRiskLevel, 期货适用 InitialMargin *float64 `protobuf:"fixed64,13,opt,name=initialMargin" json:"initialMargin,omitempty"` //初始保证金 MaintenanceMargin *float64 `protobuf:"fixed64,14,opt,name=maintenanceMargin" json:"maintenanceMargin,omitempty"` //维持保证金 CashInfoList []*AccCashInfo `protobuf:"bytes,15,rep,name=cashInfoList" json:"cashInfoList,omitempty"` //分币种的现金信息,期货适用 MaxPowerShort *float64 `protobuf:"fixed64,16,opt,name=maxPowerShort" json:"maxPowerShort,omitempty"` //卖空购买力 NetCashPower *float64 `protobuf:"fixed64,17,opt,name=netCashPower" json:"netCashPower,omitempty"` //现金购买力 LongMv *float64 `protobuf:"fixed64,18,opt,name=longMv" json:"longMv,omitempty"` //多头市值 ShortMv *float64 `protobuf:"fixed64,19,opt,name=shortMv" json:"shortMv,omitempty"` //空头市值 PendingAsset *float64 `protobuf:"fixed64,20,opt,name=pendingAsset" json:"pendingAsset,omitempty"` //在途资产 MaxWithdrawal *float64 `protobuf:"fixed64,21,opt,name=maxWithdrawal" json:"maxWithdrawal,omitempty"` //融资可提,仅证券账户适用 RiskStatus *int32 `protobuf:"varint,22,opt,name=riskStatus" json:"riskStatus,omitempty"` //风险状态,参见 [CltRiskStatus],证券账户适用,共分 9 个等级,LEVEL1是最安全,LEVEL9是最危险 MarginCallMargin *float64 `protobuf:"fixed64,23,opt,name=marginCallMargin" json:"marginCallMargin,omitempty"` // Margin Call 保证金 // contains filtered or unexported fields }
账户资金结构
func (*Funds) Descriptor
deprecated
func (*Funds) GetAvailableFunds ¶
func (*Funds) GetAvlWithdrawalCash ¶
func (*Funds) GetCashInfoList ¶
func (x *Funds) GetCashInfoList() []*AccCashInfo
func (*Funds) GetCurrency ¶
func (*Funds) GetDebtCash ¶
func (*Funds) GetFrozenCash ¶
func (*Funds) GetInitialMargin ¶
func (*Funds) GetMaintenanceMargin ¶
func (*Funds) GetMarginCallMargin ¶
func (*Funds) GetMarketVal ¶
func (*Funds) GetMaxPowerShort ¶
func (*Funds) GetMaxWithdrawal ¶
func (*Funds) GetNetCashPower ¶
func (*Funds) GetPendingAsset ¶
func (*Funds) GetRealizedPL ¶
func (*Funds) GetRiskLevel ¶
func (*Funds) GetRiskStatus ¶
func (*Funds) GetShortMv ¶
func (*Funds) GetTotalAssets ¶
func (*Funds) GetUnrealizedPL ¶
func (*Funds) ProtoMessage ¶
func (*Funds) ProtoMessage()
func (*Funds) ProtoReflect ¶
func (x *Funds) ProtoReflect() protoreflect.Message
type MaxTrdQtys ¶
type MaxTrdQtys struct { //因目前服务器实现的问题,卖空需要先卖掉持仓才能再卖空,是分开两步卖的,买回来同样是逆向两步;而看多的买是可以现金加融资一起一步买的,请注意这个差异 MaxCashBuy *float64 `protobuf:"fixed64,1,req,name=maxCashBuy" json:"maxCashBuy,omitempty"` //不使用融资,仅自己的现金最大可买整手股数,期货此字段值为0 MaxCashAndMarginBuy *float64 `protobuf:"fixed64,2,opt,name=maxCashAndMarginBuy" json:"maxCashAndMarginBuy,omitempty"` //使用融资,自己的现金 + 融资资金总共的最大可买整手股数,期货不适用 MaxPositionSell *float64 `protobuf:"fixed64,3,req,name=maxPositionSell" json:"maxPositionSell,omitempty"` //不使用融券(卖空),仅自己的持仓最大可卖整手股数 MaxSellShort *float64 `protobuf:"fixed64,4,opt,name=maxSellShort" json:"maxSellShort,omitempty"` //使用融券(卖空),最大可卖空整手股数,不包括多仓,期货不适用 MaxBuyBack *float64 `protobuf:"fixed64,5,opt,name=maxBuyBack" json:"maxBuyBack,omitempty"` //卖空后,需要买回的最大整手股数。因为卖空后,必须先买回已卖空的股数,还掉股票,才能再继续买多。期货不适用 LongRequiredIM *float64 `protobuf:"fixed64,6,opt,name=longRequiredIM" json:"longRequiredIM,omitempty"` //开多仓每张合约初始保证金。当前仅期货和期权适用(最低 FutuOpenD 版本要求:5.0.1310) ShortRequiredIM *float64 `protobuf:"fixed64,7,opt,name=shortRequiredIM" json:"shortRequiredIM,omitempty"` //开空仓每张合约初始保证金。当前仅期货和期权适用(最低 FutuOpenD 版本要求:5.0.1310) // contains filtered or unexported fields }
最大可交易数量
func (*MaxTrdQtys) Descriptor
deprecated
func (*MaxTrdQtys) Descriptor() ([]byte, []int)
Deprecated: Use MaxTrdQtys.ProtoReflect.Descriptor instead.
func (*MaxTrdQtys) GetLongRequiredIM ¶
func (x *MaxTrdQtys) GetLongRequiredIM() float64
func (*MaxTrdQtys) GetMaxBuyBack ¶
func (x *MaxTrdQtys) GetMaxBuyBack() float64
func (*MaxTrdQtys) GetMaxCashAndMarginBuy ¶
func (x *MaxTrdQtys) GetMaxCashAndMarginBuy() float64
func (*MaxTrdQtys) GetMaxCashBuy ¶
func (x *MaxTrdQtys) GetMaxCashBuy() float64
func (*MaxTrdQtys) GetMaxPositionSell ¶
func (x *MaxTrdQtys) GetMaxPositionSell() float64
func (*MaxTrdQtys) GetMaxSellShort ¶
func (x *MaxTrdQtys) GetMaxSellShort() float64
func (*MaxTrdQtys) GetShortRequiredIM ¶
func (x *MaxTrdQtys) GetShortRequiredIM() float64
func (*MaxTrdQtys) ProtoMessage ¶
func (*MaxTrdQtys) ProtoMessage()
func (*MaxTrdQtys) ProtoReflect ¶
func (x *MaxTrdQtys) ProtoReflect() protoreflect.Message
func (*MaxTrdQtys) Reset ¶
func (x *MaxTrdQtys) Reset()
func (*MaxTrdQtys) String ¶
func (x *MaxTrdQtys) String() string
type ModifyOrderOp ¶
type ModifyOrderOp int32
修改订单的操作类型
const ( //港股支持全部操作,美股目前仅支持ModifyOrderOp_Normal和ModifyOrderOp_Cancel ModifyOrderOp_ModifyOrderOp_Unknown ModifyOrderOp = 0 //未知操作 ModifyOrderOp_ModifyOrderOp_Normal ModifyOrderOp = 1 //修改订单的价格、数量等,即以前的改单 ModifyOrderOp_ModifyOrderOp_Cancel ModifyOrderOp = 2 //撤单 ModifyOrderOp_ModifyOrderOp_Disable ModifyOrderOp = 3 //失效 ModifyOrderOp_ModifyOrderOp_Enable ModifyOrderOp = 4 //生效 ModifyOrderOp_ModifyOrderOp_Delete ModifyOrderOp = 5 //删除 )
func (ModifyOrderOp) Descriptor ¶
func (ModifyOrderOp) Descriptor() protoreflect.EnumDescriptor
func (ModifyOrderOp) Enum ¶
func (x ModifyOrderOp) Enum() *ModifyOrderOp
func (ModifyOrderOp) EnumDescriptor
deprecated
func (ModifyOrderOp) EnumDescriptor() ([]byte, []int)
Deprecated: Use ModifyOrderOp.Descriptor instead.
func (ModifyOrderOp) Number ¶
func (x ModifyOrderOp) Number() protoreflect.EnumNumber
func (ModifyOrderOp) String ¶
func (x ModifyOrderOp) String() string
func (ModifyOrderOp) Type ¶
func (ModifyOrderOp) Type() protoreflect.EnumType
func (*ModifyOrderOp) UnmarshalJSON
deprecated
func (x *ModifyOrderOp) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type Order ¶
type Order struct { TrdSide *int32 `protobuf:"varint,1,req,name=trdSide" json:"trdSide,omitempty"` //交易方向, 参见TrdSide的枚举定义 OrderType *int32 `protobuf:"varint,2,req,name=orderType" json:"orderType,omitempty"` //订单类型, 参见OrderType的枚举定义 OrderStatus *int32 `protobuf:"varint,3,req,name=orderStatus" json:"orderStatus,omitempty"` //订单状态, 参见OrderStatus的枚举定义 OrderID *uint64 `protobuf:"varint,4,req,name=orderID" json:"orderID,omitempty"` //订单号 OrderIDEx *string `protobuf:"bytes,5,req,name=orderIDEx" json:"orderIDEx,omitempty"` //扩展订单号(仅查问题时备用) Code *string `protobuf:"bytes,6,req,name=code" json:"code,omitempty"` //代码 Name *string `protobuf:"bytes,7,req,name=name" json:"name,omitempty"` //名称 Qty *float64 `protobuf:"fixed64,8,req,name=qty" json:"qty,omitempty"` //订单数量,2位精度,期权单位是"张" Price *float64 `protobuf:"fixed64,9,opt,name=price" json:"price,omitempty"` //订单价格,3位精度 CreateTime *string `protobuf:"bytes,10,req,name=createTime" json:"createTime,omitempty"` //创建时间,严格按YYYY-MM-DD HH:MM:SS或YYYY-MM-DD HH:MM:SS.MS格式传 UpdateTime *string `protobuf:"bytes,11,req,name=updateTime" json:"updateTime,omitempty"` //最后更新时间,严格按YYYY-MM-DD HH:MM:SS或YYYY-MM-DD HH:MM:SS.MS格式传 FillQty *float64 `protobuf:"fixed64,12,opt,name=fillQty" json:"fillQty,omitempty"` //成交数量,2位精度,期权单位是"张" FillAvgPrice *float64 `protobuf:"fixed64,13,opt,name=fillAvgPrice" json:"fillAvgPrice,omitempty"` //成交均价,无精度限制 LastErrMsg *string `protobuf:"bytes,14,opt,name=lastErrMsg" json:"lastErrMsg,omitempty"` //最后的错误描述,如果有错误,会有此描述最后一次错误的原因,无错误为空 SecMarket *int32 `protobuf:"varint,15,opt,name=secMarket" json:"secMarket,omitempty"` //证券所属市场,参见TrdSecMarket的枚举定义 CreateTimestamp *float64 `protobuf:"fixed64,16,opt,name=createTimestamp" json:"createTimestamp,omitempty"` //创建时间戳 UpdateTimestamp *float64 `protobuf:"fixed64,17,opt,name=updateTimestamp" json:"updateTimestamp,omitempty"` //最后更新时间戳 Remark *string `protobuf:"bytes,18,opt,name=remark" json:"remark,omitempty"` //用户备注字符串,最大长度64字节 TimeInForce *int32 `protobuf:"varint,19,opt,name=timeInForce" json:"timeInForce,omitempty"` //订单期限,参考 TimeInForce 类的定义 FillOutsideRTH *bool `protobuf:"varint,20,opt,name=fillOutsideRTH" json:"fillOutsideRTH,omitempty"` //是否允许美股订单盘前盘后成交 // contains filtered or unexported fields }
订单结构
func (*Order) Descriptor
deprecated
func (*Order) GetCreateTime ¶
func (*Order) GetCreateTimestamp ¶
func (*Order) GetFillAvgPrice ¶
func (*Order) GetFillOutsideRTH ¶
func (*Order) GetFillQty ¶
func (*Order) GetLastErrMsg ¶
func (*Order) GetOrderID ¶
func (*Order) GetOrderIDEx ¶
func (*Order) GetOrderStatus ¶
func (*Order) GetOrderType ¶
func (*Order) GetSecMarket ¶
func (*Order) GetTimeInForce ¶
func (*Order) GetTrdSide ¶
func (*Order) GetUpdateTime ¶
func (*Order) GetUpdateTimestamp ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderFill ¶
type OrderFill struct { TrdSide *int32 `protobuf:"varint,1,req,name=trdSide" json:"trdSide,omitempty"` //交易方向, 参见TrdSide的枚举定义 FillID *uint64 `protobuf:"varint,2,req,name=fillID" json:"fillID,omitempty"` //成交号 FillIDEx *string `protobuf:"bytes,3,req,name=fillIDEx" json:"fillIDEx,omitempty"` //扩展成交号(仅查问题时备用) OrderID *uint64 `protobuf:"varint,4,opt,name=orderID" json:"orderID,omitempty"` //订单号 OrderIDEx *string `protobuf:"bytes,5,opt,name=orderIDEx" json:"orderIDEx,omitempty"` //扩展订单号(仅查问题时备用) Code *string `protobuf:"bytes,6,req,name=code" json:"code,omitempty"` //代码 Name *string `protobuf:"bytes,7,req,name=name" json:"name,omitempty"` //名称 Qty *float64 `protobuf:"fixed64,8,req,name=qty" json:"qty,omitempty"` //成交数量,2位精度,期权单位是"张" Price *float64 `protobuf:"fixed64,9,req,name=price" json:"price,omitempty"` //成交价格,3位精度 CreateTime *string `protobuf:"bytes,10,req,name=createTime" json:"createTime,omitempty"` //创建时间(成交时间),严格按YYYY-MM-DD HH:MM:SS或YYYY-MM-DD HH:MM:SS.MS格式传 CounterBrokerID *int32 `protobuf:"varint,11,opt,name=counterBrokerID" json:"counterBrokerID,omitempty"` //对手经纪号,港股有效 CounterBrokerName *string `protobuf:"bytes,12,opt,name=counterBrokerName" json:"counterBrokerName,omitempty"` //对手经纪名称,港股有效 SecMarket *int32 `protobuf:"varint,13,opt,name=secMarket" json:"secMarket,omitempty"` //证券所属市场,参见TrdSecMarket的枚举定义 CreateTimestamp *float64 `protobuf:"fixed64,14,opt,name=createTimestamp" json:"createTimestamp,omitempty"` //创建时间戳 UpdateTimestamp *float64 `protobuf:"fixed64,15,opt,name=updateTimestamp" json:"updateTimestamp,omitempty"` //最后更新时间戳 Status *int32 `protobuf:"varint,16,opt,name=status" json:"status,omitempty"` //成交状态, 参见OrderFillStatus的枚举定义 // contains filtered or unexported fields }
成交结构
func (*OrderFill) Descriptor
deprecated
func (*OrderFill) GetCounterBrokerID ¶
func (*OrderFill) GetCounterBrokerName ¶
func (*OrderFill) GetCreateTime ¶
func (*OrderFill) GetCreateTimestamp ¶
func (*OrderFill) GetFillIDEx ¶
func (*OrderFill) GetOrderID ¶
func (*OrderFill) GetOrderIDEx ¶
func (*OrderFill) GetSecMarket ¶
func (*OrderFill) GetTrdSide ¶
func (*OrderFill) GetUpdateTimestamp ¶
func (*OrderFill) ProtoMessage ¶
func (*OrderFill) ProtoMessage()
func (*OrderFill) ProtoReflect ¶
func (x *OrderFill) ProtoReflect() protoreflect.Message
type OrderFillStatus ¶
type OrderFillStatus int32
一笔成交的状态
const ( OrderFillStatus_OrderFillStatus_OK OrderFillStatus = 0 //正常 OrderFillStatus_OrderFillStatus_Cancelled OrderFillStatus = 1 //成交被取消 OrderFillStatus_OrderFillStatus_Changed OrderFillStatus = 2 //成交被更改 )
func (OrderFillStatus) Descriptor ¶
func (OrderFillStatus) Descriptor() protoreflect.EnumDescriptor
func (OrderFillStatus) Enum ¶
func (x OrderFillStatus) Enum() *OrderFillStatus
func (OrderFillStatus) EnumDescriptor
deprecated
func (OrderFillStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderFillStatus.Descriptor instead.
func (OrderFillStatus) Number ¶
func (x OrderFillStatus) Number() protoreflect.EnumNumber
func (OrderFillStatus) String ¶
func (x OrderFillStatus) String() string
func (OrderFillStatus) Type ¶
func (OrderFillStatus) Type() protoreflect.EnumType
func (*OrderFillStatus) UnmarshalJSON
deprecated
func (x *OrderFillStatus) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type OrderStatus ¶
type OrderStatus int32
订单状态
const ( OrderStatus_OrderStatus_Unsubmitted OrderStatus = 0 //未提交 OrderStatus_OrderStatus_Unknown OrderStatus = -1 //未知状态 OrderStatus_OrderStatus_WaitingSubmit OrderStatus = 1 //等待提交 OrderStatus_OrderStatus_Submitting OrderStatus = 2 //提交中 OrderStatus_OrderStatus_SubmitFailed OrderStatus = 3 //提交失败,下单失败 OrderStatus_OrderStatus_TimeOut OrderStatus = 4 //处理超时,结果未知 OrderStatus_OrderStatus_Submitted OrderStatus = 5 //已提交,等待成交 OrderStatus_OrderStatus_Filled_Part OrderStatus = 10 //部分成交 OrderStatus_OrderStatus_Filled_All OrderStatus = 11 //全部已成 OrderStatus_OrderStatus_Cancelling_Part OrderStatus = 12 //正在撤单_部分(部分已成交,正在撤销剩余部分) OrderStatus_OrderStatus_Cancelling_All OrderStatus = 13 //正在撤单_全部 OrderStatus_OrderStatus_Cancelled_Part OrderStatus = 14 //部分成交,剩余部分已撤单 OrderStatus_OrderStatus_Cancelled_All OrderStatus = 15 //全部已撤单,无成交 OrderStatus_OrderStatus_Failed OrderStatus = 21 //下单失败,服务拒绝 OrderStatus_OrderStatus_Disabled OrderStatus = 22 //已失效 OrderStatus_OrderStatus_Deleted OrderStatus = 23 //已删除,无成交的订单才能删除 OrderStatus_OrderStatus_FillCancelled OrderStatus = 24 //成交被撤销,一般遇不到,意思是已经成交的订单被回滚撤销,成交无效变为废单 )
func (OrderStatus) Descriptor ¶
func (OrderStatus) Descriptor() protoreflect.EnumDescriptor
func (OrderStatus) Enum ¶
func (x OrderStatus) Enum() *OrderStatus
func (OrderStatus) EnumDescriptor
deprecated
func (OrderStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderStatus.Descriptor instead.
func (OrderStatus) Number ¶
func (x OrderStatus) Number() protoreflect.EnumNumber
func (OrderStatus) String ¶
func (x OrderStatus) String() string
func (OrderStatus) Type ¶
func (OrderStatus) Type() protoreflect.EnumType
func (*OrderStatus) UnmarshalJSON
deprecated
func (x *OrderStatus) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type OrderType ¶
type OrderType int32
订单类型
const ( OrderType_OrderType_Unknown OrderType = 0 //未知类型 OrderType_OrderType_Normal OrderType = 1 //普通订单(港股的增强限价单、港股期权的限价单,A股限价委托、美股的限价单,港股期货的限价单,CME期货的限价单)。目前港股期权只能指定此订单类型。 OrderType_OrderType_Market OrderType = 2 //市价订单(目前支持美股、港股正股、涡轮、牛熊、界内证) OrderType_OrderType_AbsoluteLimit OrderType = 5 //绝对限价订单(目前仅港股),只有价格完全匹配才成交,否则下单失败,比如你下价格为5元的买单,卖单价格必须也要是5元才能成交,低于5元也不能成交,下单失败。卖出同理 OrderType_OrderType_Auction OrderType = 6 //竞价订单(目前仅港股),仅港股早盘竞价和收盘竞价有效,A股的早盘竞价订单类型不变还是OrderType_Normal OrderType_OrderType_AuctionLimit OrderType = 7 //竞价限价订单(目前仅港股),仅早盘竞价和收盘竞价有效,参与竞价,且要求满足指定价格才会成交 OrderType_OrderType_SpecialLimit OrderType = 8 //特别限价订单(目前仅港股),成交规则同增强限价订单,且部分成交后,交易所自动撤销订单 OrderType_OrderType_SpecialLimit_All OrderType = 9 //特别限价且要求全部成交订单(目前仅港股),要么全部成交,要么自动撤单 )
func (OrderType) Descriptor ¶
func (OrderType) Descriptor() protoreflect.EnumDescriptor
func (OrderType) EnumDescriptor
deprecated
func (OrderType) Number ¶
func (x OrderType) Number() protoreflect.EnumNumber
func (OrderType) Type ¶
func (OrderType) Type() protoreflect.EnumType
func (*OrderType) UnmarshalJSON
deprecated
type Position ¶
type Position struct { PositionID *uint64 `protobuf:"varint,1,req,name=positionID" json:"positionID,omitempty"` //持仓ID,一条持仓的唯一标识 PositionSide *int32 `protobuf:"varint,2,req,name=positionSide" json:"positionSide,omitempty"` //持仓方向,参见PositionSide的枚举定义 Code *string `protobuf:"bytes,3,req,name=code" json:"code,omitempty"` //代码 Name *string `protobuf:"bytes,4,req,name=name" json:"name,omitempty"` //名称 Qty *float64 `protobuf:"fixed64,5,req,name=qty" json:"qty,omitempty"` //持有数量,2位精度,期权单位是"张",下同 CanSellQty *float64 `protobuf:"fixed64,6,req,name=canSellQty" json:"canSellQty,omitempty"` //可卖数量 Price *float64 `protobuf:"fixed64,7,req,name=price" json:"price,omitempty"` //市价,3位精度,期货为2位精度 CostPrice *float64 `protobuf:"fixed64,8,opt,name=costPrice" json:"costPrice,omitempty"` //成本价,无精度限制,期货为2位精度,如果没传,代表此时此值无效, Val *float64 `protobuf:"fixed64,9,req,name=val" json:"val,omitempty"` //市值,3位精度, 期货此字段值为0 PlVal *float64 `protobuf:"fixed64,10,req,name=plVal" json:"plVal,omitempty"` //盈亏金额,3位精度,期货为2位精度 PlRatio *float64 `protobuf:"fixed64,11,opt,name=plRatio" json:"plRatio,omitempty"` //盈亏百分比(如plRatio等于8.8代表涨8.8%),无精度限制,如果没传,代表此时此值无效 SecMarket *int32 `protobuf:"varint,12,opt,name=secMarket" json:"secMarket,omitempty"` //证券所属市场,参见TrdSecMarket的枚举定义 //以下是此持仓今日统计 TdPlVal *float64 `protobuf:"fixed64,21,opt,name=td_plVal,json=tdPlVal" json:"td_plVal,omitempty"` //今日盈亏金额,3位精度,下同, 期货为2位精度 TdTrdVal *float64 `protobuf:"fixed64,22,opt,name=td_trdVal,json=tdTrdVal" json:"td_trdVal,omitempty"` //今日交易额,期货不适用 TdBuyVal *float64 `protobuf:"fixed64,23,opt,name=td_buyVal,json=tdBuyVal" json:"td_buyVal,omitempty"` //今日买入总额,期货不适用 TdBuyQty *float64 `protobuf:"fixed64,24,opt,name=td_buyQty,json=tdBuyQty" json:"td_buyQty,omitempty"` //今日买入总量,期货不适用 TdSellVal *float64 `protobuf:"fixed64,25,opt,name=td_sellVal,json=tdSellVal" json:"td_sellVal,omitempty"` //今日卖出总额,期货不适用 TdSellQty *float64 `protobuf:"fixed64,26,opt,name=td_sellQty,json=tdSellQty" json:"td_sellQty,omitempty"` //今日卖出总量,期货不适用 UnrealizedPL *float64 `protobuf:"fixed64,28,opt,name=unrealizedPL" json:"unrealizedPL,omitempty"` //未实现盈亏,期货适用 RealizedPL *float64 `protobuf:"fixed64,29,opt,name=realizedPL" json:"realizedPL,omitempty"` //已实现盈亏,期货适用 // contains filtered or unexported fields }
账户持仓结构
func (*Position) Descriptor
deprecated
func (*Position) GetCanSellQty ¶
func (*Position) GetCostPrice ¶
func (*Position) GetPlRatio ¶
func (*Position) GetPositionID ¶
func (*Position) GetPositionSide ¶
func (*Position) GetRealizedPL ¶
func (*Position) GetSecMarket ¶
func (*Position) GetTdBuyQty ¶
func (*Position) GetTdBuyVal ¶
func (*Position) GetTdPlVal ¶
func (*Position) GetTdSellQty ¶
func (*Position) GetTdSellVal ¶
func (*Position) GetTdTrdVal ¶
func (*Position) GetUnrealizedPL ¶
func (*Position) ProtoMessage ¶
func (*Position) ProtoMessage()
func (*Position) ProtoReflect ¶
func (x *Position) ProtoReflect() protoreflect.Message
type PositionSide ¶
type PositionSide int32
持仓方向类型
const ( PositionSide_PositionSide_Long PositionSide = 0 //多仓,默认情况是多仓 PositionSide_PositionSide_Unknown PositionSide = -1 //未知方向 PositionSide_PositionSide_Short PositionSide = 1 //空仓 )
func (PositionSide) Descriptor ¶
func (PositionSide) Descriptor() protoreflect.EnumDescriptor
func (PositionSide) Enum ¶
func (x PositionSide) Enum() *PositionSide
func (PositionSide) EnumDescriptor
deprecated
func (PositionSide) EnumDescriptor() ([]byte, []int)
Deprecated: Use PositionSide.Descriptor instead.
func (PositionSide) Number ¶
func (x PositionSide) Number() protoreflect.EnumNumber
func (PositionSide) String ¶
func (x PositionSide) String() string
func (PositionSide) Type ¶
func (PositionSide) Type() protoreflect.EnumType
func (*PositionSide) UnmarshalJSON
deprecated
func (x *PositionSide) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type SecurityFirm ¶
type SecurityFirm int32
券商
const ( SecurityFirm_SecurityFirm_Unknown SecurityFirm = 0 //未知 SecurityFirm_SecurityFirm_FutuSecurities SecurityFirm = 1 //富途证券 SecurityFirm_SecurityFirm_FutuInc SecurityFirm = 2 //富途Inc )
func (SecurityFirm) Descriptor ¶
func (SecurityFirm) Descriptor() protoreflect.EnumDescriptor
func (SecurityFirm) Enum ¶
func (x SecurityFirm) Enum() *SecurityFirm
func (SecurityFirm) EnumDescriptor
deprecated
func (SecurityFirm) EnumDescriptor() ([]byte, []int)
Deprecated: Use SecurityFirm.Descriptor instead.
func (SecurityFirm) Number ¶
func (x SecurityFirm) Number() protoreflect.EnumNumber
func (SecurityFirm) String ¶
func (x SecurityFirm) String() string
func (SecurityFirm) Type ¶
func (SecurityFirm) Type() protoreflect.EnumType
func (*SecurityFirm) UnmarshalJSON
deprecated
func (x *SecurityFirm) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type SimAccType ¶
type SimAccType int32
模拟交易账户类型
const ( SimAccType_SimAccType_Unknown SimAccType = 0 //未知 SimAccType_SimAccType_Stock SimAccType = 1 //股票模拟账户(仅用于交易证券类产品,不支持交易期权) SimAccType_SimAccType_Option SimAccType = 2 //期权模拟账户(仅用于交易期权,不支持交易股票证券类产品) )
func (SimAccType) Descriptor ¶
func (SimAccType) Descriptor() protoreflect.EnumDescriptor
func (SimAccType) Enum ¶
func (x SimAccType) Enum() *SimAccType
func (SimAccType) EnumDescriptor
deprecated
func (SimAccType) EnumDescriptor() ([]byte, []int)
Deprecated: Use SimAccType.Descriptor instead.
func (SimAccType) Number ¶
func (x SimAccType) Number() protoreflect.EnumNumber
func (SimAccType) String ¶
func (x SimAccType) String() string
func (SimAccType) Type ¶
func (SimAccType) Type() protoreflect.EnumType
func (*SimAccType) UnmarshalJSON
deprecated
func (x *SimAccType) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type TimeInForce ¶
type TimeInForce int32
订单有效期
const ( TimeInForce_TimeInForce_DAY TimeInForce = 0 // 当日有效 TimeInForce_TimeInForce_GTC TimeInForce = 1 // 撤单前有效,最多持续90自然日。 )
func (TimeInForce) Descriptor ¶
func (TimeInForce) Descriptor() protoreflect.EnumDescriptor
func (TimeInForce) Enum ¶
func (x TimeInForce) Enum() *TimeInForce
func (TimeInForce) EnumDescriptor
deprecated
func (TimeInForce) EnumDescriptor() ([]byte, []int)
Deprecated: Use TimeInForce.Descriptor instead.
func (TimeInForce) Number ¶
func (x TimeInForce) Number() protoreflect.EnumNumber
func (TimeInForce) String ¶
func (x TimeInForce) String() string
func (TimeInForce) Type ¶
func (TimeInForce) Type() protoreflect.EnumType
func (*TimeInForce) UnmarshalJSON
deprecated
func (x *TimeInForce) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type TrdAcc ¶
type TrdAcc struct { TrdEnv *int32 `protobuf:"varint,1,req,name=trdEnv" json:"trdEnv,omitempty"` //交易环境,参见TrdEnv的枚举定义 AccID *uint64 `protobuf:"varint,2,req,name=accID" json:"accID,omitempty"` //业务账号 TrdMarketAuthList []int32 `protobuf:"varint,3,rep,name=trdMarketAuthList" json:"trdMarketAuthList,omitempty"` //业务账户支持的交易市场权限,即此账户能交易那些市场, 可拥有多个交易市场权限,目前仅单个,取值参见TrdMarket的枚举定义 AccType *int32 `protobuf:"varint,4,opt,name=accType" json:"accType,omitempty"` //账户类型,取值见TrdAccType CardNum *string `protobuf:"bytes,5,opt,name=cardNum" json:"cardNum,omitempty"` //卡号 SecurityFirm *int32 `protobuf:"varint,6,opt,name=securityFirm" json:"securityFirm,omitempty"` //所属券商,取值见SecurityFirm SimAccType *int32 `protobuf:"varint,7,opt,name=simAccType" json:"simAccType,omitempty"` //模拟交易账号类型,取值见SimAccType // contains filtered or unexported fields }
交易业务账户结构
func (*TrdAcc) Descriptor
deprecated
func (*TrdAcc) GetAccType ¶
func (*TrdAcc) GetCardNum ¶
func (*TrdAcc) GetSecurityFirm ¶
func (*TrdAcc) GetSimAccType ¶
func (*TrdAcc) GetTrdMarketAuthList ¶
func (*TrdAcc) ProtoMessage ¶
func (*TrdAcc) ProtoMessage()
func (*TrdAcc) ProtoReflect ¶
func (x *TrdAcc) ProtoReflect() protoreflect.Message
type TrdAccType ¶
type TrdAccType int32
交易账户类型
const ( TrdAccType_TrdAccType_Unknown TrdAccType = 0 //未知类型 TrdAccType_TrdAccType_Cash TrdAccType = 1 //现金账户 TrdAccType_TrdAccType_Margin TrdAccType = 2 //保证金账户 )
func (TrdAccType) Descriptor ¶
func (TrdAccType) Descriptor() protoreflect.EnumDescriptor
func (TrdAccType) Enum ¶
func (x TrdAccType) Enum() *TrdAccType
func (TrdAccType) EnumDescriptor
deprecated
func (TrdAccType) EnumDescriptor() ([]byte, []int)
Deprecated: Use TrdAccType.Descriptor instead.
func (TrdAccType) Number ¶
func (x TrdAccType) Number() protoreflect.EnumNumber
func (TrdAccType) String ¶
func (x TrdAccType) String() string
func (TrdAccType) Type ¶
func (TrdAccType) Type() protoreflect.EnumType
func (*TrdAccType) UnmarshalJSON
deprecated
func (x *TrdAccType) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type TrdEnv ¶
type TrdEnv int32
交易环境
func (TrdEnv) Descriptor ¶
func (TrdEnv) Descriptor() protoreflect.EnumDescriptor
func (TrdEnv) EnumDescriptor
deprecated
func (TrdEnv) Number ¶
func (x TrdEnv) Number() protoreflect.EnumNumber
func (TrdEnv) Type ¶
func (TrdEnv) Type() protoreflect.EnumType
func (*TrdEnv) UnmarshalJSON
deprecated
type TrdFilterConditions ¶
type TrdFilterConditions struct { CodeList []string `protobuf:"bytes,1,rep,name=codeList" json:"codeList,omitempty"` //代码过滤,只返回包含这些代码的数据,没传不过滤 IdList []uint64 `protobuf:"varint,2,rep,name=idList" json:"idList,omitempty"` //ID主键过滤,只返回包含这些ID的数据,没传不过滤,订单是orderID、成交是fillID、持仓是positionID BeginTime *string `protobuf:"bytes,3,opt,name=beginTime" json:"beginTime,omitempty"` //开始时间,严格按YYYY-MM-DD HH:MM:SS或YYYY-MM-DD HH:MM:SS.MS格式传,对持仓无效,拉历史数据必须填 EndTime *string `protobuf:"bytes,4,opt,name=endTime" json:"endTime,omitempty"` //结束时间,严格按YYYY-MM-DD HH:MM:SS或YYYY-MM-DD HH:MM:SS.MS格式传,对持仓无效,拉历史数据必须填 // contains filtered or unexported fields }
过滤条件,条件组合是"与"不是"或",用于获取订单、成交、持仓等时二次过滤
func (*TrdFilterConditions) Descriptor
deprecated
func (*TrdFilterConditions) Descriptor() ([]byte, []int)
Deprecated: Use TrdFilterConditions.ProtoReflect.Descriptor instead.
func (*TrdFilterConditions) GetBeginTime ¶
func (x *TrdFilterConditions) GetBeginTime() string
func (*TrdFilterConditions) GetCodeList ¶
func (x *TrdFilterConditions) GetCodeList() []string
func (*TrdFilterConditions) GetEndTime ¶
func (x *TrdFilterConditions) GetEndTime() string
func (*TrdFilterConditions) GetIdList ¶
func (x *TrdFilterConditions) GetIdList() []uint64
func (*TrdFilterConditions) ProtoMessage ¶
func (*TrdFilterConditions) ProtoMessage()
func (*TrdFilterConditions) ProtoReflect ¶
func (x *TrdFilterConditions) ProtoReflect() protoreflect.Message
func (*TrdFilterConditions) Reset ¶
func (x *TrdFilterConditions) Reset()
func (*TrdFilterConditions) String ¶
func (x *TrdFilterConditions) String() string
type TrdHeader ¶
type TrdHeader struct { TrdEnv *int32 `protobuf:"varint,1,req,name=trdEnv" json:"trdEnv,omitempty"` //交易环境, 参见TrdEnv的枚举定义 AccID *uint64 `protobuf:"varint,2,req,name=accID" json:"accID,omitempty"` //业务账号, 业务账号与交易环境、市场权限需要匹配,否则会返回错误 TrdMarket *int32 `protobuf:"varint,3,req,name=trdMarket" json:"trdMarket,omitempty"` //交易市场, 参见TrdMarket的枚举定义 // contains filtered or unexported fields }
交易协议公共参数头
func (*TrdHeader) Descriptor
deprecated
func (*TrdHeader) GetTrdMarket ¶
func (*TrdHeader) ProtoMessage ¶
func (*TrdHeader) ProtoMessage()
func (*TrdHeader) ProtoReflect ¶
func (x *TrdHeader) ProtoReflect() protoreflect.Message
type TrdMarket ¶
type TrdMarket int32
交易市场,是大的市场,不是具体品种
func (TrdMarket) Descriptor ¶
func (TrdMarket) Descriptor() protoreflect.EnumDescriptor
func (TrdMarket) EnumDescriptor
deprecated
func (TrdMarket) Number ¶
func (x TrdMarket) Number() protoreflect.EnumNumber
func (TrdMarket) Type ¶
func (TrdMarket) Type() protoreflect.EnumType
func (*TrdMarket) UnmarshalJSON
deprecated
type TrdSecMarket ¶
type TrdSecMarket int32
可交易证券所属市场,目前主要是区分A股的沪市和深市,香港和美国暂不需要细分
const ( TrdSecMarket_TrdSecMarket_Unknown TrdSecMarket = 0 //未知市场 TrdSecMarket_TrdSecMarket_HK TrdSecMarket = 1 //香港市场(股票、窝轮、牛熊、期权、期货等) TrdSecMarket_TrdSecMarket_US TrdSecMarket = 2 //美国市场(股票、期权、期货等) TrdSecMarket_TrdSecMarket_CN_SH TrdSecMarket = 31 //沪股市场(股票) TrdSecMarket_TrdSecMarket_CN_SZ TrdSecMarket = 32 //深股市场(股票) TrdSecMarket_TrdSecMarket_SG TrdSecMarket = 41 //新加坡市场(期货) TrdSecMarket_TrdSecMarket_JP TrdSecMarket = 51 //日本市场(期货) )
func (TrdSecMarket) Descriptor ¶
func (TrdSecMarket) Descriptor() protoreflect.EnumDescriptor
func (TrdSecMarket) Enum ¶
func (x TrdSecMarket) Enum() *TrdSecMarket
func (TrdSecMarket) EnumDescriptor
deprecated
func (TrdSecMarket) EnumDescriptor() ([]byte, []int)
Deprecated: Use TrdSecMarket.Descriptor instead.
func (TrdSecMarket) Number ¶
func (x TrdSecMarket) Number() protoreflect.EnumNumber
func (TrdSecMarket) String ¶
func (x TrdSecMarket) String() string
func (TrdSecMarket) Type ¶
func (TrdSecMarket) Type() protoreflect.EnumType
func (*TrdSecMarket) UnmarshalJSON
deprecated
func (x *TrdSecMarket) UnmarshalJSON(b []byte) error
Deprecated: Do not use.
type TrdSide ¶
type TrdSide int32
交易方向
func (TrdSide) Descriptor ¶
func (TrdSide) Descriptor() protoreflect.EnumDescriptor
func (TrdSide) EnumDescriptor
deprecated
func (TrdSide) Number ¶
func (x TrdSide) Number() protoreflect.EnumNumber
func (TrdSide) Type ¶
func (TrdSide) Type() protoreflect.EnumType