I've decided to start grabbing real-time metrics from the API and publish them to an analytical engine that I've developed to determine if any changes I'm making to my system are having a positive or negative effect on the hash rates as well as determining the various deviations for the expected hashrate versus the actual, and how the duration of mining affects the share rate (various time frames from average per minute share rate over the entire run (which is provided by the client), and share rate over 15, 30, 60, and 90 minute intervals, etc...). However, the JSON that the API is creating isn't easily parsable, or it's using some other spec. that I'm not familiar with.
So, would it be possible to generate JSON that follows one of the following templates (one uses arrays, and the other uses the multi-nested object format that is currently being used (but with defined objects that can be parsed))?
Template 1:
{
"miner": {
"name": "TBMiner",
"version": "1.55",
"api_version": "1.3",
"num_gpu_threads": 2,
"total_hashrate": 151045628,
"total_accepted": 493,
"total_rejected": 1,
"total_stale": 1,
"uptime_minutes": 153
},
"pool": {
"url": "us-eth.2miners.com",
"port": 2020,
"worker": "WorkerName",
"algo": "ethash",
"job": "3bfaf",
"epoch": 472,
"block": 1,
"diff": 2.031715,
"ping": 90.22672064777328
},
"thread": {
"0": {
"gpu": 1,
"pcie_id": 40,
"board_name": "gfx1030",
"type": "OpenCL",
"xintensity": 800,
"gpu_temp": 32,
"mem_temp": 1,
"fan": 83,
"core_clock": 1350,
"mem_clock": 1069,
"watt": 110,
"hashrate": 75058711,
"dag": true,
"accepted": 60,
"rejected": 1,
"stale": 1
},
"1": {
"gpu": 1,
"pcie_id": 44,
"board_name": "gfx1030",
"type": "OpenCL",
"xintensity": 600,
"gpu_temp": 30,
"mem_temp": 1,
"fan": 83,
"core_clock": 1250,
"mem_clock": 1069,
"watt": 100,
"hashrate": 75986917,
"dag": true,
"accepted": 88,
"rejected": 1,
"stale": 1
}
}
}
Template 2:
{
"miner": {
"name": "nameOfTheMiner",
"version": "versionOfTheMiner",
"api_version": "minerAPIVersion",
"num_gpu_threads": 1,
"total_hashrate": 1,
"total_accepted": 1,
"total_rejected": 1,
"total_stale": 1,
"uptime_minutes": 1
},
"pool": {
"url": "poolAddress",
"port": 1,
"worker": "workerName",
"algo": "algoUsed",
"job": "jobName",
"epoch": 1,
"block": 1,
"diff": 1.1,
"ping": 1.1
},
"thread": [
{
"gpu_index": 1,
"pcie_id": "pcieLocationOfGPU",
"board_name": "gpuManufacturerClassification",
"type": "DataProcessingFrameowrk_and_Version",
"xintensity": 1,
"gpu_temp": 1.1,
"mem_temp": 1.1,
"fan": 1,
"core_clock": 1,
"mem_clock": 1,
"watt": 1,
"hashrate": 1,
"dag": bool,
"accepted": 1,
"rejected": 1,
"stale": 1
}
]
}