v2

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adjustment

type Adjustment string

Adjustment specifies the corporate action adjustment(s) for the bars

const (
	None     Adjustment = "--"
	Raw      Adjustment = "raw"
	Split    Adjustment = "split"
	Dividend Adjustment = "dividend"
	All      Adjustment = "all"
)

List of adjustments

type Bar

type Bar struct {
	Open      float64   `json:"o"`
	High      float64   `json:"h"`
	Low       float64   `json:"l"`
	Close     float64   `json:"c"`
	Volume    uint64    `json:"v"`
	Timestamp time.Time `json:"t"`
}

Bar is an aggregate of trades

type BarItem

type BarItem struct {
	Bar   Bar
	Error error
}

BarItem contains a single bar or an error

type Quote

type Quote struct {
	BidExchange string    `json:"bx"`
	BidPrice    float64   `json:"bp"`
	BidSize     uint32    `json:"bs"`
	AskExchange string    `json:"ax"`
	AskPrice    float64   `json:"ap"`
	AskSize     uint32    `json:"as"`
	Timestamp   time.Time `json:"t"`
	Conditions  []string  `json:"c"`
	Tape        string    `json:"z"`
}

Quote is a stock quote from the market

type QuoteItem

type QuoteItem struct {
	Quote Quote
	Error error
}

QuoteItem contains a single quote or an error

type TimeFrame

type TimeFrame string

TimeFrame is the resolution of the bars

const (
	Min  TimeFrame = "1Min"
	Hour TimeFrame = "1Hour"
	Day  TimeFrame = "1Day"
)

List of time frames

type Trade

type Trade struct {
	ID         int64     `json:"i"`
	Exchange   string    `json:"x"`
	Price      float64   `json:"p"`
	Size       uint32    `json:"s"`
	Timestamp  time.Time `json:"t"`
	Conditions []string  `json:"c"`
	Tape       string    `json:"z"`
}

Trade is a stock trade that happened on the market

type TradeItem

type TradeItem struct {
	Trade Trade
	Error error
}

TradeItem contains a single trade or an error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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