polygonio

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Basic     = Plan("basic")
	Starter   = Plan("starter")
	Developer = Plan("developer")
	Advanced  = Plan("advanced")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Plan

type Plan string

type Polygonio

type Polygonio struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, client *ent.Client, apikey string, plan Plan) (*Polygonio, error)

func (*Polygonio) BarRequest

func (pio *Polygonio) BarRequest(ctx context.Context, ticker string, intervalValue interval.Interval, startInterval, endInterval time.Time) (*agents.BarHistoryResults, error)

func (*Polygonio) CompanyAddress

func (pio *Polygonio) CompanyAddress() string

func (*Polygonio) CompanyName

func (pio *Polygonio) CompanyName() string

func (*Polygonio) DataSourceId

func (pio *Polygonio) DataSourceId() int

DataSourceId provides the database DataSourceID for Polygon.io

func (*Polygonio) DividendRequest

func (pio *Polygonio) DividendRequest(ctx context.Context, ticker string, start, end time.Time) (results []*ent.DividendCreate, payDates []time.Time, err error)

func (*Polygonio) Entity

func (pio *Polygonio) Entity(ctx context.Context, ticker string) (*ent.EntityCreate, error)

func (*Polygonio) EntitySearch

func (pio *Polygonio) EntitySearch(ctx context.Context, ticker string, limit int) ([]agents.EntitySearchResults, error)

func (*Polygonio) MaxTimeRange

func (pio *Polygonio) MaxTimeRange(intervalValue interval.Interval) (time.Time, time.Time)

MaxTimeRange: return the valid query time range based on the particular Polygon.io plan

func (*Polygonio) Name

func (pio *Polygonio) Name() string

func (*Polygonio) SplitRequest

func (pio *Polygonio) SplitRequest(ctx context.Context, ticker string, start, end time.Time) (results []*ent.SplitCreate, executionDates []time.Time, err error)

Jump to

Keyboard shortcuts

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