securities

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

package securities contains the code for the SecuritiesService implementation.

Index

Constants

View Source
const QuoteProviderING = "ing"
View Source
const QuoteProviderYF = "yf"

Variables

View Source
var ErrEmptyResult = errors.New("empty result")

Functions

func RegisterQuoteProvider

func RegisterQuoteProvider(name string, qp QuoteProvider)

AddCommand adds a command using the specific symbol.

Types

type QuoteProvider

type QuoteProvider interface {
	LatestQuote(ctx context.Context, ls *portfoliov1.ListedSecurity) (quote *portfoliov1.Currency, t time.Time, err error)
}

QuoteProvider is an interface that retrieves quotes for a [ListedSecurity]. They can either be historical quotes or the latest quote.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL