queries

package
v0.0.0-...-ec0f335 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DailyVolume

type DailyVolume struct {
	BaseVol  float64
	QuoteVol float64
}

DailyVolume represents any volume value which can be either bought or sold depending on the query

type DailyVolumeAction

type DailyVolumeAction string

DailyVolumeAction represents either a sell or a buy

const (
	DailyVolumeActionBuy  DailyVolumeAction = "buy"
	DailyVolumeActionSell DailyVolumeAction = "sell"
)

type of DailyVolumeAction

func ParseDailyVolumeAction

func ParseDailyVolumeAction(action string) (DailyVolumeAction, error)

ParseDailyVolumeAction converts a string to a DailyVolumeAction

func (DailyVolumeAction) IsBuy

func (a DailyVolumeAction) IsBuy() bool

IsBuy returns whether the action is buy

func (DailyVolumeAction) IsSell

func (a DailyVolumeAction) IsSell() bool

IsSell returns whether the action is sell

func (DailyVolumeAction) String

func (a DailyVolumeAction) String() string

String is the Stringer method impl

type DailyVolumeByDate

type DailyVolumeByDate struct {
	// contains filtered or unexported fields
}

DailyVolumeByDate is a query that fetches the daily volume of sales

func MakeDailyVolumeByDateForMarketIdsAction

func MakeDailyVolumeByDateForMarketIdsAction(
	db *sql.DB,
	marketIDs []string,
	action DailyVolumeAction,
	optionalAccountIDs []string,
) (*DailyVolumeByDate, error)

MakeDailyVolumeByDateForMarketIdsAction makes the DailyVolumeByDate query for a set of marketIds and an action

func (*DailyVolumeByDate) Name

func (q *DailyVolumeByDate) Name() string

Name impl.

func (*DailyVolumeByDate) QueryRow

func (q *DailyVolumeByDate) QueryRow(args ...interface{}) (interface{}, error)

QueryRow impl.

type StrategyMirrorTradeTriggerExists

type StrategyMirrorTradeTriggerExists struct {
	// contains filtered or unexported fields
}

StrategyMirrorTradeTriggerExists is a query that fetches the row by primary key

func MakeStrategyMirrorTradeTriggerExists

func MakeStrategyMirrorTradeTriggerExists(db *sql.DB, marketID string) (*StrategyMirrorTradeTriggerExists, error)

MakeStrategyMirrorTradeTriggerExists makes the StrategyMirrorTradeTriggerExists query

func (*StrategyMirrorTradeTriggerExists) Name

Name impl.

func (*StrategyMirrorTradeTriggerExists) QueryRow

func (q *StrategyMirrorTradeTriggerExists) QueryRow(args ...interface{}) (interface{}, error)

QueryRow impl.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL