Versions in this module Expand all Collapse all v1 v1.0.0 Apr 11, 2020 Changes in this version + const LSSDConnectionProblem + const OrderSideBuy + const OrderSideSell + const OrderStatusCanceled + const OrderStatusCompleted + const OrderStatusPlaced + func BackupCache() + func GetMyOrdersCache() *cache.Cache + func InitLSSD() error + func IsLSSDConnProblem(err error) bool + func PeriodicOrderListener(bot *Bot, tradingPair string, withOwnOrders bool, interval time.Duration, ...) + func PeriodicPing(interval time.Duration, entry *logrus.Entry) + func ReadFile(path string) ([]byte, error) + func SetLogger(logLvl string) + func SetupCache(tradingBot *Bot) + func ValidateCurrency(currency string) bool + type Bot struct + CurrencyClient lssdrpc.CurrenciesClient + LNDConfig LNDConfig + Log *logrus.Entry + LogLevel string + OrderClient lssdrpc.OrdersClient + OrderLimit int + SentryDSN string + SwapClient lssdrpc.SwapsClient + Timeout time.Duration + TradingPairClient lssdrpc.TradingPairsClient + func NewBot(o lssdrpc.OrdersClient, s lssdrpc.SwapsClient, c lssdrpc.CurrenciesClient, ...) (*Bot, error) + func (t *Bot) AddCurrencies() error + func (t *Bot) CancelOrder(tradingPair string, orderID string) (*lssdrpc.CancelOrderResponse, error) + func (t *Bot) EnableTradingPair(pair string) error + func (t *Bot) Init() error + func (t *Bot) ListOrders(tradingPair string, myOrders bool, printCLI bool) ([]lssdrpc.Order, error) + func (t *Bot) PlaceOrder(tradingPair string, price int64, funds int64, side lssdrpc.OrderSide, ...) (*lssdrpc.PlaceOrderResponse, error) + func (t *Bot) SubscribeOrders() error + func (t *Bot) SubscribeSwaps() error + type Connection struct + Host string + Port int + func (c *Connection) Format() string + type LNDConfig struct + Certs map[string]string + Connections map[string]Connection + TLSPaths map[string]string + func NewConfig() LNDConfig + func (c *LNDConfig) Add(currency string, certPath string, host string, port int) error + func (c *LNDConfig) IsEmpty() bool + type Order struct + CreatedAt uint64 + Funds int64 + IsOwn bool + Label string + OrderId string + OrderType string + PairId string + Price int64 + Side string + Status string + func GetFromCacheByOrderId(c *cache.Cache, tradingPair string, orderId string) *Order + func GetMyOrderByID(tradingPair string, orderId string) *Order + type OrderCollection []Order + func GetMemoryEnrichedMyOrders(tp string) OrderCollection + func (o *OrderCollection) Add(order Order) *OrderCollection + func (o *OrderCollection) GetByOrderID(orderId string) *Order + func (o *OrderCollection) GetPriceTopOrdersSorted(side string, limit int, excludingMyOrders bool) *OrderCollection + func (o *OrderCollection) SumFunds(status string) (sum int64) + func (o *OrderCollection) Unique() *OrderCollection