listing

package
v0.0.0-...-ad3e573 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithOnlyNamedExchanges

func WithOnlyNamedExchanges(exchanges []ExchangeName) func(*Options) error

WithOnlyNamedExchanges limits the set of returned listings to those available from the specified exchanges. Not setting an exchange filter means all listings from all exchanges are returned

func WithOnlyTypes

func WithOnlyTypes(types []AssetType) func(*Options) error

WithOnlyTypes limits the set of returned listings to be restricted to the specified AssetTypes Not setting a type filter means all listings of any type are returned.

Types

type AssetType

type AssetType int
const (
	UnknownAssetType AssetType = iota
	Stock
	ETF
	InvalidAssetType
)

func (AssetType) String

func (a AssetType) String() string

type Data

type Data struct {
	// Meta describes the details of the data
	Meta *Metadata
	// Tradeables is the map of all accessible data items
	Tradeables map[Symbol]*Info
}

Data is the returned object from a call to GetData

func GetActiveListing

func GetActiveListing(apiKey string, opts ...func(*Options) error) (*Data, error)

type ExchangeName

type ExchangeName string

ExchangeName is the type of an exchange's name

type Info

type Info struct {
	Symbol   Symbol
	Name     string
	Exchange ExchangeName
	Type     AssetType
	IPO      time.Time
	Delisted time.Time
}

Info is the set of information available for each symbol

type Metadata

type Metadata struct {
	// Options describes the options used
	Options *Options
}

Metadata describes how the request was made

type Options

type Options struct {
	// TypeFilter limits to only the specified AssetTypes.  Default is all AssetTypes
	TypeFilter []AssetType
	// ExchangeName limits to only the specified Exchanges.  Default is all Exchanges
	ExchangeFilter []ExchangeName
}

Options can change the returned Data from GetData

type Symbol

type Symbol string

Symbol is the type of the tradeable identifier

Jump to

Keyboard shortcuts

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