Documentation
¶
Index ¶
- Constants
- type AccountAllowances
- type AccountBalances
- type AccountBase
- type AccountManager
- func (a *AccountManager) GetAllowanceWithSymbolResult(owner, spender common.Address) (map[string]*big.Int, error)
- func (a *AccountManager) GetBalanceAndAllowance(owner, token, spender common.Address) (balance, allowance *big.Int, err error)
- func (a *AccountManager) GetBalanceWithSymbolResult(owner common.Address) (map[string]*big.Int, error)
- func (a *AccountManager) GetCutoff(contract, address string) (int, error)
- func (a *AccountManager) HasUnlocked(owner string) (exists bool, err error)
- func (accountManager *AccountManager) Start()
- func (a *AccountManager) UnlockedWallet(owner string) (err error)
- type Allowance
- type Balance
- type BinanceTicker
- type Cache
- type ChangedOfBlock
- type Collector
- type CollectorImpl
- type Exchange
- type ExchangeImpl
- type ExchangeType
- type HuobiInnerTicker
- type HuobiTicker
- type OkexFullTicker
- type OkexInnerTicker
- type OkexTicker
- type OkexTickerElem
- type Ticker
- func GetAllTickerFromBinance() (tickers []Ticker, err error)
- func GetAllTickerFromOkex() (tickers []Ticker, err error)
- func GetTickerFromBinance(market string) (ticker Ticker, err error)
- func GetTickerFromHuobi(market string) (ticker Ticker, err error)
- func GetTickerFromOkex(market string) (ticker Ticker, err error)
- type TickerField
- type Trend
- type TrendManager
- func (t *TrendManager) GetTicker() (tickers []Ticker, err error)
- func (t *TrendManager) GetTickerByMarket(mkt string) (ticker Ticker, err error)
- func (t *TrendManager) GetTrends(market, interval string) (trends []Trend, err error)
- func (t *TrendManager) HandleOrderFilled(input eventemitter.EventData) (err error)
- func (t *TrendManager) LoadCache()
- func (t *TrendManager) ProofRead()
- func (t *TrendManager) ScheduleUpdate()
Constants ¶
View Source
const ( UnlockedPrefix = "unlock_" BalancePrefix = "balance_" AllowancePrefix = "allowance_" CustomTokenPrefix = "customtoken_" )
View Source
const ( OneHour = "1Hr" TwoHour = "2Hr" FourHour = "4Hr" OneDay = "1Day" OneWeek = "1Week" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountAllowances ¶
type AccountBalances ¶
type AccountBalances struct {
AccountBase
Balances map[common.Address]Balance
}
type AccountManager ¶
type AccountManager struct {
// contains filtered or unexported fields
}
func NewAccountManager ¶
func NewAccountManager(options config.AccountManagerOptions) AccountManager
func (*AccountManager) GetAllowanceWithSymbolResult ¶
func (*AccountManager) GetBalanceAndAllowance ¶
func (*AccountManager) GetBalanceWithSymbolResult ¶
func (*AccountManager) GetCutoff ¶
func (a *AccountManager) GetCutoff(contract, address string) (int, error)
func (*AccountManager) HasUnlocked ¶
func (a *AccountManager) HasUnlocked(owner string) (exists bool, err error)
func (*AccountManager) Start ¶
func (accountManager *AccountManager) Start()
func (*AccountManager) UnlockedWallet ¶
func (a *AccountManager) UnlockedWallet(owner string) (err error)
type BinanceTicker ¶
type BinanceTicker struct {
Symbol string `json:"symbol"`
Change string `json:"priceChangePercent"`
Close string `json:"prevClosePrice"`
Open string `json:"openPrice"`
High string `json:"highPrice"`
Low string `json:"lowPrice"`
LastPrice string `json:"lastPrice"`
Amount string `json:"volume"`
Vol string `json:"quoteVolume"`
Ask string `json:"askPrice"`
Bid string `json:"bidPrice"`
}
type ChangedOfBlock ¶
type ChangedOfBlock struct {
// contains filtered or unexported fields
}
type CollectorImpl ¶
type CollectorImpl struct {
// contains filtered or unexported fields
}
func NewCollector ¶
func NewCollector(cronJobLock bool) *CollectorImpl
func (*CollectorImpl) GetTickers ¶
func (c *CollectorImpl) GetTickers(market string) ([]Ticker, error)
func (*CollectorImpl) Start ¶
func (c *CollectorImpl) Start()
type ExchangeImpl ¶
type ExchangeImpl struct {
// contains filtered or unexported fields
}
func NewExchange ¶
func NewExchange(name, tickerUrl string) ExchangeImpl
type ExchangeType ¶
type ExchangeType string
type HuobiInnerTicker ¶
type HuobiTicker ¶
type HuobiTicker struct {
Timestamp int64 `json:"ts"`
ErrorCode string `json:"err-code"`
Status string `json:"status"`
Tick HuobiInnerTicker `json:"tick"`
}
type OkexFullTicker ¶
type OkexFullTicker struct {
Code int `json:"code"`
Data []OkexTickerElem `json:"data"`
Msg string `json:"msg"`
}
type OkexInnerTicker ¶
type OkexTicker ¶
type OkexTicker struct {
Date string `json:"date"`
Ticker OkexInnerTicker `json:"ticker"`
}
type OkexTickerElem ¶
type Ticker ¶
type Ticker struct {
Market string `json:"market"`
Exchange string `json:"exchange"`
Intervals string `json:"interval"`
Amount float64 `json:"amount"`
Vol float64 `json:"vol"`
Open float64 `json:"open"`
Close float64 `json:"close"`
High float64 `json:"high"`
Low float64 `json:"low"`
Last float64 `json:"last"`
Buy float64 `json:"buy"`
Sell float64 `json:"sell"`
Change string `json:"change"`
}
func GetAllTickerFromBinance ¶
func GetAllTickerFromOkex ¶
func GetTickerFromBinance ¶
func GetTickerFromHuobi ¶
func GetTickerFromOkex ¶
type TickerField ¶
type TickerField struct {
// contains filtered or unexported fields
}
type Trend ¶
type Trend struct {
Intervals string `json:"intervals"`
Market string `json:"market"`
Vol float64 `json:"vol"`
Amount float64 `json:"amount"`
CreateTime int64 `json:"createTime"`
Open float64 `json:"open"`
Close float64 `json:"close"`
High float64 `json:"high"`
Low float64 `json:"low"`
Start int64 `json:"start"`
End int64 `json:"end"`
}
type TrendManager ¶
type TrendManager struct {
// contains filtered or unexported fields
}
func NewTrendManager ¶
func NewTrendManager(dao dao.RdsService, cronJobLock bool) TrendManager
func (*TrendManager) GetTicker ¶
func (t *TrendManager) GetTicker() (tickers []Ticker, err error)
func (*TrendManager) GetTickerByMarket ¶
func (t *TrendManager) GetTickerByMarket(mkt string) (ticker Ticker, err error)
func (*TrendManager) GetTrends ¶
func (t *TrendManager) GetTrends(market, interval string) (trends []Trend, err error)
func (*TrendManager) HandleOrderFilled ¶
func (t *TrendManager) HandleOrderFilled(input eventemitter.EventData) (err error)
func (*TrendManager) LoadCache ¶
func (t *TrendManager) LoadCache()
func (*TrendManager) ProofRead ¶
func (t *TrendManager) ProofRead()
func (*TrendManager) ScheduleUpdate ¶
func (t *TrendManager) ScheduleUpdate()
Click to show internal directories.
Click to hide internal directories.