finance

package
v0.0.0-...-a9a37cd Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package finance provides interfaces and types for financial data services.

Consumers use financial data sources to continually retrieve stock quotes for a given subset of stock symbols.

Index

Constants

This section is empty.

Variables

View Source
var DefaultSymbols = []string{"fb", "amzn", "aapl", "nflx", "goog"}

Functions

This section is empty.

Types

type Provider

type Provider interface {
	GetQuotes(ctx context.Context, symbol ...string) ([]Quote, error)
}

Provider describes an object that returns one quote per given stock symbol.

type Quote

type Quote struct {
	Price  float64   `json:"price"`
	Symbol string    `json:"symbol"`
	Time   time.Time `json:"time"`
}

Quote represents the snapshot of a stock's price.

type QuoteBatch

type QuoteBatch map[string][]Quote

Directories

Path Synopsis
Package iexcloud provides a finance.Provider implementation that retrieves its data from IEX Cloud's API.
Package iexcloud provides a finance.Provider implementation that retrieves its data from IEX Cloud's API.

Jump to

Keyboard shortcuts

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