Documentation
¶
Index ¶
- func GetVersionDB(db *sql.DB) (int, error)
- func InitDB() error
- func InitInMemory() error
- func UpdateSchema(db *sql.DB, targetVersion int) error
- type Database
- type SQLite
- func (s *SQLite) GetActiveTrade(symbol string) (*models.ActiveTrade, error)
- func (s *SQLite) GetActiveTrades(symbol string) ([]*models.ActiveTrade, error)
- func (s *SQLite) GetActiveTradesCount() (int, error)
- func (s *SQLite) GetAllActiveTrades() ([]*models.ActiveTrade, error)
- func (s *SQLite) GetAth(symbol string) (float64, error)
- func (s *SQLite) GetAtl(symbol string) (float64, error)
- func (s *SQLite) GetLastATHTimestamp(symbol string) (time.Time, error)
- func (s *SQLite) GetLastBuySymbol(symbol string) (time.Time, error)
- func (s *SQLite) GetLastSellSymbol(symbol string) (time.Time, error)
- func (s *SQLite) GetTodaysTradeCount() (int, error)
- func (s *SQLite) IsCurrentlyActiveTrade(symbol string) (bool, error)
- func (s *SQLite) LogActiveTrade(symbol string, buyPrice, quantity float64, orderID int64, ...) error
- func (s *SQLite) LogCompletedTrade(symbol string, ...) error
- func (s *SQLite) LogTrade(symbol, side string, amount, price float64) error
- func (s *SQLite) RemoveActiveTrade(id int) error
- func (s *SQLite) RemoveAth(symbol string) error
- func (s *SQLite) RemoveAtl(symbol string) error
- func (s *SQLite) RenameAllSymbolsUSDTtoUSDC() error
- func (s *SQLite) SetUpdateAth(symbol string, ath float64) error
- func (s *SQLite) SetUpdateAtl(symbol string, atl float64) error
- func (s *SQLite) WasLastTradeLoss(symbol string) (bool, time.Time, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitInMemory ¶
func InitInMemory() error
Types ¶
type SQLite ¶
var SQLiteDB SQLite
func (*SQLite) GetActiveTrade ¶
func (s *SQLite) GetActiveTrade(symbol string) (*models.ActiveTrade, error)
func (*SQLite) GetActiveTrades ¶
func (s *SQLite) GetActiveTrades(symbol string) ([]*models.ActiveTrade, error)
func (*SQLite) GetActiveTradesCount ¶
func (*SQLite) GetAllActiveTrades ¶
func (s *SQLite) GetAllActiveTrades() ([]*models.ActiveTrade, error)
func (*SQLite) GetLastATHTimestamp ¶
func (*SQLite) GetLastBuySymbol ¶
func (*SQLite) GetLastSellSymbol ¶
func (*SQLite) GetTodaysTradeCount ¶
func (*SQLite) IsCurrentlyActiveTrade ¶
func (*SQLite) LogActiveTrade ¶
func (*SQLite) LogCompletedTrade ¶
func (*SQLite) RemoveActiveTrade ¶
func (*SQLite) RenameAllSymbolsUSDTtoUSDC ¶
Click to show internal directories.
Click to hide internal directories.