exchanges

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amex

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

Amex define american stock exchange

func NewAmex

func NewAmex() *Amex

NewAmex create american stock exchange

func (Amex) Code

func (s Amex) Code() string

Code get exchange code

func (Amex) Companies

func (s Amex) Companies() (map[string]*quotes.Company, error)

Companies get exchange companies

func (Amex) Crawl

func (s Amex) Crawl(company *quotes.Company, date time.Time) (*quotes.CompanyDailyQuote, error)

Crawl company daily quote

func (Amex) Location

func (s Amex) Location() *time.Location

Location get exchange location

type Exchange

type Exchange interface {
	Code() string
	Location() *time.Location
	Companies() (map[string]*quotes.Company, error)
	Crawl(*quotes.Company, time.Time) (*quotes.CompanyDailyQuote, error)
}

Exchange define exchanges

func Get

func Get(code string) (Exchange, bool)

Get get exchange by code

func Parse

func Parse(arg string) ([]Exchange, error)

Parse parse command argument

type Hkex

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

Hkex define hongkong exchange

func NewHkex

func NewHkex() *Hkex

NewHkex create hongkong exchange

func (Hkex) Code

func (s Hkex) Code() string

Code get exchange code

func (Hkex) Companies

func (s Hkex) Companies() (map[string]*quotes.Company, error)

Companies get exchange companies

func (Hkex) Crawl

func (s Hkex) Crawl(company *quotes.Company, date time.Time) (*quotes.CompanyDailyQuote, error)

Crawl company daily quote

func (Hkex) Location

func (s Hkex) Location() *time.Location

Location get exchange location

type Nasdaq

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

Nasdaq define nasdaq exchange

func NewNasdaq

func NewNasdaq() *Nasdaq

NewNasdaq create nasdaq exchange

func (Nasdaq) Code

func (s Nasdaq) Code() string

Code get exchange code

func (Nasdaq) Companies

func (s Nasdaq) Companies() (map[string]*quotes.Company, error)

Companies get exchange companies

func (Nasdaq) Crawl

func (s Nasdaq) Crawl(company *quotes.Company, date time.Time) (*quotes.CompanyDailyQuote, error)

Crawl company daily quote

func (Nasdaq) Location

func (s Nasdaq) Location() *time.Location

Location get exchange location

type Nyse

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

Nyse define new york stock exchange

func NewNyse

func NewNyse() *Nyse

NewNyse create new york stock exchange

func (Nyse) Code

func (s Nyse) Code() string

Code get exchange code

func (Nyse) Companies

func (s Nyse) Companies() (map[string]*quotes.Company, error)

Companies get exchange companies

func (Nyse) Crawl

func (s Nyse) Crawl(company *quotes.Company, date time.Time) (*quotes.CompanyDailyQuote, error)

Crawl company daily quote

func (Nyse) Location

func (s Nyse) Location() *time.Location

Location get exchange location

type Sse

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

Sse define shanghai stock exchange

func NewSse

func NewSse() *Sse

NewSse create shanghai stock exchange

func (Sse) Code

func (s Sse) Code() string

Code get exchange code

func (Sse) Companies

func (s Sse) Companies() (map[string]*quotes.Company, error)

Companies get exchange companies

func (Sse) Crawl

func (s Sse) Crawl(company *quotes.Company, date time.Time) (*quotes.CompanyDailyQuote, error)

Crawl company daily quote

func (Sse) Location

func (s Sse) Location() *time.Location

Location get exchange location

type Szse

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

Szse define shenzhen stock exchange

func NewSzse

func NewSzse() *Szse

NewSzse create shenzhen stock exchange

func (Szse) Code

func (s Szse) Code() string

Code get exchange code

func (Szse) Companies

func (s Szse) Companies() (map[string]*quotes.Company, error)

Companies get exchange companies

func (Szse) Crawl

func (s Szse) Crawl(company *quotes.Company, date time.Time) (*quotes.CompanyDailyQuote, error)

Crawl company daily quote

func (Szse) Location

func (s Szse) Location() *time.Location

Location get exchange location

Jump to

Keyboard shortcuts

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