data

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Etf

type Etf struct {
	Symbol  string
	Price   float32
	History []EtfHistory
}

Represents an Etf

type EtfClient

type EtfClient struct {
	BaseUrl   string
	UserAgent string
	// contains filtered or unexported fields
}

EtfClient Represents an etf client.

func NewEtfClient

func NewEtfClient() *EtfClient

NewEtfClient creates a new etf client.

func (*EtfClient) EtfExists

func (c *EtfClient) EtfExists(etfSymbol string) bool

EtfExists checks whether the named etfSymbol exists.

func (*EtfClient) GetEtf

func (c *EtfClient) GetEtf(etfSymbol string) (*Etf, error)

GetEtf retrieves the ETF information for the named etfSymbol and returns the scraped ETF.

type EtfHistory

type EtfHistory struct {
	Date  string
	Price float32
}

Represents a single history element of an ETF

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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