config

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// BuyEvent ...
	BuyEvent = "BUY"
	// SellEvent ...
	SellEvent = "SELL"
)

Variables

View Source
var BTC = Currency("BTC")

BTC ...

View Source
var EnabledEvents = []Event{BuyEvent, SellEvent}

EnabledEvents ...

View Source
var USD = Currency("USD")

USD ...

Functions

func GetCurrencyPair

func GetCurrencyPair() string

GetCurrencyPair ...

func GetEventsRaiseInterval

func GetEventsRaiseInterval() time.Duration

GetEventsRaiseInterval ...

func GetExchange

func GetExchange() string

GetExchange ...

func GetGCEBucket

func GetGCEBucket() string

GetGCEBucket ...

func GetGCEServiceKeyFilepath

func GetGCEServiceKeyFilepath() string

GetGCEServiceKeyFilepath ...

func GetOrderSize

func GetOrderSize() float64

GetOrderSize ...

func Init

func Init(configPath string) error

Init ...

func IsDebugEnabled

func IsDebugEnabled() bool

IsDebugEnabled ...

Types

type Configuration

type Configuration struct {
	EnableDebug    bool
	TestBrokerMode bool

	EventRaiseInterval int
	LogsRoot           string
	ConfigsRoot        string
	Exchange           string
	CurrencyPair       string
	OrderSize          float64
	MinimumOrderSize   float64

	DataCollector DataCollector

	GCEBucket          string
	ServiceKeyFilename string
}

Configuration ...

func SwapConfig

func SwapConfig(c Configuration) Configuration

SwapConfig ...

type Currency

type Currency string

Currency ...

func GetCurrencyBase

func GetCurrencyBase() Currency

GetCurrencyBase ...

func GetCurrencyQuote

func GetCurrencyQuote() Currency

GetCurrencyQuote ...

func (Currency) String

func (c Currency) String() string

String ...

type DataCollector

type DataCollector struct {
	OrderBook []OrderBookLog
}

DataCollector ...

func GetDataCollector

func GetDataCollector() DataCollector

GetDataCollector ...

type Event

type Event string

Event ...

func (Event) String

func (m Event) String() string

String ...

type OrderBookLog

type OrderBookLog struct {
	Filename       string
	DumpInterval   int
	RotateInterval int
}

OrderBookLog ...

func (OrderBookLog) GetFilepath

func (m OrderBookLog) GetFilepath() string

GetFilepath ...

func (OrderBookLog) GetRotateInterval

func (m OrderBookLog) GetRotateInterval() time.Duration

GetRotateInterval ...

Jump to

Keyboard shortcuts

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