Discover Packages
github.com/cryptellation/historian
internal
repositories
db
cockroach
entities
20210831
package
Version:
v0.0.0-...-3099d22
Opens a new window with list of versions in this module.
Published: Feb 17, 2022
License: AGPL-3.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Asset struct {
Symbol string `gorm:"primaryKey;autoIncrement:false"`
}
type Candlestick struct {
ExchangeName string `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
PairBaseSymbol string `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
PairQuoteSymbol string `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
PeriodName string `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
Timestamp uint64 `gorm:"primaryKey;autoIncrement:false;index:candlestick,unique"`
Open float64
High float64
Low float64
Close float64
Volume float64
Uncomplete bool
Exchange Exchange
Pair Pair
Period Period
}
type Exchange struct {
Name string `gorm:"primaryKey;autoIncrement:false"`
Pairs []Pair `gorm:"many2many:exchange_pair;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
Periods []Period `gorm:"many2many:exchange_period;constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}
type Pair struct {
BaseSymbol string `gorm:"primaryKey;autoIncrement:false"`
QuoteSymbol string `gorm:"primaryKey;autoIncrement:false"`
Base Asset
Quote Asset
}
type Period struct {
Name string `gorm:"primaryKey;autoIncrement:false"`
Duration uint64 `gorm:"index:duration,unique"`
Unit string `gorm:"index:duration,unique"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.