Documentation
¶
Index ¶
- Constants
- type SDK
- func (sdk *SDK) Close() error
- func (sdk *SDK) GetAccList(opts ...adapt.Option) ([]*trdcommon.TrdAcc, error)
- func (sdk *SDK) GetAccListWithContext(ctx context.Context, opts ...adapt.Option) ([]*trdcommon.TrdAcc, error)
- func (sdk *SDK) GetBasicQot(codes []string) ([]*qotcommon.BasicQot, error)
- func (sdk *SDK) GetBasicQotWithContext(ctx context.Context, codes []string) ([]*qotcommon.BasicQot, error)
- func (sdk *SDK) GetBroker(code string) (*qotgetbroker.S2C, error)
- func (sdk *SDK) GetBrokerWithContext(ctx context.Context, code string) (*qotgetbroker.S2C, error)
- func (sdk *SDK) GetCapitalDistribution(code string) (*qotgetcapitaldistribution.S2C, error)
- func (sdk *SDK) GetCapitalDistributionWithContext(ctx context.Context, code string) (*qotgetcapitaldistribution.S2C, error)
- func (sdk *SDK) GetCapitalFlow(code string, opts ...adapt.Option) (*qotgetcapitalflow.S2C, error)
- func (sdk *SDK) GetCapitalFlowWithContext(ctx context.Context, code string, opts ...adapt.Option) (*qotgetcapitalflow.S2C, error)
- func (sdk *SDK) GetClient() *client.Client
- func (sdk *SDK) GetFunds(header *trdcommon.TrdHeader, opts ...adapt.Option) (*trdcommon.Funds, error)
- func (sdk *SDK) GetFundsWithContext(ctx context.Context, header *trdcommon.TrdHeader, opts ...adapt.Option) (*trdcommon.Funds, error)
- func (sdk *SDK) GetFutureInfo(codes []string) ([]*qotgetfutureinfo.FutureInfo, error)
- func (sdk *SDK) GetFutureInfoWithContext(ctx context.Context, codes []string) ([]*qotgetfutureinfo.FutureInfo, error)
- func (sdk *SDK) GetGlobalState() (*getglobalstate.S2C, error)
- func (sdk *SDK) GetGlobalStateWithContext(ctx context.Context) (*getglobalstate.S2C, error)
- func (sdk *SDK) GetHistoryOrderFillList(header *trdcommon.TrdHeader, fc *trdcommon.TrdFilterConditions, ...) ([]*trdcommon.OrderFill, error)
- func (sdk *SDK) GetHistoryOrderFillListWithContext(ctx context.Context, header *trdcommon.TrdHeader, ...) ([]*trdcommon.OrderFill, error)
- func (sdk *SDK) GetHistoryOrderList(header *trdcommon.TrdHeader, fc *trdcommon.TrdFilterConditions, ...) ([]*trdcommon.Order, error)
- func (sdk *SDK) GetHistoryOrderListWithContext(ctx context.Context, header *trdcommon.TrdHeader, ...) ([]*trdcommon.Order, error)
- func (sdk *SDK) GetIpoList(market int32) ([]*qotgetipolist.IpoData, error)
- func (sdk *SDK) GetIpoListWithContext(ctx context.Context, market int32) ([]*qotgetipolist.IpoData, error)
- func (sdk *SDK) GetKL(code string, klType int32, opts ...adapt.Option) (*qotgetkl.S2C, error)
- func (sdk *SDK) GetKLWithContext(ctx context.Context, code string, klType int32, opts ...adapt.Option) (*qotgetkl.S2C, error)
- func (sdk *SDK) GetMarginRatio(header *trdcommon.TrdHeader, codes []string) ([]*trdgetmarginratio.MarginRatioInfo, error)
- func (sdk *SDK) GetMarginRatioWithContext(ctx context.Context, header *trdcommon.TrdHeader, codes []string) ([]*trdgetmarginratio.MarginRatioInfo, error)
- func (sdk *SDK) GetMarketState(codes []string) ([]*qotgetmarketstate.MarketInfo, error)
- func (sdk *SDK) GetMarketStateWithContext(ctx context.Context, codes []string) ([]*qotgetmarketstate.MarketInfo, error)
- func (sdk *SDK) GetMaxTrdQtys(header *trdcommon.TrdHeader, orderType int32, code string, price float64, ...) (*trdcommon.MaxTrdQtys, error)
- func (sdk *SDK) GetMaxTrdQtysWithContext(ctx context.Context, header *trdcommon.TrdHeader, orderType int32, code string, ...) (*trdcommon.MaxTrdQtys, error)
- func (sdk *SDK) GetOpenOrderList(header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.Order, error)
- func (sdk *SDK) GetOpenOrderListWithContext(ctx context.Context, header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.Order, error)
- func (sdk *SDK) GetOptionChain(code string, beginTime string, endTime string, opts ...adapt.Option) ([]*qotgetoptionchain.OptionChain, error)
- func (sdk *SDK) GetOptionChainWithContext(ctx context.Context, code string, beginTime string, endTime string, ...) ([]*qotgetoptionchain.OptionChain, error)
- func (sdk *SDK) GetOptionExpirationDate(code string, opts ...adapt.Option) ([]*qotgetoptionexpirationdate.OptionExpirationDate, error)
- func (sdk *SDK) GetOptionExpirationDateWithContext(ctx context.Context, code string, opts ...adapt.Option) ([]*qotgetoptionexpirationdate.OptionExpirationDate, error)
- func (sdk *SDK) GetOrderBook(code string, opts ...adapt.Option) (*qotgetorderbook.S2C, error)
- func (sdk *SDK) GetOrderBookWithContext(ctx context.Context, code string, opts ...adapt.Option) (*qotgetorderbook.S2C, error)
- func (sdk *SDK) GetOrderFee(header *trdcommon.TrdHeader, orderIdExList []string) ([]*trdcommon.OrderFee, error)
- func (sdk *SDK) GetOrderFeeWithContext(ctx context.Context, header *trdcommon.TrdHeader, orderIdExList []string) ([]*trdcommon.OrderFee, error)
- func (sdk *SDK) GetOrderFillList(header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.OrderFill, error)
- func (sdk *SDK) GetOrderFillListWithContext(ctx context.Context, header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.OrderFill, error)
- func (sdk *SDK) GetOwnerPlate(codes []string) ([]*qotgetownerplate.SecurityOwnerPlate, error)
- func (sdk *SDK) GetOwnerPlateWithContext(ctx context.Context, codes []string) ([]*qotgetownerplate.SecurityOwnerPlate, error)
- func (sdk *SDK) GetPlateSecurity(plateCode string, opts ...adapt.Option) ([]*qotcommon.SecurityStaticInfo, error)
- func (sdk *SDK) GetPlateSecurityWithContext(ctx context.Context, plateCode string, opts ...adapt.Option) ([]*qotcommon.SecurityStaticInfo, error)
- func (sdk *SDK) GetPlateSet(market int32, plateSetType int32) ([]*qotcommon.PlateInfo, error)
- func (sdk *SDK) GetPlateSetWithContext(ctx context.Context, market int32, plateSetType int32) ([]*qotcommon.PlateInfo, error)
- func (sdk *SDK) GetPositionList(header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.Position, error)
- func (sdk *SDK) GetPositionListWithContext(ctx context.Context, header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.Position, error)
- func (sdk *SDK) GetPriceReminder(code string, market int32) ([]*qotgetpricereminder.PriceReminder, error)
- func (sdk *SDK) GetPriceReminderWithContext(ctx context.Context, code string, market int32) ([]*qotgetpricereminder.PriceReminder, error)
- func (sdk *SDK) GetRT(code string) (*qotgetrt.S2C, error)
- func (sdk *SDK) GetRTWithContext(ctx context.Context, code string) (*qotgetrt.S2C, error)
- func (sdk *SDK) GetReference(code string, refType int32) ([]*qotcommon.SecurityStaticInfo, error)
- func (sdk *SDK) GetReferenceWithContext(ctx context.Context, code string, refType int32) ([]*qotcommon.SecurityStaticInfo, error)
- func (sdk *SDK) GetSecuritySnapshot(codes []string) ([]*qotgetsecuritysnapshot.Snapshot, error)
- func (sdk *SDK) GetSecuritySnapshotWithContext(ctx context.Context, codes []string) ([]*qotgetsecuritysnapshot.Snapshot, error)
- func (sdk *SDK) GetStaticInfo(opts ...adapt.Option) ([]*qotcommon.SecurityStaticInfo, error)
- func (sdk *SDK) GetStaticInfoWithContext(ctx context.Context, opts ...adapt.Option) ([]*qotcommon.SecurityStaticInfo, error)
- func (sdk *SDK) GetSubInfo(opts ...adapt.Option) (*qotgetsubinfo.S2C, error)
- func (sdk *SDK) GetSubInfoWithContext(ctx context.Context, opts ...adapt.Option) (*qotgetsubinfo.S2C, error)
- func (sdk *SDK) GetTicker(code string, opts ...adapt.Option) (*qotgetticker.S2C, error)
- func (sdk *SDK) GetTickerWithContext(ctx context.Context, code string, opts ...adapt.Option) (*qotgetticker.S2C, error)
- func (sdk *SDK) GetUserSecurity(groupName string) ([]*qotcommon.SecurityStaticInfo, error)
- func (sdk *SDK) GetUserSecurityGroup(groupType int32) ([]*qotgetusersecuritygroup.GroupData, error)
- func (sdk *SDK) GetUserSecurityGroupWithContext(ctx context.Context, groupType int32) ([]*qotgetusersecuritygroup.GroupData, error)
- func (sdk *SDK) GetUserSecurityWithContext(ctx context.Context, groupName string) ([]*qotcommon.SecurityStaticInfo, error)
- func (sdk *SDK) GetWarrant(begin int32, num int32, opts ...adapt.Option) (*qotgetwarrant.S2C, error)
- func (sdk *SDK) GetWarrantWithContext(ctx context.Context, begin int32, num int32, opts ...adapt.Option) (*qotgetwarrant.S2C, error)
- func (sdk *SDK) ModifyOrder(header *trdcommon.TrdHeader, orderID uint64, modifyOrderOp int32, ...) (*trdmodifyorder.S2C, error)
- func (sdk *SDK) ModifyOrderWithContext(ctx context.Context, header *trdcommon.TrdHeader, orderID uint64, ...) (*trdmodifyorder.S2C, error)
- func (sdk *SDK) ModifyUserSecurity(groupName string, codes []string, op int32) error
- func (sdk *SDK) ModifyUserSecurityWithContext(ctx context.Context, groupName string, codes []string, op int32) error
- func (sdk *SDK) PlaceOrder(header *trdcommon.TrdHeader, trdSide int32, orderType int32, code string, ...) (*trdplaceorder.S2C, error)
- func (sdk *SDK) PlaceOrderWithContext(ctx context.Context, header *trdcommon.TrdHeader, trdSide int32, ...) (*trdplaceorder.S2C, error)
- func (sdk *SDK) RegisterHandler(protoID uint32, h client.Handler) *SDK
- func (sdk *SDK) RequestHistoryKL(code string, klType int32, beginTime string, endTime string, ...) (*qotrequesthistorykl.S2C, error)
- func (sdk *SDK) RequestHistoryKLQuota(opts ...adapt.Option) (*qotrequesthistoryklquota.S2C, error)
- func (sdk *SDK) RequestHistoryKLQuotaWithContext(ctx context.Context, opts ...adapt.Option) (*qotrequesthistoryklquota.S2C, error)
- func (sdk *SDK) RequestHistoryKLWithContext(ctx context.Context, code string, klType int32, beginTime string, ...) (*qotrequesthistorykl.S2C, error)
- func (sdk *SDK) RequestRehab(code string) (*qotrequestrehab.S2C, error)
- func (sdk *SDK) RequestRehabWithContext(ctx context.Context, code string) (*qotrequestrehab.S2C, error)
- func (sdk *SDK) RequestTradeDate(market int32, code string, beginTime string, endTime string) ([]*qotrequesttradedate.TradeDate, error)
- func (sdk *SDK) RequestTradeDateWithContext(ctx context.Context, market int32, code string, beginTime string, ...) ([]*qotrequesttradedate.TradeDate, error)
- func (sdk *SDK) SetPriceReminder(code string, op int32, opts ...adapt.Option) (int64, error)
- func (sdk *SDK) SetPriceReminderWithContext(ctx context.Context, code string, op int32, opts ...adapt.Option) (int64, error)
- func (sdk *SDK) StockFilter(market int32, opts ...adapt.Option) (*qotstockfilter.S2C, error)
- func (sdk *SDK) StockFilterWithContext(ctx context.Context, market int32, opts ...adapt.Option) (*qotstockfilter.S2C, error)
- func (sdk *SDK) Subscribe(codes []string, subTypes []int32, isSub bool, opts ...adapt.Option) error
- func (sdk *SDK) SubscribeAccPush(accIDList []uint64) error
- func (sdk *SDK) SubscribeAccPushWithContext(ctx context.Context, accIDList []uint64) error
- func (sdk *SDK) SubscribeWithContext(ctx context.Context, codes []string, subTypes []int32, isSub bool, ...) error
- func (sdk *SDK) TrdFlowSummary(header *trdcommon.TrdHeader, clearingDate string) ([]*trdflowsummary.FlowSummaryInfo, error)
- func (sdk *SDK) TrdFlowSummaryWithContext(ctx context.Context, header *trdcommon.TrdHeader, clearingDate string) ([]*trdflowsummary.FlowSummaryInfo, error)
- func (sdk *SDK) UnlockTrade(unlock bool, pwdMD5 string, securityFirm int32) error
- func (sdk *SDK) UnlockTradeWithContext(ctx context.Context, unlock bool, pwdMD5 string, securityFirm int32) error
Constants ¶
const ( DateFormat = "2006-01-02" TimeFormat = "2006-01-02 15:04:05" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SDK ¶
SDK is Futu SDK.
func (*SDK) GetAccList ¶
GetAccList 2001 - gets the trading account list.
func (*SDK) GetAccListWithContext ¶
func (sdk *SDK) GetAccListWithContext(ctx context.Context, opts ...adapt.Option) ([]*trdcommon.TrdAcc, error)
GetAccListWithContext 2001 - gets the account list with context.
func (*SDK) GetBasicQot ¶
GetBasicQot 3004 - gets the basic quotes of given securities.
func (*SDK) GetBasicQotWithContext ¶
func (sdk *SDK) GetBasicQotWithContext(ctx context.Context, codes []string) ([]*qotcommon.BasicQot, error)
GetBasicQotWithContext 3004 - gets the basic quotes of given securities with context.
func (*SDK) GetBroker ¶
func (sdk *SDK) GetBroker(code string) (*qotgetbroker.S2C, error)
GetBroker 3014 - gets broker data.
code: security code
func (*SDK) GetBrokerWithContext ¶
GetBrokerWithContext 3014 - gets the broker with context.
code: security code
func (*SDK) GetCapitalDistribution ¶
func (sdk *SDK) GetCapitalDistribution(code string) (*qotgetcapitaldistribution.S2C, error)
GetCapitalDistribution 3212 - gets the capital distribution.
code: security code
func (*SDK) GetCapitalDistributionWithContext ¶
func (sdk *SDK) GetCapitalDistributionWithContext(ctx context.Context, code string) (*qotgetcapitaldistribution.S2C, error)
GetCapitalDistributionWithContext 3212 - gets the capital distribution with context.
code: security code
func (*SDK) GetCapitalFlowWithContext ¶
func (sdk *SDK) GetCapitalFlowWithContext(ctx context.Context, code string, opts ...adapt.Option) (*qotgetcapitalflow.S2C, error)
GetCapitalFlowWithContext 3211 - gets the capital flow with context.
code: security code
func (*SDK) GetFunds ¶
func (sdk *SDK) GetFunds(header *trdcommon.TrdHeader, opts ...adapt.Option) (*trdcommon.Funds, error)
GetFunds 2101 - gets the funds.
func (*SDK) GetFundsWithContext ¶
func (sdk *SDK) GetFundsWithContext(ctx context.Context, header *trdcommon.TrdHeader, opts ...adapt.Option) (*trdcommon.Funds, error)
GetFundsWithContext 2101 - gets the funds with context.
func (*SDK) GetFutureInfo ¶
func (sdk *SDK) GetFutureInfo(codes []string) ([]*qotgetfutureinfo.FutureInfo, error)
GetFutureInfo 3218 - gets the future information.
codes: security codes
func (*SDK) GetFutureInfoWithContext ¶
func (sdk *SDK) GetFutureInfoWithContext(ctx context.Context, codes []string) ([]*qotgetfutureinfo.FutureInfo, error)
GetFutureInfoWithContext 3218 - gets the future information with context.
codes: security codes
func (*SDK) GetGlobalState ¶
func (sdk *SDK) GetGlobalState() (*getglobalstate.S2C, error)
GetGlobalState 1002 - gets the global state.
func (*SDK) GetGlobalStateWithContext ¶
GetGlobalStateWithContext 1002 - gets the global state with context.
func (*SDK) GetHistoryOrderFillList ¶
func (sdk *SDK) GetHistoryOrderFillList(header *trdcommon.TrdHeader, fc *trdcommon.TrdFilterConditions, opts ...adapt.Option) ([]*trdcommon.OrderFill, error)
GetHistoryOrderFillList 2222 - gets the history filled order list.
func (*SDK) GetHistoryOrderFillListWithContext ¶
func (sdk *SDK) GetHistoryOrderFillListWithContext(ctx context.Context, header *trdcommon.TrdHeader, fc *trdcommon.TrdFilterConditions, opts ...adapt.Option) ([]*trdcommon.OrderFill, error)
GetHistoryOrderFillListWithContext 2222 - gets the history filled order list with context.
func (*SDK) GetHistoryOrderList ¶
func (sdk *SDK) GetHistoryOrderList(header *trdcommon.TrdHeader, fc *trdcommon.TrdFilterConditions, opts ...adapt.Option) ([]*trdcommon.Order, error)
GetHistoryOrderList 2221 - gets the history order list.
func (*SDK) GetHistoryOrderListWithContext ¶
func (sdk *SDK) GetHistoryOrderListWithContext(ctx context.Context, header *trdcommon.TrdHeader, fc *trdcommon.TrdFilterConditions, opts ...adapt.Option) ([]*trdcommon.Order, error)
GetHistoryOrderListWithContext 2221 - gets the history order list with context.
func (*SDK) GetIpoList ¶
func (sdk *SDK) GetIpoList(market int32) ([]*qotgetipolist.IpoData, error)
GetIpoList 3217 - gets the IPO list.
market: market
func (*SDK) GetIpoListWithContext ¶
func (sdk *SDK) GetIpoListWithContext(ctx context.Context, market int32) ([]*qotgetipolist.IpoData, error)
GetIpoListWithContext 3217 - gets the IPO list with context.
market: market
func (*SDK) GetKLWithContext ¶
func (sdk *SDK) GetKLWithContext(ctx context.Context, code string, klType int32, opts ...adapt.Option) (*qotgetkl.S2C, error)
GetKLWithContext 3006 - gets K-line data with context.
func (*SDK) GetMarginRatio ¶
func (sdk *SDK) GetMarginRatio(header *trdcommon.TrdHeader, codes []string) ([]*trdgetmarginratio.MarginRatioInfo, error)
GetMarginRatio 2223 - gets the margin ratio.
func (*SDK) GetMarginRatioWithContext ¶
func (sdk *SDK) GetMarginRatioWithContext(ctx context.Context, header *trdcommon.TrdHeader, codes []string) ([]*trdgetmarginratio.MarginRatioInfo, error)
GetMarginRatioWithContext 2223 - gets the margin ratio with context.
func (*SDK) GetMarketState ¶
func (sdk *SDK) GetMarketState(codes []string) ([]*qotgetmarketstate.MarketInfo, error)
GetMarketState 3223 - gets the market state.
codes: security codes
func (*SDK) GetMarketStateWithContext ¶
func (sdk *SDK) GetMarketStateWithContext(ctx context.Context, codes []string) ([]*qotgetmarketstate.MarketInfo, error)
GetMarketStateWithContext 3223 - gets the market state with context.
codes: security codes
func (*SDK) GetMaxTrdQtys ¶
func (sdk *SDK) GetMaxTrdQtys(header *trdcommon.TrdHeader, orderType int32, code string, price float64, opts ...adapt.Option) (*trdcommon.MaxTrdQtys, error)
GetOrderList 2111 - gets the maximum available trading quantities.
header: trading header
orderType: order type
code: security code, e.g. US.AAPL
price: price
func (*SDK) GetMaxTrdQtysWithContext ¶
func (sdk *SDK) GetMaxTrdQtysWithContext(ctx context.Context, header *trdcommon.TrdHeader, orderType int32, code string, price float64, opts ...adapt.Option) (*trdcommon.MaxTrdQtys, error)
GetMaxTrdQtysWithContext 2111 - gets the maximum available trading quantities with context.
header: trading header
orderType: order type
code: security code, e.g. AAPL
price: price
func (*SDK) GetOpenOrderList ¶
func (sdk *SDK) GetOpenOrderList(header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.Order, error)
GetOpenOrderList 2201 - gets the open order list.
func (*SDK) GetOpenOrderListWithContext ¶
func (sdk *SDK) GetOpenOrderListWithContext(ctx context.Context, header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.Order, error)
GetOpenOrderListWithContext 2201 - gets the open order list with context.
func (*SDK) GetOptionChain ¶
func (sdk *SDK) GetOptionChain(code string, beginTime string, endTime string, opts ...adapt.Option) ([]*qotgetoptionchain.OptionChain, error)
GetOptionChain 3209 - gets the option chain with context.
code: security code
beginTime: begin time, format: "yyyy-MM-dd"
endTime: end time, format: "yyyy-MM-dd"
func (*SDK) GetOptionChainWithContext ¶
func (sdk *SDK) GetOptionChainWithContext(ctx context.Context, code string, beginTime string, endTime string, opts ...adapt.Option) ([]*qotgetoptionchain.OptionChain, error)
GetOptionChainWithContext 3209 - gets the option chain with context.
code: security code
beginTime: begin time, format: "yyyy-MM-dd"
endTime: end time, format: "yyyy-MM-dd"
func (*SDK) GetOptionExpirationDate ¶
func (sdk *SDK) GetOptionExpirationDate(code string, opts ...adapt.Option) ([]*qotgetoptionexpirationdate.OptionExpirationDate, error)
GetOptionExpirationDate 3224 - gets the option expiration date.
code: security code
func (*SDK) GetOptionExpirationDateWithContext ¶
func (sdk *SDK) GetOptionExpirationDateWithContext(ctx context.Context, code string, opts ...adapt.Option) ([]*qotgetoptionexpirationdate.OptionExpirationDate, error)
GetOptionExpirationDateWithContext 3224 - gets the option expiration date with context.
code: security code
func (*SDK) GetOrderBookWithContext ¶
func (sdk *SDK) GetOrderBookWithContext(ctx context.Context, code string, opts ...adapt.Option) (*qotgetorderbook.S2C, error)
GetOrderBookWithContext 3012 - gets the order book with context.
code: security code
func (*SDK) GetOrderFee ¶
func (sdk *SDK) GetOrderFee(header *trdcommon.TrdHeader, orderIdExList []string) ([]*trdcommon.OrderFee, error)
GetOrderFee 2225 - gets the order fee.
func (*SDK) GetOrderFeeWithContext ¶
func (sdk *SDK) GetOrderFeeWithContext(ctx context.Context, header *trdcommon.TrdHeader, orderIdExList []string) ([]*trdcommon.OrderFee, error)
GetOrderFeeWithContext 2225 - gets the order fee with context.
func (*SDK) GetOrderFillList ¶
func (sdk *SDK) GetOrderFillList(header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.OrderFill, error)
GetHistoryOrderList 2211 - gets the filled order list.
func (*SDK) GetOrderFillListWithContext ¶
func (sdk *SDK) GetOrderFillListWithContext(ctx context.Context, header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.OrderFill, error)
GetOrderFillListWithContext 2211 - gets the filled order list with context.
func (*SDK) GetOwnerPlate ¶
func (sdk *SDK) GetOwnerPlate(codes []string) ([]*qotgetownerplate.SecurityOwnerPlate, error)
GetOwnerPlate 3207 - gets the owner plate.
codes: security codes
func (*SDK) GetOwnerPlateWithContext ¶
func (sdk *SDK) GetOwnerPlateWithContext(ctx context.Context, codes []string) ([]*qotgetownerplate.SecurityOwnerPlate, error)
GetOwnerPlateWithContext 3207 - gets the owner plate with context.
codes: security codes
func (*SDK) GetPlateSecurity ¶
func (sdk *SDK) GetPlateSecurity(plateCode string, opts ...adapt.Option) ([]*qotcommon.SecurityStaticInfo, error)
GetPlateSecurity 3205 - gets the plate securities.
plateCode: plate code
func (*SDK) GetPlateSecurityWithContext ¶
func (sdk *SDK) GetPlateSecurityWithContext(ctx context.Context, plateCode string, opts ...adapt.Option) ([]*qotcommon.SecurityStaticInfo, error)
GetPlateSecurityWithContext 3205 - gets the plate securities with context.
plateCode: plate code
func (*SDK) GetPlateSet ¶
GetPlateSet 3204 - gets the plate set.
market: market
plateSetType: plate set type
func (*SDK) GetPlateSetWithContext ¶
func (sdk *SDK) GetPlateSetWithContext(ctx context.Context, market int32, plateSetType int32) ([]*qotcommon.PlateInfo, error)
GetPlateSetWithContext 3204 - gets the plate set with context.
market: market
plateSetType: plate set type
func (*SDK) GetPositionList ¶
func (sdk *SDK) GetPositionList(header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.Position, error)
GetPositionList 2102 - gets the position list.
func (*SDK) GetPositionListWithContext ¶
func (sdk *SDK) GetPositionListWithContext(ctx context.Context, header *trdcommon.TrdHeader, opts ...adapt.Option) ([]*trdcommon.Position, error)
GetPositionListWithContext 2102 - gets the position list with context.
func (*SDK) GetPriceReminder ¶
func (sdk *SDK) GetPriceReminder(code string, market int32) ([]*qotgetpricereminder.PriceReminder, error)
GetPriceReminder 3221 - gets the price reminder.
code: security code
market: market, if security is set, this param is ignored
func (*SDK) GetPriceReminderWithContext ¶
func (sdk *SDK) GetPriceReminderWithContext(ctx context.Context, code string, market int32) ([]*qotgetpricereminder.PriceReminder, error)
GetPriceReminderWithContext 3221 - gets the price reminder with context.
code: security code
market: market, if security is set, this param is ignored
func (*SDK) GetRTWithContext ¶
GetRTWithContext 3008 - gets real-time data with context.
code: security code
func (*SDK) GetReference ¶
GetReference 3206 - gets the reference data.
code: security code
refType: reference type
func (*SDK) GetReferenceWithContext ¶
func (sdk *SDK) GetReferenceWithContext(ctx context.Context, code string, refType int32) ([]*qotcommon.SecurityStaticInfo, error)
GetReferenceWithContext 3206 - gets the reference with context.
code: security code
refType: reference type
func (*SDK) GetSecuritySnapshot ¶
func (sdk *SDK) GetSecuritySnapshot(codes []string) ([]*qotgetsecuritysnapshot.Snapshot, error)
GetSecuritySnapshot 3203 - gets the security snapshot.
codes: security codes
func (*SDK) GetSecuritySnapshotWithContext ¶
func (sdk *SDK) GetSecuritySnapshotWithContext(ctx context.Context, codes []string) ([]*qotgetsecuritysnapshot.Snapshot, error)
GetSecuritySnapshotWithContext 3203 - gets the security snapshot with context.
codes: security codes
func (*SDK) GetStaticInfo ¶
GetStaticInfo 3202 - gets the static information.
func (*SDK) GetStaticInfoWithContext ¶
func (sdk *SDK) GetStaticInfoWithContext(ctx context.Context, opts ...adapt.Option) ([]*qotcommon.SecurityStaticInfo, error)
GetStaticInfoWithContext 3202 - gets the static information with context.
func (*SDK) GetSubInfo ¶
GetSubInfo 3003 - gets the subscription information.
func (*SDK) GetSubInfoWithContext ¶
func (sdk *SDK) GetSubInfoWithContext(ctx context.Context, opts ...adapt.Option) (*qotgetsubinfo.S2C, error)
GetSubInfoWithContext 3003 - gets the subscription information with context.
func (*SDK) GetTickerWithContext ¶
func (sdk *SDK) GetTickerWithContext(ctx context.Context, code string, opts ...adapt.Option) (*qotgetticker.S2C, error)
GetTickerWithContext 3010 - gets the ticker data with context.
code: security code
func (*SDK) GetUserSecurity ¶
func (sdk *SDK) GetUserSecurity(groupName string) ([]*qotcommon.SecurityStaticInfo, error)
GetUserSecurity 3213 - gets the user security.
groupName: group name
func (*SDK) GetUserSecurityGroup ¶
func (sdk *SDK) GetUserSecurityGroup(groupType int32) ([]*qotgetusersecuritygroup.GroupData, error)
GetUserSecurityGroup 3222 - gets the user security group.
groupType: group type
func (*SDK) GetUserSecurityGroupWithContext ¶
func (sdk *SDK) GetUserSecurityGroupWithContext(ctx context.Context, groupType int32) ([]*qotgetusersecuritygroup.GroupData, error)
GetUserSecurityGroupWithContext 3222 - gets the user security group with context.
groupType: group type
func (*SDK) GetUserSecurityWithContext ¶
func (sdk *SDK) GetUserSecurityWithContext(ctx context.Context, groupName string) ([]*qotcommon.SecurityStaticInfo, error)
GetUserSecurityWithContext 3213 - gets the user security with context.
groupName: group name
func (*SDK) GetWarrant ¶
func (sdk *SDK) GetWarrant(begin int32, num int32, opts ...adapt.Option) (*qotgetwarrant.S2C, error)
GetWarrant 3210 - gets the warrant, only available in Hong Kong market. Sort by score in descending order by default.
begin: begin index
num: number of warrants
func (*SDK) GetWarrantWithContext ¶
func (sdk *SDK) GetWarrantWithContext(ctx context.Context, begin int32, num int32, opts ...adapt.Option) (*qotgetwarrant.S2C, error)
GetWarrantWithContext 3210 - gets the warrant with context, only available in Hong Kong market. Sort by score in descending order by default.
begin: begin index
num: number of warrants
func (*SDK) ModifyOrder ¶
func (sdk *SDK) ModifyOrder(header *trdcommon.TrdHeader, orderID uint64, modifyOrderOp int32, opts ...adapt.Option) (*trdmodifyorder.S2C, error)
ModifyOrder 2205 - modifies an order with context.
header: trading header
orderID: order ID, use 0 if forAll=true
modifyOrderOp: modify order operation
func (*SDK) ModifyOrderWithContext ¶
func (sdk *SDK) ModifyOrderWithContext(ctx context.Context, header *trdcommon.TrdHeader, orderID uint64, modifyOrderOp int32, opts ...adapt.Option) (*trdmodifyorder.S2C, error)
ModifyOrderWithContext 2205 - modifies an order with context.
header: trading header
orderID: order ID, use 0 if forAll=true
modifyOrderOp: modify order operation
func (*SDK) ModifyUserSecurity ¶
ModifyUserSecurity 3214 - modifies the user security.
groupName: group name
codes: security codes
op: operation, 1 for add, 2 for delete
func (*SDK) ModifyUserSecurityWithContext ¶
func (sdk *SDK) ModifyUserSecurityWithContext(ctx context.Context, groupName string, codes []string, op int32) error
ModifyUserSecurityWithContext 3214 - modifies the user security with context.
groupName: group name
codes: security codes
op: operation
func (*SDK) PlaceOrder ¶
func (sdk *SDK) PlaceOrder(header *trdcommon.TrdHeader, trdSide int32, orderType int32, code string, qty float64, price float64, opts ...adapt.Option) (*trdplaceorder.S2C, error)
PlaceOrder 2202 - places an order.
header: trading header
trdSide: trading side
orderType: order type
code: security code, e.g. US.AAPL
qty: quantity
price: price
func (*SDK) PlaceOrderWithContext ¶
func (sdk *SDK) PlaceOrderWithContext(ctx context.Context, header *trdcommon.TrdHeader, trdSide int32, orderType int32, code string, qty float64, price float64, opts ...adapt.Option) (*trdplaceorder.S2C, error)
PlaceOrderWithContext 2202 - places an order with context.
header: trading header
trdSide: trading side
orderType: order type
code: security code, e.g. US.AAPL
qty: quantity
price: price
func (*SDK) RegisterHandler ¶
RegisterHandler registers a handler for notifications of a specified protoID.
func (*SDK) RequestHistoryKL ¶
func (sdk *SDK) RequestHistoryKL(code string, klType int32, beginTime string, endTime string, opts ...adapt.Option) (*qotrequesthistorykl.S2C, error)
RequestHistoryKL 3103 - requests the history K-line data.
code: security code
klType: K-line type
beginTime: begin time, format: "yyyy-MM-dd"
endTime: end time, format: "yyyy-MM-dd"
func (*SDK) RequestHistoryKLQuota ¶
RequestHistoryKLQuota 3104 - requests the history K-line quota.
func (*SDK) RequestHistoryKLQuotaWithContext ¶
func (sdk *SDK) RequestHistoryKLQuotaWithContext(ctx context.Context, opts ...adapt.Option) (*qotrequesthistoryklquota.S2C, error)
RequestHistoryKLQuotaWithContext 3104 - requests the history K-line quota with context.
func (*SDK) RequestHistoryKLWithContext ¶
func (sdk *SDK) RequestHistoryKLWithContext(ctx context.Context, code string, klType int32, beginTime string, endTime string, opts ...adapt.Option) (*qotrequesthistorykl.S2C, error)
RequestHistoryKLWithContext 3103 - requests the history K-line data with context.
code: security code
klType: K-line type
beginTime: begin time, format: "yyyy-MM-dd"
endTime: end time, format: "yyyy-MM-dd"
func (*SDK) RequestRehab ¶
func (sdk *SDK) RequestRehab(code string) (*qotrequestrehab.S2C, error)
RequestRehab 3105 - requests the rehab data.
func (*SDK) RequestRehabWithContext ¶
func (sdk *SDK) RequestRehabWithContext(ctx context.Context, code string) (*qotrequestrehab.S2C, error)
RequestRehabWithContext 3105 - requests the rehab data with context.
code: security code
func (*SDK) RequestTradeDate ¶
func (sdk *SDK) RequestTradeDate(market int32, code string, beginTime string, endTime string) ([]*qotrequesttradedate.TradeDate, error)
RequestTradeDate 3219 - requests the trade date.
market: market
code: security code
beginTime: begin time, format: "yyyy-MM-dd"
endTime: end time, format: "yyyy-MM-dd"
func (*SDK) RequestTradeDateWithContext ¶
func (sdk *SDK) RequestTradeDateWithContext(ctx context.Context, market int32, code string, beginTime string, endTime string) ([]*qotrequesttradedate.TradeDate, error)
RequestTradeDateWithContext 3219 - requests the trade date with context.
market: market
code: security code
beginTime: begin time, format: "yyyy-MM-dd"
endTime: end time, format: "yyyy-MM-dd"
func (*SDK) SetPriceReminder ¶
SetPriceReminder 3220 - sets the price reminder.
code: security code
op: operation, 1 for add, 2 for delete
func (*SDK) SetPriceReminderWithContext ¶
func (sdk *SDK) SetPriceReminderWithContext(ctx context.Context, code string, op int32, opts ...adapt.Option) (int64, error)
SetPriceReminderWithContext 3220 - sets the price reminder with context.
code: security code
op: operation
func (*SDK) StockFilterWithContext ¶
func (sdk *SDK) StockFilterWithContext(ctx context.Context, market int32, opts ...adapt.Option) (*qotstockfilter.S2C, error)
StockFilterWithContext 3215 - filters the stock with context.
market: market
func (*SDK) Subscribe ¶
Subscribe 3001 - subscribes or unsubscribes.
codes: security codes
subTypes: subscription types
isSub: true for subscribe, false for unsubscribe
func (*SDK) SubscribeAccPush ¶
SubscribeAccPush 2008 - subscribes the trading account push data.
accIDList: account ID list
func (*SDK) SubscribeAccPushWithContext ¶
SubscribeAccPushWithContext 2008 - subscribes the trading account push data.
accIDList: account ID list
func (*SDK) SubscribeWithContext ¶
func (sdk *SDK) SubscribeWithContext(ctx context.Context, codes []string, subTypes []int32, isSub bool, opts ...adapt.Option) error
SubscribeWithContext 3001 - subscribes or unsubscribes with context.
codes: security codes
subTypes: subscription types
isSub: true for subscribe, false for unsubscribe
func (*SDK) TrdFlowSummary ¶ added in v1.3.0
func (sdk *SDK) TrdFlowSummary(header *trdcommon.TrdHeader, clearingDate string) ([]*trdflowsummary.FlowSummaryInfo, error)
TrdFlowSummary 2226 - gets the trading flow summary.
func (*SDK) TrdFlowSummaryWithContext ¶ added in v1.3.0
func (sdk *SDK) TrdFlowSummaryWithContext(ctx context.Context, header *trdcommon.TrdHeader, clearingDate string) ([]*trdflowsummary.FlowSummaryInfo, error)
TrdFlowSummaryWithContext 2226 - gets the trading flow summary with context.
func (*SDK) UnlockTrade ¶
UnlockTrade 2005 - unlocks or locks the trade.
unlock: true for unlock, false for lock
pwdMD5: MD5 of the password
securityFirm: security firm