models

package
v0.0.0-...-b093a28 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExchangeAPIClient

type ExchangeAPIClient interface {
	GetExchangeIdentifier() string
	GetSupportedPairs() ([]*Symbol, error)
	GetRawMarketData() ([]*RawMarketData, error)
	GetAllOHLCVMarketData(
		symbol Symbol,
		interval time.Duration,
		startTime time.Time,
		endTime time.Time,
	) ([]*OHLCVMarketData, error)
}

ExchangeAPIClient TODO(Zahin): Get a List of Supported Symbols

type LastSync

type LastSync struct {
	BaseAsset    string
	QuoteAsset   string
	Exchange     string
	LastSyncTime time.Time
}

type MarketData

type MarketData struct {
	Source        string
	BaseCurrency  string
	QuoteCurrency string
}

type OHLCVMarketData

type OHLCVMarketData struct {
	MarketData
	StartTime  time.Time
	EndTime    time.Time
	OpenPrice  float64
	HighPrice  float64
	LowPrice   float64
	ClosePrice float64
	Volume     float64
}

type RawMarketData

type RawMarketData struct {
	MarketData
	StartTime time.Time
	Value     float64
	Volume    float64
}

type Symbol

type Symbol struct {
	RawBase         string
	NormalizedBase  string
	RawQuote        string
	NormalizedQuote string
	ProductID       string
}

Jump to

Keyboard shortcuts

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