lendings

package
v0.0.0-...-4f87207 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lending

type Lending struct {
	gorm.Model

	LendingID int64     `gorm:"unique" json:"lending_id"`
	Currency  string    `json:"currency"`
	Rate      float64   `json:"rate,string"`
	Amount    float64   `json:"amount,string"`
	Duration  float64   `json:"duration,string"`
	Interest  float64   `json:"interest,string"`
	Fee       float64   `json:"fee,string"`
	Earned    float64   `json:"earned,string"`
	Open      time.Time `json:"open"`
	Close     time.Time `json:"close"`
}

func (*Lending) FeeRate

func (r *Lending) FeeRate() float64

func (*Lending) MakeHistory

func (r *Lending) MakeHistory() poloniex.PoloniexLendingHistory

type Report

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

func NewReport

func NewReport(rows []Lending) Report

type Sync

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

func NewSync

func NewSync(db *gorm.DB, api *poloniex.Poloniex) *Sync

func (*Sync) GetLastTime

func (sync *Sync) GetLastTime() time.Time

func (*Sync) Sync

func (sync *Sync) Sync(start, end time.Time) (int, error)

func (*Sync) SyncAll

func (sync *Sync) SyncAll() (int, error)

func (*Sync) SyncRecent

func (sync *Sync) SyncRecent() (int, error)

type View

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

func NewView

func NewView(db *gorm.DB) *View

func (*View) All

func (q *View) All(currency string) []Lending

Jump to

Keyboard shortcuts

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