Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
Manager manages symbols in the target stock exchanges. symbol(s) can be newly registered / removed from the exchange, so target symbols should be update periodically.
type ManagerImpl ¶
type ManagerImpl struct { APIClient api.Client TargetExchanges []string TargetIndexGroups []string // identifier = {symbol}.{exchange} (i.e. "7203.XTKS"). Identifiers map[string][]string // IndexIdentifiers are the identifiers for index symbols (ex. "151.INDXJPX" (=TOPIX)) IndexIdentifiers map[string][]string }
ManagerImpl is an implementation of the Manager.
func NewManager ¶
func NewManager(apiClient api.Client, targetExchanges, targetIndexGroups []string) *ManagerImpl
NewManager initializes the SymbolManager object with the specified parameters.
func (*ManagerImpl) GetAllIdentifiers ¶
func (m *ManagerImpl) GetAllIdentifiers() []string
GetAllIdentifiers returns Identifiers for the target symbols for all the target exchanges identifier = {exchange}.{symbol} (ex. "XTKS.1301").
func (*ManagerImpl) GetAllIndexIdentifiers ¶
func (m *ManagerImpl) GetAllIndexIdentifiers() []string
GetAllIndexIdentifiers returns Identifiers for the target index symbols for all the index groups identifier = {exchange}.{symbol} (ex. "XTKS.1301").
func (*ManagerImpl) Update ¶
func (m *ManagerImpl) Update(ctx context.Context)
Update calls UpdateSymbols and UpdateIndexSymbols sequentially.
func (*ManagerImpl) UpdateIndexSymbols ¶
func (m *ManagerImpl) UpdateIndexSymbols(ctx context.Context)
UpdateIndexSymbols calls the ListIndexSymbols endpoint, convert the index symbols to the Identifiers and store them to the Identifiers map.
func (*ManagerImpl) UpdateSymbols ¶
func (m *ManagerImpl) UpdateSymbols(ctx context.Context)
UpdateSymbols calls the ListSymbols endpoint, convert the symbols to the Identifiers and store them to the Identifiers map.