Documentation
¶
Index ¶
- type 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 NonceModel
- type 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
- 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) UpdateEnableInfiniteApproval(ctx context.Context, id int, newValue bool) error
- func (model *SettingsModel) UpdateExitSlippageBps(ctx context.Context, id int, newValue int) 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
- 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
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GridModel ¶
type GridModel struct {
// contains filtered or unexported fields
}
func NewGridModel ¶
func NewGridModel(client *ent.GridClient) *GridModel
func (*GridModel) DeleteByGuid ¶
func (*GridModel) DeleteByStrategyId ¶
func (*GridModel) FindByGuid ¶
func (*GridModel) FindByStrategyId ¶
func (*GridModel) SetBoughtStatus ¶
func (*GridModel) SetSellingStatus ¶
type NonceModel ¶
type NonceModel struct {
// contains filtered or unexported fields
}
func NewNonceModel ¶
func NewNonceModel(client *ent.NonceClient) *NonceModel
func (*NonceModel) UpdateNonce ¶
type OrderModel ¶
type OrderModel struct {
// contains filtered or unexported fields
}
func NewOrderModel ¶
func NewOrderModel(client *ent.OrderClient) *OrderModel
func (*OrderModel) FindOrdersByStrategyId ¶
func (*OrderModel) FindPendingOrders ¶
func (*OrderModel) SetOrderClosedStatus ¶
func (*OrderModel) SetOrderRejectedStatus ¶
func (*OrderModel) TotalProfit ¶
func (*OrderModel) UpdateProfit ¶
type SettingsModel ¶
type SettingsModel struct {
// contains filtered or unexported fields
}
func NewSettingsModel ¶
func NewSettingsModel(client *ent.SettingsClient) *SettingsModel
func (*SettingsModel) FindByUserId ¶
func (*SettingsModel) UpdateDexAggregator ¶
func (model *SettingsModel) UpdateDexAggregator(ctx context.Context, id int, dexAggregator settings.DexAggregator) error
func (*SettingsModel) UpdateEnableInfiniteApproval ¶
func (*SettingsModel) UpdateExitSlippageBps ¶
func (*SettingsModel) UpdateSellSlippageBps ¶
func (*SettingsModel) UpdateSlippageBps ¶
type StrategyModel ¶
type StrategyModel struct {
// contains filtered or unexported fields
}
func NewStrategyModel ¶
func NewStrategyModel(client *ent.StrategyClient) *StrategyModel
func (*StrategyModel) ClearLastLowerThresholdAlertTime ¶
func (model *StrategyModel) ClearLastLowerThresholdAlertTime(ctx context.Context, id int) error
func (*StrategyModel) ClearLastUpperThresholdAlertTime ¶
func (model *StrategyModel) ClearLastUpperThresholdAlertTime(ctx context.Context, id int) error
func (*StrategyModel) Delete ¶
func (model *StrategyModel) Delete(ctx context.Context, id int) error
func (*StrategyModel) FindAllActive ¶
func (*StrategyModel) FindByGUID ¶
func (*StrategyModel) FindByUserId ¶
func (*StrategyModel) FindByUserIdGUID ¶
func (*StrategyModel) FindByUserIdToken ¶
func (*StrategyModel) UpdateCandlesToCheck ¶
func (*StrategyModel) UpdateDropOn ¶
func (*StrategyModel) UpdateDropThreshold ¶
func (*StrategyModel) UpdateDynamicStopLoss ¶
func (*StrategyModel) UpdateEnableAutoBuy ¶
func (*StrategyModel) UpdateEnableAutoExit ¶
func (*StrategyModel) UpdateEnableAutoSell ¶
func (*StrategyModel) UpdateEnablePushNotification ¶
func (*StrategyModel) UpdateFirstOrderId ¶
func (*StrategyModel) UpdateFiveKlineVolume ¶
func (*StrategyModel) UpdateGlobalTakeProfitRatio ¶
func (*StrategyModel) UpdateGridTrend ¶
func (*StrategyModel) UpdateInitialOrderSize ¶
func (*StrategyModel) UpdateLastKlineVolume ¶
func (*StrategyModel) UpdateLastLowerThresholdAlertTime ¶
func (*StrategyModel) UpdateLastUpperThresholdAlertTime ¶
func (*StrategyModel) UpdateLowerPriceBound ¶
func (*StrategyModel) UpdateMaxGridLimit ¶
func (*StrategyModel) UpdateStatusByGuid ¶
func (*StrategyModel) UpdateStopLossExit ¶
func (*StrategyModel) UpdateTakeProfitExit ¶
func (*StrategyModel) UpdateTakeProfitRatio ¶
func (*StrategyModel) UpdateUpperBoundExit ¶
func (*StrategyModel) UpdateUpperPriceBound ¶
type WalletModel ¶
type WalletModel struct {
// contains filtered or unexported fields
}
func NewWalletModel ¶
func NewWalletModel(client *ent.WalletClient) *WalletModel
func (*WalletModel) FindByAccount ¶
func (*WalletModel) FindByUserId ¶
func (*WalletModel) UpdatePassword ¶
func (model *WalletModel) UpdatePassword(ctx context.Context, account, password string) error
Click to show internal directories.
Click to hide internal directories.