io

package
v0.0.0-...-795205e Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterByBuyable

func FilterByBuyable(stocks ...stock.Stock) []stock.Stock

func FilterByRisk

func FilterByRisk(a *Alpaca, symbols []string) []string

func FilterByTradability

func FilterByTradability(a *Alpaca) []string

Types

type Alpaca

type Alpaca struct {
	Client *alpaca.Client
}

func NewAlpaca

func NewAlpaca() *Alpaca

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) GetSpendableAmount

func (a Alpaca) GetSpendableAmount() float64

func (Alpaca) GetStocks

func (a Alpaca) GetStocks(symbols ...string) []stock.Stock

func (Alpaca) LiquidatePosition

func (a Alpaca) LiquidatePosition(order alpaca.Order)

func (Alpaca) ListOpenOrders

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

func (Alpaca) OrderBracket

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

Jump to

Keyboard shortcuts

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