Versions in this module Expand all Collapse all v1 v1.1.0 Mar 16, 2022 v1.0.2 Mar 18, 2022 v1.0.1 Mar 16, 2022 v1.0.0 Mar 16, 2022 Changes in this version + const ReconnectWaitSecond + const TimerIntervalSecond + func GZipDecompress(input []byte) (string, error) + type AuthV2Message struct + AcType string + Cid string + Data struct{ ... } + ErrorCode int + ErrorMsg string + func ParseWSV2AuthResp(message string) *AuthV2Message + type AuthenticationV2ResponseHandler func(resp *AuthV2Message) + type BaseV2Message struct + Action string + Ts int64 + func ParseBaseV2Message(message string) *BaseV2Message + type ConnectedHandler func() + type MessageHandler func(message string) (interface{}, error) + type MethonInfo struct + func (wsOp *MethonInfo) Init(fun interface{}, param reflect.Type) *MethonInfo + type OnReqBasisResponse func(*index.ReqBasisResponse) + type OnReqEstimatedRateResponse func(*index.ReqIndexKLineResponse) + type OnReqIndexKLineResponse func(*index.ReqIndexKLineResponse) + type OnReqKLineResponse func(*market.ReqKLineResponse) + type OnReqMarkPriceKLineResponse func(*index.ReqIndexKLineResponse) + type OnReqPremiumIndexKLineResponse func(*index.ReqIndexKLineResponse) + type OnReqTradeDetailResponse func(*market.ReqTradeDetailResponse) + type OnSubAccountsResponse func(*notify.SubAccountsResponse) + type OnSubBBOResponse func(*market.SubBBOResponse) + type OnSubBasisResponse func(*index.SubBasiesResponse) + type OnSubContractInfoResponse func(*notify.SubContractInfoResponse) + type OnSubDepthResponse func(*market.SubDepthResponse) + type OnSubDetailResponse func(*market.SubKLineResponse) + type OnSubEstimatedRateResponse func(*index.SubIndexKLineResponse) + type OnSubFundingRateResponse func(*notify.SubFundingRateResponse) + type OnSubIndexKLineResponse func(*index.SubIndexKLineResponse) + type OnSubKLineResponse func(*market.SubKLineResponse) + type OnSubLiquidationOrdersResponse func(*notify.SubLiquidationOrdersResponse) + type OnSubMarkPriceKLineResponse func(*index.SubIndexKLineResponse) + type OnSubMatchOrdersResponse func(*notify.SubOrdersResponse) + type OnSubOrdersResponse func(*notify.SubOrdersResponse) + type OnSubPositionsResponse func(*notify.SubPositionsResponse) + type OnSubPremiumIndexKLineResponse func(*index.SubIndexKLineResponse) + type OnSubTradeDetailResponse func(*market.SubTradeDetailResponse) + type OnSubTriggerOrderResponse func(*notify.SubTriggerOrderResponse) + type PingMessage struct + Ping int64 + func ParsePingMessage(message string) *PingMessage + type PingV2Message struct + Action string + Ts string + func ParsePingV2Message(message string) *PingV2Message + func (p *PingV2Message) IsPing() bool + type ResponseHandler func(response interface{}) + type WSIndexClient struct + func (wsIx *WSIndexClient) Init(host string) *WSIndexClient + func (wsIx *WSIndexClient) ReqBasis(contractCode string, period string, callbackFun OnReqBasisResponse, from int64, ...) + func (wsIx *WSIndexClient) ReqEstimatedRateKLine(contractCode string, period string, callbackFun OnReqEstimatedRateResponse, ...) + func (wsIx *WSIndexClient) ReqIndexKLine(contractCode string, period string, callbackFun OnReqIndexKLineResponse, ...) + func (wsIx *WSIndexClient) ReqMarkPriceKLine(contractCode string, period string, callbackFun OnReqMarkPriceKLineResponse, ...) + func (wsIx *WSIndexClient) ReqPremiumIndexKLine(contractCode string, period string, callbackFun OnReqPremiumIndexKLineResponse, ...) + func (wsIx *WSIndexClient) SubBasis(contractCode string, period string, callbackFun OnSubBasisResponse, ...) + func (wsIx *WSIndexClient) SubEstimatedRateKLine(contractCode string, period string, callbackFun OnSubEstimatedRateResponse, ...) + func (wsIx *WSIndexClient) SubIndexKLine(contractCode string, period string, callbackFun OnSubIndexKLineResponse, ...) + func (wsIx *WSIndexClient) SubMarkPriceKLine(contractCode string, period string, callbackFun OnSubMarkPriceKLineResponse, ...) + func (wsIx *WSIndexClient) SubPremiumIndexKLine(contractCode string, period string, callbackFun OnSubPremiumIndexKLineResponse, ...) + type WSMarketClient struct + func (wsMk *WSMarketClient) Init(host string) *WSMarketClient + func (wsMk *WSMarketClient) ReqKLine(contractCode string, period string, callbackFun OnReqKLineResponse, from int64, ...) + func (wsMk *WSMarketClient) ReqTradeDetail(contractCode string, callbackFun OnReqTradeDetailResponse, id string) + func (wsMk *WSMarketClient) SubBBO(contractCode string, callbackFun OnSubBBOResponse, id string) + func (wsMk *WSMarketClient) SubDepth(contractCode string, fcType string, callbackFun OnSubDepthResponse, id string) + func (wsMk *WSMarketClient) SubDetail(contractCode string, callbackFun OnSubDetailResponse, id string) + func (wsMk *WSMarketClient) SubIncrementalDepth(contractCode string, size string, callbackFun OnSubDepthResponse, id string) + func (wsMk *WSMarketClient) SubKLine(contractCode string, period string, callbackFun OnSubKLineResponse, id string) + func (wsMk *WSMarketClient) SubTradeDetail(contractCode string, callbackFun OnSubTradeDetailResponse, id string) + type WSNotifyClient struct + func (wsNf *WSNotifyClient) CrossSubAcounts(contractCode string, callbackFun OnSubAccountsResponse, cid string) + func (wsNf *WSNotifyClient) CrossSubMatchOrders(contractCode string, callbackFun OnSubMatchOrdersResponse, cid string) + func (wsNf *WSNotifyClient) CrossSubOrders(contractCode string, callbackFun OnSubOrdersResponse, cid string) + func (wsNf *WSNotifyClient) CrossSubPositions(contractCode string, callbackFun OnSubPositionsResponse, cid string) + func (wsNf *WSNotifyClient) CrossSubTriggerOrder(contractCode string, callbackFun OnSubTriggerOrderResponse, cid string) + func (wsNf *WSNotifyClient) CrossUnsubAccounts(marginAccount string, cid string) + func (wsNf *WSNotifyClient) CrossUnsubMathOrders(contractCode string, cid string) + func (wsNf *WSNotifyClient) CrossUnsubOrders(contractCode string, cid string) + func (wsNf *WSNotifyClient) CrossUnsubPositions(contractCode string, cid string) + func (wsNf *WSNotifyClient) CrossUnsubTriggerOrder(contractCode string, cid string) + func (wsNf *WSNotifyClient) Init(accessKey string, secretKey string, host string) *WSNotifyClient + func (wsNf *WSNotifyClient) IsolatdUnsubPositions(contractCode string, cid string) + func (wsNf *WSNotifyClient) IsolatedSubAcounts(contractCode string, callbackFun OnSubAccountsResponse, cid string) + func (wsNf *WSNotifyClient) IsolatedSubMatchOrders(contractCode string, callbackFun OnSubMatchOrdersResponse, cid string) + func (wsNf *WSNotifyClient) IsolatedSubOrders(contractCode string, callbackFun OnSubOrdersResponse, cid string) + func (wsNf *WSNotifyClient) IsolatedSubPositions(contractCode string, callbackFun OnSubPositionsResponse, cid string) + func (wsNf *WSNotifyClient) IsolatedSubTriggerOrder(contractCode string, callbackFun OnSubTriggerOrderResponse, cid string) + func (wsNf *WSNotifyClient) IsolatedUnsubAccounts(contractCode string, cid string) + func (wsNf *WSNotifyClient) IsolatedUnsubMathOrders(contractCode string, cid string) + func (wsNf *WSNotifyClient) IsolatedUnsubOrders(contractCode string, cid string) + func (wsNf *WSNotifyClient) IsolatedUnsubTriggerOrder(contractCode string, cid string) + func (wsNf *WSNotifyClient) SubContractInfo(contractCode string, callbackFun OnSubContractInfoResponse, cid string) + func (wsNf *WSNotifyClient) SubFundingRate(contractCode string, callbackFun OnSubFundingRateResponse, cid string) + func (wsNf *WSNotifyClient) SubLiquidationOrders(contractCode string, callbackFun OnSubLiquidationOrdersResponse, cid string) + func (wsNf *WSNotifyClient) UnsubContractInfo(contractCode string, cid string) + func (wsNf *WSNotifyClient) UnsubFundingRate(contractCode string, cid string) + func (wsNf *WSNotifyClient) UnsubLiquidationOrders(contractCode string, cid string) + type WebSocketClientBase struct + func (p *WebSocketClientBase) Close() + func (p *WebSocketClientBase) Connect(autoConnect bool) + func (p *WebSocketClientBase) Init(host string, path string) *WebSocketClientBase + func (p *WebSocketClientBase) Send(data string) + func (p *WebSocketClientBase) SetHandler(connHandler ConnectedHandler, msgHandler MessageHandler, ...) + type WebSocketOp struct + type WebSocketV2ClientBase struct + func (p *WebSocketV2ClientBase) Close() + func (p *WebSocketV2ClientBase) Connect(autoConnect bool) + func (p *WebSocketV2ClientBase) Init(accessKey string, secretKey string, host string, path string) *WebSocketV2ClientBase + func (p *WebSocketV2ClientBase) Send(data string) + func (p *WebSocketV2ClientBase) SetHandler(authHandler AuthenticationV2ResponseHandler, msgHandler MessageHandler, ...)