chart

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 6 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	B finance.Backend
}

Client is used to invoke chart APIs.

func (Client) Get

func (c Client) Get(params *Params) *Iter

Get returns a historical chart.

type Iter

type Iter struct {
	*iter.Iter
}

Iter is a structure containing results and related metadata for a yfin chart request.

func Get

func Get(params *Params) *Iter

Get returns a historical chart. and requires a params struct as an argument.

func (*Iter) Bar

func (i *Iter) Bar() *finance.ChartBar

Bar returns the next Bar visited by a call to Next.

func (*Iter) Meta

func (i *Iter) Meta() finance.ChartMeta

Meta returns the chart metadata related to a chart response.

type Params

type Params struct {
	// Context access.
	finance.Params `form:"-"`

	// Accessible fields.
	Symbol   string             `form:"-"`
	Start    *datetime.Datetime `form:"-"`
	End      *datetime.Datetime `form:"-"`
	Interval datetime.Interval  `form:"-"`

	IncludeExt bool `form:"includePrePost"`
	// contains filtered or unexported fields
}

Params carries a context and chart information.

Jump to

Keyboard shortcuts

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