Documentation ¶
Index ¶
- Constants
- Variables
- func NewCryptoBaseScanner() model.Channel
- func NewListings() model.Channel
- func NewMiningHamster() model.Channel
- func NewQualitySignals() model.Channel
- func NewVolume() model.Channel
- type CryptoBase
- type CryptoBaseScanner
- func (self *CryptoBaseScanner) GetCalls(exchange model.Exchange, market string, sandbox, debug bool) (model.Calls, error)
- func (self *CryptoBaseScanner) GetMarkets(exchange model.Exchange, quote model.Assets, btcVolumeMin float64, ...) (model.Markets, error)
- func (self *CryptoBaseScanner) GetName() string
- func (self *CryptoBaseScanner) GetOrderType() model.OrderType
- func (self *CryptoBaseScanner) GetRateLimit() time.Duration
- func (self *CryptoBaseScanner) GetValidity() (time.Duration, error)
- func (self *CryptoBaseScanner) Init() error
- type CryptoBaseScannerAlgo
- type CryptoBaseScannerResponse
- type CryptoBases
- type CryptoQualitySignals
- func (self *CryptoQualitySignals) GetCalls(exchange model.Exchange, market string, sandbox, debug bool) (model.Calls, error)
- func (self *CryptoQualitySignals) GetMarkets(exchange model.Exchange, quote model.Assets, btcVolumeMin float64, ...) (model.Markets, error)
- func (self *CryptoQualitySignals) GetName() string
- func (self *CryptoQualitySignals) GetOrderType() model.OrderType
- func (self *CryptoQualitySignals) GetRateLimit() time.Duration
- func (self *CryptoQualitySignals) GetValidity() (time.Duration, error)
- func (self *CryptoQualitySignals) Init() error
- type Listing
- type Listings
- func (self *Listings) GetCalls(exchange model.Exchange, market string, sandbox, debug bool) (model.Calls, error)
- func (self *Listings) GetMarkets(exchange model.Exchange, quote model.Assets, btcVolumeMin float64, ...) (model.Markets, error)
- func (self *Listings) GetName() string
- func (self *Listings) GetOrderType() model.OrderType
- func (self *Listings) GetRateLimit() time.Duration
- func (self *Listings) GetValidity() (time.Duration, error)
- func (self *Listings) Init() error
- type MarketStat
- type MarketStats
- type MiningHamster
- func (self *MiningHamster) GetCalls(exchange model.Exchange, market string, sandbox, debug bool) (model.Calls, error)
- func (self *MiningHamster) GetMarkets(exchange model.Exchange, quote model.Assets, btcVolumeMin float64, ...) (model.Markets, error)
- func (self *MiningHamster) GetName() string
- func (self *MiningHamster) GetOrderType() model.OrderType
- func (self *MiningHamster) GetRateLimit() time.Duration
- func (self *MiningHamster) GetValidity() (time.Duration, error)
- func (self *MiningHamster) Init() error
- type QualityResponse
- type QualitySignal
- type QualitySignals
- type Signals
- type Volume
- func (self *Volume) GetCalls(exchange model.Exchange, market string, sandbox, debug bool) (model.Calls, error)
- func (self *Volume) GetMarkets(exchange model.Exchange, quote model.Assets, btcVolumeMin float64, ...) (model.Markets, error)
- func (self *Volume) GetName() string
- func (self *Volume) GetOrderType() model.OrderType
- func (self *Volume) GetRateLimit() time.Duration
- func (self *Volume) GetValidity() (time.Duration, error)
- func (self *Volume) Init() error
Constants ¶
View Source
const ( RISK_LEVEL_MINIMUM = 1 // pretty rare RISK_LEVEL_LOW = 2 RISK_LEVEL_MEDIUM = 3 // pretty common RISK_LEVEL_HIGH = 4 // for really risky trades RISK_LEVEL_MAXIMUM = 5 )
Possible values for risk_level are:
Variables ¶
View Source
var CryptoBaseScannerAlgoString = map[CryptoBaseScannerAlgo]string{ CBS_ALGO_ORIGINAL: "original", CBS_ALGO_DAY_TRADE: "day_trade", CBS_ALGO_CONSERVATIVE: "conservative", CBS_ALGO_POSITION: "position", }
Functions ¶
func NewCryptoBaseScanner ¶
func NewListings ¶
func NewMiningHamster ¶
func NewQualitySignals ¶
Types ¶
type CryptoBase ¶
type CryptoBase struct { ExchangeName string `json:"exchangeName"` BaseCurrency string `json:"baseCurrency"` QuoteCurrency string `json:"quoteCurrency"` BtcVolume float64 `json:"btcVolume,string"` CurrentPrice float64 `json:"currentPrice"` LatestBase struct { CurrentDrop float64 `json:"currentDrop,string"` CrackedAt interface{} `json:"crackedAt"` } `json:"latestBase"` MarketStats MarketStats `json:"marketStats"` }
func (*CryptoBase) Buy ¶
func (self *CryptoBase) Buy(exchange model.Exchange, algorithm CryptoBaseScannerAlgo, btcVolumeMin, dip, successRatio float64, sandbox, debug bool) (bool, error)
func (*CryptoBase) GetCrackedAt ¶
func (self *CryptoBase) GetCrackedAt() (*time.Time, error)
type CryptoBaseScanner ¶
type CryptoBaseScanner struct {
// contains filtered or unexported fields
}
func (*CryptoBaseScanner) GetMarkets ¶
func (*CryptoBaseScanner) GetName ¶
func (self *CryptoBaseScanner) GetName() string
func (*CryptoBaseScanner) GetOrderType ¶
func (self *CryptoBaseScanner) GetOrderType() model.OrderType
func (*CryptoBaseScanner) GetRateLimit ¶
func (self *CryptoBaseScanner) GetRateLimit() time.Duration
func (*CryptoBaseScanner) GetValidity ¶
func (self *CryptoBaseScanner) GetValidity() (time.Duration, error)
func (*CryptoBaseScanner) Init ¶
func (self *CryptoBaseScanner) Init() error
type CryptoBaseScannerAlgo ¶
type CryptoBaseScannerAlgo int
const ( CBS_ALGO_ORIGINAL CryptoBaseScannerAlgo = iota CBS_ALGO_DAY_TRADE CBS_ALGO_CONSERVATIVE CBS_ALGO_POSITION )
func NewCryptoBaseScannerAlgo ¶
func NewCryptoBaseScannerAlgo(data string) (CryptoBaseScannerAlgo, error)
func (*CryptoBaseScannerAlgo) String ¶
func (algo *CryptoBaseScannerAlgo) String() string
type CryptoBaseScannerResponse ¶
type CryptoBaseScannerResponse struct {
Bases CryptoBases `json:"bases"`
}
type CryptoBases ¶
type CryptoBases []CryptoBase
func (CryptoBases) IndexByMarket ¶
func (bases CryptoBases) IndexByMarket(base *CryptoBase) int
type CryptoQualitySignals ¶
type CryptoQualitySignals struct {
// contains filtered or unexported fields
}
func (*CryptoQualitySignals) GetMarkets ¶
func (*CryptoQualitySignals) GetName ¶
func (self *CryptoQualitySignals) GetName() string
func (*CryptoQualitySignals) GetOrderType ¶
func (self *CryptoQualitySignals) GetOrderType() model.OrderType
func (*CryptoQualitySignals) GetRateLimit ¶
func (self *CryptoQualitySignals) GetRateLimit() time.Duration
func (*CryptoQualitySignals) GetValidity ¶
func (self *CryptoQualitySignals) GetValidity() (time.Duration, error)
func (*CryptoQualitySignals) Init ¶
func (self *CryptoQualitySignals) Init() error
type Listings ¶
type Listings struct {
// contains filtered or unexported fields
}
func (*Listings) GetMarkets ¶
func (*Listings) GetOrderType ¶
func (*Listings) GetRateLimit ¶
type MarketStat ¶
type MarketStats ¶
type MarketStats []MarketStat
type MiningHamster ¶
type MiningHamster struct {
// contains filtered or unexported fields
}
func (*MiningHamster) GetMarkets ¶
func (*MiningHamster) GetName ¶
func (self *MiningHamster) GetName() string
func (*MiningHamster) GetOrderType ¶
func (self *MiningHamster) GetOrderType() model.OrderType
func (*MiningHamster) GetRateLimit ¶
func (self *MiningHamster) GetRateLimit() time.Duration
func (*MiningHamster) GetValidity ¶
func (self *MiningHamster) GetValidity() (time.Duration, error)
func (*MiningHamster) Init ¶
func (self *MiningHamster) Init() error
type QualityResponse ¶
type QualityResponse struct { Error int `json:"error"` Message string `json:"message"` Count int `json:"count"` Signals QualitySignals `json:"signals"` }
type QualitySignal ¶
type QualitySignal struct { TimeStamp string `json:"timestamp"` Exchange string `json:"exchange"` Quote string `json:"currency"` Base string `json:"coin"` BuyStart float64 `json:"buy_start,string"` BuyEnd float64 `json:"buy_end,string"` Target1 string `json:"target1"` StopLoss string `json:"stop_loss"` Ask float64 `json:"ask,string"` RiskLevel int64 `json:"risk_level,string"` Skip bool }
func (*QualitySignal) GetTimeStamp ¶
func (self *QualitySignal) GetTimeStamp() (*time.Time, error)
func (*QualitySignal) Price ¶
func (self *QualitySignal) Price() float64
type QualitySignals ¶
type QualitySignals []QualitySignal
func (QualitySignals) IndexByMarket ¶
func (signals QualitySignals) IndexByMarket(signal *QualitySignal) int
type Volume ¶
type Volume struct {
// contains filtered or unexported fields
}
func (*Volume) GetMarkets ¶
func (*Volume) GetOrderType ¶
func (*Volume) GetRateLimit ¶
Click to show internal directories.
Click to hide internal directories.