query

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotInfo

type BotInfo struct {
	LastUpdated    string             `json:"last_updated"`
	TradingAccount string             `json:"trading_account"`
	Strategy       string             `json:"strategy"`
	IsTestnet      bool               `json:"is_testnet"`
	TradingPair    *model.TradingPair `json:"trading_pair"`
	AssetBase      hProtocol.Asset    `json:"asset_base"`
	AssetQuote     hProtocol.Asset    `json:"asset_quote"`
	BalanceBase    float64            `json:"balance_base"`
	BalanceQuote   float64            `json:"balance_quote"`
	NumBids        int                `json:"num_bids"`
	NumAsks        int                `json:"num_asks"`
	SpreadValue    float64            `json:"spread_value"`
	SpreadPercent  float64            `json:"spread_pct"`
}

BotInfo is the response from the getBotInfo IPC request

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a query server with which the trade command will serve information about an actively running bot

func MakeServer

func MakeServer(
	l logger.Logger,
	strategyName string,
	strategy api.Strategy,
	botConfig trader.BotConfig,
	client *horizonclient.Client,
	sdex *plugins.SDEX,
	exchangeShim api.ExchangeShim,
	tradingPair *model.TradingPair,
) *Server

MakeServer is a factory method

func (*Server) StartIPC

func (s *Server) StartIPC() error

StartIPC kicks off the Server which reads from Stdin and writes to Stdout, this should be run in a new goroutine

Jump to

Keyboard shortcuts

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