Versions in this module Expand all Collapse all v0 v0.1.1 Feb 5, 2026 v0.1.0 Nov 16, 2025 Changes in this version + type GridModel struct + func NewGridModel(client *ent.GridClient) *GridModel + func (model *GridModel) DeleteByGuid(ctx context.Context, guid string) (int, error) + func (model *GridModel) DeleteByStrategyId(ctx context.Context, strategyId string) (int, error) + func (model *GridModel) FindByGuid(ctx context.Context, guid string) (*ent.Grid, error) + func (model *GridModel) FindByStrategyId(ctx context.Context, strategyId string) ([]*ent.Grid, error) + func (model *GridModel) Save(ctx context.Context, args ent.Grid) (*ent.Grid, error) + func (model *GridModel) SetBoughtStatus(ctx context.Context, guid string, finalPrice, quantity decimal.Decimal) error + func (model *GridModel) SetSellingStatus(ctx context.Context, guid string) error + func (model *GridModel) UpdateStatusByGuid(ctx context.Context, guid string, status grid.Status) error + type OrderModel struct + func NewOrderModel(client *ent.OrderClient) *OrderModel + func (model *OrderModel) FindOrdersByStrategyId(ctx context.Context, strategyId string, offset, limit int) ([]*ent.Order, int, error) + func (model *OrderModel) FindPendingOrders(ctx context.Context, limit int) ([]*ent.Order, error) + func (model *OrderModel) Save(ctx context.Context, args ent.Order) (*ent.Order, error) + func (model *OrderModel) SetOrderClosedStatus(ctx context.Context, id int, finalPrice, outAmount decimal.Decimal) error + func (model *OrderModel) SetOrderRejectedStatus(ctx context.Context, id int, reason string) error + func (model *OrderModel) TotalProfit(ctx context.Context, strategyId string, firstOrderId int) (decimal.Decimal, error) + func (model *OrderModel) UpdateProfit(ctx context.Context, id int, profit decimal.Decimal) error + type SettingsModel struct + func NewSettingsModel(client *ent.SettingsClient) *SettingsModel + func (model *SettingsModel) FindByUserId(ctx context.Context, userId int64) (*ent.Settings, error) + func (model *SettingsModel) Save(ctx context.Context, args ent.Settings) (*ent.Settings, error) + func (model *SettingsModel) UpdateDexAggregator(ctx context.Context, id int, dexAggregator settings.DexAggregator) error + func (model *SettingsModel) UpdateExitSlippageBps(ctx context.Context, id int, newValue int) error + func (model *SettingsModel) UpdateMaxLamports(ctx context.Context, id int, newValue int64) error + func (model *SettingsModel) UpdateMaxRetries(ctx context.Context, id int, newValue int64) error + func (model *SettingsModel) UpdatePriorityLevel(ctx context.Context, id int, newValue settings.PriorityLevel) error + func (model *SettingsModel) UpdateSellSlippageBps(ctx context.Context, id int, newValue int) error + func (model *SettingsModel) UpdateSlippageBps(ctx context.Context, id int, newValue int) error + type StrategyModel struct + func NewStrategyModel(client *ent.StrategyClient) *StrategyModel + func (model *StrategyModel) ClearLastLowerThresholdAlertTime(ctx context.Context, id int) error + func (model *StrategyModel) ClearLastUpperThresholdAlertTime(ctx context.Context, id int) error + func (model *StrategyModel) Delete(ctx context.Context, id int) error + func (model *StrategyModel) FindAllActive(ctx context.Context, offset, limit int) ([]*ent.Strategy, error) + func (model *StrategyModel) FindByGUID(ctx context.Context, guid string) (*ent.Strategy, error) + func (model *StrategyModel) FindByUserId(ctx context.Context, userId int64, offset, limit int) ([]*ent.Strategy, int, error) + func (model *StrategyModel) FindByUserIdGUID(ctx context.Context, userId int64, guid string) (*ent.Strategy, error) + func (model *StrategyModel) FindByUserIdToken(ctx context.Context, userId int64, token string) (*ent.Strategy, error) + func (model *StrategyModel) Save(ctx context.Context, args ent.Strategy) (*ent.Strategy, error) + func (model *StrategyModel) UpdateCandlesToCheck(ctx context.Context, id int, candlesToCheck int) error + func (model *StrategyModel) UpdateDropOn(ctx context.Context, id int, newValue bool) error + func (model *StrategyModel) UpdateDropThreshold(ctx context.Context, id int, dropThreshold decimal.Decimal) error + func (model *StrategyModel) UpdateDynamicStopLoss(ctx context.Context, id int, newValue bool) error + func (model *StrategyModel) UpdateEnableAutoBuy(ctx context.Context, id int, newValue bool) error + func (model *StrategyModel) UpdateEnableAutoExit(ctx context.Context, id int, newValue bool) error + func (model *StrategyModel) UpdateEnableAutoSell(ctx context.Context, id int, newValue bool) error + func (model *StrategyModel) UpdateEnablePushNotification(ctx context.Context, id int, newValue bool) error + func (model *StrategyModel) UpdateFirstOrderId(ctx context.Context, id int, newValue *int) error + func (model *StrategyModel) UpdateFiveKlineVolume(ctx context.Context, id int, newValue decimal.Decimal) error + func (model *StrategyModel) UpdateGlobalTakeProfitRatio(ctx context.Context, id int, newValue decimal.Decimal) error + func (model *StrategyModel) UpdateGridTrend(ctx context.Context, id int, trending string) error + func (model *StrategyModel) UpdateInitialOrderSize(ctx context.Context, id int, newValue decimal.Decimal) error + func (model *StrategyModel) UpdateLastKlineVolume(ctx context.Context, id int, newValue decimal.Decimal) error + func (model *StrategyModel) UpdateLastLowerThresholdAlertTime(ctx context.Context, id int, newValue time.Time) error + func (model *StrategyModel) UpdateLastUpperThresholdAlertTime(ctx context.Context, id int, newValue time.Time) error + func (model *StrategyModel) UpdateLowerPriceBound(ctx context.Context, id int, newValue decimal.Decimal) error + func (model *StrategyModel) UpdateMaxGridLimit(ctx context.Context, id int, newValue int) error + func (model *StrategyModel) UpdateStatusByGuid(ctx context.Context, guid string, newValue strategy.Status) error + func (model *StrategyModel) UpdateStopLossExit(ctx context.Context, id int, newValue decimal.Decimal) error + func (model *StrategyModel) UpdateTakeProfitExit(ctx context.Context, id int, newValue decimal.Decimal) error + func (model *StrategyModel) UpdateTakeProfitRatio(ctx context.Context, id int, newValue decimal.Decimal) error + func (model *StrategyModel) UpdateUpperBoundExit(ctx context.Context, id int, newValue decimal.Decimal) error + func (model *StrategyModel) UpdateUpperPriceBound(ctx context.Context, id int, newValue decimal.Decimal) error + type WalletModel struct + func NewWalletModel(client *ent.WalletClient) *WalletModel + func (model *WalletModel) FindByAccount(ctx context.Context, account string) (*ent.Wallet, error) + func (model *WalletModel) FindByUserId(ctx context.Context, userId int64) (*ent.Wallet, error) + func (model *WalletModel) Save(ctx context.Context, args ent.Wallet) (*ent.Wallet, error) + func (model *WalletModel) UpdatePassword(ctx context.Context, account, password string) error