Documentation ¶
Index ¶
- Constants
- func DefaultErrResponseTypes() []openapi.ProtoOAPayloadType
- func RequestMessageToProtoMessage(reqType uint32, payload proto.Message, clientMsgUuid *uuid.UUID) (*uuid.UUID, *openapi.ProtoMessage)
- func Reverse(s []byte)
- func ToByteArray(num int) []byte
- type Account
- func (account *Account) AccountLogout() (*openapi.ProtoOAAccountLogoutRes, error)
- func (account *Account) AmendOrder(req *openapi.ProtoOAAmendOrderReq) (*openapi.ProtoOAExecutionEvent, error)
- func (account *Account) AmendOrderPositionSlip(req *openapi.ProtoOAAmendPositionSLTPReq) (*openapi.ProtoOAExecutionEvent, error)
- func (account *Account) AssetClassList() (*openapi.ProtoOAAssetClassListRes, error)
- func (account *Account) AssetsList() (*openapi.ProtoOAAssetListRes, error)
- func (account *Account) CancelOrder(orderId int64) (*openapi.ProtoOAExecutionEvent, error)
- func (account *Account) CashFlowHistoryList(fromTimestamp, toTimestamp int64) (*openapi.ProtoOACashFlowHistoryListRes, error)
- func (account *Account) ClosePosition(positionId int64, volume int64) (*openapi.ProtoOAExecutionEvent, error)
- func (account *Account) DealList(fromTimestamp, toTimestamp int64, maxRows *int32) (*openapi.ProtoOADealListRes, error)
- func (account *Account) DealListByPositionId(positionId int64, fromTimestamp, toTimestamp int64) (*openapi.ProtoOADealListByPositionIdRes, error)
- func (account *Account) ExpectedMargin(symbolId int64, volume []int64) (*openapi.ProtoOAExpectedMarginRes, error)
- func (account *Account) GetDynamicLeverageByID(leverageId int64) (*openapi.ProtoOAGetDynamicLeverageByIDRes, error)
- func (account *Account) GetTickData(symbolId int64, quoteType openapi.ProtoOAQuoteType, ...) (*openapi.ProtoOAGetTickDataRes, error)
- func (account *Account) GetTrendbars(fromTimestamp, toTimestamp int64, period openapi.ProtoOATrendbarPeriod, ...) (*openapi.ProtoOAGetTrendbarsRes, error)
- func (account *Account) Id() int64
- func (account *Account) MarginCallList() (*openapi.ProtoOAMarginCallListRes, error)
- func (account *Account) MarginCallUpdate(marginCallType openapi.ProtoOANotificationType, marginLevelThreshold float64) (*openapi.ProtoOAMarginCallUpdateRes, error)
- func (account *Account) NewOrder(req *openapi.ProtoOANewOrderReq) (*openapi.ProtoOAExecutionEvent, error)
- func (account *Account) On(payloadType openapi.ProtoOAPayloadType) (bus.MessageHandler, error)
- func (account *Account) OnAccountDisconnect() (bus.MessageHandler, error)
- func (account *Account) OnAccountTokenInvalided() (bus.MessageHandler, error)
- func (account *Account) OnDepth() (bus.MessageHandler, error)
- func (account *Account) OnExecution() (bus.MessageHandler, error)
- func (account *Account) OnMarginCallTrigger() (bus.MessageHandler, error)
- func (account *Account) OnMarginCallUpdate() (bus.MessageHandler, error)
- func (account *Account) OnMarginChanged() (bus.MessageHandler, error)
- func (account *Account) OnOrderError() (bus.MessageHandler, error)
- func (account *Account) OnSpot() (bus.MessageHandler, error)
- func (account *Account) OnSymbolChange() (bus.MessageHandler, error)
- func (account *Account) OnTraderUpdate() (bus.MessageHandler, error)
- func (account *Account) OnTrailingSLChange() (bus.MessageHandler, error)
- func (account *Account) OrderList(fromTimestamp, toTimestamp int64) (*openapi.ProtoOAOrderListRes, error)
- func (account *Account) Reconcile() (*openapi.ProtoOAReconcileRes, error)
- func (account *Account) SubscribeDepthQuotes(symbolId []int64) (*openapi.ProtoOASubscribeDepthQuotesRes, error)
- func (account *Account) SubscribeLiveTrendbar(symbolId int64, period openapi.ProtoOATrendbarPeriod) (*openapi.ProtoOASubscribeLiveTrendbarRes, error)
- func (account *Account) SubscribeSpots(symbolId []int64) (*openapi.ProtoOASubscribeSpotsRes, error)
- func (account *Account) SymbolById(ids []int64) (*openapi.ProtoOASymbolByIdRes, error)
- func (account *Account) SymbolCategoryList() (*openapi.ProtoOASymbolCategoryListRes, error)
- func (account *Account) SymbolList() (*openapi.ProtoOASymbolsListRes, error)
- func (account *Account) SymbolsForConversion(firstAssetId, lastAssetId int64) (*openapi.ProtoOASymbolsForConversionRes, error)
- func (account *Account) Trader() (*openapi.ProtoOATraderRes, error)
- func (account *Account) UnsubscribeDepthQuotes(symbolId []int64) (*openapi.ProtoOAUnsubscribeDepthQuotesRes, error)
- func (account *Account) UnsubscribeLiveTrendbar(symbolId int64, period openapi.ProtoOATrendbarPeriod) (*openapi.ProtoOAUnsubscribeLiveTrendbarRes, error)
- func (account *Account) UnsubscribeSpots(symbolId []int64) (*openapi.ProtoOAUnsubscribeSpotsRes, error)
- type Client
- func (client *Client) Account(accountId int64) (*Account, error)
- func (client *Client) ApplicationAuth() (*openapi.ProtoOAApplicationAuthRes, error)
- func (client *Client) Close() error
- func (client *Client) Connect() error
- func (client *Client) GetAccountListByAccessToken(accessToken string) (*openapi.ProtoOAGetAccountListByAccessTokenRes, error)
- func (client *Client) GetCtidProfileByToken(accessToken string) (*openapi.ProtoOAGetCtidProfileByTokenRes, error)
- func (client *Client) On(payloadType openapi.ProtoOAPayloadType) (bus.MessageHandler, error)
- func (client *Client) OnConnClose() (bus.MessageHandler, error)
- func (client *Client) RefreshToken(refreshToken string) (*openapi.ProtoOARefreshTokenRes, error)
- func (client *Client) SendRequest(reqType openapi.ProtoOAPayloadType, resType []openapi.ProtoOAPayloadType, ...) (interface{}, error)
- func (client *Client) Version() (*openapi.ProtoOAVersionRes, error)
- type Conn
- type ConnOption
- type ResponseMessageHandlerError
Constants ¶
View Source
const (
ConnOnClosed = "onClosed"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultErrResponseTypes ¶
func DefaultErrResponseTypes() []openapi.ProtoOAPayloadType
func ToByteArray ¶
Types ¶
type Account ¶
type Account struct {
// contains filtered or unexported fields
}
func (*Account) AccountLogout ¶
func (account *Account) AccountLogout() (*openapi.ProtoOAAccountLogoutRes, error)
func (*Account) AmendOrder ¶
func (account *Account) AmendOrder(req *openapi.ProtoOAAmendOrderReq) (*openapi.ProtoOAExecutionEvent, error)
func (*Account) AmendOrderPositionSlip ¶
func (account *Account) AmendOrderPositionSlip(req *openapi.ProtoOAAmendPositionSLTPReq) (*openapi.ProtoOAExecutionEvent, error)
func (*Account) AssetClassList ¶
func (account *Account) AssetClassList() (*openapi.ProtoOAAssetClassListRes, error)
func (*Account) AssetsList ¶
func (account *Account) AssetsList() (*openapi.ProtoOAAssetListRes, error)
func (*Account) CancelOrder ¶
func (account *Account) CancelOrder(orderId int64) (*openapi.ProtoOAExecutionEvent, error)
func (*Account) CashFlowHistoryList ¶
func (account *Account) CashFlowHistoryList(fromTimestamp, toTimestamp int64) (*openapi.ProtoOACashFlowHistoryListRes, error)
func (*Account) ClosePosition ¶
func (*Account) DealListByPositionId ¶
func (*Account) ExpectedMargin ¶
func (*Account) GetDynamicLeverageByID ¶
func (account *Account) GetDynamicLeverageByID(leverageId int64) (*openapi.ProtoOAGetDynamicLeverageByIDRes, error)
func (*Account) GetTickData ¶
func (account *Account) GetTickData(symbolId int64, quoteType openapi.ProtoOAQuoteType, fromTimestamp, toTimestamp int64) (*openapi.ProtoOAGetTickDataRes, error)
func (*Account) GetTrendbars ¶
func (account *Account) GetTrendbars(fromTimestamp, toTimestamp int64, period openapi.ProtoOATrendbarPeriod, symbolId int64, count uint32) (*openapi.ProtoOAGetTrendbarsRes, error)
func (*Account) MarginCallList ¶
func (account *Account) MarginCallList() (*openapi.ProtoOAMarginCallListRes, error)
func (*Account) MarginCallUpdate ¶
func (account *Account) MarginCallUpdate(marginCallType openapi.ProtoOANotificationType, marginLevelThreshold float64) (*openapi.ProtoOAMarginCallUpdateRes, error)
func (*Account) NewOrder ¶
func (account *Account) NewOrder(req *openapi.ProtoOANewOrderReq) (*openapi.ProtoOAExecutionEvent, error)
func (*Account) On ¶
func (account *Account) On(payloadType openapi.ProtoOAPayloadType) (bus.MessageHandler, error)
func (*Account) OnAccountDisconnect ¶
func (account *Account) OnAccountDisconnect() (bus.MessageHandler, error)
func (*Account) OnAccountTokenInvalided ¶
func (account *Account) OnAccountTokenInvalided() (bus.MessageHandler, error)
func (*Account) OnExecution ¶
func (account *Account) OnExecution() (bus.MessageHandler, error)
func (*Account) OnMarginCallTrigger ¶
func (account *Account) OnMarginCallTrigger() (bus.MessageHandler, error)
func (*Account) OnMarginCallUpdate ¶
func (account *Account) OnMarginCallUpdate() (bus.MessageHandler, error)
func (*Account) OnMarginChanged ¶
func (account *Account) OnMarginChanged() (bus.MessageHandler, error)
func (*Account) OnOrderError ¶
func (account *Account) OnOrderError() (bus.MessageHandler, error)
func (*Account) OnSymbolChange ¶
func (account *Account) OnSymbolChange() (bus.MessageHandler, error)
func (*Account) OnTraderUpdate ¶
func (account *Account) OnTraderUpdate() (bus.MessageHandler, error)
func (*Account) OnTrailingSLChange ¶
func (account *Account) OnTrailingSLChange() (bus.MessageHandler, error)
func (*Account) OrderList ¶
func (account *Account) OrderList(fromTimestamp, toTimestamp int64) (*openapi.ProtoOAOrderListRes, error)
func (*Account) Reconcile ¶
func (account *Account) Reconcile() (*openapi.ProtoOAReconcileRes, error)
func (*Account) SubscribeDepthQuotes ¶
func (account *Account) SubscribeDepthQuotes(symbolId []int64) (*openapi.ProtoOASubscribeDepthQuotesRes, error)
func (*Account) SubscribeLiveTrendbar ¶
func (account *Account) SubscribeLiveTrendbar(symbolId int64, period openapi.ProtoOATrendbarPeriod) (*openapi.ProtoOASubscribeLiveTrendbarRes, error)
func (*Account) SubscribeSpots ¶
func (account *Account) SubscribeSpots(symbolId []int64) (*openapi.ProtoOASubscribeSpotsRes, error)
func (*Account) SymbolById ¶
func (account *Account) SymbolById(ids []int64) (*openapi.ProtoOASymbolByIdRes, error)
func (*Account) SymbolCategoryList ¶
func (account *Account) SymbolCategoryList() (*openapi.ProtoOASymbolCategoryListRes, error)
func (*Account) SymbolList ¶
func (account *Account) SymbolList() (*openapi.ProtoOASymbolsListRes, error)
func (*Account) SymbolsForConversion ¶
func (account *Account) SymbolsForConversion(firstAssetId, lastAssetId int64) (*openapi.ProtoOASymbolsForConversionRes, error)
func (*Account) UnsubscribeDepthQuotes ¶
func (account *Account) UnsubscribeDepthQuotes(symbolId []int64) (*openapi.ProtoOAUnsubscribeDepthQuotesRes, error)
func (*Account) UnsubscribeLiveTrendbar ¶
func (account *Account) UnsubscribeLiveTrendbar(symbolId int64, period openapi.ProtoOATrendbarPeriod) (*openapi.ProtoOAUnsubscribeLiveTrendbarRes, error)
func (*Account) UnsubscribeSpots ¶
func (account *Account) UnsubscribeSpots(symbolId []int64) (*openapi.ProtoOAUnsubscribeSpotsRes, error)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) ApplicationAuth ¶
func (client *Client) ApplicationAuth() (*openapi.ProtoOAApplicationAuthRes, error)
func (*Client) GetAccountListByAccessToken ¶
func (client *Client) GetAccountListByAccessToken(accessToken string) (*openapi.ProtoOAGetAccountListByAccessTokenRes, error)
func (*Client) GetCtidProfileByToken ¶
func (client *Client) GetCtidProfileByToken(accessToken string) (*openapi.ProtoOAGetCtidProfileByTokenRes, error)
func (*Client) On ¶
func (client *Client) On(payloadType openapi.ProtoOAPayloadType) (bus.MessageHandler, error)
func (*Client) OnConnClose ¶
func (client *Client) OnConnClose() (bus.MessageHandler, error)
func (*Client) RefreshToken ¶
func (client *Client) RefreshToken(refreshToken string) (*openapi.ProtoOARefreshTokenRes, error)
func (*Client) SendRequest ¶
func (client *Client) SendRequest(reqType openapi.ProtoOAPayloadType, resType []openapi.ProtoOAPayloadType, errType []openapi.ProtoOAPayloadType, req proto.Message, clientMsgUuid *uuid.UUID) (interface{}, error)
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func NewConn ¶
func NewConn(addr string, options ...ConnOption) *Conn
type ConnOption ¶
type ConnOption func(conn *Conn)
func TlsCertificatesConnOption ¶
func TlsCertificatesConnOption(certificates []tls.Certificate) ConnOption
type ResponseMessageHandlerError ¶
func (*ResponseMessageHandlerError) Error ¶
func (resMsgHandlerErr *ResponseMessageHandlerError) Error() string
Click to show internal directories.
Click to hide internal directories.