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:

  1. Go to Settings > Access Profiles
  2. Select one of your access profiles or create a new one
  3. Select Allow access to web APIs in the access profile detail
  4. Click on Generate New token
  5. 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
TypeDescription
luck_b10stringpool luck for the last ten blocks
luck_b50stringpool luck for the last 50 blocks
luck_b250stringpool luck for the last 250 blocks
hash_rate_unitstringunit used for the hash rate values
pool_scoring_hash_ratenumberpool scoring hash rate
pool_active_workersnumbernumber of pool active workers
round_probabilitystringcurrent CDF for the current round
round_startednumberUnix time when the current round was started
round_durationnumberduration of the current round (seconds)
blocksobjectinformation for the last 15 blocks (breakdown below)

Latest Blocks

Field
TypeDescription
date_foundnumberUnix time when given block was found
mining_durationnumberduration of the round leading to given block
total_sharesnumbernumber of shares collected during the round
statestringstate of given block
confirmations_leftnumbernumber of confirmations left
valuestringblock value
user_rewardstringuser reward for the given block
pool_scoring_hash_ratenumberpool 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
TypeDescription
usernamestringusername
confirmed_rewardstringconfirmed reward
unconfirmed_rewardstringunconfirmed reward
estimated_rewardstringestimated reward for the current block
all_time_rewardstringcumulative all-time reward 
hash_rate_unitstringunit used for the hash rate values
hash_rate_5mstringaverage hash rate for the last 5 minutes
hash_rate_60mnumberaverage hash rate for the last 60 minutes
hash_rate_24hnumberaverage hash rate for the last 24 hours
hash_rate_scoringnumberuser current scoring hash rate
hash_rate_yesterdaynumberaverage hash rate for the previous UTC day
low_workersnumbernumber of workers with 'low' state
off_workersnumbernumber of workers with 'off' state
ok_workersnumbernumber of workers with 'ok' state
dis_workersnumbernumber 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
TypeDescription
datenumberUnix time (the first second of the date)
total_rewardnumberthe sum of all reward types for the day
mining_rewardnumberthe standard mining reward
bos_plus_rewardnumber

the amount refunded (pool fee refund) for mining with Braiins OS+

referral_bonusnumberbonus received by being referred to Braiins OS+
referral_rewardnumberreward 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
TypeDescription
datenumberUnix time (the first second of the date)
hash_rate_unitstringunit used for the hash rate values
hash_rate_24hnumberaverage hash rate for the last 24 hours
scoring_hash_rate_24hnumber

average scoring hashrate for the last 24 hours

total_sharesnumbernumber 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
TypeDescription
block_found_at    numberunix timestamp (UTC), when the block was found
pool_scoring_hash_ratenumbertotal scoring hash rate of the pool at time when the block was found
user_scoring_hash_ratenumbertotal scoring hash rate of the user at time when the block was found
block_valuestringtotal value of the block
user_rewardstringtotal reward amount for the user
block_heighnumbernumber of the block within the coin's blockchain
mining_rewardstringamount of mining reward for delivered shares on the block
braiinsos_plus_mining_bonusstringpool fee refund for mining with Braiins OS+ device
referral_rewardstringpool fee refund for mining with Braiins OS+ device and with special referral code
referral_bonusstringpool fee refund for propagation of Braiins OS+ with dedicated referral code
confirmations_leftnumbernumber 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
TypeDescription
last_sharenumberUnix time of the last accepted share
statestringstate of the worker (ok/low/off/dis)
hash_rate_unitstringunit used for the hash rate values
hash_rate_scoringnumbercurrent scoring hash rate
hash_rate_5mnumberaverage hash rate for the last 5 minutes
hash_rate_60mnumberaverage hash rate for the last 60 minutes
hash_rate_24hnumberaverage hash rate for the last 24 hours