histories

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

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

poloniex api server clone

func NewAPIServer

func NewAPIServer(db *gorm.DB) *APIServer

func (*APIServer) PaginateTradeHistory

func (s *APIServer) PaginateTradeHistory(start, end time.Time, page, tadePerPage int, apiType int) []TradeHistory

https://poloniex.com/private.php command=returnPaginatedTradeHistory start=0 end=1917895987 page=1 tradesPerPage=50 type=0

func (*APIServer) PersonalTradeHistory

func (s *APIServer) PersonalTradeHistory(start, end time.Time) map[string][]PersonalTradeHistory

https://poloniex.com/private.php command=returnPersonalTradeHistory start=0 end=1917895987 retval: key=BTC, BTC_AMP, value=array

type Database

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

func NewDatabase

func NewDatabase(filepath string) (Database, error)

func (*Database) Close

func (d *Database) Close()

func (*Database) GetORM

func (d *Database) GetORM() *gorm.DB

func (*Database) MakeBalanceSync

func (d *Database) MakeBalanceSync(api *poloniex.Poloniex) *balances.Sync

func (*Database) MakeBalanceView

func (d *Database) MakeBalanceView() *balances.View

func (*Database) MakeExchangeSync

func (d *Database) MakeExchangeSync(api *poloniex.Poloniex) *exchanges.Sync

func (*Database) MakeExchangeView

func (d *Database) MakeExchangeView() *exchanges.View

func (*Database) MakeLendingSync

func (d *Database) MakeLendingSync(api *poloniex.Poloniex) *lendings.Sync

func (*Database) MakeLendingView

func (d *Database) MakeLendingView() *lendings.View

type PersonalTradeHistory

type PersonalTradeHistory struct {
	Amount        string `json:"amount"`
	Category      string `json:"category"`
	Date          string `json:"date"`
	Fee           string `json:"fee"`
	GlobalTradeID string `json:"globalTradeID,int"`
	OrderNumber   string `json:"orderNumber"`
	Rate          string `json:"rate"`
	Total         string `json:"total"`
	TradeID       string `json:"tradeID"`
	Type          string `json:"type"`
}

func NewPersonalTradeHistoryFromExchange

func NewPersonalTradeHistoryFromExchange(r *exchanges.Exchange) PersonalTradeHistory

func NewPersonalTradeHistoryFromLending

func NewPersonalTradeHistoryFromLending(r *lendings.Lending) PersonalTradeHistory

type Synchronizer

type Synchronizer interface {
	SyncRecent() (int, error)
	SyncAll() (int, error)
	GetLastTime() time.Time
}

type TradeHistory

type TradeHistory struct {
	CurrencyPair string `json:"currencyPair"`
	Date         string `json:"date"`
	Type         string `json:"type"`
	Category     string `json:"category"`
	Rate         string `json:"rate"`
	Amount       string `json:"amount"`
	Total        string `json:"total"`
	Fee          string `json:"fee"`
}

func NewTradeHistoryFromExchange

func NewTradeHistoryFromExchange(r *exchanges.Exchange) TradeHistory

func NewTradeHistoryFromLending

func NewTradeHistoryFromLending(r *lendings.Lending) TradeHistory

Jump to

Keyboard shortcuts

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