2022-01-13 15:06:13 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#!/usr/bin/env zsh
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								hostname=$(hostname)
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-29 11:34:49 -05:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								slugs=(`curl -sSL https://raw.githubusercontent.com/mempool/mining-pools/master/pools.json | jq -r '.slugs[]'`)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:06:13 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								while true
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-28 13:32:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								do for url in / \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/statistics/2h' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/statistics/24h' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/statistics/1w' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/statistics/1m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/statistics/3m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/statistics/6m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/statistics/1y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/statistics/2y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/statistics/3y' \
							 | 
						
					
						
							
								
									
										
										
										
											2022-02-02 19:03:07 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/pools/24h' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/pools/3d' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/pools/1w' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/pools/1m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/pools/3m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/pools/6m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/pools/1y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/pools/2y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/pools/3y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/pools/all' \
							 | 
						
					
						
							
								
									
										
										
										
											2022-02-21 18:01:09 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/3m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/6m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/1y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/2y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/3y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/all' \
							 | 
						
					
						
							
								
									
										
										
										
											2022-02-25 10:21:16 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/pools/3m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/pools/6m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/pools/1y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/pools/2y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/pools/3y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/hashrate/pools/all' \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-22 12:34:29 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/reward-stats/144' \
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-30 19:52:06 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks-extras' \
							 | 
						
					
						
							
								
									
										
										
										
											2022-04-09 01:17:25 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/fees/24h' \
							 | 
						
					
						
							
								
									
										
										
										
											2022-04-11 18:17:36 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/fees/3d' \
							 | 
						
					
						
							
								
									
										
										
										
											2022-04-09 01:17:25 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/fees/1w' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/fees/1m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/fees/3m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/fees/6m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/fees/1y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/fees/2y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/fees/3y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/fees/all' \
							 | 
						
					
						
							
								
									
										
										
										
											2022-04-11 21:20:20 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/rewards/24h' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/rewards/3d' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/rewards/1w' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/rewards/1m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/rewards/3m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/rewards/6m' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/rewards/1y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/rewards/2y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/rewards/3y' \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'/api/v1/mining/blocks/rewards/all' \
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-28 13:32:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:06:13 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									do
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										curl -s "https://${hostname}${url}" >/dev/null
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									done
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-30 01:06:42 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									for slug in $slugs
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-08 16:55:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									do
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-30 01:06:42 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										curl -s "https://${hostname}/api/v1/mining/pool/${slug}" >/dev/null
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-30 19:52:06 +09:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										curl -s "https://${hostname}/api/v1/mining/pool/${slug}/hashrate" >/dev/null
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										curl -s "https://${hostname}/api/v1/mining/pool/${slug}/blocks" >/dev/null
							 | 
						
					
						
							
								
									
										
										
										
											2022-03-08 16:55:49 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									done
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-01-13 15:06:13 +09:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									sleep 10
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								done
							 |