Skip to content

Bitcoin accepted at checkout  |  Ships from Laval, QC, Canada  |  Expert support since 2016

Miner API Command Reference — cgminer/BOSminer on Port 4028

Every ASIC miner exposes a JSON API on TCP port 4028 — the cgminer/BMMiner/BOSminer socket that fleet tools and pyasic use to read your miners and switch pools. This reference is the firmware-family support matrix: which commands work as read or control across Stock Antminer, BraiinsOS-family, LuxOS-family and DCENT_OS.

Quick answer

Almost every ASIC miner exposes a local management API on TCP port 4028 — the cgminer/BMMiner/BOSminer "API socket". You send a one-line JSON object like {"command":"summary"} and get back JSON; it is how fleet tools, pyasic and monitoring dashboards read your miners and (where permitted) switch pools, toggle boards and set tuning. But the SAME command behaves differently across firmware: stock Antminer is largely read-only on 4028 (writes go through its HTTP CGI), BraiinsOS keeps 4028 read-only and moves control to gRPC, and the LuxOS-family implements full read+control on 4028 behind a session token. This reference is that matrix — 50 commands (25 control-class), each mapped across Stock, BraiinsOS-family, LuxOS-family and DCENT_OS, with parameters and a one-line description, every row cited.

How to read it: the "Access" column is what the command DOES (read vs control); the four firmware columns are HOW each family exposes it — Read / Control on the 4028 socket, gRPC (capability lives on BraiinsOS gRPC port 50051, not 4028), HTTP CGI (stock does the write via /cgi-bin), or — (not on that socket). LuxOS-family control commands take a session token as the first parameter (logon to get one). DCENT_OS columns are closed-beta TARGETS (public beta summer 2026) aimed at cgminer-compatible detection so existing tools just work — built on the shoulders of cgminer, BOSminer and LuxOS, not a claim to beat them. Free CSV/JSON under CC BY 4.0.

Download CSV Download JSON REST API →

