queryhelper

package
v1.4.358 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PAIR_SPLITTER = "-"
)

Variables

View Source
var (
	EXCHANGES = scrapers.Exchanges
)

Functions

func FilterEMA added in v1.4.0

func FilterEMA(points []dia.FilterPoint, asset dia.Asset, blockSize int) (filterPoints []dia.FilterPoint, metadata *dia.FilterPointMetadata)

func FilterEMAextended added in v1.4.310

func FilterEMAextended(points []dia.FilterPoint, asset dia.Asset, blockSize int) (filterPoints []dia.FilterPoint, metadata *dia.FilterPointMetadata)

func FilterMA

func FilterMA(tradeBlocks []Block, asset dia.Asset, blockSize int) (filterPoints []dia.FilterPoint, metadata *dia.FilterPointMetadata)

func FilterMAIR

func FilterMAIR(tradeBlocks []Block, asset dia.Asset, blockSize int) (filterPoints []dia.FilterPoint, metadata *dia.FilterPointMetadata)

func FilterMAIRextended added in v1.4.310

func FilterMAIRextended(tradeBlocks []Block, asset dia.Asset, blockSize int, volumeThresholdUSD float64) (filterPointsExtended []dia.FilterPointExtended)

func FilterMAextended added in v1.4.310

func FilterMAextended(tradeBlocks []Block, asset dia.Asset, blockSize int, volumeThresholdUSD float64) (filterPointsExtended []dia.FilterPointExtended)

func FilterMEDIR added in v1.4.0

func FilterMEDIR(tradeBlocks []Block, asset dia.Asset, blockSize int) (filterPoints []dia.FilterPoint, metadata *dia.FilterPointMetadata)

func FilterMEDIRextended added in v1.4.310

func FilterMEDIRextended(tradeBlocks []Block, asset dia.Asset, blockSize int, volumeThresholdUSD float64) (filterPointsExtended []dia.FilterPointExtended)

func FilterVOL added in v1.4.2

func FilterVOL(tradeBlocks []Block, asset dia.Asset, blockSize int) (filterPoints []dia.FilterPoint, metadata *dia.FilterPointMetadata)

func FilterVOLextended added in v1.4.310

func FilterVOLextended(tradeBlocks []Block, asset dia.Asset, blockSize int) (filterPointsExtended []dia.FilterPointExtended)

func FilterVWAP

func FilterVWAP(tradeBlocks []Block, asset dia.Asset, blockSize int) (filterPoints []dia.FilterPoint, metadata *dia.FilterPointMetadata)

func FilterVWAPIR

func FilterVWAPIR(tradeBlocks []Block, asset dia.Asset, blockSize int) (filterPoints []dia.FilterPoint, metadata *dia.FilterPointMetadata)

func FilterVWAPIRextended added in v1.4.310

func FilterVWAPIRextended(tradeBlocks []Block, asset dia.Asset, blockSize int, volumeThresholdUSD float64) (filterPointsExtended []dia.FilterPointExtended)

func FilterVWAPextended added in v1.4.310

func FilterVWAPextended(tradeBlocks []Block, asset dia.Asset, blockSize int, volumeThresholdUSD float64) (filterPointsExtended []dia.FilterPointExtended)

func GetData

func GetData() string

GetData Returns trades

Types

type Block

type Block struct {
	Trades    []dia.Trade
	TimeStamp int64
}

func (*Block) GetBlockSources added in v1.4.310

func (b *Block) GetBlockSources() (pairs []dia.ExchangePair, pools []dia.Pool)

GetBlockSources returns a unique list of all pairs and pools contained in the block's @b trades.

type Blockgenerator

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

func NewBlockGenerator

func NewBlockGenerator(trades []dia.Trade) *Blockgenerator

func (*Blockgenerator) GenerateBlocks added in v1.4.113

func (bg *Blockgenerator) GenerateBlocks(blockSizeSeconds int64, blockShiftSeconds int64, bins []utils.TimeBin) (tradeBlocks []Block)

Jump to

Keyboard shortcuts

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