config

package
v4.1.23 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// How many workers should be used to process the incoming WS messages
	WSWorkerCount int `json:"ws_worker_count"`
	// Alpaca API key ID for authenticating with their APIs
	APIKey string `json:"api_key"`
	// Alpaca API key secret for authenticating with their APIs
	APISecret string `json:"api_secret"`
	// websocket server for Alpaca
	WSServer string `json:"ws_server"`
	// The things we want to subscribe to
	Subscription
}

Config describes the AlpacaStreamer configuration.

type Subscription

type Subscription struct {
	// Feed prefixes all symbols
	Feed string `json:"feed,omitempty"`
	// list of symbols whose minute bars are important
	MinuteBarSymbols []string `json:"minute_bar_symbols"`
	// list of symbols whose quotes are important
	QuoteSymbols []string `json:"quote_symbols"`
	// list of symbols whose trades are important
	TradeSymbols []string `json:"trade_symbols"`
}

Subscription is the collection of Bars, Quotes and Trades we subscribe to.

func (*Subscription) AsCanonical

func (s *Subscription) AsCanonical() []string

AsCanonical returns the list of prefixed streams that we want to subscribe to.

Jump to

Keyboard shortcuts

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