account

package
v0.0.0-...-04e463c Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func SortByStrikePrice

func SortByStrikePrice(c *datasourcev1.Chain)

Types

type Market

type Market interface {
	// Search returns a list of symbols that match the given query
	Search(ctx context.Context, query string) ([]*datasourcev1.Symbol, error)
	// GetOptionExpirations returns a list of expiration dates for the given underlying, e.g. "SPY"
	// return as an asc list of strings in the format "YYYY-MM-DD", e.g. ["2021-01-15", "2021-02-19", ...]
	GetOptionExpirations(ctx context.Context, underlying string) ([]string, error)
	// GetOptionChains returns a list of option chains for the given underlying and expiration date
	// Because some symbols have multiple option chains, for example, SPX may return one for SPXW and one for SPY
	GetOptionChains(
		ctx context.Context, underlying string, expiration string,
	) ([]*datasourcev1.Chain, error)
	// GetTodayTradePeriod returns the trading period for today
	GetTodayTradePeriod(ctx context.Context) (*datasourcev1.TradePeriod, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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