notional

package
v0.0.0-...-29d4719 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package notional contains the logic to get the notional value of assets

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoopNotifier

func NoopNotifier() notify

Types

type HistoryNotionalJob

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

func NewHistoryNotionalJob

func NewHistoryNotionalJob(api *coingecko.CoinGeckoAPI, db *mongo.Database, p2pNetwork string, requestLimitTimeSeconds int, days string, logger *zap.Logger) *HistoryNotionalJob

func (*HistoryNotionalJob) Run

type IndexingTimestamps

type IndexingTimestamps struct {
	IndexedAt time.Time `bson:"indexedAt"`
}

type NotionalJob

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

NotionalJob is the job to get the notional value of assets.

func NewNotionalJob

func NewNotionalJob(api *coingecko.CoingeckoAPI, cacheClient *redis.Client, cachePrefix string, cacheChannel string,
	tokenProvider *domain.TokenProvider, notify notify, logger *zap.Logger) *NotionalJob

NewNotionalJob creates a new notional job.

func (*NotionalJob) Run

func (j *NotionalJob) Run() error

Run runs the notional job.

type PriceUpdate

type PriceUpdate struct {
	ID          string    `bson:"_id" json:"id"`
	CoingeckoID string    `bson:"coingeckoId" json:"coingeckoId"`
	Price       string    `bson:"price" json:"price"`
	Datetime    time.Time `bson:"dateTime" json:"dateTime"`
	UpdatedAt   time.Time `bson:"updatedAt" json:"updatedAt"`
}

Jump to

Keyboard shortcuts

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