Documentation ¶
Index ¶
- Constants
- func Balances() (cli.Command, error)
- func CalcPercentiles(prices []float64) map[int]float64
- func ChartDataImport() (cli.Command, error)
- func ChartDataList() (cli.Command, error)
- func MyTrades() (cli.Command, error)
- func OpenOrders() (cli.Command, error)
- func Prospect() (cli.Command, error)
- func Simulate() (cli.Command, error)
- func Ticker() (cli.Command, error)
- func Trade() (cli.Command, error)
- func TradeHistory() (cli.Command, error)
- type BalancesCommand
- type ByVolumeDesc
- type ChartDataImportCommand
- type ChartDataListCommand
- type Command
- type MyTradesCommand
- type OpenOrdersCommand
- type ProspectCommand
- func (c *ProspectCommand) Help() string
- func (c *ProspectCommand) InitDB()
- func (c *ProspectCommand) InitFlags() *flag.FlagSet
- func (c *ProspectCommand) InitTrader(marketName string) (*trading.Trader, error)
- func (c *ProspectCommand) LoadTraderConfig() (*trading.TraderConfig, error)
- func (c *ProspectCommand) Run(args []string) int
- func (c *ProspectCommand) Synopsis() string
- type SimulateCommand
- func (c *SimulateCommand) Buy(price float64, d *data.ChartData) bool
- func (c *SimulateCommand) ForTimeRange(startTime, endTime time.Time, callback func(d *data.ChartData)) error
- func (c *SimulateCommand) GetPrices(startTime, endTime time.Time) []float64
- func (c *SimulateCommand) Help() string
- func (c *SimulateCommand) InitFlags() *flag.FlagSet
- func (c *SimulateCommand) Run(args []string) int
- func (c *SimulateCommand) Sell(price float64, d *data.ChartData, force bool) bool
- func (c *SimulateCommand) ShouldBuy(price float64, prices []float64, percentiles map[int]float64) bool
- func (c *SimulateCommand) ShouldSell(price float64, prices []float64, percentiles map[int]float64) bool
- func (c *SimulateCommand) Synopsis() string
- func (c *SimulateCommand) Validate() error
- type TickerCommand
- type TradeCommand
- func (c *TradeCommand) Help() string
- func (c *TradeCommand) InitDB()
- func (c *TradeCommand) InitFlags() *flag.FlagSet
- func (c *TradeCommand) InitTrader(marketName string) (*trading.Trader, error)
- func (c *TradeCommand) LoadTraderConfig() (*trading.TraderConfig, error)
- func (c *TradeCommand) Run(args []string) int
- func (c *TradeCommand) Synopsis() string
- func (c *TradeCommand) TradeContinuously(interval int64)
- func (c *TradeCommand) TradeOnce() error
- type TradeHistoryCommand
Constants ¶
View Source
const BTC_BUY_AMOUNT = 0.01
View Source
const BUY_COOLOFF = 0
View Source
const LIVE_DB = "sftbot-live.db"
View Source
const PLX_FEE = 0.00025
View Source
const PROFIT_FACTOR = 1.06
View Source
const PROSPECT_DB = "sftbot-prospect.db"
View Source
const SELL_COOLOFF = 0
View Source
const TIME_VAR_FORMAT = "2006-01-02 15:04:05 MST"
View Source
const TRADE_INTERVAL = 300 // 5 minutes
View Source
const VOLATILITY = 1.02
View Source
const WINDOW = 24 * 60 * 60
View Source
const XRP_SELL_AMOUNT = 90
View Source
const XRP_SELL_PCT = 0.5
Variables ¶
This section is empty.
Functions ¶
func CalcPercentiles ¶
func ChartDataImport ¶
func ChartDataList ¶
func OpenOrders ¶
func TradeHistory ¶
Types ¶
type BalancesCommand ¶
type BalancesCommand struct { }
func (*BalancesCommand) Help ¶
func (c *BalancesCommand) Help() string
func (*BalancesCommand) Run ¶
func (c *BalancesCommand) Run(args []string) int
func (*BalancesCommand) Synopsis ¶
func (c *BalancesCommand) Synopsis() string
type ByVolumeDesc ¶
type ByVolumeDesc []plx.TickerEntry
func (ByVolumeDesc) Len ¶
func (a ByVolumeDesc) Len() int
func (ByVolumeDesc) Less ¶
func (a ByVolumeDesc) Less(i, j int) bool
func (ByVolumeDesc) Swap ¶
func (a ByVolumeDesc) Swap(i, j int)
type ChartDataImportCommand ¶
type ChartDataImportCommand struct { Flags *flag.FlagSet CurrencyPair string Continuous bool Days int64 Resolution int64 }
func (*ChartDataImportCommand) Help ¶
func (c *ChartDataImportCommand) Help() string
func (*ChartDataImportCommand) InitFlags ¶
func (c *ChartDataImportCommand) InitFlags() *flag.FlagSet
func (*ChartDataImportCommand) Parse ¶
func (c *ChartDataImportCommand) Parse(args []string) error
func (*ChartDataImportCommand) Run ¶
func (c *ChartDataImportCommand) Run(args []string) int
func (*ChartDataImportCommand) Synopsis ¶
func (c *ChartDataImportCommand) Synopsis() string
type ChartDataListCommand ¶
type ChartDataListCommand struct { Flags *flag.FlagSet Market string StartTimeVar string StartTime time.Time EndTimeVar string EndTime time.Time }
func (*ChartDataListCommand) Help ¶
func (c *ChartDataListCommand) Help() string
func (*ChartDataListCommand) InitFlags ¶
func (c *ChartDataListCommand) InitFlags() *flag.FlagSet
func (*ChartDataListCommand) Run ¶
func (c *ChartDataListCommand) Run(args []string) int
func (*ChartDataListCommand) Synopsis ¶
func (c *ChartDataListCommand) Synopsis() string
func (*ChartDataListCommand) Validate ¶
func (c *ChartDataListCommand) Validate()
type MyTradesCommand ¶
type MyTradesCommand struct { Flags *flag.FlagSet Market string StartTimeVar string StartTime time.Time EndTimeVar string EndTime time.Time }
func (*MyTradesCommand) Help ¶
func (c *MyTradesCommand) Help() string
func (*MyTradesCommand) InitFlags ¶
func (c *MyTradesCommand) InitFlags() *flag.FlagSet
func (*MyTradesCommand) Run ¶
func (c *MyTradesCommand) Run(args []string) int
func (*MyTradesCommand) Synopsis ¶
func (c *MyTradesCommand) Synopsis() string
func (*MyTradesCommand) Validate ¶
func (c *MyTradesCommand) Validate() (err error)
type OpenOrdersCommand ¶
type OpenOrdersCommand struct { }
func (*OpenOrdersCommand) Help ¶
func (c *OpenOrdersCommand) Help() string
func (*OpenOrdersCommand) Run ¶
func (c *OpenOrdersCommand) Run(args []string) int
func (*OpenOrdersCommand) Synopsis ¶
func (c *OpenOrdersCommand) Synopsis() string
type ProspectCommand ¶
func (*ProspectCommand) Help ¶
func (c *ProspectCommand) Help() string
func (*ProspectCommand) InitDB ¶
func (c *ProspectCommand) InitDB()
func (*ProspectCommand) InitFlags ¶
func (c *ProspectCommand) InitFlags() *flag.FlagSet
func (*ProspectCommand) InitTrader ¶
func (c *ProspectCommand) InitTrader(marketName string) (*trading.Trader, error)
func (*ProspectCommand) LoadTraderConfig ¶
func (c *ProspectCommand) LoadTraderConfig() (*trading.TraderConfig, error)
func (*ProspectCommand) Run ¶
func (c *ProspectCommand) Run(args []string) int
func (*ProspectCommand) Synopsis ¶
func (c *ProspectCommand) Synopsis() string
type SimulateCommand ¶
type SimulateCommand struct { DB *data.Store Flags *flag.FlagSet BTC_Balance float64 XRP_Balance float64 PLX_Balance float64 Bids []float64 LastBuyTime int64 LastSellTime int64 BuyThreshold int SellThreshold float64 CurrencyPair string StartTimeVar string StartTime time.Time EndTimeVar string EndTime time.Time }
func (*SimulateCommand) ForTimeRange ¶
func (*SimulateCommand) GetPrices ¶
func (c *SimulateCommand) GetPrices(startTime, endTime time.Time) []float64
func (*SimulateCommand) Help ¶
func (c *SimulateCommand) Help() string
func (*SimulateCommand) InitFlags ¶
func (c *SimulateCommand) InitFlags() *flag.FlagSet
func (*SimulateCommand) Run ¶
func (c *SimulateCommand) Run(args []string) int
func (*SimulateCommand) ShouldSell ¶
func (*SimulateCommand) Synopsis ¶
func (c *SimulateCommand) Synopsis() string
func (*SimulateCommand) Validate ¶
func (c *SimulateCommand) Validate() error
type TickerCommand ¶
func (*TickerCommand) Help ¶
func (c *TickerCommand) Help() string
func (*TickerCommand) InitFlags ¶
func (c *TickerCommand) InitFlags() *flag.FlagSet
func (*TickerCommand) Run ¶
func (c *TickerCommand) Run(args []string) int
func (*TickerCommand) Synopsis ¶
func (c *TickerCommand) Synopsis() string
type TradeCommand ¶
type TradeCommand struct { Flags *flag.FlagSet Market string Config string Offset int64 DBStore db.Store }
func (*TradeCommand) Help ¶
func (c *TradeCommand) Help() string
func (*TradeCommand) InitDB ¶
func (c *TradeCommand) InitDB()
func (*TradeCommand) InitFlags ¶
func (c *TradeCommand) InitFlags() *flag.FlagSet
func (*TradeCommand) InitTrader ¶
func (c *TradeCommand) InitTrader(marketName string) (*trading.Trader, error)
func (*TradeCommand) LoadTraderConfig ¶
func (c *TradeCommand) LoadTraderConfig() (*trading.TraderConfig, error)
func (*TradeCommand) Run ¶
func (c *TradeCommand) Run(args []string) int
func (*TradeCommand) Synopsis ¶
func (c *TradeCommand) Synopsis() string
func (*TradeCommand) TradeContinuously ¶
func (c *TradeCommand) TradeContinuously(interval int64)
func (*TradeCommand) TradeOnce ¶
func (c *TradeCommand) TradeOnce() error
type TradeHistoryCommand ¶
func (*TradeHistoryCommand) Help ¶
func (c *TradeHistoryCommand) Help() string
func (*TradeHistoryCommand) InitFlags ¶
func (c *TradeHistoryCommand) InitFlags() *flag.FlagSet
func (*TradeHistoryCommand) Run ¶
func (c *TradeHistoryCommand) Run(args []string) int
func (*TradeHistoryCommand) Synopsis ¶
func (c *TradeHistoryCommand) Synopsis() string
Click to show internal directories.
Click to hide internal directories.