cryptact

package
v0.0.0-...-afd3e11 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionBuy     = "BUY"
	ActionSell    = "SELL"
	ActionPay     = "PAY"
	ActionMining  = "MINING"
	ActionSendFee = "SENDFEE"
	ActionTip     = "TIP"
	ActionReduce  = "REDUCE"
	ActionBonus   = "BONUS"
	ActionLending = "LENDING"
	ActionStaking = "STAKING"
)

Actions (BUY/SELL/PAY/MINING/SENDFEE/TIP/REDUCE/BONUS/LENDING/STAKING)

View Source
const (
	TimestampColumn = "Timestamp"
	ActionColumn    = "Action"
	SourceColumn    = "Source"
	BaseColumn      = "Base"
	VolumeColumn    = "Volume"
	PriceColumn     = "Price"
	CounterColumn   = "Counter"
	FeeColumn       = "Fee"
	FeeCcyColumn    = "FeeCcy"
	CommentColumn   = "Comment"
)

Column names

View Source
const WalletCode = "CRYPTACT_C"

Variables

This section is empty.

Functions

func ValidateColumnNames

func ValidateColumnNames(names []string) error

ValidateColumnNames checks columns

Types

type ErrorWithLineInfo

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

func (*ErrorWithLineInfo) Error

func (e *ErrorWithLineInfo) Error() string

type Extractor

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

Extractor for Poloniex trades

func NewExtractor

func NewExtractor(loc *time.Location) *Extractor

NewExtractor create an executor for Poloniex trades

func (*Extractor) Execute

func (e *Extractor) Execute(ctx context.Context, db boil.ContextExecutor, reader io.Reader, options ...eupholio.Option) error

Execute performs ETL

type Record

type Record map[string]string

func MakeRecords

func MakeRecords(head []string, rows [][]string) ([]Record, error)

func (Record) Get

func (r Record) Get(name string) string

func (Record) GetAsDecimal

func (r Record) GetAsDecimal(name string) (*decimal.Big, error)

func (Record) GetAsNullDecimal

func (r Record) GetAsNullDecimal(name string) (*decimal.Big, error)

func (Record) Timestamp

func (r Record) Timestamp(loc *time.Location) (time.Time, error)

type Repository

type Repository interface {
	FindCustoms(ctx context.Context, start, end time.Time) (models.CryptactCustomSlice, error)
}

func NewRepository

func NewRepository(db boil.ContextExecutor) Repository

type Translator

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

Translator is a translator for BitTrex

func NewTranslator

func NewTranslator(mainCurrency currency.Symbol) *Translator

NewTranslator create a translator for BitTrex

func (*Translator) Translate

func (t *Translator) Translate(ctx context.Context, repo eupholio.Repository, start, end time.Time) error

Translate stores extracted transaction data to transaction table

Jump to

Keyboard shortcuts

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