Are you a software developer and want your software to be compatible with NiceHash? Here are a few simple things you need to know.
NiceHash Simple Multi-Algorithm Mining
We have designed Simple Multi-Algorithm Mining for two reasons:
- To remove the unnecessary connection overhead with previous Multi-Algorithm mining.
- To transfer control of the algorithm selection process to miner.
Benefits of Simple Multi-Algorithm Mining over previous versions are the following:
- Miner's discretion on which algorithm to mine (and no longer ours).
- Using standard 3xxx ports.
- Already made and simple to use open source C function, which tells your miner which algorithm is currently the most profitable.
- Reduced connection overhead. Miner uses only one connection to our service and periodically queries HTTP API for information.
- Opportunity to upgrade mining software with better algorithm switching with no added overhead.
- No more dealing with messy huge config files.
How does it work? How should it work in mining software in the optimal way?
- Query our HTTP API https://api.nicehash.com/api?method=simplemultialgo.info to get information about profitability.
- Decide which algorithm is the most profitable.
- If already mining the most profitable algorithm, wait 60 seconds and go to 1.
- Establish a connection for mining the most profitable algorithm and wait for work (job).
- Unload previous work (old algorithm) and prepare for the new algorithm (new job).
- Mine the new algorithm (new job).
- Go to 1.
Steps 1 and 2 are already implemented by us. In mining software, only trivial steps from 3 to 7 needs to be implemented.
C function to get information about profitability and decide on the most profitable algorithm can be found in our GitHub repository.
Mining software needs to use the appropriate NiceHash stratum URL when switching the algorithm. URLs follow the scheme stratum+tcp://[algo_name].[location].nicehash.com:[algo_port] as you can see here. Use the name of the algorithm in lower case and one of the following locations: eu, usa, jp, hk.
We recommend the mining software to perform a benchmark of algorithms to detect the appropriate factors (speeds), thus relieving miners from setting factors manually.
Support for subscribe.extranonce
Other relevant and important stuff