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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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