Documentation ¶
Index ¶
- type BaseInfoSrv
- func (i *BaseInfoSrv) GetAllShares(ctx context.Context) (*dtotapi.SharesResponse, error)
- func (i *BaseInfoSrv) GetDataStream(ctx context.Context) (investapi.MarketDataStreamService_MarketDataStreamClient, error)
- func (i *BaseInfoSrv) GetHistorySorted(figis []string, ivl investapi.CandleInterval, startTime time.Time, ...) ([]entity.History, error)
- func (i *BaseInfoSrv) GetInstrumentInfoByFigi(figi string, ctx context.Context) (*dtotapi.InstrumentResponse, error)
- func (i *BaseInfoSrv) GetLastPrices(figis []string, ctx context.Context) (*dtotapi.LastPricesResponse, error)
- type InfoProdService
- func (is *InfoProdService) GetAccounts(ctx context.Context) (*dtotapi.AccountsResponse, error)
- func (is *InfoProdService) GetOrderState(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
- func (is *InfoProdService) GetPositions(req *dtotapi.PositionsRequest, ctx context.Context) (*dtotapi.PositionsResponse, error)
- type InfoSandboxService
- func (is *InfoSandboxService) GetAccounts(ctx context.Context) (*dtotapi.AccountsResponse, error)
- func (is *InfoSandboxService) GetOrderState(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
- func (is *InfoSandboxService) GetPositions(req *dtotapi.PositionsRequest, ctx context.Context) (*dtotapi.PositionsResponse, error)
- type InfoSrv
- type StatService
- type StatServiceImpl
- type TradeProdService
- func (ts *TradeProdService) CancelOrder(req *dtotapi.CancelOrderRequest, ctx context.Context) (*dtotapi.CancelOrderResponse, error)
- func (ts *TradeProdService) GetOrderStatus(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
- func (ts *TradeProdService) PostOrder(req *dtotapi.PostOrderRequest, ctx context.Context) (*dtotapi.PostOrderResponse, error)
- type TradeSandboxService
- func (ts *TradeSandboxService) CancelOrder(req *dtotapi.CancelOrderRequest, ctx context.Context) (*dtotapi.CancelOrderResponse, error)
- func (ts *TradeSandboxService) GetOrderStatus(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
- func (ts *TradeSandboxService) PostOrder(req *dtotapi.PostOrderRequest, ctx context.Context) (*dtotapi.PostOrderResponse, error)
- type TradeService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseInfoSrv ¶
type BaseInfoSrv struct {
// contains filtered or unexported fields
}
func (*BaseInfoSrv) GetAllShares ¶
func (i *BaseInfoSrv) GetAllShares(ctx context.Context) (*dtotapi.SharesResponse, error)
func (*BaseInfoSrv) GetDataStream ¶
func (i *BaseInfoSrv) GetDataStream(ctx context.Context) (investapi.MarketDataStreamService_MarketDataStreamClient, error)
func (*BaseInfoSrv) GetHistorySorted ¶
func (*BaseInfoSrv) GetInstrumentInfoByFigi ¶
func (i *BaseInfoSrv) GetInstrumentInfoByFigi(figi string, ctx context.Context) (*dtotapi.InstrumentResponse, error)
func (*BaseInfoSrv) GetLastPrices ¶
func (i *BaseInfoSrv) GetLastPrices(figis []string, ctx context.Context) (*dtotapi.LastPricesResponse, error)
type InfoProdService ¶
type InfoProdService struct { *BaseInfoSrv // contains filtered or unexported fields }
func (*InfoProdService) GetAccounts ¶
func (is *InfoProdService) GetAccounts(ctx context.Context) (*dtotapi.AccountsResponse, error)
func (*InfoProdService) GetOrderState ¶
func (is *InfoProdService) GetOrderState(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
func (*InfoProdService) GetPositions ¶
func (is *InfoProdService) GetPositions(req *dtotapi.PositionsRequest, ctx context.Context) (*dtotapi.PositionsResponse, error)
type InfoSandboxService ¶
type InfoSandboxService struct { *BaseInfoSrv // contains filtered or unexported fields }
func (*InfoSandboxService) GetAccounts ¶
func (is *InfoSandboxService) GetAccounts(ctx context.Context) (*dtotapi.AccountsResponse, error)
func (*InfoSandboxService) GetOrderState ¶
func (is *InfoSandboxService) GetOrderState(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
func (*InfoSandboxService) GetPositions ¶
func (is *InfoSandboxService) GetPositions(req *dtotapi.PositionsRequest, ctx context.Context) (*dtotapi.PositionsResponse, error)
type InfoSrv ¶
type InfoSrv interface { //GetHistorySorted return sorted by time history in time interval GetHistorySorted(finis []string, ivl investapi.CandleInterval, startTime time.Time, endTime time.Time, ctx context.Context) ([]entity.History, error) //GetDataStream returns bidirectional data stream client GetDataStream(ctx context.Context) (investapi.MarketDataStreamService_MarketDataStreamClient, error) GetAllShares(ctx context.Context) (*dtotapi.SharesResponse, error) //GetInstrumentInfoByFigi returns instrument information by figi identifier GetInstrumentInfoByFigi(figi string, ctx context.Context) (*dtotapi.InstrumentResponse, error) //GetOrderState returns current order state and other info GetOrderState(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error) //GetAccounts returns accounts for the token GetAccounts(ctx context.Context) (*dtotapi.AccountsResponse, error) //GetLastPrices returns last price for the instrument GetLastPrices(figis []string, ctx context.Context) (*dtotapi.LastPricesResponse, error) //GetPositions returns current amount of money and instrument from the requested account GetPositions(req *dtotapi.PositionsRequest, ctx context.Context) (*dtotapi.PositionsResponse, error) }
func NewInfoProdService ¶
func NewInfoProdService(t tinapi.Api, logger *zap.SugaredLogger) InfoSrv
func NewInfoSandboxService ¶
func NewInfoSandboxService(t tinapi.Api, logger *zap.SugaredLogger) InfoSrv
type StatService ¶
type StatService interface { //GetAlgorithmStat returns statistics for the algorithm id GetAlgorithmStat(req *dto.StatAlgoRequest) (*dto.StatAlgoResponse, error) }
func NewStatService ¶
func NewStatService(statRep repository.StatRepository, logger *zap.SugaredLogger) StatService
type StatServiceImpl ¶
type StatServiceImpl struct {
// contains filtered or unexported fields
}
func (*StatServiceImpl) GetAlgorithmStat ¶
func (ss *StatServiceImpl) GetAlgorithmStat(req *dto.StatAlgoRequest) (*dto.StatAlgoResponse, error)
type TradeProdService ¶
func (*TradeProdService) CancelOrder ¶
func (ts *TradeProdService) CancelOrder(req *dtotapi.CancelOrderRequest, ctx context.Context) (*dtotapi.CancelOrderResponse, error)
func (*TradeProdService) GetOrderStatus ¶
func (ts *TradeProdService) GetOrderStatus(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
func (*TradeProdService) PostOrder ¶
func (ts *TradeProdService) PostOrder(req *dtotapi.PostOrderRequest, ctx context.Context) (*dtotapi.PostOrderResponse, error)
type TradeSandboxService ¶
func (*TradeSandboxService) CancelOrder ¶
func (ts *TradeSandboxService) CancelOrder(req *dtotapi.CancelOrderRequest, ctx context.Context) (*dtotapi.CancelOrderResponse, error)
func (*TradeSandboxService) GetOrderStatus ¶
func (ts *TradeSandboxService) GetOrderStatus(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error)
func (*TradeSandboxService) PostOrder ¶
func (ts *TradeSandboxService) PostOrder(req *dtotapi.PostOrderRequest, ctx context.Context) (*dtotapi.PostOrderResponse, error)
type TradeService ¶
type TradeService interface { //PostOrder posts order with requested params PostOrder(req *dtotapi.PostOrderRequest, ctx context.Context) (*dtotapi.PostOrderResponse, error) //GetOrderStatus returns status and information about the order GetOrderStatus(req *dtotapi.OrderStateRequest, ctx context.Context) (*dtotapi.OrderStateResponse, error) //CancelOrder cancels order and returns cancel result CancelOrder(req *dtotapi.CancelOrderRequest, ctx context.Context) (*dtotapi.CancelOrderResponse, error) }
TradeService provides methods for order management
func NewTradeProdService ¶
func NewTradeProdService(tapi tinapi.Api, logger *zap.SugaredLogger) TradeService
func NewTradeSandboxSrv ¶
func NewTradeSandboxSrv(tapi tinapi.Api, logger *zap.SugaredLogger) TradeService
Click to show internal directories.
Click to hide internal directories.