Do you want to pull the mining stats/data and analyse them yourself? The pool API is here for you!
TABLE OF CONTENTS
Overview
The pool API provides data in JSON fils 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://pool.braiins.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://pool.braiins.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://pool.braiins.com/accounts/profile/json/[coin]/
Sample output:
{ username: "username", btc: { confirmed_reward: "0.00765122", unconfirmed_reward: "0.00062272", estimated_reward: "0.00006014", all_time_reward: "0.024839520", 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 |
all_time_reward | string | cumulative all-time reward |
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 |
Daily Reward API
Provides information about rewards for the last 90 days. Please note that on any given day the data only becomes available after the last block found that day (UTC) has gained 100 confirmations, i.e. approximately 20 hours later.
URL:
https://pool.braiins.com/accounts/rewards/json/<coin>/
Sample output:
{ "btc":{ "daily_rewards":[ { "date":1627862400, "total_reward":"0.36361081", "mining_reward":"0.35648119", "bos_plus_reward":"0.00712962", "referral_bonus":"0.00000000", "referral_reward":"0.00000000" }, ] } }
Field | Type | Description |
date | number | Unix time (the first second of the date) |
total_reward | number | the sum of all reward types for the day |
mining_reward | number | the standard mining reward |
bos_plus_reward | number | the amount refunded (pool fee refund) for mining with Braiins OS+ |
referral_bonus | number | bonus received by being referred to Braiins OS+ |
referral_reward | number | reward earned for HR referred to Braiins OS+ |
Daily Hashrate API
Provides information about daily averages of hashrate for user or user group.
URL:
https://pool.braiins.com/accounts/hash_rate_daily/json/[group]/[coin]
Where group is indicating if average hash rates should be returned for the user group. Variable coin is BTC.
Example URL request:
https://pool.braiins.com/accounts/hash_rate_daily/json/group/btc
Sample output:
{ btc: [ { date: 1662674400, hash_rate_unit: "Gh/s", hash_rate_24h: 1073.7, scoring_hash_rate_24h: 322122.5, total_shares: 21600000, }, { date: 1662588000, hash_rate_unit: "Gh/s", hash_rate_24h: 1000.7, scoring_hash_rate_24h: 322100.5, total_shares: 21200000, }, ] }
Field | Type | Description |
date | number | Unix time (the first second of the date) |
hash_rate_unit | string | unit used for the hash rate values |
hash_rate_24h | number | average hash rate for the last 24 hours |
scoring_hash_rate_24h | number | average scoring hashrate for the last 24 hours |
total_shares | number | number of shares collected during the day |
Block Rewards API
Provides information about block rewards.
URL:
https://pool.braiins.com/accounts/block_rewards/json/[coin]?from=[from date]&to=[to date]
Where COIN is BTC, FROM date is string representation of date in ISO format (YYYY-MM-DD), and TO date is string representation of date in ISO format (YYYY-MM-DD).
Example URL request:
https://pool.braiins.com/accounts/block_rewards/json/btc?from=2022-05-01&to=2022-05-07
Sample output:
{ "btc": { "block_rewards": [ { "block_found_at": 1651804117, "pool_scoring_hash_rate": 4441768989.204721, "user_scoring_hash_rate": 12981.581642348925, "block_value": "12.59169582", "user_reward": "0.06366676", "block_height": 567815, "mining_reward": "0.06366676", "braiinsos_plus_mining_bonus": "0.00000000", "referral_reward": "0.00000000", "referral_bonus": "0.00000000", "confirmations_left": 0 }, { "block_found_at": 1651811734, "pool_scoring_hash_rate": 4441768989.387698, "user_scoring_hash_rate": 13041.508413918604, "block_value": "12.66780812", "user_reward": "0.07129083", "block_height": 567816, "mining_reward": "0.07129083", "braiinsos_plus_mining_bonus": "0.00000000", "referral_reward": "0.00000000", "referral_bonus": "0.00000000", "confirmations_left": 0 } ], "hash_rate_unit": "Gh/s" } }
Field | Type | Description |
block_found_at | number | unix timestamp (UTC), when the block was found |
pool_scoring_hash_rate | number | total scoring hash rate of the pool at time when the block was found |
user_scoring_hash_rate | number | total scoring hash rate of the user at time when the block was found |
block_value | string | total value of the block |
user_reward | string | total reward amount for the user |
block_heigh | number | number of the block within the coin's blockchain |
mining_reward | string | amount of mining reward for delivered shares on the block |
braiinsos_plus_mining_bonus | string | pool fee refund for mining with Braiins OS+ device |
referral_reward | string | pool fee refund for mining with Braiins OS+ device and with special referral code |
referral_bonus | string | pool fee refund for propagation of Braiins OS+ with dedicated referral code |
confirmations_left | number | number of confirmations left before the block is considered valid |
Worker API
Provides performance data for each one of users worker.
URL:
https://pool.braiins.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 |