Are you a software developer and want your software to be compatible with NiceHash? Here are few simple things you need to know.
NiceHash Simple Multi-Algorithm Mining
We designed Simple Multi-Algorithm Mining for two reasons:
- To remove unnecessary connection overhead with previous Multi-Algorithm mining.
- To transfer control of algorithm choosing onto miner.
Benefits of Simple Multi-Algorithm Mining over previous are following:
- Miner's discretion which algorithm to mine (and not ours anymore).
- Using standard 3xxx ports.
- Already made and simple to use open source C function, which tells your miner which algorithm is currently most profitable.
- Reduced connection overhead. Miner uses only one connection to our service and periodically query 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 the most optimal way?
- Query our HTTP API https://api.nicehash.com/api?method=simplemultialgo.info to get information about profitability.
- Decide which algorithm is most profitable.
- If already mining most profitable algorithm, wait 60 seconds and go to 1.
- Establish connection for mining most profitable algorithm and wait for work (job).
- Unload previous work (old algorithm) and prepare for new algorithm (new job).
- Mine 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 most profitable algorithm can be found in our GitHub repository.
Mining software needs to use appropriate NiceHash stratum URL when switching algorithm. URLs follow scheme stratum+tcp://[algo_name].[location].nicehash.com:[algo_port] as you can see here. Use the algorithm's name in lowercase and one of the following locations: eu, usa, jp, hk.
We recommend mining software to perform benchmark of algorithms to detect appropriate factors (speeds) thus relieving miners from setting factors manually.
Support for subscribe.extranonce
Other relevant and important stuff