Documentation
¶
Index ¶
- Constants
- Variables
- type APILevel
- type APIQuota
- type AccCashInfo
- type AccumulateData
- type AccumulateFilter
- type BaseData
- type BaseFilter
- type BasicIPOData
- type BasicQot
- type Broker
- type BrokerQueue
- type CNIPOExData
- type CapitalDistribution
- type CapitalFlow
- type CapitalFlowItem
- type ConnSubInfo
- type ConnectStatus
- type DataFilter
- type EquitySnapshotExData
- type FilterDouble
- type FilterInt32
- type FilterString
- type FilterUInt64
- type FinancialData
- type FinancialFilter
- type Funds
- type FutuAPI
- func (api *FutuAPI) Close(ctx context.Context) error
- func (api *FutuAPI) ConnID() uint64
- func (api *FutuAPI) Connect(ctx context.Context, address string) error
- func (api *FutuAPI) GetAccList(ctx context.Context) ([]*TrdAcc, error)
- func (api *FutuAPI) GetBrokerQueue(ctx context.Context, security *Security) (*BrokerQueue, error)
- func (api *FutuAPI) GetCapitalDistribution(ctx context.Context, security *Security) (*CapitalDistribution, error)
- func (api *FutuAPI) GetCapitalFlow(ctx context.Context, security *Security) (*CapitalFlow, error)
- func (api *FutuAPI) GetCurKL(ctx context.Context, security *Security, num int32, ...) (*RTKLine, error)
- func (api *FutuAPI) GetDealList(ctx context.Context, header *TrdHeader, filter *TrdFilterConditions, ...) ([]*OrderFill, error)
- func (api *FutuAPI) GetFunds(ctx context.Context, header *TrdHeader, refresh bool, ...) (*Funds, error)
- func (api *FutuAPI) GetFutureInfo(ctx context.Context, securities []*Security) ([]*FutureInfo, error)
- func (api *FutuAPI) GetGlobalState(ctx context.Context) (*GlobalState, error)
- func (api *FutuAPI) GetHistoryDeal(ctx context.Context, header *TrdHeader, filter *TrdFilterConditions) ([]*OrderFill, error)
- func (api *FutuAPI) GetHistoryKLQuota(ctx context.Context, detail bool) (*HistoryKLQuota, error)
- func (api *FutuAPI) GetHistoryOrderList(ctx context.Context, header *TrdHeader, filter *TrdFilterConditions, ...) ([]*Order, error)
- func (api *FutuAPI) GetIPOList(ctx context.Context, market qotcommon.QotMarket) ([]*IPOData, error)
- func (api *FutuAPI) GetMarginRatio(ctx context.Context, header *TrdHeader, securities []*Security) ([]*MarginRatio, error)
- func (api *FutuAPI) GetMarketSnapshot(ctx context.Context, securities []*Security) ([]*Snapshot, error)
- func (api *FutuAPI) GetMarketState(ctx context.Context, securities []*Security) ([]*MarketInfo, error)
- func (api *FutuAPI) GetMaxTrdQtys(ctx context.Context, header *TrdHeader, orderType trdcommon.OrderType, ...) (*MaxTrdQtys, error)
- func (api *FutuAPI) GetOptionChain(ctx context.Context, owner *Security, begin string, end string, ...) ([]*OptionChain, error)
- func (api *FutuAPI) GetOrderBook(ctx context.Context, security *Security, num int32) (*RTOrderBook, error)
- func (api *FutuAPI) GetOrderList(ctx context.Context, header *TrdHeader, filter *TrdFilterConditions, ...) ([]*Order, error)
- func (api *FutuAPI) GetOwnerPlate(ctx context.Context, securities []*Security) ([]*OwnerPlate, error)
- func (api *FutuAPI) GetPlateList(ctx context.Context, market qotcommon.QotMarket, ...) ([]*PlateInfo, error)
- func (api *FutuAPI) GetPlateStock(ctx context.Context, plate *Security, sortField qotcommon.SortField, ...) ([]*SecurityStaticInfo, error)
- func (api *FutuAPI) GetPositionList(ctx context.Context, header *TrdHeader, filter *TrdFilterConditions, ...) ([]*Position, error)
- func (api *FutuAPI) GetPriceReminder(ctx context.Context, security *Security, market qotcommon.QotMarket) ([]*PriceReminder, error)
- func (api *FutuAPI) GetRTData(ctx context.Context, security *Security) (*RTData, error)
- func (api *FutuAPI) GetRTTicker(ctx context.Context, security *Security, num int32) (*RTTicker, error)
- func (api *FutuAPI) GetReferenceStockList(ctx context.Context, security *Security, refType qotgetreference.ReferenceType) ([]*SecurityStaticInfo, error)
- func (api *FutuAPI) GetRehab(ctx context.Context, security *Security) ([]*Rehab, error)
- func (api *FutuAPI) GetStockBasicInfo(ctx context.Context, markte qotcommon.QotMarket, ...) ([]*SecurityStaticInfo, error)
- func (api *FutuAPI) GetStockFilter(ctx context.Context, market qotcommon.QotMarket, begin int32, num int32, ...) (*StockFilterResult, error)
- func (api *FutuAPI) GetStockQuote(ctx context.Context, securities []*Security) ([]*BasicQot, error)
- func (api *FutuAPI) GetUserSecurity(ctx context.Context, group string) ([]*SecurityStaticInfo, error)
- func (api *FutuAPI) GetUserSecurityGroup(ctx context.Context, groupType qotgetusersecuritygroup.GroupType) ([]*GroupData, error)
- func (api *FutuAPI) GetWarrant(ctx context.Context, begin int32, num int32, sortField qotcommon.SortField, ...) (*Warrant, error)
- func (api *FutuAPI) ModifyOrder(ctx context.Context, header *TrdHeader, all bool, op trdcommon.ModifyOrderOp, ...) (uint64, error)
- func (api *FutuAPI) ModifyUserSecurity(ctx context.Context, name string, ...) error
- func (api *FutuAPI) PlaceOrder(ctx context.Context, header *TrdHeader, trdSide trdcommon.TrdSide, ...) (uint64, error)
- func (api *FutuAPI) QuerySubscription(ctx context.Context, isAll bool) (*Subscription, error)
- func (api *FutuAPI) RequestHistoryKLine(ctx context.Context, security *Security, begin string, end string, ...) (*HistoryKLine, error)
- func (api *FutuAPI) RequestTradingDays(ctx context.Context, market qotcommon.TradeDateMarket, begin string, ...) ([]*TradeDate, error)
- func (api *FutuAPI) SetClientInfo(id string, ver int32)
- func (api *FutuAPI) SetEncAlgo(algo common.PacketEncAlgo)
- func (api *FutuAPI) SetPriceReminder(ctx context.Context, security *Security, ...) (int64, error)
- func (api *FutuAPI) SetProtoFmt(fmt common.ProtoFmt)
- func (api *FutuAPI) SetRecvNotify(recv bool)
- func (api *FutuAPI) Subscribe(ctx context.Context, securities []*Security, subTypes []qotcommon.SubType, ...) error
- func (api *FutuAPI) SubscribeTrd(ctx context.Context, accID []uint64) error
- func (api *FutuAPI) SysNotify(ctx context.Context) (<-chan *SysNotifyResp, error)
- func (api *FutuAPI) UnlockTrade(ctx context.Context, unlock bool, pwd string, firm trdcommon.SecurityFirm) error
- func (api *FutuAPI) Unsubscribe(ctx context.Context, securities []*Security, subTypes []qotcommon.SubType) error
- func (api *FutuAPI) UnsubscribeAll(ctx context.Context) error
- func (api *FutuAPI) UpdateBasicQot(ctx context.Context) (<-chan *UpdateBasicQotResp, error)
- func (api *FutuAPI) UpdateBroker(ctx context.Context) (<-chan *UpdateBrokerResp, error)
- func (api *FutuAPI) UpdateDeal(ctx context.Context) (<-chan *UpdateDealResp, error)
- func (api *FutuAPI) UpdateKL(ctx context.Context) (<-chan *UpdateKLResp, error)
- func (api *FutuAPI) UpdateOrder(ctx context.Context) (<-chan *UpdateOrderResp, error)
- func (api *FutuAPI) UpdateOrderBook(ctx context.Context) (<-chan *UpdateOrderBookResp, error)
- func (api *FutuAPI) UpdatePriceReminder(ctx context.Context) (<-chan *UpdatePriceReminderResp, error)
- func (api *FutuAPI) UpdateRT(ctx context.Context) (<-chan *UpdateRTResp, error)
- func (api *FutuAPI) UpdateTicker(ctx context.Context) (<-chan *UpdateTickerResp, error)
- func (api *FutuAPI) UserID() uint64
- type FutureBasicQotExData
- type FutureInfo
- type FutureSnapshotExData
- type FutureStaticExData
- type GlobalState
- type GroupData
- type GtwEvent
- type HKIPOExData
- type HistoryKLQuota
- type HistoryKLQuotaItem
- type HistoryKLine
- type IPOData
- type IndexSnapshotExData
- type KLine
- type MarginRatio
- type MarketInfo
- type MaxTrdQtys
- type Notification
- type NotifyProgramStatus
- type OptionBasicQotExData
- type OptionChain
- type OptionItem
- type OptionSnapshotExData
- type OptionStaticExData
- type Order
- type OrderBook
- type OrderBookDetail
- type OrderFill
- type OwnerPlate
- type PacketID
- type PlateInfo
- type PlateSnapshotExData
- type Position
- type PreAfterMarketData
- type PriceReminder
- type PriceReminderItem
- type ProgramStatus
- type QotRight
- type RTData
- type RTKLine
- type RTOrderBook
- type RTPriceReminder
- type RTTicker
- type Rehab
- type Security
- type SecurityStaticBasic
- type SecurityStaticInfo
- type Snapshot
- type SnapshotBasicData
- type StockData
- type StockFilter
- type StockFilterResult
- type SubInfo
- type Subscription
- type SysNotifyResp
- type Ticker
- type TimeShare
- type TradeDate
- type TradeTime
- type TrdAcc
- type TrdFilterConditions
- type TrdHeader
- type TrustSnapshotExData
- type USIPOExData
- type UpdateBasicQotResp
- type UpdateBrokerResp
- type UpdateDealResp
- type UpdateKLResp
- type UpdateOrderBookResp
- type UpdateOrderResp
- type UpdatePriceReminderResp
- type UpdateRTResp
- type UpdateTickerResp
- type Warrant
- type WarrantData
- type WarrantFilter
- type WarrantSnapshotExData
- type WarrantStaticExData
- type WinningNumData
Constants ¶
const ( ProtoIDInitConnect = 1001 //InitConnect 初始化连接 ProtoIDGetGlobalState = 1002 //GetGlobalState 获取全局状态 ProtoIDNotify = 1003 //Notify 系统通知推送 ProtoIDKeepAlive = 1004 //KeepAlive 保活心跳 )
const (
ProtoIDQotGetBasicQot = 3004 //Qot_GetBasicQot 获取股票基本报价
)
const (
ProtoIDQotGetBroker = 3014 //Qot_GetBroker 获取经纪队列
)
const (
ProtoIDQotGetCapitalDistribution = 3212 //Qot_GetCapitalDistribution
)
const (
ProtoIDQotGetCapitalFlow = 3211 //Qot_GetCapitalFlow 获取资金流向
)
const (
ProtoIDQotGetFutureInfo = 3218 //Qot_GetFutureInfo 获取期货合约资料
)
const (
ProtoIDQotGetIpoList = 3217 //Qot_GetIpoList 获取新股
)
const (
ProtoIDQotGetKL = 3006 //Qot_GetKL 获取 K 线
)
const (
ProtoIDQotGetMarketState = 3223 //Qot_GetMarketState 获取指定品种的市场状态
)
const (
ProtoIDQotGetOptionChain = 3209 //Qot_GetOptionChain 获取期权链
)
const (
ProtoIDQotGetOrderBook = 3012 //Qot_GetOrderBook 获取买卖盘
)
const (
ProtoIDQotGetOwnerPlate = 3207 //Qot_GetOwnerPlate 获取股票所属板块
)
const (
ProtoIDQotGetPlateSecurity = 3205 //Qot_GetPlateSecurity 获取板块下的股票
)
const (
ProtoIDQotGetPlateSet = 3204 //Qot_GetPlateSet 获取板块集合下的板块
)
const (
ProtoIDQotGetPriceReminder = 3221 //Qot_GetPriceReminder 获取到价提醒
)
const (
ProtoIDQotGetRT = 3008 //Qot_GetRT 获取分时
)
const (
ProtoIDQotGetReference = 3206 //Qot_GetReference 获取正股相关股票
)
const (
ProtoIDQotGetSecuritySnapshot = 3203 //Qot_GetSecuritySnapshot 获取股票快照
)
const (
ProtoIDQotGetStaticInfo = 3202 //Qot_GetStaticInfo 获取股票静态信息
)
const (
ProtoIDQotGetSubInfo = 3003 //Qot_GetSubInfo 获取订阅信息
)
const (
ProtoIDQotGetTicker = 3010 //Qot_GetTicker 获取逐笔
)
const (
ProtoIDQotGetUserSecurity = 3213 //Qot_GetUserSecurity 获取自选股分组下的股票
)
const (
ProtoIDQotGetUserSecurityGroup = 3222 //Qot_GetUserSecurityGroup 获取自选股分组列表
)
const (
ProtoIDQotGetWarrant = 3210 //Qot_GetWarrant 获取窝轮
)
const (
ProtoIDQotModifyUserSecurity = 3214 //Qot_ModifyUserSecurity 修改自选股分组下的股票
)
const (
ProtoIDQotRequestHistoryKL = 3103 //Qot_RequestHistoryKL 在线获取单只股票一段历史 K 线
)
const (
ProtoIDQotRequestHistoryKLQuota = 3104 //Qot_RequestHistoryKLQuota 获取历史 K 线额度
)
const (
ProtoIDQotRequestRehab = 3105 //Qot_RequestRehab 在线获取单只股票复权信息
)
const (
ProtoIDQotRequestTradeDate = 3219 //Qot_RequestTradeDate 获取市场交易日,在线拉取不在本地计算
)
const (
ProtoIDQotSetPriceReminder = 3220 //Qot_SetPriceReminder 设置到价提醒
)
const (
ProtoIDQotStockFilter = 3215 //Qot_StockFilter 获取条件选股
)
const (
ProtoIDQotSub = 3001 //Qot_Sub 订阅或者反订阅
)
const (
ProtoIDQotUpdateBasicQot = 3005 //Qot_UpdateBasicQot 推送股票基本报价
)
const (
ProtoIDQotUpdateBroker = 3015 //Qot_UpdateBroker 推送经纪队列
)
const (
ProtoIDQotUpdateKL = 3007 //Qot_UpdateKL 推送 K 线
)
const (
ProtoIDQotUpdateOrderBook = 3013 //Qot_UpdateOrderBook 推送买卖盘
)
const (
ProtoIDQotUpdatePriceReminder = 3019 //Qot_UpdatePriceReminder 到价提醒通知
)
const (
ProtoIDQotUpdateRT = 3009 //Qot_UpdateRT 推送分时
)
const (
ProtoIDQotUpdateTicker = 3011 //Qot_UpdateTicker 推送逐笔
)
const (
ProtoIDTrdGetAccList = 2001 //Trd_GetAccList 获取业务账户列表
)
const (
ProtoIDTrdGetFunds = 2101 //Trd_GetFunds 获取账户资金
)
const (
ProtoIDTrdGetHistoryOrderFillList = 2222 //Trd_GetHistoryOrderFillList 获取历史成交列表
)
const (
ProtoIDTrdGetHistoryOrderList = 2221 //Trd_GetHistoryOrderList 获取历史订单列表
)
const (
ProtoIDTrdGetMarginRatio = 2223 // Trd_GetMarginRatio 获取融资融券数据
)
const (
ProtoIDTrdGetMaxTrdQtys = 2111 //Trd_GetMaxTrdQtys 获取最大交易数量
)
const (
ProtoIDTrdGetOrderFillList = 2211 //Trd_GetOrderFillList 获取成交列表
)
const (
ProtoIDTrdGetOrderList = 2201 //Trd_GetOrderList 获取订单列表
)
const (
ProtoIDTrdGetPositionList = 2102 //Trd_GetPositionList 获取账户持仓
)
const (
ProtoIDTrdModifyOrder = 2205 //Trd_ModifyOrder
)
const (
ProtoIDTrdPlaceOrder = 2202 //Trd_PlaceOrder 下单
)
const (
ProtoIDTrdSubAccPush = 2008 //Trd_SubAccPush 订阅业务账户的交易推送数据
)
const (
ProtoIDTrdUnlockTrade = 2005 //Trd_UnlockTrade 解锁或锁定交易
)
const (
ProtoIDTrdUpdateOrder = 2208 //Trd_UpdateOrder 推送订单状态变动通知
)
const (
ProtoIDTrdUpdateOrderFill = 2218 //Trd_UpdateOrderFill 推送成交通知
)
Variables ¶
var ( ErrInterrupted = errors.New("process is interrupted") ErrChannelClosed = errors.New("channel is closed") )
Functions ¶
This section is empty.
Types ¶
type AccCashInfo ¶
type AccumulateData ¶
type AccumulateData struct {
FieldName qotstockfilter.AccumulateField // AccumulateField 累积属性
Value float64
Days int32 // 近几日,累积时间
}
累积属性数据
type AccumulateFilter ¶
type AccumulateFilter struct {
FieldName qotstockfilter.AccumulateField // AccumulateField 累积属性
FilterMin *FilterDouble // 区间下限(闭区间),不传代表下限为 -∞
FilterMax *FilterDouble // 区间上限(闭区间),不传代表上限为 +∞
IsNoFilter bool // 该字段是否不需要筛选,True:不筛选,False:筛选。不传默认不筛选
SortDir qotstockfilter.SortDir // SortDir 排序方向,默认不排序。
Days int32 // 近几日,累积时间
}
累积属性筛选
type BaseData ¶
type BaseData struct {
FieldName qotstockfilter.StockField // StockField 简单属性
Value float64
}
简单属性数据
type BaseFilter ¶
type BaseFilter struct {
FieldName qotstockfilter.StockField // StockField 简单属性
FilterMin *FilterDouble // 区间下限(闭区间),不传代表下限为 -∞
FilterMax *FilterDouble // 区间上限(闭区间),不传代表上限为 +∞
IsNoFilter bool // 该字段是否不需要筛选,True:不筛选,False:筛选。不传默认不筛选
SortDir qotstockfilter.SortDir // SortDir 排序方向,默认不排序。
}
简单属性筛选
type BasicIPOData ¶
type BasicIPOData struct {
Security *Security // Qot_Common::QotMarket 股票市场,支持沪股和深股,且沪股和深股不做区分都代表 A 股市场。
Name string // 股票名称
ListTime string // 上市日期字符串
ListTimestamp float64 // 上市日期时间戳
}
IPO 基本数据
type BasicQot ¶
type BasicQot struct {
Security *Security //*股票
IsSuspended bool //*是否停牌
ListTime string //*上市日期字符串
PriceSpread float64 //*价差
UpdateTime string //*最新价的更新时间字符串,对其他字段不适用
HighPrice float64 //*最高价
OpenPrice float64 //*开盘价
LowPrice float64 //*最低价
CurPrice float64 //*最新价
LastClosePrice float64 //*昨收价
Volume int64 //*成交量
Turnover float64 //*成交额
TurnoverRate float64 //*换手率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%,如 20 实际对应 20%)
Amplitude float64 //*振幅(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%,如 20 实际对应 20%)
DarkStatus qotcommon.DarkStatus //DarkStatus, 暗盘交易状态
OptionExData *OptionBasicQotExData //期权特有字段
ListTimestamp float64 //上市日期时间戳
UpdateTimestamp float64 //最新价的更新时间戳,对其他字段不适用
PreMarket *PreAfterMarketData //盘前数据
AfterMarket *PreAfterMarketData //盘后数据
SecStatus qotcommon.SecurityStatus //SecurityStatus, 股票状态
FutureExData *FutureBasicQotExData //期货特有字段
}
基础报价
type Broker ¶
type Broker struct {
ID int64 //*经纪 ID
Name string //*经纪名称
Pos int32 //*经纪档位
//以下为 SF 行情特有字段
OrderID int64 //交易所订单 ID,与交易接口返回的订单 ID 并不一样
Volume int64 //订单股数
}
买卖经纪
type BrokerQueue ¶
type BrokerQueue struct {
Security *Security //*股票
Asks []*Broker //经纪 Ask(卖)盘
Bids []*Broker //经纪 Bid(买)盘
}
实时经纪队列
type CNIPOExData ¶
type CNIPOExData struct {
ApplyCode string // 申购代码
IssueSize int64 // 发行总数
OnlineIssueSize int64 // 网上发行量
ApplyUpperLimit int64 // 申购上限
ApplyLimitMarketValue int64 // 顶格申购需配市值
IsEstimateIPOPrice bool // 是否预估发行价
IPOPrice float64 // 发行价 预估值会因为募集资金、发行数量、发行费用等数据变动而变动,仅供参考。实际数据公布后会第一时间更新。
IndustryPERate float64 // 行业市盈率
IsEstimateWinningRatio bool // 是否预估中签率
WinningRatio float64 // 中签率 该字段为百分比字段,默认不展示 %,如 20 实际对应 20%。预估值会因为募集资金、发行数量、发行费用等数据变动而变动,仅供参考。实际数据公布后会第一时间更新。
IssuePERate float64 // 发行市盈率
ApplyTime string // 申购日期字符串
ApplyTimestamp float64 // 申购日期时间戳
WinningTime string // 公布中签日期字符串
WinningTimestamp float64 // 公布中签日期时间戳
IsHasWon bool // 是否已经公布中签号
WinningNumData []*WinningNumData // Qot_GetIpoList::WinningNumData 中签号数据,对应 PC 中"公布中签日期的已公布"
}
type CapitalDistribution ¶
type CapitalDistribution struct {
InBig float64 //流入资金额度,大单
InMid float64 //流入资金额度,中单
InSmall float64 //流入资金额度,小单
OutBig float64 //流出资金额度,大单
OutMid float64 //流出资金额度,中单
OutSmall float64 //流出资金额度,小单
UpdateTime string //更新时间字符串
UpdateTimestamp float64 //更新时间戳
}
根据历史成交数据将逐笔成交记录划分成大单,中单,小单。以正股前一个月(或窝轮前三天)的平均每笔成交额为参考值,小于该平均值为小单,大于等于该金额的10倍为大单,其余为中单。
type CapitalFlow ¶
type CapitalFlow struct {
FlowItems []*CapitalFlowItem //资金流向
LastValidTIme string //数据最后有效时间字符串
LastValidTimestamp float64 //数据最后有效时间戳
}
type CapitalFlowItem ¶
type ConnSubInfo ¶
type ConnSubInfo struct {
SubInfos []*SubInfo //该连接订阅信息
UsedQuota int32 //*该连接已经使用的订阅额度
IsOwnData bool //*用于区分是否是自己连接的数据
}
单条连接订阅信息
type ConnectStatus ¶
type DataFilter ¶
type DataFilter struct {
ImpliedVolatilityMin *FilterDouble //隐含波动率过滤
ImpliedVolatilityMax *FilterDouble
DeltaMin *FilterDouble
DeltaMax *FilterDouble
GammaMin *FilterDouble
GammaMax *FilterDouble
VegaMin *FilterDouble
VegaMax *FilterDouble
ThetaMin *FilterDouble
ThetaMax *FilterDouble
RhoMin *FilterDouble
RhoMax *FilterDouble
NetOpenInterestMin *FilterDouble //净未平仓合约数过滤
NetOpenInterestMax *FilterDouble
OpenInterestMin *FilterDouble //未平仓合约数过滤
OpenInterestMax *FilterDouble
VolMin *FilterDouble //成交量过滤
VolMax *FilterDouble
}
type EquitySnapshotExData ¶
type EquitySnapshotExData struct {
IssueMarketVal float64 // *总市值 =总股本*当前价格
NetAsset float64 // *资产净值
NetProfit float64 // *盈利(亏损)
OutstandingMarketVal float64 // *流通市值 =流通股本*当前价格
EYRate float64 // *收益率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
PERate float64 // *市盈率
PBRate float64 // *市净率
PETTMRate float64 // *市盈率 TTM
DividendTTM float64 // 股息 TTM,派息
DividendRatioTTM float64 // 股息率 TTM(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
DividendLFY float64 // 股息 LFY,上一年度派息
DividendLFYRatio float64 // 股息率 LFY(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
}
type FilterDouble ¶
type FilterDouble struct {
Value float64
}
type FilterInt32 ¶
type FilterInt32 struct {
Value int32
}
type FilterString ¶
type FilterString struct {
Value string
}
type FilterUInt64 ¶
type FilterUInt64 struct {
Value uint64
}
type FinancialData ¶
type FinancialData struct {
FieldName qotstockfilter.FinancialField // FinancialField 财务属性
Value float64
Quarter qotstockfilter.FinancialQuarter // FinancialQuarter 财报累积时间
}
财务属性数据
type FinancialFilter ¶
type FinancialFilter struct {
FiledName qotstockfilter.FinancialField // FinancialField 财务属性
FilterMin *FilterDouble // 区间下限(闭区间),不传代表下限为 -∞
FilterMax *FilterDouble // 区间上限(闭区间),不传代表上限为 +∞
IsNoFilter bool // 该字段是否不需要筛选,True:不筛选,False:筛选。不传默认不筛选
SortDir qotstockfilter.SortDir // SortDir 排序方向,默认不排序。
Quarter qotstockfilter.FinancialQuarter // FinancialQuarter 财报累积时间
}
财务属性筛选
type Funds ¶
type Funds struct {
Power float64 //最大购买力(做多)
TotalAssets float64 //资产净值
Cash float64 //现金
MarketVal float64 //证券市值, 仅证券账户适用
FrozenCash float64 //冻结资金
DebtCash float64 //计息金额
AvlWithdrawalCash float64 //现金可提,仅证券账户适用
Currency trdcommon.Currency //币种,本结构体资金相关的货币类型,取值参见 Currency,期货适用
AvailableFunds float64 //可用资金,期货适用
UnrealizedPL float64 //未实现盈亏,期货适用
RealizedPL float64 //已实现盈亏,期货适用
RiskLevel trdcommon.CltRiskLevel //风控状态,参见 CltRiskLevel, 期货适用
InitialMargin float64 //初始保证金
MaintenanceMargin float64 //维持保证金
CashInfoList []*AccCashInfo //分币种的现金信息,期货适用
MaxPowerShort float64 //卖空购买力
NetCashPower float64 //现金购买力
LongMV float64 //多头市值
ShortMV float64 //空头市值
PendingAsset float64 //在途资产
MaxWithdrawal float64 //融资可提,仅证券账户适用
RiskStatus trdcommon.CltRiskStatus //风险状态,参见 [CltRiskStatus],证券账户适用,共分 9 个等级,LEVEL1是最安全,LEVEL9是最危险
MarginCallMargin float64 // Margin Call 保证金
}
账户资金
type FutuAPI ¶
type FutuAPI struct {
// contains filtered or unexported fields
}
FutuAPI 是富途开放API的主要操作对象。
func (*FutuAPI) GetAccList ¶
获取交易业务账户列表
func (*FutuAPI) GetBrokerQueue ¶
获取实时经纪队列
func (*FutuAPI) GetCapitalDistribution ¶
func (api *FutuAPI) GetCapitalDistribution(ctx context.Context, security *Security) (*CapitalDistribution, error)
获取资金分布
func (*FutuAPI) GetCapitalFlow ¶
获取资金流向
func (*FutuAPI) GetCurKL ¶
func (api *FutuAPI) GetCurKL(ctx context.Context, security *Security, num int32, rehabType qotcommon.RehabType, klType qotcommon.KLType) (*RTKLine, error)
获取实时 K 线
func (*FutuAPI) GetDealList ¶
func (api *FutuAPI) GetDealList(ctx context.Context, header *TrdHeader, filter *TrdFilterConditions, refresh bool) ([]*OrderFill, error)
查询当日成交
func (*FutuAPI) GetFunds ¶
func (api *FutuAPI) GetFunds(ctx context.Context, header *TrdHeader, refresh bool, currency trdcommon.Currency) (*Funds, error)
查询账户资金
func (*FutuAPI) GetFutureInfo ¶
func (api *FutuAPI) GetFutureInfo(ctx context.Context, securities []*Security) ([]*FutureInfo, error)
获取期货合约资料
func (*FutuAPI) GetGlobalState ¶
func (api *FutuAPI) GetGlobalState(ctx context.Context) (*GlobalState, error)
获取全局状态
func (*FutuAPI) GetHistoryDeal ¶
func (api *FutuAPI) GetHistoryDeal(ctx context.Context, header *TrdHeader, filter *TrdFilterConditions) ([]*OrderFill, error)
查询历史成交
func (*FutuAPI) GetHistoryKLQuota ¶
func (*FutuAPI) GetHistoryOrderList ¶
func (api *FutuAPI) GetHistoryOrderList(ctx context.Context, header *TrdHeader, filter *TrdFilterConditions, status []trdcommon.OrderStatus) ([]*Order, error)
查询历史订单
func (*FutuAPI) GetIPOList ¶
获取 IPO 信息
func (*FutuAPI) GetMarginRatio ¶
func (api *FutuAPI) GetMarginRatio(ctx context.Context, header *TrdHeader, securities []*Security) ([]*MarginRatio, error)
获取融资融券数据
func (*FutuAPI) GetMarketSnapshot ¶
func (api *FutuAPI) GetMarketSnapshot(ctx context.Context, securities []*Security) ([]*Snapshot, error)
获取快照
func (*FutuAPI) GetMarketState ¶
func (api *FutuAPI) GetMarketState(ctx context.Context, securities []*Security) ([]*MarketInfo, error)
获取标的市场状态
func (*FutuAPI) GetMaxTrdQtys ¶
func (api *FutuAPI) GetMaxTrdQtys(ctx context.Context, header *TrdHeader, orderType trdcommon.OrderType, code string, price float64, orderID uint64, adjust bool, sideAndLimit float64, secMarket trdcommon.TrdSecMarket) (*MaxTrdQtys, error)
查询最大可买可卖
func (*FutuAPI) GetOptionChain ¶
func (api *FutuAPI) GetOptionChain(ctx context.Context, owner *Security, begin string, end string, indexOptType qotcommon.IndexOptionType, optType qotcommon.OptionType, cond qotgetoptionchain.OptionCondType, filter *DataFilter) ([]*OptionChain, error)
获取期权链
func (*FutuAPI) GetOrderBook ¶
func (api *FutuAPI) GetOrderBook(ctx context.Context, security *Security, num int32) (*RTOrderBook, error)
获取实时摆盘
func (*FutuAPI) GetOrderList ¶
func (api *FutuAPI) GetOrderList(ctx context.Context, header *TrdHeader, filter *TrdFilterConditions, status []trdcommon.OrderStatus, refresh bool) ([]*Order, error)
查询今日订单
func (*FutuAPI) GetOwnerPlate ¶
func (api *FutuAPI) GetOwnerPlate(ctx context.Context, securities []*Security) ([]*OwnerPlate, error)
获取股票所属板块
func (*FutuAPI) GetPlateList ¶
func (api *FutuAPI) GetPlateList(ctx context.Context, market qotcommon.QotMarket, plateClass qotcommon.PlateSetType) ([]*PlateInfo, error)
获取板块列表
func (*FutuAPI) GetPlateStock ¶
func (api *FutuAPI) GetPlateStock(ctx context.Context, plate *Security, sortField qotcommon.SortField, ascend bool) ([]*SecurityStaticInfo, error)
获取板块内股票列表
func (*FutuAPI) GetPositionList ¶
func (api *FutuAPI) GetPositionList(ctx context.Context, header *TrdHeader, filter *TrdFilterConditions, minPLRatio float64, maxPLRation float64, refresh bool) ([]*Position, error)
查询持仓
func (*FutuAPI) GetPriceReminder ¶
func (api *FutuAPI) GetPriceReminder(ctx context.Context, security *Security, market qotcommon.QotMarket) ([]*PriceReminder, error)
获取到价提醒列表
func (*FutuAPI) GetRTTicker ¶
func (*FutuAPI) GetReferenceStockList ¶
func (api *FutuAPI) GetReferenceStockList(ctx context.Context, security *Security, refType qotgetreference.ReferenceType) ([]*SecurityStaticInfo, error)
获取证券关联数据
func (*FutuAPI) GetStockBasicInfo ¶
func (api *FutuAPI) GetStockBasicInfo(ctx context.Context, markte qotcommon.QotMarket, secType qotcommon.SecurityType, securities []*Security) ([]*SecurityStaticInfo, error)
获取静态数据
func (*FutuAPI) GetStockFilter ¶
func (api *FutuAPI) GetStockFilter(ctx context.Context, market qotcommon.QotMarket, begin int32, num int32, filter *StockFilter) (*StockFilterResult, error)
条件选股
func (*FutuAPI) GetStockQuote ¶
获取股票基本行情
func (*FutuAPI) GetUserSecurity ¶
func (api *FutuAPI) GetUserSecurity(ctx context.Context, group string) ([]*SecurityStaticInfo, error)
获取自选股列表
func (*FutuAPI) GetUserSecurityGroup ¶
func (api *FutuAPI) GetUserSecurityGroup(ctx context.Context, groupType qotgetusersecuritygroup.GroupType) ([]*GroupData, error)
获取自选股分组
func (*FutuAPI) GetWarrant ¶
func (api *FutuAPI) GetWarrant(ctx context.Context, begin int32, num int32, sortField qotcommon.SortField, ascend bool, filter *WarrantFilter) (*Warrant, error)
筛选窝轮
func (*FutuAPI) ModifyOrder ¶
func (api *FutuAPI) ModifyOrder(ctx context.Context, header *TrdHeader, all bool, op trdcommon.ModifyOrderOp, orderID uint64, qty float64, price float64, adjustPrice bool, sideAndLimit float64) (uint64, error)
改单撤单
func (*FutuAPI) ModifyUserSecurity ¶
func (api *FutuAPI) ModifyUserSecurity(ctx context.Context, name string, op qotmodifyusersecurity.ModifyUserSecurityOp, securities []*Security) error
修改自选股列表
func (*FutuAPI) PlaceOrder ¶
func (api *FutuAPI) PlaceOrder(ctx context.Context, header *TrdHeader, trdSide trdcommon.TrdSide, orderType trdcommon.OrderType, code string, qty float64, price float64, adjustPrice bool, sideAndLimit float64, secMarket trdcommon.TrdSecMarket, remark string, timeInForce trdcommon.TimeInForce, fillOutsideRTH bool) (uint64, error)
下单
func (*FutuAPI) QuerySubscription ¶
获取订阅信息
func (*FutuAPI) RequestHistoryKLine ¶
func (api *FutuAPI) RequestHistoryKLine(ctx context.Context, security *Security, begin string, end string, klType qotcommon.KLType, rehabType qotcommon.RehabType, maxNum int32, fields qotcommon.KLFields, nextKey []byte, extTime bool) (*HistoryKLine, error)
获取历史 K 线
func (*FutuAPI) RequestTradingDays ¶
func (api *FutuAPI) RequestTradingDays(ctx context.Context, market qotcommon.TradeDateMarket, begin string, end string) ([]*TradeDate, error)
获取交易日
func (*FutuAPI) SetClientInfo ¶
设置调用接口信息, 非必调接口
func (*FutuAPI) SetEncAlgo ¶
func (api *FutuAPI) SetEncAlgo(algo common.PacketEncAlgo)
func (*FutuAPI) SetPriceReminder ¶
func (api *FutuAPI) SetPriceReminder(ctx context.Context, security *Security, op qotsetpricereminder.SetPriceReminderOp, key int64, remindType qotcommon.PriceReminderType, freq qotcommon.PriceReminderFreq, value float64, note string) (int64, error)
设置到价提醒
func (*FutuAPI) SetProtoFmt ¶
设置通讯协议 body 格式, 目前支持 Protobuf|Json 两种格式,默认 ProtoBuf, 非必调接口
func (*FutuAPI) SetRecvNotify ¶
func (*FutuAPI) Subscribe ¶
func (api *FutuAPI) Subscribe(ctx context.Context, securities []*Security, subTypes []qotcommon.SubType, isRegPush bool, isFirstPush bool, isSubOrderBookDetail bool, isExtendedTime bool) error
订阅注册需要的实时信息,指定股票和订阅的数据类型即可。 香港市场(含正股、窝轮、牛熊、期权、期货)订阅,需要 LV1 及以上的权限,BMP 权限下不支持订阅。
func (*FutuAPI) SubscribeTrd ¶
订阅交易推送
func (*FutuAPI) SysNotify ¶
func (api *FutuAPI) SysNotify(ctx context.Context) (<-chan *SysNotifyResp, error)
系统推送通知
func (*FutuAPI) UnlockTrade ¶
func (api *FutuAPI) UnlockTrade(ctx context.Context, unlock bool, pwd string, firm trdcommon.SecurityFirm) error
解锁交易
func (*FutuAPI) Unsubscribe ¶
func (api *FutuAPI) Unsubscribe(ctx context.Context, securities []*Security, subTypes []qotcommon.SubType) error
取消订阅
func (*FutuAPI) UnsubscribeAll ¶
取消所有订阅
func (*FutuAPI) UpdateBasicQot ¶
func (api *FutuAPI) UpdateBasicQot(ctx context.Context) (<-chan *UpdateBasicQotResp, error)
实时报价回调
func (*FutuAPI) UpdateBroker ¶
func (api *FutuAPI) UpdateBroker(ctx context.Context) (<-chan *UpdateBrokerResp, error)
实时经纪队列回调
func (*FutuAPI) UpdateDeal ¶
func (api *FutuAPI) UpdateDeal(ctx context.Context) (<-chan *UpdateDealResp, error)
响应成交推送回调
func (*FutuAPI) UpdateKL ¶
func (api *FutuAPI) UpdateKL(ctx context.Context) (<-chan *UpdateKLResp, error)
实时 K 线回调
func (*FutuAPI) UpdateOrder ¶
func (api *FutuAPI) UpdateOrder(ctx context.Context) (<-chan *UpdateOrderResp, error)
响应订单推送回调
func (*FutuAPI) UpdateOrderBook ¶
func (api *FutuAPI) UpdateOrderBook(ctx context.Context) (<-chan *UpdateOrderBookResp, error)
实时摆盘回调
func (*FutuAPI) UpdatePriceReminder ¶
func (api *FutuAPI) UpdatePriceReminder(ctx context.Context) (<-chan *UpdatePriceReminderResp, error)
到价提醒回调
func (*FutuAPI) UpdateRT ¶
func (api *FutuAPI) UpdateRT(ctx context.Context) (<-chan *UpdateRTResp, error)
实时分时回调
func (*FutuAPI) UpdateTicker ¶
func (api *FutuAPI) UpdateTicker(ctx context.Context) (<-chan *UpdateTickerResp, error)
实时逐笔回调,异步处理已订阅股票的实时逐笔推送
type FutureBasicQotExData ¶
type FutureBasicQotExData struct {
LastSettlePrice float64 //*昨结
Position int32 //*持仓量
PositionChange int32 //*日增仓
ExpiryDataDistance int32 //距离到期日天数
}
基础报价的期货特有字段
type FutureInfo ¶
type FutureInfo struct {
Name string // 合约名称
Security *Security // 合约代码
LastTradeTime string //最后交易日,只有非主连期货合约才有该字段
LastTradeTimestamp float64 //最后交易日时间戳,只有非主连期货合约才有该字段
Owner *Security //标的股 股票期货和股指期货才有该字段
OwnerOther string //标的
Exchange string //交易所
ContractType string //合约类型
ContractSize float64 //合约规模
ContractSizeUnit string //合约规模的单位
QuoteCurrency string //报价货币
MinVar float64 //最小变动单位
MinVarUnit string //最小变动单位的单位
QuoteUnit string //报价单位
TradeTime []*TradeTime //交易时间
TimeZone string //所在时区
ExchangeFormatURL string //交易所规格
Origin *Security // 实际合约代码
}
type FutureSnapshotExData ¶
type FutureStaticExData ¶
type FutureStaticExData struct {
LastTradeTime string //最后交易日,只有非主连期货合约才有该字段
LastTradeTimestamp float64 //最后交易日时间戳,只有非主连期货合约才有该字段
IsMainContract bool //是否主连合约
}
期货额外静态信息
type GlobalState ¶
type GlobalState struct {
MarketHK qotcommon.QotMarketState
MarketUS qotcommon.QotMarketState
MarketSH qotcommon.QotMarketState
MarketSZ qotcommon.QotMarketState
MarketHKFuture qotcommon.QotMarketState
MarketUSFuture qotcommon.QotMarketState
QotLogined bool
TrdLogined bool
ServerVer int32
ServerBuildNo int32
Time int64
LocalTime float64
ProgramStatus *ProgramStatus
QotSvrIpAddr string
TrdSvrIpAddr string
ConnID uint64
}
type GroupData ¶
type GroupData struct {
Name string // 自选股分组名字
Type qotgetusersecuritygroup.GroupType // GroupType,自选股分组类型。
}
type GtwEvent ¶
type GtwEvent struct {
EventType notify.GtwEventType //*GtwEventType,事件类型
Desc string //*事件描述
}
type HKIPOExData ¶
type HKIPOExData struct {
IPOPriceMin float64 // 最低发售价
IPOPriceMax float64 // 最高发售价
ListPrice float64 // 上市价
LotSize int32 // 每手股数
EntrancePrice float64 // 入场费
IsSubscribeStatus bool // 是否为认购状态,True-认购中,False-待上市
ApplyEndTime string // 截止认购日期字符串
ApplyEndTimestamp float64 // 截止认购日期时间戳 因需处理认购手续,富途认购截止时间会早于交易所公布的日期。
}
type HistoryKLQuota ¶
type HistoryKLQuota struct {
UsedQuota int32 //已使用过的额度,即当前周期内已经下载过多少只股票。
RemainQuota int32 //剩余额度
DetailList []*HistoryKLQuotaItem //每只拉取过的股票的下载时间
}
type HistoryKLQuotaItem ¶
type HistoryKLine ¶
type IPOData ¶
type IPOData struct {
Basic *BasicIPOData // IPO 基本数据
CNExData *CNIPOExData // A 股 IPO 额外数据
HKExData *HKIPOExData // 港股 IPO 额外数据
USExData *USIPOExData // 美股 IPO 额外数据
}
新股 IPO 数据
type IndexSnapshotExData ¶
type KLine ¶
type KLine struct {
Time string //*时间戳字符串
IsBlank bool //*是否是空内容的点,若为 true 则只有时间信息
HighPrice float64 //最高价
OpenPrice float64 //开盘价
LowPrice float64 //最低价
ClosePrice float64 //收盘价
LastClosePrice float64 //昨收价
Volume int64 //成交量
Turnover float64 //成交额
TurnoverRate float64 //换手率(该字段为百分比字段,展示为小数表示)
PE float64 //市盈率
ChangeRate float64 //涨跌幅(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%,如 20 实际对应 20%)
Timestamp float64 //时间戳
}
K 线数据
type MarginRatio ¶
type MarginRatio struct {
Security *Security //股票
IsLongPermit bool //是否允许融资
IsShortPermit bool //是否允许融券
ShortPoolRemain float64 //卖空池剩余(股)
ShortFeeRate float64 //融券参考利率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
AlertLongRatio float64 //融资预警比率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
AlertShortRatio float64 //融券预警比率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
IMLongRatio float64 //融资初始保证金率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
IMShortRatio float64 //融券初始保证金率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
MCMLongRatio float64 //融资 margin call 保证金率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
MCMShortRatio float64 //融券 margin call 保证金率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
MMLongRatio float64 //融资维持保证金率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
MMShortRatio float64 //融券维持保证金率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
}
type MarketInfo ¶
type MarketInfo struct {
Security *Security //股票代码
Name string // 股票名称
MarketState qotcommon.QotMarketState //Qot_Common.QotMarketState,市场状态
}
type MaxTrdQtys ¶
type MaxTrdQtys struct {
MaxCashBuy float64 //不使用融资,仅自己的现金最大可买整手股数,期货此字段值为0
MaxCashAndMarginBuy float64 //使用融资,自己的现金 + 融资资金总共的最大可买整手股数,期货不适用
MaxPositionSell float64 //不使用融券(卖空),仅自己的持仓最大可卖整手股数
MaxSellShort float64 //使用融券(卖空),最大可卖空整手股数,不包括多仓,期货不适用
MaxBuyBack float64 //卖空后,需要买回的最大整手股数。因为卖空后,必须先买回已卖空的股数,还掉股票,才能再继续买多。期货不适用
LongRequiredIM float64 //开多仓每张合约初始保证金。当前仅期货和期权适用(最低 FutuOpenD 版本要求:5.0.1310)
ShortRequiredIM float64 //开空仓每张合约初始保证金。当前仅期货和期权适用(最低 FutuOpenD 版本要求:5.0.1310)
}
最大可交易数量
type Notification ¶
type Notification struct {
Type notify.NotifyType //*通知类型
Event *GtwEvent //事件通息
ProgramStatus *NotifyProgramStatus //程序状态
ConnectStatus *ConnectStatus //连接状态
QotRight *QotRight //行情权限
APILevel *APILevel //用户等级,已在2.10版本之后废弃
APIQuota *APIQuota //API 额度
}
type NotifyProgramStatus ¶
type NotifyProgramStatus struct {
ProgramStatus *ProgramStatus //*当前程序状态
}
type OptionBasicQotExData ¶
type OptionBasicQotExData struct {
StrikePrice float64 //*行权价
ContractSize int32 //*每份合约数(整型数据)
ContractSizeFloat float64 //每份合约数(浮点型数据)
OpenInterest int32 //*未平仓合约数
ImpliedVolatility float64 //*隐含波动率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%,如 20 实际对应 20%)
Premium float64 //*溢价(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%,如 20 实际对应 20%)
Delta float64 //*希腊值 Delta
Gamma float64 //*希腊值 Gamma
Vega float64 //*希腊值 Vega
Theta float64 //*希腊值 Theta
Rho float64 //*希腊值 Rho
NetOpenInterest int32 //净未平仓合约数,仅港股期权适用
ExpiryDataDistance int32 //距离到期日天数,负数表示已过期
ContractNominalValue float64 //合约名义金额,仅港股期权适用
OwnerLotMultiplier float64 //相等正股手数,指数期权无该字段,仅港股期权适用
OptionAreaType qotcommon.OptionAreaType //OptionAreaType,期权类型(按行权时间)
ContractMultiplier float64 //合约乘数
IndexOptionType qotcommon.IndexOptionType //IndexOptionType,指数期权类型
}
基础报价的期权特有字段
type OptionChain ¶
type OptionChain struct {
StrikeTime string //行权日
Option []*OptionItem //期权信息
StrikeTimestamp float64 //行权日时间戳
}
type OptionItem ¶
type OptionItem struct {
Call *SecurityStaticInfo //看涨期权,不一定有该字段,由请求条件决定
Put *SecurityStaticInfo //看跌期权,不一定有该字段,由请求条件决定
}
type OptionSnapshotExData ¶
type OptionSnapshotExData struct {
Type qotcommon.OptionType //*Qot_Common.OptionType,期权类型(按方向)
Owner *Security //*标的股
StrikeTime string //*行权日时间字符串
StrikePrice float64 //*行权价
ContractSize int32 //*每份合约数(整型数据)
ContractSizeFloat float64 //*每份合约数(浮点型数据)
OpenInterest int32 //*未平仓合约数
ImpliedVolatility float64 //*隐含波动率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
Premium float64 //*溢价(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
Delta float64 //*希腊值 Delta
Gamma float64 //*希腊值 Gamma
Vega float64 //*希腊值 Vega
Theta float64 //*希腊值 Theta
Rho float64 //*希腊值 Rho
StrikeTimestamp float64 //行权日时间戳
IndexOptionType qotcommon.IndexOptionType //Qot_Common.IndexOptionType,指数期权类型
NetOpenInterest int32 //净未平仓合约数,仅港股期权适用
ExpiryDateDistance int32 //距离到期日天数,负数表示已过期
ContractNominalValue float64 //合约名义金额,仅港股期权适用
OwnerLotMultiplier float64 //相等正股手数,指数期权无该字段,仅港股期权适用
OptionAreaType qotcommon.OptionAreaType //Qot_Common.OptionAreaType,期权类型(按行权时间)
ContractMultiplier float64 //合约乘数
}
type OptionStaticExData ¶
type OptionStaticExData struct {
Type qotcommon.OptionType //Qot_Common.OptionType,期权
Owner *Security //标的股
StrikeTime string //行权日
StrikePrice float64 //行权价
Suspend bool //是否停牌
Market string //发行市场名字
StrikeTimestamp float64 //行权日时间戳
IndexOptType qotcommon.IndexOptionType //Qot_Common.IndexOptionType, 指数期权的类型,仅在指数期权有效
}
期权额外静态信息
type Order ¶
type Order struct {
TrdSide trdcommon.TrdSide //交易方向, 参见 TrdSide 的枚举定义
OrderType trdcommon.OrderType //订单类型, 参见 OrderType 的枚举定义
OrderStatus trdcommon.OrderStatus //订单状态, 参见 OrderStatus 的枚举定义
OrderID uint64 //订单号
OrderIDEx string //扩展订单号(仅查问题时备用)
Code string //代码
Name string //名称
Qty float64 //订单数量,2位精度,期权单位是"张"
Price float64 //订单价格,3位精度
CreateTime string //创建时间,严格按 YYYY-MM-DD HH:MM:SS 或 YYYY-MM-DD HH:MM:SS.MS 格式传
UpdateTime string //最后更新时间,严格按 YYYY-MM-DD HH:MM:SS 或 YYYY-MM-DD HH:MM:SS.MS 格式传
FillQty float64 //成交数量,2位精度,期权单位是"张"
FillAvgPrice float64 //成交均价,无精度限制
LastErrMsg string //最后的错误描述,如果有错误,会有此描述最后一次错误的原因,无错误为空
SecMarket trdcommon.TrdSecMarket //证券所属市场,参见 TrdSecMarket 的枚举定义
CreateTimestamp float64 //创建时间戳
UpdateTimestamp float64 //最后更新时间戳
Remark string //用户备注字符串,最大长度64字节
}
订单
type OrderBook ¶
type OrderBook struct {
Price float64 //*委托价格
Volume int64 //*委托数量
OrderCount int32 //*委托订单个数
Details []*OrderBookDetail //订单信息,SF 行情特有
}
买卖档
type OrderBookDetail ¶
买卖档明细
type OrderFill ¶
type OrderFill struct {
TrdSide trdcommon.TrdSide //交易方向, 参见 TrdSide 的枚举定义
FillID uint64 //成交号
FillIDEx string //扩展成交号(仅查问题时备用)
OrderID uint64 //订单号
OrderIDEx string //扩展订单号(仅查问题时备用)
Code string //代码
Name string //名称
Qty float64 //成交数量,2位精度,期权单位是"张"
Price float64 //成交价格,3位精度
CreateTime string //创建时间(成交时间),严格按 YYYY-MM-DD HH:MM:SS 或 YYYY-MM-DD HH:MM:SS.MS 格式传
CounterBrokerID int32 //对手经纪号,港股有效
CounterBrokerName string //对手经纪名称,港股有效
SecMarket trdcommon.TrdSecMarket //证券所属市场,参见 TrdSecMarket 的枚举定义
CreateTimestamp float64 //创建时间戳
UpdateTimestamp float64 //最后更新时间戳
Status trdcommon.OrderFillStatus //成交状态, 参见 OrderFillStatus 的枚举定义
}
type OwnerPlate ¶
type PlateInfo ¶
type PlateInfo struct {
Plate *Security //板块
Name string //板块名字
PlateType qotcommon.PlateSetType //PlateSetType 板块类型, 仅3207(获取股票所属板块)协议返回该字段
}
板块信息
type PlateSnapshotExData ¶
type Position ¶
type Position struct {
PositionID uint64 //持仓 ID,一条持仓的唯一标识
PositionSide trdcommon.PositionSide //持仓方向,参见 PositionSide 的枚举定
Code string //代码
Name string //名称
Qty float64 //持有数量,2位精度,期权单位是"张",下同
CanSellQty float64 //可卖数量
Price float64 //市价,3位精度,期货为2位精度
CostPrice float64 //成本价,无精度限制,期货为2位精度,如果没传,代表此时此值无效,
Val float64 //市值,3位精度, 期货此字段值为0
PLVal float64 //盈亏金额,3位精度,期货为2位精度
PLRatio float64 //盈亏百分比(如 plRatio 等于8.8代表涨8.8%),无精度限制,如果没传,代表此时此值无效
SecMarket trdcommon.TrdSecMarket //证券所属市场,参见 TrdSecMarket 的枚举定义
//以下是此持仓今日统计
TdPLVal float64 //今日盈亏金额,3位精度,下同, 期货为2位精度
TdTrdVal float64 //今日交易额,期货不适用
TdBuyVal float64 //今日买入总额,期货不适用
TdBuyQty float64 //今日买入总量,期货不适用
TdSellVal float64 //今日卖出总额,期货不适用
TdSellQty float64 //今日卖出总量,期货不适用
UnrealizedPL float64 //未实现盈亏(仅期货账户适用)
RelizedPL float64 //已实现盈亏(仅期货账户适用)
}
type PreAfterMarketData ¶
type PreAfterMarketData struct {
Price float64 // 盘前或盘后## 价格
HighPrice float64 // 盘前或盘后## 最高价
LowPrice float64 // 盘前或盘后## 最低价
Volume int64 // 盘前或盘后## 成交量
Turnover float64 // 盘前或盘后## 成交额
ChangeVal float64 // 盘前或盘后## 涨跌额
ChangeRate float64 // 盘前或盘后## 涨跌幅(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%,如 20 实际对应 20%)
Amplitude float64 // 盘前或盘后## 振幅(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%,如 20 实际对应 20%)
}
盘前盘后数据
type PriceReminder ¶
type PriceReminder struct {
Security *Security // 股票
ItemList []*PriceReminderItem // 提醒信息列表
}
type PriceReminderItem ¶
type PriceReminderItem struct {
Key int64 // 每个提醒的唯一标识
ItemType qotcommon.PriceReminderType // Qot_Common::PriceReminderType 提醒类型
Value float64 // 提醒参数值
Note string // 备注
Freq qotcommon.PriceReminderFreq // Qot_Common::PriceReminderFreq 提醒频率类型
IsEnable bool // 该提醒设置是否生效。false 不生效,true 生效
}
type ProgramStatus ¶
type ProgramStatus struct {
Type common.ProgramStatusType //*当前状态
StrExtDesc string //额外描述
}
type QotRight ¶
type QotRight struct {
HKQotRight qotcommon.QotRight //*港股行情权限, Qot_Common.QotRight
USQotRight qotcommon.QotRight //*美股行情权限, Qot_Common.QotRight
CNQotRight qotcommon.QotRight //*A股行情权限, Qot_Common.QotRight
HKOptionQotRight qotcommon.QotRight //港股期权行情权限, Qot_Common.QotRight
HasUSOptionQotRight bool //是否有美股期权行情权限
HKFutureQotRight qotcommon.QotRight //港股期货行情权限, Qot_Common.QotRight
USFutureQotRight qotcommon.QotRight //美股期货行情权限, Qot_Common.QotRight
USOptionQotRight qotcommon.QotRight //美股期货行情权限, Qot_Common.QotRight
}
type RTKLine ¶
type RTKLine struct {
RehabType qotcommon.RehabType //*Qot_Common.RehabType,复权类型
KLType qotcommon.KLType //*Qot_Common.KLType,K 线类型
Security *Security //*股票
KLines []*KLine
}
实时K线
type RTOrderBook ¶
type RTOrderBook struct {
Security *Security //*股票
Asks []*OrderBook //卖盘
Bids []*OrderBook //买盘
SvrRecvTimeBid string // 富途服务器从交易所收到数据的时间(for bid)部分数据的接收时间为零,例如服务器重启或第一次推送的缓存数据。该字段暂时只支持港股。
SvrRecvTimeBidTimestamp float64 // 富途服务器从交易所收到数据的时间戳(for bid)
SvrRecvTimeAsk string // 富途服务器从交易所收到数据的时间(for ask)
SvrRecvTimeAskTimestamp float64 // 富途服务器从交易所收到数据的时间戳(for ask)
}
实时摆盘
type RTPriceReminder ¶
type RTPriceReminder struct {
Security *Security //股票
Price float64 //价格
ChangeRate float64 //当日涨跌幅
MarketStatus qotupdatepricereminder.MarketStatus //市场状态
Content string //内容
Note string //备注
Key int64 //到价提醒的标识
Type qotcommon.PriceReminderType //Qot_Common::PriceReminderType,提醒频率类型
SetValue float64 //设置的提醒值
CurValue float64 //设置的提醒类型触发时当前值
}
type Rehab ¶
type Rehab struct {
Time string //时间字符串
CompanyAct qotcommon.CompanyAct //公司行动(CompanyAct)组合标志位,指定某些字段值是否有效
FwdFactorA float64 //前复权因子 A
FwdFactorB float64 //前复权因子 B
BwdFactorA float64 //后复权因子 A
BwdFactorB float64 //后复权因子 B
SplitBase int32 //拆股(例如,1拆5,Base 为1,Ert 为5)
SplitErt int32
JoinBase int32 //合股(例如,50合1,Base 为50,Ert 为1)
JoinErt int32
BonusBase int32 //送股(例如,10送3, Base 为10,Ert 为3)
BonusErt int32
TransferBase int32 //转赠股(例如,10转3, Base 为10,Ert 为3)
TransferErt int32
AllotBase int32 //配股(例如,10送2, 配股价为6.3元, Base 为10, Ert 为2, Price 为6.3)
AllotErt int32
AllotPrice float64
AddBase int32 //增发股(例如,10送2, 增发股价为6.3元, Base 为10, Ert 为2, Price 为6.3)
AddErt int32
AddPrice float64
Dividend float64 //现金分红(例如,每10股派现0.5元,则该字段值为0.05)
SpDividend float64 //特别股息(例如,每10股派特别股息0.5元,则该字段值为0.05)
Timestamp float64 //时间戳
}
type SecurityStaticBasic ¶
type SecurityStaticBasic struct {
Security *Security //股票
ID int64 //股票 ID
LotSize int32 //每手数量,期权类型表示一份合约的股数
SecType qotcommon.SecurityType //Qot_Common.SecurityType,股票类型
Name string //股票名字
ListTime string //上市时间字符串
Delisting bool //是否退市
ListTimestamp float64 //上市时间戳
}
证券基本静态信息
type SecurityStaticInfo ¶
type SecurityStaticInfo struct {
Basic *SecurityStaticBasic //证券基本静态信息
WarrantExData *WarrantStaticExData //窝轮额外静态信息
OptionExData *OptionStaticExData //期权额外静态信息
FutureExData *FutureStaticExData //期货额外静态信息
}
证券静态信息
type Snapshot ¶
type Snapshot struct {
Basic *SnapshotBasicData //*快照基本数据
EquityExData *EquitySnapshotExData //正股快照额外数据
WarrantExData *WarrantSnapshotExData //窝轮快照额外数据
OptionExData *OptionSnapshotExData //期权快照额外数据
IndexExData *IndexSnapshotExData //指数快照额外数据
PlateExData *PlateSnapshotExData //板块快照额外数据
FutureExData *FutureSnapshotExData //期货类型额外数据
TrustExData *TrustSnapshotExData //基金类型额外数据
}
type SnapshotBasicData ¶
type SnapshotBasicData struct {
Security *Security //*证券
Type qotcommon.SecurityType //*Qot_Common.SecurityType,证券类型
IsSuspend bool //*是否停牌
ListTime string //*上市时间字符串
LotSize int32 //*每手数量
PriceSpread float64 //*价差
UpdateTime string //*更新时间字符串
HighPrice float64 //*最高价
OpenPrice float64 //*开盘价
LowPrice float64 //*最低价
LastClosePrice float64 //*昨收价
CurPrice float64 //*最新价
Volume int64 //*成交量
Turnover float64 //*成交额
TurnoverRate float64 //换手率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
ListTimestamp float64 //上市时间戳
UpdateTimestamp float64 //更新时间戳
AskPrice float64 //卖价
BidPrice float64 //买价
AskVol int64 //卖量
BidVol int64 //买量
EnableMargin bool // 是否可融资,如果为 true,后两个字段才有意义
MortgageRatio float64 // 股票抵押率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
LongMarginInitialRatio float64 // 融资初始保证金率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
EnableShortSell bool // 是否可卖空,如果为 true,后三个字段才有意义
ShortSellRate float64 // 卖空参考利率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
ShortAvailableVolume int64 // 剩余可卖空数量(股)
ShortMarginInitialRatio float64 // 卖空(融券)初始保证金率(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
Amplitude float64 // 振幅(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
AvgPrice float64 // 平均价
BidAskRatio float64 // 委比(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
VolumeRatio float64 // 量比
Highest52WeeksPrice float64 // 52周最高价
Lowest52WeeksPrice float64 // 52周最低价
HighestHistoryPrice float64 // 历史最高价
LowestHistoryPrice float64 // 历史最低价
PreMarket *PreAfterMarketData //Qot_Common::PreAfterMarketData 盘前数据
AfterMarket *PreAfterMarketData //Qot_Common::PreAfterMarketData 盘后数据
SecStatus qotcommon.SecurityStatus //Qot_Common::SecurityStatus 股票状态
ClosePrice5Minute float64 //5分钟收盘价
}
type StockData ¶
type StockData struct {
Security *Security // 股票
Name string // 股票名称
BaseDataList []*BaseData // 筛选后的简单指标属性数据
AccumulateDataList []*AccumulateData // 筛选后的累积指标属性数据
FinancialDataList []*FinancialData // 筛选后的财务指标属性数据
}
返回的股票数据
type StockFilter ¶
type StockFilter struct {
Plate *Security // 板块
BaseFilterList []*BaseFilter // 简单指标过滤器
AccumulateFilterList []*AccumulateFilter // 累积指标过滤器
FinancialFilterList []*FinancialFilter // 财务指标过滤器
}
type StockFilterResult ¶
type SubInfo ¶
type SubInfo struct {
SubType qotcommon.SubType //*Qot_Common.SubType,订阅类型
Securities []*Security //订阅该类型行情的证券
}
单个订阅类型信息
type Subscription ¶
type Subscription struct {
ConnSubInfos []*ConnSubInfo //单条连接订阅信息
TotalUsedQuota int32 //*FutuOpenD 已使用的订阅额度
RemainQuota int32 //*FutuOpenD 剩余订阅额度
}
type SysNotifyResp ¶
type SysNotifyResp struct {
Notification *Notification
Err error
}
type Ticker ¶
type Ticker struct {
Time string //*时间字符串
Sequence int64 //*唯一标识
Dir qotcommon.TickerDirection //*TickerDirection, 买卖方向
Price float64 //*价格
Volume int64 //*成交量
Turnover float64 //*成交额
RecvTime float64 //收到推送数据的本地时间戳,用于定位延迟
Type qotcommon.TickerType //TickerType, 逐笔类型
TypeSign int32 //逐笔类型符号
PushDataType qotcommon.PushDataType //用于区分推送情况,仅推送时有该字段
Timestamp float64 //时间戳
}
逐笔成交
type TradeDate ¶
type TradeDate struct {
Time string //时间字符串
Timestamp float64 //时间戳
TradeDateType qotcommon.TradeDateType //Qot_Common.TradeDateType,交易时间类型
}
type TrdAcc ¶
type TrdAcc struct {
TrdEnv trdcommon.TrdEnv //交易环境,参见 TrdEnv 的枚举定义
AccID uint64 //业务账号
TrdMarketAuthList []trdcommon.TrdMarket //业务账户支持的交易市场权限,即此账户能交易那些市场, 可拥有多个交易市场权限,目前仅单个,取值参见 TrdMarket 的枚举定义
AccType trdcommon.TrdAccType //账户类型,取值见 TrdAccType
CardNum string //卡号
SecurityFirm trdcommon.SecurityFirm //所属券商,取值见SecurityFirm
SimAccType trdcommon.SimAccType //模拟交易账号类型,取值见SimAccType
}
type TrdFilterConditions ¶
type TrdFilterConditions struct {
CodeList []string //代码过滤,只返回包含这些代码的数据,没传不过滤
IDList []uint64 //ID 主键过滤,只返回包含这些 ID 的数据,没传不过滤,订单是 orderID、成交是 fillID、持仓是 positionID
Begin string //开始时间,严格按 YYYY-MM-DD HH:MM:SS 或 YYYY-MM-DD HH:MM:SS.MS 格式传,对持仓无效,拉历史数据必须填
End string //结束时间,严格按 YYYY-MM-DD HH:MM:SS 或 YYYY-MM-DD HH:MM:SS.MS 格式传,对持仓无效,拉历史数据必须填
}
type TrdHeader ¶
type TrdHeader struct {
TrdEnv trdcommon.TrdEnv //交易环境, 参见 TrdEnv 的枚举定义
AccID uint64 //业务账号, 业务账号与交易环境、市场权限需要匹配,否则会返回错误
TrdMarket trdcommon.TrdMarket //交易市场, 参见 TrdMarket 的枚举定义
}
交易协议公共参数头
type TrustSnapshotExData ¶
type USIPOExData ¶
type UpdateBasicQotResp ¶
type UpdateBrokerResp ¶
type UpdateBrokerResp struct {
BrokerQueue *BrokerQueue
Err error
}
type UpdateDealResp ¶
type UpdateKLResp ¶
type UpdateOrderBookResp ¶
type UpdateOrderBookResp struct {
OrderBook *RTOrderBook
Err error
}
type UpdateOrderResp ¶
type UpdatePriceReminderResp ¶
type UpdatePriceReminderResp struct {
Reminder *RTPriceReminder
Err error
}
type UpdateRTResp ¶
type UpdateTickerResp ¶
type Warrant ¶
type Warrant struct {
LastPage bool //是否最后一页了,false:非最后一页,还有窝轮记录未返回; true:已是最后一页
AllCount int32 //该条件请求所有数据的个数
WarrantList []*WarrantData //窝轮数据
}
type WarrantData ¶
type WarrantData struct {
// 静态数据项
Stock *Security //股票
Owner *Security //所属正股
Type qotcommon.WarrantType //Qot_Common.WarrantType,窝轮类型
Issuer qotcommon.Issuer //Qot_Common.Issuer,发行人
MaturityTime string //到期日
MaturityTimestamp float64 //到期日时间戳
ListTime string //上市时间
ListTimestamp float64 //上市时间戳
LastTradeTime string //最后交易日
LastTradeTimestamp float64 //最后交易日时间戳
RecoveryPrice float64 //收回价,仅牛熊证支持此字段
ConversionRatio float64 //换股比率
LotSize int32 //每手数量
StrikePrice float64 //行使价
LastClosePrice float64 //昨收价
Name string //名称
// 动态数据项
CurPrice float64 //当前价
PriceChangeVal float64 //涨跌额
ChangeRate float64 //涨跌幅(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
Status qotcommon.WarrantStatus //Qot_Common.WarrantStatus,窝轮状态
BidPrice float64 //买入价
AskPrice float64 //卖出价
BidVol int64 //买量
AskVol int64 //卖量
Volume int64 //成交量
Turnover float64 //成交额
Score float64 //综合评分
Premium float64 //溢价(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
BreakEvenPoint float64 //打和点
Leverage float64 //杠杆比率(倍)
IPOP float64 //价内/价外,正数表示价内,负数表示价外(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
PriceRecoveryRatio float64 //正股距收回价,仅牛熊证支持此字段(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
ConversionPrice float64 //换股价
StreetRate float64 //街货占比(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
StreetVol int64 //街货量
Amplitude float64 //振幅(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
IssueSize int64 //发行量
HighPrice float64 //最高价
LowPrice float64 //最低价
ImpliedVolatility float64 //引申波幅,仅认购认沽支持此字段
Delta float64 //对冲值,仅认购认沽支持此字段
EffectiveLeverage float64 //有效杠杆
UpperStrikePrice float64 //上限价,仅界内证支持此字段
LowerStrikePrice float64 //下限价,仅界内证支持此字段
InLinePriceStatus qotcommon.PriceType //Qot_Common.PriceType,界内界外,仅界内证支持此字段
}
type WarrantFilter ¶
type WarrantFilter struct {
Owner *Security //所属正股
TypeList []qotcommon.WarrantType //Qot_Common.WarrantType,窝轮类型过滤列表
IssuerList []qotcommon.Issuer //Qot_Common.Issuer,发行人过滤列表
IpoPeriod qotcommon.IpoPeriod //Qot_Common.IpoPeriod,上市日
PriceType qotcommon.PriceType //Qot_Common.PriceType,价内/价外(暂不支持界内证的界内外筛选)
Status qotcommon.WarrantStatus //Qot_Common.WarrantStatus,窝轮状态
MaturityTimeMin *FilterString //到期日,到期日范围的开始时间戳
MaturityTimeMax *FilterString //到期日范围的结束时间戳
CurPriceMin *FilterDouble //最新价的过滤下限(闭区间),不传代表下限为 -∞(精确到小数点后 3 位,超出部分会被舍弃)
CurPriceMax *FilterDouble //最新价的过滤上限(闭区间),不传代表上限为 +∞(精确到小数点后 3 位,超出部分会被舍弃)
StrikePriceMin *FilterDouble //行使价的过滤下限(闭区间),不传代表下限为 -∞(精确到小数点后 3 位,超出部分会被舍弃)
StrikePriceMax *FilterDouble //行使价的过滤上限(闭区间),不传代表上限为 +∞(精确到小数点后 3 位,超出部分会被舍弃)
StreetMin *FilterDouble //街货占比的过滤下限(闭区间),该字段为百分比字段,默认不展示 %,如 20 实际对应 20%。不传代表下限为 -∞(精确到小数点后 3 位,超出部分会被舍弃)
StreetMax *FilterDouble //街货占比的过滤上限(闭区间),该字段为百分比字段,默认不展示 %,如 20 实际对应 20%。不传代表上限为 +∞(精确到小数点后 3 位,超出部分会被舍弃)
ConversionMin *FilterDouble //换股比率的过滤下限(闭区间),不传代表下限为 -∞(精确到小数点后 3 位,超出部分会被舍弃)
ConversionMax *FilterDouble //换股比率的过滤上限(闭区间),不传代表上限为 +∞(精确到小数点后 3 位,超出部分会被舍弃)
VolMin *FilterUInt64 //成交量的过滤下限(闭区间),不传代表下限为 -∞
VolMax *FilterUInt64 //成交量的过滤上限(闭区间),不传代表上限为 +∞
PremiumMin *FilterDouble //溢价的过滤下限(闭区间),该字段为百分比字段,默认不展示 %,如 20 实际对应 20%。不传代表下限为 -∞(精确到小数点后 3 位,超出部分会被舍弃)
PremiumMax *FilterDouble //溢价的过滤上限(闭区间),该字段为百分比字段,默认不展示 %,如 20 实际对应 20%。不传代表上限为 +∞(精确到小数点后 3 位,超出部分会被舍弃)
LeverageRatioMin *FilterDouble //杠杆比率的过滤下限(闭区间),不传代表下限为 -∞(精确到小数点后 3 位,超出部分会被舍弃)
LeverageRatioMax *FilterDouble //杠杆比率的过滤上限(闭区间),不传代表上限为 +∞(精确到小数点后 3 位,超出部分会被舍弃)
DeltaMin *FilterDouble //对冲值的过滤下限(闭区间),仅认购认沽支持此字段过滤,不传代表下限为 -∞(精确到小数点后 3 位,超出部分会被舍弃)
DeltaMax *FilterDouble //对冲值的过滤上限(闭区间),仅认购认沽支持此字段过滤,不传代表上限为 +∞(精确到小数点后 3 位,超出部分会被舍弃)
ImplieMin *FilterDouble //引伸波幅的过滤下限(闭区间),仅认购认沽支持此字段过滤,不传代表下限为 -∞(精确到小数点后 3 位,超出部分会被舍弃)
ImplieMax *FilterDouble //引伸波幅的过滤上限(闭区间),仅认购认沽支持此字段过滤,不传代表上限为 +∞(精确到小数点后 3 位,超出部分会被舍弃)
RecoveryPriceMin *FilterDouble //收回价的过滤下限(闭区间),仅牛熊证支持此字段过滤,不传代表下限为 -∞(精确到小数点后 3 位,超出部分会被舍弃)
RecoveryPriceMax *FilterDouble //收回价的过滤上限(闭区间),仅牛熊证支持此字段过滤,不传代表上限为 +∞(精确到小数点后 3 位,超出部分会被舍弃)
PriceRecoveryRatioMin *FilterDouble //正股距收回价,的过滤下限(闭区间),仅牛熊证支持此字段过滤。该字段为百分比字段,默认不展示 %,如 20 实际对应 20%。不传代表下限为 -∞(精确到小数点后 3 位,超出部分会被舍弃)
PriceRecoveryRatioMax *FilterDouble //正股距收回价,的过滤上限(闭区间),仅牛熊证支持此字段过滤。该字段为百分比字段,默认不展示 %,如 20 实际对应 20%。不传代表上限为 +∞(精确到小数点后 3 位,超出部分会被舍弃)
}
type WarrantSnapshotExData ¶
type WarrantSnapshotExData struct {
ConversionRate float64 //*换股比率
WarrantType qotcommon.WarrantType //*Qot_Common.WarrantType,窝轮类型
StrikePrice float64 //*行使价
MaturityTime string //*到期日时间字符串
EndTradeTime string //*最后交易日时间字符串
Owner *Security //*所属正股
RecoveryPrice float64 //*收回价,仅牛熊证支持该字段
StreetVolumn int64 //*街货量
IssueVolumn int64 //*发行量
StreetRate float64 //*街货占比(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
Delta float64 //*对冲值,仅认购认沽支持该字段
ImpliedVolatility float64 //*引申波幅,仅认购认沽支持该字段
Premium float64 //*溢价(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
MaturityTimestamp float64 //到期日时间戳
EndTradeTimestamp float64 //最后交易日时间戳
Leverage float64 // 杠杆比率(倍)
IPOP float64 // 价内/价外(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
BreakEvenPoint float64 // 打和点
ConversionPrice float64 // 换股价
PriceRecoveryRatio float64 // 正股距收回价(该字段为百分比字段,默认不展示 %,如 20 实际对应 20%)
Score float64 // 综合评分
UpperStrikePrice float64 //上限价,仅界内证支持该字段
LowerStrikePrice float64 //下限价,仅界内证支持该字段
InLinePriceStatus qotcommon.PriceType //Qot_Common.PriceType,界内界外,仅界内证支持该字段
IssuerCode string //发行人代码
}
type WarrantStaticExData ¶
type WarrantStaticExData struct {
Type qotcommon.WarrantType //Qot_Common.WarrantType,窝轮类型
Owner *Security //所属正股
}
窝轮额外静态信息
type WinningNumData ¶
Source Files
¶
- common.go
- futuapi.go
- qot_common.go
- qot_getbasicqot.go
- qot_getbroker.go
- qot_getcapitaldistribution.go
- qot_getcapitalflow.go
- qot_getfutureinfo.go
- qot_getipolist.go
- qot_getkl.go
- qot_getmarketstate.go
- qot_getoptionchain.go
- qot_getorderbook.go
- qot_getownerplate.go
- qot_getplatesecurity.go
- qot_getplateset.go
- qot_getpricereminder.go
- qot_getreference.go
- qot_getrt.go
- qot_getsecuritysnapshot.go
- qot_getstaticinfo.go
- qot_getsubinfo.go
- qot_getticker.go
- qot_getusersecurity.go
- qot_getusersecuritygroup.go
- qot_getwarrant.go
- qot_modifyusersecurity.go
- qot_requesthistorykl.go
- qot_requesthistoryklquota.go
- qot_requestrehab.go
- qot_requesttradedate.go
- qot_setpricereminder.go
- qot_stockfilter.go
- qot_sub.go
- qot_updatebasicqot.go
- qot_updatebroker.go
- qot_updatekl.go
- qot_updateorderbook.go
- qot_updatepricereminder.go
- qot_updatert.go
- qot_updateticker.go
- trd_common.go
- trd_getacclist.go
- trd_getfunds.go
- trd_gethistoryorderfilllist.go
- trd_gethistoryorderlist.go
- trd_getmarginratio.go
- trd_getmaxtrdqtys.go
- trd_getorderfilllist.go
- trd_getorderlist.go
- trd_getpositionlist.go
- trd_modifyorder.go
- trd_placeorder.go
- trd_subaccpush.go
- trd_unlocktrade.go
- trd_updateorder.go
- trd_updateorderfill.go
Directories
¶
| Path | Synopsis |
|---|---|
|
pb
|
|
|
protoc-gen-go-futu
command
|
|
|
Package tcp implements the framework of TCP connection.
|
Package tcp implements the framework of TCP connection. |