simplemultialgo

package module
v0.0.0-...-634dff5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2018 License: MIT Imports: 5 Imported by: 0

README

Nice Simple Multi-Algorithm in Go

Go port of Nice Simple Multi-Algorithm.

Gets profitability information about algorithms and returns back the most profitable algorithm.

Algorithm names: https://www.nicehash.com/index.jsp?p=simplemultialgo#names

Example

package main

import (
	"fmt"

	simplemultialgo "github.com/moncho/go-simplemultialgo"
)

func main() {
	algo, err := simplemultialgo.NiceHashMultiAlgo(map[string]int{"scrypt": 1, "x11": 7, "quark": 12})
	if err != nil {
		panic("Run for your life!!")
	}

	fmt.Printf("Most profitable algo is %s, currently paying %v\n", algo.Name, algo.Paying)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

type Algorithm struct {
	Paying string `json:"paying"`
	Port   uint   `json:"port"`
	Name   string `json:"name"`
	Index  int    `json:"algo"`
}

Algorithm holds information about algorithm profitability

func NiceHashMultiAlgo

func NiceHashMultiAlgo(algoSpeeds map[string]int) (*Algorithm, error)

NiceHashMultiAlgo queries profitability of all algorithms on NiceHash and returns the most profitable. The given map is used to filter and weight algorithms. It can be empty. See https://www.nicehash.com/software-developers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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