arbitrageur

package
v1.0.0-rc Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArbitConfig

type ArbitConfig struct {
	TradingSecretSeed string `valid:"-" toml:"TRADING_SECRET_SEED"`
	SourceSecretSeed  string `valid:"-" toml:"SOURCE_SECRET_SEED"`
	HorizonURL        string `valid:"-" toml:"HORIZON_URL"`
	RateLimiterMS     int    `valid:"-" toml:"RATE_LIMITER_MS"`
	// contains filtered or unexported fields
}

ArbitConfig represents the configuration params for the arbitrage bot

func (*ArbitConfig) Init

func (a *ArbitConfig) Init() error

Init initializes this config

func (*ArbitConfig) SourceAccount

func (a *ArbitConfig) SourceAccount() string

SourceAccount returns the config's source account

func (ArbitConfig) String

func (a ArbitConfig) String() string

String impl.

func (*ArbitConfig) TradingAccount

func (a *ArbitConfig) TradingAccount() string

TradingAccount returns the config's trading account

type Arbitrageur

type Arbitrageur struct {
	PathFinder modules.PathFinder
	DexWatcher modules.DexWatcher
	DexAgent   *modules.DexAgent
	// contains filtered or unexported fields
}

Arbitrageur is the bot struct

func MakeArbitrageur

func MakeArbitrageur(
	pathFinder modules.PathFinder,
	dexWatcher modules.DexWatcher,
	dexAgent *modules.DexAgent,
	threadTracker *multithreading.ThreadTracker,
	rateLimiter func(),
	simMode bool,
	booksOut chan *horizon.OrderBookSummary,
	ledgerOut chan horizon.Ledger,
	findIt chan<- bool,
	pathReturn <-chan modules.PathFindOutcome,
	refresh chan<- bool,
	submitDone <-chan bool,
	l logger.Logger,
) *Arbitrageur

MakeArbitrageur is the factory method

func (*Arbitrageur) StartLedgerSynced

func (a *Arbitrageur) StartLedgerSynced()

StartLedgerSynced starts in ledger-synced mode

Jump to

Keyboard shortcuts

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