Documentation
¶
Index ¶
- type AlgoType
- type Balance
- type GlobalStats
- type Location
- type MyOrders
- type NewOrder
- type NicehashClient
- func (client *NicehashClient) GetBalance() (Balance, error)
- func (client *NicehashClient) GetMyOrders(algo AlgoType, location Location) ([]MyOrders, error)
- func (client *NicehashClient) GetOrders(algo AlgoType, location Location) ([]Orders, error)
- func (client *NicehashClient) GetStatsGlobalCurrent() ([]GlobalStats, error)
- func (client *NicehashClient) GetStatsGlobalDay() ([]GlobalStats, error)
- func (client *NicehashClient) GetStatsProvider(addr string) ([]ProviderStats, []ProviderPayments, error)
- func (client *NicehashClient) GetStatsProviderEx(addr string) (StatsProviderEx, error)
- func (client *NicehashClient) GetStatsProviderWorkers(addr string, algo AlgoType) ([]ProviderWorker, error)
- func (client *NicehashClient) GetVersion() (string, error)
- func (client *NicehashClient) OrderCreate(order NewOrder) (string, error)
- func (client *NicehashClient) OrderRefill(algo AlgoType, location Location, order uint, amount float64) (string, error)
- func (client *NicehashClient) OrderRemove(algo AlgoType, location Location, order uint) (string, error)
- func (client *NicehashClient) OrderSetLimit(algo AlgoType, location Location, order uint, limit float32) (string, error)
- func (client *NicehashClient) OrderSetPrice(algo AlgoType, location Location, order uint, price float32) (string, error)
- func (client *NicehashClient) OrderSetPriceDecrease(algo AlgoType, location Location, order uint) (string, error)
- func (client NicehashClient) SetDebug(debug bool)
- type OrderType
- type Orders
- type Params
- type ProviderExHistory
- type ProviderExHistoryItem
- type ProviderExPayments
- type ProviderExStats
- type ProviderPayments
- type ProviderStats
- type ProviderWorker
- type StatsProviderEx
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlgoType ¶
type AlgoType int
const ( AlgoTypeScrypt AlgoType = iota AlgoTypeSHA256 AlgoTypeScryptNf AlgoTypeX11 AlgoTypeX13 AlgoTypeKeccak AlgoTypeX15 AlgoTypeNist5 AlgoTypeNeoScrypt AlgoTypeLyra2RE AlgoTypeWhirlpoolX AlgoTypeQubit AlgoTypeQuark AlgoTypeAxiom AlgoTypeLyra2REv2 AlgoTypeScryptJaneNf16 AlgoTypeBlake256r8 AlgoTypeBlake256r14 AlgoTypeBlake256r8vnl AlgoTypeHodl AlgoTypeDaggerHashimoto AlgoTypeDecred AlgoTypeCryptoNight AlgoTypeLbry AlgoTypeEquihash AlgoTypePascal AlgoTypeX11Gost AlgoTypeSia AlgoTypeBlake2s AlgoTypeMAX )
type GlobalStats ¶
type GlobalStats struct { Algo AlgoType `json:"algo"` ProfitabilityAboveBtc float32 `json:"profitability_above_btc,string"` ProfitabilityAboveLtc float32 `json:"profitability_above_ltc,string"` Price float64 `json:"price,string"` ProfitabilityBtc float32 `json:"profitability_btc,string"` ProfitabilityLtc float32 `json:"profitability_ltc,string"` Speed float64 `json:"speed,string"` }
type MyOrders ¶
type MyOrders struct { Id uint64 `json:"id"` Type OrderType `json:"type"` Algo AlgoType `json:"algo"` Price float64 `json:"price,string"` BtcAvail float64 `json:"btc_avail,string"` BtcPaid float64 `json:"btc_paid,string"` PoolHost string `json:"pool_host"` PoolPort uint16 `json:"pool_port"` PoolUser string `json:"pool_user"` PoolPass string `json:"pool_pass"` Alive bool `json:"alive"` LimitSpeed float64 `json:"limit_speed,string"` AcceptedSpeed float64 `json:"accepted_speed,string"` Workers uint64 `json:"workers"` End uint64 `json:"end"` }
type NewOrder ¶
type NewOrder struct { Algo AlgoType `json:"algo" url:"algo"` Price float64 `json:"price,string" url:"price"` Amount float64 `json:"amount,string" url:"amount"` PoolHost string `json:"pool_host" url:"pool_host"` PoolPort uint16 `json:"pool_port" url:"pool_port"` PoolUser string `json:"pool_user" url:"pool_user"` PoolPass string `json:"pool_pass" url:"pool_pass"` Alive bool `json:"alive" url:"alive"` LimitSpeed float64 `json:"limit,string" url:"limit,omitempty"` Code string `json:"code" url:"code,omitempty"` }
type NicehashClient ¶
type NicehashClient struct {
// contains filtered or unexported fields
}
func NewNicehashClient ¶
func (*NicehashClient) GetBalance ¶
func (client *NicehashClient) GetBalance() (Balance, error)
func (*NicehashClient) GetMyOrders ¶
func (client *NicehashClient) GetMyOrders(algo AlgoType, location Location) ([]MyOrders, error)
func (*NicehashClient) GetOrders ¶
func (client *NicehashClient) GetOrders(algo AlgoType, location Location) ([]Orders, error)
func (*NicehashClient) GetStatsGlobalCurrent ¶
func (client *NicehashClient) GetStatsGlobalCurrent() ([]GlobalStats, error)
func (*NicehashClient) GetStatsGlobalDay ¶
func (client *NicehashClient) GetStatsGlobalDay() ([]GlobalStats, error)
func (*NicehashClient) GetStatsProvider ¶
func (client *NicehashClient) GetStatsProvider(addr string) ([]ProviderStats, []ProviderPayments, error)
func (*NicehashClient) GetStatsProviderEx ¶
func (client *NicehashClient) GetStatsProviderEx(addr string) (StatsProviderEx, error)
func (*NicehashClient) GetStatsProviderWorkers ¶
func (client *NicehashClient) GetStatsProviderWorkers(addr string, algo AlgoType) ([]ProviderWorker, error)
func (*NicehashClient) GetVersion ¶
func (client *NicehashClient) GetVersion() (string, error)
func (*NicehashClient) OrderCreate ¶
func (client *NicehashClient) OrderCreate(order NewOrder) (string, error)
func (*NicehashClient) OrderRefill ¶
func (*NicehashClient) OrderRemove ¶
func (*NicehashClient) OrderSetLimit ¶
func (*NicehashClient) OrderSetPrice ¶
func (*NicehashClient) OrderSetPriceDecrease ¶
func (NicehashClient) SetDebug ¶
func (client NicehashClient) SetDebug(debug bool)
type Params ¶
type Params struct { Method string `url:"method"` ApiId string `url:"id,omitempty"` ApiKey string `url:"key,omitempty"` Addr string `url:"addr,omitempty"` Algo AlgoType `url:"algo"` Location Location `url:"location"` My bool `url:"my,omitempty"` Order uint `url:"order,omitempty"` Limit float32 `url:"limit,omitempty"` Price float32 `url:"price,omitempty"` Amount float64 `url:"amount,omitempty"` }
type ProviderExHistory ¶
type ProviderExHistory struct { Algo AlgoType `json:"algo"` Data map[time.Time]ProviderExHistoryItem `json:"data"` }
func (*ProviderExHistory) UnmarshalJSON ¶
func (t *ProviderExHistory) UnmarshalJSON(data []byte) error
type ProviderExHistoryItem ¶
type ProviderExPayments ¶
type ProviderExPayments struct { Amount float64 `json:"amount,string"` Fee float64 `json:"fee,string"` TxID string `json:"TXID"` Time time.Time `json:"time"` }
func (*ProviderExPayments) UnmarshalJSON ¶
func (t *ProviderExPayments) UnmarshalJSON(data []byte) error
type ProviderExStats ¶
type ProviderExStats struct { Algo AlgoType `json:"algo"` Suffix string `json:"suffix"` Name string `json:"name"` Profitability float64 `json:"profitability,string"` Unpaid float64 `json:"balance,string"` AcceptedSpeed float64 `json:"accepted_speed,string"` RejectedSpeed float64 `json:"rejected_speed,string"` }
func (*ProviderExStats) UnmarshalJSON ¶
func (t *ProviderExStats) UnmarshalJSON(data []byte) error
type ProviderPayments ¶
type ProviderPayments struct { Amount float64 `json:"amount,string"` Fee float64 `json:"fee,string"` TxID string `json:"TXID"` Time time.Time `json:"time"` }
func (*ProviderPayments) UnmarshalJSON ¶
func (t *ProviderPayments) UnmarshalJSON(data []byte) error
type ProviderStats ¶
type ProviderWorker ¶
type ProviderWorker struct { Name string `json:"name"` AcceptedSpeed float64 `json:"accepted_speed,string"` RejectedSpeed float64 `json:"rejected_speed,string"` Connected uint64 `json:"connected"` XnSubEnabled bool `json:"xnsub"` Difficulty float64 `json:"difficulty"` Location Location `json:"location"` }
func (*ProviderWorker) UnmarshalJSON ¶
func (t *ProviderWorker) UnmarshalJSON(data []byte) error
type StatsProviderEx ¶
type StatsProviderEx struct { Error string `json:"error"` Current []ProviderExStats `json:"current"` Past []ProviderExHistory `json:"past"` Payments []ProviderExPayments `json:"payments"` }
Click to show internal directories.
Click to hide internal directories.