reference

package
v0.1.34 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OptionSymbol

type OptionSymbol map[string][]string

OptionSymbol represents one datum of that returned by the ref-data/options/symbols endpoint.

func GoldenOptionSymbol

func GoldenOptionSymbol() (symbols OptionSymbol)

GoldenOptionSymbol returns golden data for the OptionSymbol type

type Symbol

type Symbol struct {
	Symbol   string    `json:"symbol"`
	Name     string    `json:"name"`
	Exchange string    `json:"exchange"`
	IEXID    string    `json:"iexId"`
	Currency string    `json:"currency"`
	Date     time.Time `json:"-"`
	Type     string    `json:"type"`
	Enabled  bool      `json:"isEnabled"`
	Region   string    `json:"region"`
	FIGI     string    `json:"figi"`
	CIK      string    `json:"cik"`
}

Symbol represents one datum of that returned by the ref-data/symbols endpoint.

func GoldenSymbol

func GoldenSymbol() (symbols []Symbol)

GoldenSymbol returns golden data for the Symbol type

func (*Symbol) MarshalJSON

func (s *Symbol) MarshalJSON() ([]byte, error)

MarshalJSON satisfies the json.Unmarshaler interface. This function correctly translates the date field, which is specified as "YYYY-MM-DD", into a time.Time by using time.Parse().

func (*Symbol) UnmarshalJSON

func (s *Symbol) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON satisfies the json.Unmarshaler interface. This function correctly translates the date field, which is specified as "YYYY-MM-DD", into a time.Time by using time.Parse().

func (*Symbol) Validate

func (s *Symbol) Validate() error

Validate satisfies the Validator interface. It will return an error if the Symbol, IEXID, or Date fields are equal to their zero value.

Jump to

Keyboard shortcuts

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