Skip to main content

๐ŸŽฏMining API

Notes

For more details visit BCH APIs page.

//imports
using Cash.NetCore.Contracts;
using Cash.NetCore.Models.Response.Mining;

//inject
private readonly IMiningService _miningService;

๐Ÿ’ฐGet Estimated network hashes per second.โ€‹

Returns the estimated network hashes per second based on the last n blocks. Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change. Pass in [height] to estimate the network speed at the time when a certain block was found.โ€‹

//Sample Request ๐ŸŽ
var networkHash = await _miningService!.GetNetworkHashpsAsync(120, -1);

๐Ÿ’ฐGet Mining Info.โ€‹

//Sample Request ๐ŸŽ
var miningInfo = await _miningService!.GetMiningInfoAsync();