quandl

package
v0.0.0-...-74856e8 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dev

func Dev()

Dev for development

Types

type HistoricalPrice

type HistoricalPrice struct {
	Code     int     `csv:"-"`
	CodeF    string  `csv:"-"` // code in string format
	Date     string  `csv:"Date"`
	Ask      float64 `csv:"Ask"`
	Bid      float64 `csv:"Bid"`
	Open     float64 `csv:"Previous Close"` // open is missing in quandl, using prev close
	High     float64 `csv:"High"`
	Low      float64 `csv:"Low"`
	Close    float64 `csv:"Nominal Price"`
	Volume   int     `csv:"Share Volume (000)"`
	Turnover int     `csv:"Turnover (000)"`
}

HistoricalPrice as the struct for the API result

type Quandl

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

Quandl

func New

func New(logger *logrus.Logger) Quandl

New as Quandl constructor

func (*Quandl) GetStock

func (q *Quandl) GetStock(code int, date string) ([]HistoricalPrice, error)

GetStock is the underlying function to get the stock by different code and date settings

func (*Quandl) GetStockByCode

func (q *Quandl) GetStockByCode(code int) ([]HistoricalPrice, error)

GetStockByCode is a wrapper to get all the historical dat a for a single stock

func (*Quandl) GetStockByDate

func (q *Quandl) GetStockByDate(date string) ([]HistoricalPrice, error)

GetStockByDate

func (*Quandl) Insert

func (q *Quandl) Insert(data []HistoricalPrice) error

Jump to

Keyboard shortcuts

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