io

package
v0.0.0-...-f086f5d Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMarketCap

func GetMarketCap(symbol string) float64

Types

type Action

type Action struct {
	Action, Params string
}

type Aggregate

type Aggregate struct {
	Ev, Sym                      string
	V, Av, Op, Vw, O, C, H, L, A float64
	S, E                         int64
}

type Alpaca

type Alpaca struct {
	Client *alpaca.Client
}

func NewAlpaca

func NewAlpaca() *Alpaca

func (*Alpaca) Exit

func (a *Alpaca) Exit()

func (*Alpaca) GetAccount

func (a *Alpaca) GetAccount() alpaca.Account

func (Alpaca) GetMarketTime

func (a Alpaca) GetMarketTime() (bool, time.Time, time.Time)

func (Alpaca) GetQuote

func (a Alpaca) GetQuote(symbol string) *alpaca.LastQuoteResponse

func (Alpaca) ListOpenOrders

func (a Alpaca) ListOpenOrders() []alpaca.Order

func (*Alpaca) ListPositions

func (a *Alpaca) ListPositions() []alpaca.Position

func (Alpaca) OrderBracket

func (a Alpaca) OrderBracket(symbol string, qty, price, takeProfit, stopLoss, stopLimit float64)

func (Alpaca) OrderLimit

func (a Alpaca) OrderLimit(symbol string, qty, limit decimal.Decimal)

type Financials

type Financials struct {
	Results []struct {
		MarketCapitalization float64
	}
}

type Polygon

type Polygon struct {
	Statuses chan Status
	// contains filtered or unexported fields
}

func InitPolygon

func InitPolygon() *Polygon

func (*Polygon) Exit

func (p *Polygon) Exit()

func (*Polygon) SubscribeTicker

func (p *Polygon) SubscribeTicker(symbol string) chan Aggregate

type Quote

type Quote struct {
	Status, Symbol string
	Last           struct {
		Asksize, Askexchange, Bidsize, Bidexchange int
		Askprice, Bidprice                         float64
	}
}

type Status

type Status struct {
	Ev, Status, Message string
}

Jump to

Keyboard shortcuts

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