Documentation
¶
Index ¶
- func Command[A, B proto.Message](ctx context.Context, c *Client, req A) (B, error)
- type Client
- func (c *Client) AccountAuthorize(accessToken string, CtidTraderAccountId int64) error
- func (c *Client) AccountList(accessToken string) ([]*openapi.ProtoOACtidTraderAccount, error)
- func (c *Client) RefreshAccessToken(refreshToken string) (string, error)
- func (c *Client) Start() error
- func (c *Client) Stop() error
- func (c *Client) SubscribeSpots(CtidTraderAccountId int64, symbols []int64, withTimeStamps bool) error
- func (c *Client) SymbolsList(CtidTraderAccountId int64) ([]*openapi.ProtoOALightSymbol, error)
- type ProtoOAError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
ApplicationClientID string
ApplicationSecret string
HandlerEvent func(proto.Message)
Deadline time.Duration
Logger *slog.Logger
Live bool
// contains filtered or unexported fields
}
func (*Client) AccountAuthorize ¶ added in v1.0.2
func (*Client) AccountList ¶ added in v1.0.2
func (c *Client) AccountList(accessToken string) ([]*openapi.ProtoOACtidTraderAccount, error)
func (*Client) RefreshAccessToken ¶ added in v1.0.3
func (*Client) SubscribeSpots ¶ added in v1.0.2
func (*Client) SymbolsList ¶ added in v1.0.2
func (c *Client) SymbolsList(CtidTraderAccountId int64) ([]*openapi.ProtoOALightSymbol, error)
type ProtoOAError ¶
func (ProtoOAError) Error ¶
func (e ProtoOAError) Error() string
Click to show internal directories.
Click to hide internal directories.