Documentation ¶
Index ¶
- type Api
- type DefaultTinApi
- func (t *DefaultTinApi) CancelProdOrder(req *dtotapi.CancelOrderRequest, ctx context.Context) (*dtotapi.CancelOrderResponse, error)
- func (t *DefaultTinApi) CancelSandboxOrder(req *dtotapi.CancelOrderRequest, ctx context.Context) (*dtotapi.CancelOrderResponse, error)
- func (t *DefaultTinApi) GetAllShares(ctx context.Context) (*dtotapi.SharesResponse, error)
- func (t *DefaultTinApi) GetHistory(figis []string, ivl investapi.CandleInterval, startDate time.Time, ...) ([]entity.History, error)
- func (t *DefaultTinApi) GetInstrumentInfo(req *dtotapi.InstrumentRequest, ctx context.Context) (*dtotapi.InstrumentResponse, error)
- func (t *DefaultTinApi) GetLastPrices(req *dtotapi.LastPricesRequest, ctx context.Context) (*dtotapi.LastPricesResponse, error)
- func (t *DefaultTinApi) GetOrderStream(accounts []string, ctx context.Context) (investapi.OrdersStreamService_TradesStreamClient, error)
- func (t *DefaultTinApi) GetProdAccounts(ctx context.Context) (*dtotapi.AccountsResponse, error)
- func (t *DefaultTinApi) GetProdOrderState(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
- func (t *DefaultTinApi) GetProdPositions(req *dtotapi.PositionsRequest, ctx context.Context) (*dtotapi.PositionsResponse, error)
- func (t *DefaultTinApi) GetSandboxAccounts(ctx context.Context) (*dtotapi.AccountsResponse, error)
- func (t *DefaultTinApi) GetSandboxOrderState(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
- func (t *DefaultTinApi) GetSandboxPositions(req *dtotapi.PositionsRequest, ctx context.Context) (*dtotapi.PositionsResponse, error)
- func (t *DefaultTinApi) MarketDataStream(ctx context.Context) (investapi.MarketDataStreamService_MarketDataStreamClient, error)
- func (t *DefaultTinApi) PostProdOrder(req *dtotapi.PostOrderRequest, ctx context.Context) (*dtotapi.PostOrderResponse, error)
- func (t *DefaultTinApi) PostSandboxOrder(req *dtotapi.PostOrderRequest, ctx context.Context) (*dtotapi.PostOrderResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api interface { GetHistory(figis []string, ivl investapi.CandleInterval, startDate time.Time, endDate time.Time, ctx context.Context) ([]entity.History, error) MarketDataStream(ctx context.Context) (investapi.MarketDataStreamService_MarketDataStreamClient, error) GetInstrumentInfo(req *dtotapi.InstrumentRequest, ctx context.Context) (*dtotapi.InstrumentResponse, error) GetLastPrices(req *dtotapi.LastPricesRequest, ctx context.Context) (*dtotapi.LastPricesResponse, error) GetOrderStream(accounts []string, ctx context.Context) (investapi.OrdersStreamService_TradesStreamClient, error) PostSandboxOrder(req *dtotapi.PostOrderRequest, ctx context.Context) (*dtotapi.PostOrderResponse, error) PostProdOrder(req *dtotapi.PostOrderRequest, ctx context.Context) (*dtotapi.PostOrderResponse, error) CancelSandboxOrder(req *dtotapi.CancelOrderRequest, ctx context.Context) (*dtotapi.CancelOrderResponse, error) CancelProdOrder(req *dtotapi.CancelOrderRequest, ctx context.Context) (*dtotapi.CancelOrderResponse, error) GetSandboxOrderState(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error) GetProdOrderState(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error) GetSandboxPositions(req *dtotapi.PositionsRequest, ctx context.Context) (*dtotapi.PositionsResponse, error) GetProdPositions(req *dtotapi.PositionsRequest, ctx context.Context) (*dtotapi.PositionsResponse, error) GetSandboxAccounts(ctx context.Context) (*dtotapi.AccountsResponse, error) GetProdAccounts(ctx context.Context) (*dtotapi.AccountsResponse, error) }
Api is a wrapper under generated GRPC to provide only required methods
func NewTinApi ¶
func NewTinApi(logger *zap.SugaredLogger) Api
type DefaultTinApi ¶
type DefaultTinApi struct {
// contains filtered or unexported fields
}
func (*DefaultTinApi) CancelProdOrder ¶
func (t *DefaultTinApi) CancelProdOrder(req *dtotapi.CancelOrderRequest, ctx context.Context) (*dtotapi.CancelOrderResponse, error)
func (*DefaultTinApi) CancelSandboxOrder ¶
func (t *DefaultTinApi) CancelSandboxOrder(req *dtotapi.CancelOrderRequest, ctx context.Context) (*dtotapi.CancelOrderResponse, error)
func (*DefaultTinApi) GetAllShares ¶
func (t *DefaultTinApi) GetAllShares(ctx context.Context) (*dtotapi.SharesResponse, error)
func (*DefaultTinApi) GetHistory ¶
func (*DefaultTinApi) GetInstrumentInfo ¶
func (t *DefaultTinApi) GetInstrumentInfo(req *dtotapi.InstrumentRequest, ctx context.Context) (*dtotapi.InstrumentResponse, error)
func (*DefaultTinApi) GetLastPrices ¶
func (t *DefaultTinApi) GetLastPrices(req *dtotapi.LastPricesRequest, ctx context.Context) (*dtotapi.LastPricesResponse, error)
func (*DefaultTinApi) GetOrderStream ¶
func (t *DefaultTinApi) GetOrderStream(accounts []string, ctx context.Context) (investapi.OrdersStreamService_TradesStreamClient, error)
func (*DefaultTinApi) GetProdAccounts ¶
func (t *DefaultTinApi) GetProdAccounts(ctx context.Context) (*dtotapi.AccountsResponse, error)
func (*DefaultTinApi) GetProdOrderState ¶
func (t *DefaultTinApi) GetProdOrderState(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
func (*DefaultTinApi) GetProdPositions ¶
func (t *DefaultTinApi) GetProdPositions(req *dtotapi.PositionsRequest, ctx context.Context) (*dtotapi.PositionsResponse, error)
func (*DefaultTinApi) GetSandboxAccounts ¶
func (t *DefaultTinApi) GetSandboxAccounts(ctx context.Context) (*dtotapi.AccountsResponse, error)
func (*DefaultTinApi) GetSandboxOrderState ¶
func (t *DefaultTinApi) GetSandboxOrderState(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
func (*DefaultTinApi) GetSandboxPositions ¶
func (t *DefaultTinApi) GetSandboxPositions(req *dtotapi.PositionsRequest, ctx context.Context) (*dtotapi.PositionsResponse, error)
func (*DefaultTinApi) MarketDataStream ¶
func (t *DefaultTinApi) MarketDataStream(ctx context.Context) (investapi.MarketDataStreamService_MarketDataStreamClient, error)
func (*DefaultTinApi) PostProdOrder ¶
func (t *DefaultTinApi) PostProdOrder(req *dtotapi.PostOrderRequest, ctx context.Context) (*dtotapi.PostOrderResponse, error)
func (*DefaultTinApi) PostSandboxOrder ¶
func (t *DefaultTinApi) PostSandboxOrder(req *dtotapi.PostOrderRequest, ctx context.Context) (*dtotapi.PostOrderResponse, error)
Click to show internal directories.
Click to hide internal directories.