investment

package
v0.0.0-...-2f87fcc Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Layout string = "2020-01-01 00:00"
View Source
const (
	RFC3339 = "2006-01-02T15:04:05Z07:00"
)

Variables

This section is empty.

Functions

func Date

func Date(year, month, day int) time.Time

Types

type Dividends

type Dividends struct {
	ID             string `json:"id"`
	Date           string `json:"date"`
	Ticker         string `json:"ticker"`
	Name           string `json:"name"`
	Exchange       string `json:"exchange"`
	Currency       string `json:"currency"`
	Frequency      int    `json:"frequency"`
	Dividend       string `json:"dividend"`
	DividendType   string `json:"dividend_type"`
	DividendYield  string `json:"dividend_yield"`
	ExDividendDate string `json:"ex_dividend_date"`
	PayableDate    string `json:"payable_date"`
	RecordDate     string `json:"record_date"`
	Importance     int    `json:"importance"`
	Updated        int    `json:"updated"`
}

Serializer for Dividends response

type DividendsClient

type DividendsClient struct {
	InvestmentClient
	// contains filtered or unexported fields
}

func NewDividendsClient

func NewDividendsClient(sampleTaskDao *persistence.SampleTaskDao, restClient *resty.Client) *DividendsClient

func (*DividendsClient) ProcessData

func (c *DividendsClient) ProcessData() (*[]uint64, *[]uint64, error)

type DividendsData

type DividendsData struct {
	Dividends []Dividends `json:"dividends"`
}

type Earning

type Earning struct {
	ID                     string `json:"id"`
	Date                   string `json:"date"`
	DateConfirmed          int16  `json:"date_confirmed"`
	Time                   string `json:"time"`
	Ticker                 string `json:"ticker"`
	Exchange               string `json:"exchange"`
	Name                   string `json:"name"`
	Period                 string `json:"period"`
	PeriodYear             int16  `json:"period_year"`
	Currency               string `json:"currency"`
	EPS                    string `json:"eps"`
	EPSEst                 string `json:"eps_est"`
	EPSPrior               string `json:"eps_prior"`
	EPSSuprise             string `json:"eps_surprise"`
	EPSSuprisePercent      string `json:"eps_surprise_percent"`
	EPSTYPE                string `json:"eps_type"`
	Revenue                string `json:"revenue"`
	RevenueEst             string `json:"revenue_est"`
	RevenuePrior           string `json:"revenue_prior"`
	RevenueSurprise        string `json:"revenue_surprise"`
	RevenueSurprisePercent string `json:"revenue_surprise_percent"`
	RevenueType            string `json:"revenue_type"`
	Importance             int16  `json:"importance"`
	Notes                  string `json:"notes"`
	Updated                int64  `json:"updated"`
}

type EarningClient

type EarningClient struct {
	InvestmentClient
	// contains filtered or unexported fields
}

func NewEarningsClient

func NewEarningsClient(sampleTaskDao *persistence.SampleTaskDao, restClient *resty.Client) *EarningClient

func (*EarningClient) ProcessData

func (c *EarningClient) ProcessData() (*[]uint64, *[]uint64, error)

type EarningsData

type EarningsData struct {
	Earning []Earning `json:"earnings"`
}

type Extractor

type Extractor interface {
	ProcessData() (*[]uint64, *[]uint64, error)
	// contains filtered or unexported methods
}

type IPO

type IPO struct {
	ID                             string   `json:"id"`
	Date                           string   `json:"date"`
	Time                           string   `json:"time"`
	Ticker                         string   `json:"ticker"`
	Exchange                       string   `json:"exchange"`
	Name                           string   `json:"name"`
	OpenDateVerified               bool     `json:"open_date_verified"`
	PricingDate                    string   `json:"pricing_date"`
	Currency                       string   `json:"currency"`
	PriceMin                       string   `json:"price_min"`
	PriceMax                       string   `json:"price_max"`
	DealStatus                     string   `json:"deal_status"`
	InsiderLockupDays              int      `json:"insider_lockup_days"`
	InsiderLockupDate              string   `json:"insider_lockup_date"`
	OfferingValue                  int      `json:"offering_value"`
	OfferingShares                 int      `json:"offering_shares"`
	SharesOutstanding              int      `json:"shares_outstanding"`
	LeadUnderwriters               []string `json:"lead_underwriters"`
	UnderwriterQuietExpirationDate string   `json:"underwriter_quiet_expiration_date"`
	Notes                          string   `json:"notes"`
	Updated                        int      `json:"updated"`
}

Serializer for IPO response

type IPOClient

type IPOClient struct {
	InvestmentClient
	// contains filtered or unexported fields
}

func NewIPOClient

func NewIPOClient(sampleTaskDao *persistence.SampleTaskDao, restClient *resty.Client) *IPOClient

func (*IPOClient) ProcessData

func (c *IPOClient) ProcessData() (*[]uint64, *[]uint64, error)

type IPOData

type IPOData struct {
	IPO []IPO `json:"ipos"`
}

type InvestmentClient

type InvestmentClient struct {
	Category string
	// contains filtered or unexported fields
}

func Init

func Init(categoryName string, sampleTaskDao *persistence.SampleTaskDao, restClient *resty.Client) InvestmentClient

func (*InvestmentClient) ProcessAllData

func (c *InvestmentClient) ProcessAllData(days int, e Extractor) (*[]uint64, *[]uint64, error)

Jump to

Keyboard shortcuts

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