tpex

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HttpClient tkthttp.Client
}

func NewClient

func NewClient(minInterval time.Duration) *Client

func (*Client) FetchDailyQuotes

func (c *Client) FetchDailyQuotes(code string, year int, month time.Month) ([]Quote, error)

func (*Client) FetchDayQuotes

func (c *Client) FetchDayQuotes(date time.Time) (map[string]Quote, error)

func (*Client) FetchMonthlyQuotes

func (c *Client) FetchMonthlyQuotes(code string, year int) ([]Quote, error)

func (*Client) FetchYearlyQuotes

func (c *Client) FetchYearlyQuotes(code string) ([]Quote, error)

type Quote

type Quote struct {
	Code         string
	Name         string
	Date         time.Time
	Volume       uint64
	Transactions uint64
	Value        uint64
	High         float64
	Low          float64
	Open         float64
	Close        float64
	DateOfHigh   time.Time
	DateOfLow    time.Time
}

Jump to

Keyboard shortcuts

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