providers

package
v0.0.0-...-0a1f481 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Open = iota
	High
	Low
	Close
	AdjClose
	Volume
)
View Source
const (
	Fmp = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BarHistory

type BarHistory struct {
	Open     []float64
	High     []float64
	Low      []float64
	Close    []float64
	AdjClose []float64
	Volume   []int64
}

type BarType

type BarType int

type DataProvider

type DataProvider interface {
	GetHistBars(symbol string, period int) (*BarHistory, error)
}

type FMPConfig

type FMPConfig struct {
	APIKey                string `mapstructure:"apikey"`
	RequestLimitPerMinute int    `mapstructure:"requestlimitperminute"`
}

type FmpProvider

type FmpProvider struct {
	Client  *fmp.APIClient
	Limiter *rate.Limiter
}

func NewFmpProvider

func NewFmpProvider(config FMPConfig) *FmpProvider

func (*FmpProvider) GetHistBars

func (fmp *FmpProvider) GetHistBars(symbol string, period int) (*BarHistory, error)

type Provider

type Provider int

Jump to

Keyboard shortcuts

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