CommandAccessStock AntminerBraiinsOS-familyLuxOS-familyDCENT_OS
version
Returns miner/API version (CGMiner version, API version string e.g. '3.7', Miner type, compile time). Primary tool-fingerprint call. Identity
readReadReadReadBeta
summary
Top-level mining summary: Elapsed, GHS 5s / GHS av (or MHS av/5s), Accepted, Rejected, Hardware Errors, Utility, Found Blocks, Best Share, Device Hardware%/Rejected%. Status
readReadReadReadBeta
stats
Detailed per-board statistics: per-chain chip counts (chain_acn*), per-chain hashrate (chain_rate*), chip status maps (chain_acs*), temps (temp*, temp2_*), fan RPM (fan1-4), total_rateideal, uptime. Status
readReadReadReadBeta
pools
Lists configured pools with per-pool metrics: URL, Status (Alive/Dead), Priority, Quota, Accepted/Rejected, User, Stratum Active, Last Share Time/Difficulty, Pool Rejected%/Stale%. Pools
readReadReadReadBeta
devs
Per-device (hashboard/ASC) report: status, temperature, hashrate, accepted/rejected, hardware errors per board. Devices
readReadReadReadBeta
devdetails
Static hardware details per board: Model, Chips, Cores, Frequency, Voltage, Profile, Serial. Used for model identification. Devices
readReadReadReadBeta
config
Basic configuration info: ASC count, pool count, active strategy, log interval, device code, OS. Config
readReadReadReadBeta
edevs (none (legacy '[old]' arg accepted))
Same as devs but excludes blacklisted/zombie devices. Cleaner board list for monitoring. Devices
readReadReadReadBeta
estats (none (legacy '[old]' arg accepted))
Same as stats but excludes zombie devices. Variety of model-specific miner stats. Status
readReadReadReadBeta
coin
Current coin/algorithm info (hash method, current block diff, network diff). Placeholder/compatibility on many ASIC builds. Status
readReadReadReadBeta
lcd
Compact one-shot general summary (originally for LCD displays). Compatibility placeholder on most ASIC firmware. Status
readReadReadTBD
check (command_name)
Reports whether a given command exists and the caller's access level for it. Used for capability discovery. Meta
readReadReadReadBeta
asc (board_id (n))
Detailed report for a single ASC (hashboard) by index. Devices
readReadReadReadBeta
asccount
Returns the quantity of ASC devices (hashboards) detected. Devices
readReadReadReadBeta
notify
Returns the device notification/error history (last share, temps, comms errors per device). Status
readReadReadReadBeta
privileged
Reports whether the calling connection has privileged (write) access under the api-allow policy. Meta
readReadReadReadBeta
pga (n)
Legacy: data for FPGA device n. Placeholder/empty on ASIC-only miners. Devices
readReadReadTBD
debug (setting)
Get/set the daemon debug verbosity flags (e.g. quiet, verbose, debug, rpc). Meta
readReadReadTBD
lockstats
Writes internal lock statistics to the log (build-dependent debug aid). Meta
readReadTBD
switchpool (n (pool index))
Switch the active pool to index n (raise to top priority). Pools
controlHTTP CGIgRPCControlTBD
enablepool (n)
Enable (activate) pool n. Pools
controlHTTP CGIgRPCControlTBD
disablepool (n)
Disable (deactivate) pool n. Pools
controlHTTP CGIgRPCControlTBD
addpool (url,user,password)
Add a new pool (to the first group). On LuxOS the leading session_id is required. Pools
controlHTTP CGIgRPCControlTBD
removepool (n)
Remove pool n. Pools
controlHTTP CGIgRPCControlTBD
poolpriority (n,n,n,... (priority order))
Set the priority order of all pools. Pools
controlHTTP CGIgRPCControlTBD
poolquota (n,q (pool,quota))
Set the load-balancing quota for pool n. Pools
controlHTTP CGIgRPCControlTBD
save ([file])
Persist the current configuration to disk (optionally to a named file). Config
controlHTTP CGIgRPCControlTBD
restart
Restart the mining daemon (cgminer/bmminer/bosminer/luxminer) without rebooting the device. System
controlHTTP CGIgRPCControlTBD
quit
Terminate the mining daemon process. System
controlHTTP CGIgRPCControlTBD
ascenable (n)
Enable hashboard (ASC) n. Devices
controlHTTP CGIgRPCControlTBD
ascdisable (n)
Disable hashboard (ASC) n. Devices
controlHTTP CGIgRPCControlTBD
ascset (n,opt[,val] (vendor-specific opcodes))
Set a vendor-specific ASC option. On Avalon/Canaan this carries the model-specific ascset opcodes (e.g. frequency, voltage, LED). Parameters are not portable across vendors. Devices
controlHTTP CGIgRPCControlTBD
pgaenable (n)
Legacy: enable FPGA device n (placeholder on ASIC miners). Devices
controlHTTP CGITBD
pgadisable (n)
Legacy: disable FPGA device n (placeholder on ASIC miners). Devices
controlHTTP CGITBD
pgaidentify (n)
Legacy: blink the identify LED on FPGA device n. Devices
controlHTTP CGITBD
setconfig (name,value)
Set a global cgminer config value (e.g. queue, scantime, expiry). Config
controlHTTP CGIgRPCControlTBD
zero (which,summary (true/false))
Zero the named statistics counters; optional summary printout. Stats
controlHTTP CGIgRPCControlTBD
hotplug (n (seconds))
Set the hotplug device-scan interval (0 disables). System
controlHTTP CGIControlTBD
failover-only (true|false)
Restrict work to the primary pool unless it is dead (failover-only mode). Pools
controlHTTP CGIgRPCControlTBD
logon
Open a control session; returns SessionID. Single-session mutex: fails if a session already exists. SessionID is the FIRST parameter of every mutating command. (LuxOS-family model; BraiinsOS uses gRPC bearer token instead.) Session
controlgRPCControlTBD
logoff (session_id)
Close the active control session. Session
controlgRPCControlTBD
session
Report whether a control session is currently active. Session
readReadTBD
kill
Force-terminate any active session (recover a stuck mutex). Session
controlControlTBD
fans
Fan statistics: per-fan RPM, speed %, target %. Cooling
readReadReadReadBeta
temps
Per-chain board and chip temperatures. Cooling
readReadReadReadBeta
tempctrl
Temperature-control thresholds (target / hot / dangerous). Cooling
readReadTBD
power
Get power consumption in watts (measured or estimated). Power
readgRPCReadBeta
profiles
List available tuning profiles (frequency/voltage operating points). Note: profile values are runtime operating points, not factory presets. Tuning
readgRPCReadBeta
profileset (session_id,profile_name[,frequency_step,voltage_step,update_atm])
Set the active tuning profile for the miner/board. (BraiinsOS equivalent is a gRPC tuner call; stock has no socket equivalent.) Tuning
controlgRPCControlTBD
curtail (session_id,sleep|wakeup[,voltage_step,frequency_step,mode])
Demand-response sleep/wake control (curtailment). LuxOS exposes sleep/wakeup; an operator can pause hashing for grid events. (BraiinsOS pause/resume is gRPC.) Power
controlgRPCControlTBD

Legend: Read read-only on 4028 · Control write/control on 4028 · gRPC / HTTP CGI control via a different surface (BraiinsOS gRPC 50051 / stock /cgi-bin) · Beta‡ DCENT_OS closed-beta target · — / TBD not on that socket. LuxOS-family control commands need a session token (logon).

Source: D-Central Mining Bible (PYASIC_COMPATIBILITY, BraiinsOS & LuxOS reverse-engineering) — per-command citations in the CSV/JSON. See also the firmware feature matrix, the Stratum V2 pool protocol (distinct from this local socket), and the web flasher.