Documentation ¶
Index ¶
Constants ¶
View Source
const ( ExchangeSell = "sell" ExchangeBuy = "buy" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClosedSummaryReport ¶
type ClosedSummaryReport struct {
// contains filtered or unexported fields
}
func NewClosedSummaryReport ¶
func NewClosedSummaryReport(rs []*Report) *ClosedSummaryReport
func (*ClosedSummaryReport) ProfitLoss ¶
func (r *ClosedSummaryReport) ProfitLoss() float64
type Exchange ¶
type Exchange struct { gorm.Model // from zenbot format // {exchange_slug}.{asset}-{currency} // poloniex.AMP-BTC Asset string Currency string GlobalTradeID int64 `gorm:"unique"` TradeID int64 Date time.Time Rate float64 Amount float64 Total float64 Fee float64 OrderNumber int64 Type string Category string }
PoloniexAuthenticatedTradeHistory
func NewExchange ¶
func NewExchange(asset, currency string, h poloniex.PoloniexAuthentictedTradeHistory) Exchange
func (*Exchange) CurrencyPair ¶
func (*Exchange) MakeHistory ¶
func (r *Exchange) MakeHistory() poloniex.PoloniexAuthentictedTradeHistory
type Report ¶
type Report struct { Asset string Currency string Rows []Exchange // contains filtered or unexported fields }
func NewReport ¶
func NewReport(asset, currency string, ticker poloniex.PoloniexTicker, rows []Exchange) (closed, opened *Report)
func NewReports ¶
func NewReports(tickers *kanaelib.TickerCache, rows []Exchange) (closedList, openedList []*Report)
func (*Report) CurrentAsset ¶
func (*Report) EarningRate ¶
func (*Report) EquivalentCurrency ¶
func (*Report) ProfitLoss ¶
func (*Report) TotalAssetBuys ¶
func (*Report) TotalAssetSells ¶
func (*Report) TotalCurrencyBuys ¶
type Sync ¶
type Sync struct {
// contains filtered or unexported fields
}
func (*Sync) GetLastTime ¶
func (*Sync) SyncRecent ¶
type View ¶
type View struct {
// contains filtered or unexported fields
}
func (*View) UsedAssets ¶
Click to show internal directories.
Click to hide internal directories.