alpaca

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Free      = Plan("free")
	Unlimited = Plan("unlimited")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alpaca

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

func New

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

func (*Alpaca) BarRequest

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

func (*Alpaca) DataSourceId

func (pio *Alpaca) DataSourceId() int

DataSourceId provides the database DataSourceID for Alpaca

func (*Alpaca) MarketHoursRequest

func (pio *Alpaca) MarketHoursRequest(ctx context.Context, start, end time.Time) ([]*ent.MarketHoursCreate, []time.Time, error)

func (*Alpaca) MaxTimeRange

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

MaxTimeRange returns the valid time range based on the particular Alpaca plan

func (*Alpaca) Name

func (pio *Alpaca) Name() string

type Plan

type Plan string

Jump to

Keyboard shortcuts

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