nasdaq

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const NASDAQ_FTP_HOSTNAME = "ftp.nasdaqtrader.com"
View Source
const NASDAQ_FTP_TRADED_PATH = "symboldirectory/nasdaqtraded.txt"
View Source
const NASDAQ_TRADED_FILENAME = "nasdaqtraded.txt"
View Source
const NASDAQ_TRADED_URL = "ftp://ftp.nasdaqtrader.com/symboldirectory/nasdaqtraded.txt"

Variables

This section is empty.

Functions

func FtpDownloadNasdaqTradedFile

func FtpDownloadNasdaqTradedFile() ([]byte, error)

Downloads the nasdaqtraded.txt file anonymously from NASDAQ's FTP. Returns the downloaded bytes or an error on failure.

func GetTapeForListingExchange

func GetTapeForListingExchange(listingExchange string) string

Returns Tape "A", "B", or "C" for the given listing exchange code. Returns "" for unknown

Types

type NasdaqCompleter

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

NasdaqCompleter implements ticker_autocomplete.TickerCompleter for NASDAQ-source symbol list

func NewCompleter

func NewCompleter() (*NasdaqCompleter, error)

NewCompleter returns a new Nasdaq Completer, loading symbols from cache or the Internet.

func (*NasdaqCompleter) GetAll added in v0.0.2

func (c *NasdaqCompleter) GetAll() []tac.Completion

func (*NasdaqCompleter) GetCompletions

func (c *NasdaqCompleter) GetCompletions(prompt string, limit int) []tac.Completion

GetCompletions returns completions for the given prompt.

type NasdaqTraded

type NasdaqTraded struct {
	Traded          string `csv:"Nasdaq Traded" db:"nasdaq_traded" json:"nasdaq_traded"`
	Symbol          string `csv:"Symbol" db:"symbol" json:"symbol"`
	Name            string `csv:"Security Name" db:"security_name" json:"security_name"`
	ListingExchange string `csv:"Listing Exchange" db:"listing_exchange" json:"listing_exchange"`
	Category        string `csv:"Market Category" db:"market_category" json:"market_category"`
	IsETF           string `csv:"ETF" db:"etf" json:"etf"`
	RoundLotSize    int    `csv:"Round Lot Size" db:"round_lot_size" json:"round_lot_size"`
	IsTestIssue     string `csv:"Test Issue" db:"test_issue" json:"test_issue"`
	FinancialStatus string `csv:"Financial Status" db:"financial_status" json:"financial_status"`
	CqsSymbol       string `csv:"CQS Symbol" db:"cqs_symbol" json:"cqs_symbol"`
	NasdaqSymbol    string `csv:"NASDAQ Symbol" db:"nasdaq_symbol" json:"nasdaq_symbol"`
	IsNextShare     string `csv:"NextShares" db:"nextshares" json:"nextshares"`
	Type            string `csv:"-" db:"security_type" json:"security_type"` // not in CSV
	Tape            string `csv:"-" db:"tape" json:"tape"`                   // not in CSV
}

NasdaqTraded is a CSV row of the Nasdaq Traded file Nasdaq Traded|Symbol|Security Name|Listing Exchange|Market Category|ETF|Round Lot Size|Test Issue|Financial Status|CQS Symbol|NASDAQ Symbol|NextShares

func FetchNasdaqTraded

func FetchNasdaqTraded() ([]NasdaqTraded, error)

func ParseNasdaqTradedBytes

func ParseNasdaqTradedBytes(nqt_bytes []byte) ([]NasdaqTraded, error)

Given a nasdaqtraded.txt input file bytes, returns an array of the parsed data. Returns nil and error upon any failure.

Jump to

Keyboard shortcuts

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