KB: Knowledge Base - Usage of API

< Back

THIS ARTICLE IS OUTDATED FOR VERSION 0.64B AND ABOVE. UPDATED ARTICLE WILL ARRIVE SOON.

Integrated with AMD XMR Miner there is a API based on JSON. For now, this API is only for reading information and it does not receive any commands today, this is a planned feature for future developments of the application.

JSON file can be accessed from http://localhost:4664/api.json. It can also be accessed from another computer, or even through internet if your port is open. The port 4664 needs to be changed if you have changed it.

To disable API Function you can add this to command or start.bat file <–port 0>

 

Lets get to the good stuff; What information included in this API?

  • Separate hashrates for each thread with updates every 5 seconds, 60 seconds and 30 minutes(H/s)
  • Overall total hashrates with updates every 5 seconds, 60 seconds and 30 minutes(H/s)
  • Current Runtime overall hashrate record(H/s)
  • Current Difficulty
  • Accepted Shares
  • Rejected Shares
  • Total Shares
  • Average time between each share (in seconds)
  • Total amount of hashes done in current runtime
  • Best hashes supplied in current runtime
  • Reported errors from miner
  • Which pool is connected
  • Time since pool connection
  • Respond time to pool(ping)
  • Current application runtime
  • Current application runtime in seconds

Example output from a single thread miner:

{“threads”:[[685.0,680.0,null]],”total”:[685.0,680.0,null],”highest”:682.4,”diff_current”:16170,”shares_good”:14,”shares_bad”:0,”shares_total”:14,”avg_time”:21.7,”hashes_total”:156849,”best”:[79883,51097,46211,19761,17142,17007,15262,14654,11974,9783],”error_log”:[],”pool”: “pool.supportxmr.com:7777″,”uptime”:304,”ping”:206,”error_log”:[],”runtime”:[5:9],”runtimes”:[309]}

Example output from 6 thread miner:

{“threads”:[[711.0,710.0,null],[717.0,717.0,null],[951.0,994.0,null],[903.0,889.0,null],[993.0,992.0,null],[884.0,887.0,null]],”total”:[5159.0,5189.0,null],”highest”:5204.1,”diff_current”:173072,”shares_good”:14,”shares_bad”:0,”shares_total”:14,”avg_time”:11.8,”hashes_total”:1142804,”best”:[6183844,467754,442446,373159,280469,101254,88718,74437,42982,40952],”error_log”:[],”pool”: “pool.supportxmr.com:7777″,”uptime”:165,”ping”:243,”error_log”:[],”runtime”:[3:36],”runtimes”:[216]}