Skip to content
MaynardMiner edited this page Apr 4, 2019 · 29 revisions

SWARM API

Endpoints

http://localhost:4099

Global security

if -APIPassword argument is set, then new endpoint becomes:

http://localhost:4099/[password]/

Remote Endpoint (if -Remote yes was set)

http://ip.address:4099/[password]/

GET /summary

Request
      no extra variable.

Response
     Array of ALL current pool and miner configurations.

Example:
     [ 
       "NVIDIA2":[{    ##Device Group
        "Power": 0.00008930731017545172,  ##Power Consuption, In BTC
        "Pool_Estimate": 2.21445E-11, ##Pool Quote In BTC for Algorithm / Coin
        "Type": "NVIDIA2", ##Device Group
        "Miner": "trex-2", ##This Miner Combination
        "Name": "x22i", ##The Name of the Miner Combination's SYMBOL (Can be coin symbol or algorithm)

        "Arguments": "-a x22i -o stratum+tcp://blockmasters.co:3223 --api-bind-telnet 0.0.0.0:4069 --api-bind-http 0.0.0.0:4072 -u 1DRxiWx6yuZfN9hrEJa3BDXWVJ9yyJU36i -p c=BTC,ID=MKVITO2 ", ##This Miner Combination's Arguments

        "HashRates": 12201560.7579051, ##Registered Hashrate
        "Profits": 1.9714855352506141E-05, ##This Miner's Current Estimated Profit
        "Algo": "x22i", ##The Name of the Miner Combination's Algorithm
        "Fullname": "x22i", ##The fullname of the Miner Combination's symbol (full coin name or algorithm)
        "MinerPool": "blockmasters" ##This Miner Combinations's pool
       } ]
      ]
GET /getstats

Request
      no extra variable.

Response
     Array of current GPU stats.

Example:

[
{
 "GPU0":
  {
   "fans":"75",
   "hashrate":"0.001",
   "temperature":"69"
  }
},
{
 "GPU1":
  {
   "fans":"75",
   "hashrate":"7114.77",
   "temperature":"69"
   }
},
{
 "GPU2":
  {
   "fans":"75",
   "hashrate":"0.001",
   "temperature":"72"
  }
},
{
 "GPU3":
  {
   "fans":"75",
   "hashrate":"7400.83",
   "temperature":"63"
  }
},
{
 "GPU4":
  {
   "fans":"75",
   "hashrate":"0.001",
   "temperature":"66"
  }
},
{
 "GPU5":
  {
   "fans":"75",
   "hashrate":"7317.26",
   "temperature":"66"
  }
},
{
 "GPU6":
  {
   "fans":"75",
   "hashrate":"7312.13",
   "temperature":"70"
  }
},
{
 "Algorithm":"argon2d-dyn"
},
{
 "Uptime":"183"
},
{
 "Hash_Units":"khs"
}
{
 "Accepted":"54"
},
{
 "Rejected":"0"
}]
GET /getbest

Request
      no extra variable.

Response
     Array of current miners SWARM is using- The Miners Determined To Be Best.

Example:

[
    {
     "AMD1":
     [
      { 
       "Delay":"1",
       "Name":"fancyix-1",
       "Type":"AMD1",
       "Devices":"none",
       "ArgDevices":null,
       "DeviceCall":"sgminer-gm",
       "MinerName":"sgminer.exe",
       "Path":".\\bin\\fancyix-1\\sgminer.exe",
       "Arguments":"-gpu-platform 0 --api-listen --api-port 4028 -k allium -o stratum+tcp://allium.mine.zergpool.com:6433 -u 
       1DRxiWx6yuZfN9hrEJa3BDXWVJ9yyJU36i -p c=BTC,ID=AMD -T -w 256 -I 22",
       "API":"sgminer-gm",
       "Port":4028,
       "Coins":"allium",
       "Active": 
        {
         "Ticks":0,
         "Days":0,
         "Hours":0,
         "Milliseconds":0,
         "Minutes":0,
         "Seconds":0,
         "TotalDays":0,
         "TotalHours":0,
         "TotalMilliseconds":0,
         "TotalMinutes":0,
         "TotalSeconds":0
        },
       "Activated":0,
       "Status":"Idle",
       "HashRate":0,
       "Benchmarked":0,
       "WasBenchmarked":false,
       "XProcess":null,
       "MinerPool":"zergpool",
       "Algo":"allium",
       "FullName":"allium",
       "Instance":null,
       "InstanceName":null,
       "Username":null,
       "Connection":null,
       "Password":null,
       "BestMiner":true,
       "JsonFile":null,
       "LogGPUS":"none",
       "FirstBad":null,
       "Prestart":
        [
         "export LD_LIBRARY_PATH=C:\\Users\\Mayna\\Documents\\GitHub\\SWARM\\build\\export",
         "export GPU_MAX_HEAP_SIZE=100","export GPU_USE_SYNC_OBJECTS=1",
         "export GPU_SINGLE_ALLOC_PERCENT=100",
         "export GPU_MAX_ALLOC_PERCENT=100"
        ],
       "ocpl":null,
       "ocdpm":"",
       "ocv":"",
       "occore":"",
       "ocmem":"",
       "ocmdpm":"",
       "ocpower":null,
       "ocfans":"",
       "ethpill":null,
       "pilldelay":null,
       "Host":null,
       "User":null,
       "CommandFile":null,
       "Profit":0.000330999084774573,
       "Power":0.000232126449395317776,
       "Fiat_Day":1.33,
       "Log":"C:\\Users\\Mayna\\Documents\\GitHub\\SWARM\\logs\\AMD1.log",
       "Strike":false
      }
    ]
   }
]
Clone this wiki locally