Do you want to pull the mining stats/data and analyse them yourself? The pool API is here for you!
The pool API provides data in JSON files on three endpoints: stats, profile and workers. You have to include the abbreviation of the selected coin (e.g. btc) and your access token in every API URL.
To acquire access token (API key) needed for API authentication, please follow these steps:
- Go to Settings > Access Profiles
- Select one of your access profiles or create a new one
- Select Allow access to web APIs in the access profile detail
- Click on Generate New token
- Save the changes
Each access profile has its own access token (in case API access is enabled). Access tokens can be regenerated any time, effectively cancelling the former access token belonging to the selected access profile.
API authentication
An access profile token has to be included in the HTTP header field named SlushPool-Auth-Token or X-SlushPool-Auth-Token to authenticate your requests.
Example request using cURL:
curl https://slushpool.com/stats/json/btc/ -H "SlushPool-Auth-Token: <your access token>"
API request limit
The API allows for approximately one request per five seconds (safe value). When you transiently exceed this limit, some of your requests will be ignored. In case the allowed request rate is exceeded greatly or over a longer period of time, your IP address might get banned. If that is the case, please contact us to resolve the situation.
Pool Stats API
Provides information about pool performance and recently found blocks.
URL:
https://slushpool.com/stats/json/[coin]/
Sample output:
{ btc: { luck_b10: "0.77", luck_b50: "0.85", luck_b250: "0.93", hash_rate_unit: "Gh/s", pool_scoring_hash_rate: 5820970883.3011, pool_active_workers: 219210, round_probability: "0.67", round_started: 1542096907, round_duration: 5913, blocks: { 549753: { date_found: 1542002919, mining_duration: 3423, total_shares: 4640771710739, state: "confirmed", confirmations_left: 0, value: "12.92594863", user_reward: "0.00006194", pool_scoring_hash_rate: 5878745444.967269, }, } } }
General Pool Stats
Field | Type | Description |
luck_b10 | string | pool luck for the last ten blocks |
luck_b50 | string | pool luck for the last 50 blocks |
luck_b250 | string | pool luck for the last 250 blocks |
hash_rate_unit | string | unit used for the hash rate values |
pool_scoring_hash_rate | number | pool scoring hash rate |
pool_active_workers | number | number of pool active workers |
round_probability | string | current CDF for the current round |
round_started | number | Unix time when the current round was started |
round_duration | number | duration of the current round (seconds) |
blocks | object | information for the last 15 blocks (breakdown below) |
Latest Blocks
Field | Type | Description |
date_found | number | Unix time when given block was found |
mining_duration | number | duration of the round leading to given block |
total_shares | number | number of shares collected during the round |
state | string | state of given block |
confirmations_left | number | number of confirmations left |
value | string | block value |
user_reward | string | user reward for the given block |
pool_scoring_hash_rate | number | pool scoring hash rate at the time when block was found |
User Profile API
Provides information about users performance and rewards.
URL:
https://slushpool.com/accounts/profile/json/[coin]/
Sample output:
{ username: "username", btc: { confirmed_reward: "0.00765122", unconfirmed_reward: "0.00062272", estimated_reward: "0.00006014", send_threshold: "0.01000000", hash_rate_unit: "Gh/s", hash_rate_5m: 27978, hash_rate_60m: 28191, hash_rate_24h: 28357, hash_rate_scoring: 28294, hash_rate_yesterday: 28197, low_workers: 0, off_workers: 0, ok_workers: 2, dis_workers: 2, } }
Field | Type | Description |
username | string | username |
confirmed_reward | string | confirmed reward |
unconfirmed_reward | string | unconfirmed reward |
estimated_reward | string | estimated reward for the current block |
send_threshold | string | user minimum payout threshold |
hash_rate_unit | string | unit used for the hash rate values |
hash_rate_5m | string | average hash rate for the last 5 minutes |
hash_rate_60m | number | average hash rate for the last 60 minutes |
hash_rate_24h | number | average hash rate for the last 24 hours |
hash_rate_scoring | number | user current scoring hash rate |
hash_rate_yesterday | number | average hash rate for the previous UTC day |
low_workers | number | number of workers with 'low' state |
off_workers | number | number of workers with 'off' state |
ok_workers | number | number of workers with 'ok' state |
dis_workers | number | number of workers with disabled monitoring |
Worker API
Provides performance data for each one of users worker.
URL:
https://slushpool.com/accounts/workers/json/[coin]/
Sample output:
{ btc: { workers: { username.worker1: { state: "ok", last_share: 1542103204, hash_rate_unit: "Gh/s", hash_rate_scoring: 15342, hash_rate_5m: 14977, hash_rate_60m: 15302, hash_rate_24h: 15351, }, username.worker2: { state: "ok", last_share: 1542103200, hash_rate_unit: "Gh/s", hash_rate_scoring: 12952, hash_rate_5m: 13001, hash_rate_60m: 12889, hash_rate_24h: 13006, }, } } }
Field | Type | Description |
last_share | number | Unix time of the last accepted share |
state | string | state of the worker (ok/low/off/dis) |
hash_rate_unit | string | unit used for the hash rate values |
hash_rate_scoring | number | current scoring hash rate |
hash_rate_5m | number | average hash rate for the last 5 minutes |
hash_rate_60m | number | average hash rate for the last 60 minutes |
hash_rate_24h | number | average hash rate for the last 24 hours |