API Documentation
Access real-time mining pool data through our RESTful API endpoints
Real-time Data
Get live mining statistics through Server-Sent Events (SSE) for instant updates
JSON Format
All endpoints return structured JSON data that's easy to parse and integrate
No Authentication
Public API endpoints require no authentication for easy integration
Base URL
https://nomp.mofumofu.me
All API endpoints are relative to this base URL.
API Endpoints
/api/stats
GETactive
Get general pool statistics including hashrate, workers, and algorithm data
Example Response:
{
"pools": {
"bellcoin": {
"hashrateString": "12.73 KH/s",
"hashrate": 12728,
"workerCount": 2,
"minerCount": 2
},
"sugarchain": {
"hashrateString": "38.91 KH/s",
"hashrate": 38906,
"workerCount": 5,
"minerCount": 2
}
},
"algos": {
"yespower": {
"hashrateString": "12.73 KH/s",
"workers": 2
},
"yespowerSUGAR": {
"hashrateString": "38.91 KH/s",
"workers": 5
}
}
}
/api/live_stats
GETactive
Server-Sent Events (SSE) endpoint for real-time statistics updates
Example Response:
// EventSource connection
const source = new EventSource('/api/live_stats');
source.onmessage = function(event) {
const data = JSON.parse(event.data);
// Update UI with live data
};
/api/pool_stats
GETactive
Detailed statistics for individual pools including network data
Example Response:
{
"bellcoin": {
"poolStats": {
"validBlocks": 21581,
"networkHash": 20146,
"networkDiff": 0.0002561,
"networkBlocks": 3569057
},
"blocks": {
"pending": 84,
"confirmed": 21379,
"orphaned": 95
}
},
"sugarchain": {
"poolStats": {
"validBlocks": 1104789,
"networkHash": 117823,
"networkDiff": 0.0001311,
"networkBlocks": 37457745
},
"blocks": {
"pending": 41,
"confirmed": 974854,
"orphaned": 16105
}
}
}
/api/payments
GETactive
Payment history and transaction records for miners
Example Response:
{
"payments": [
{
"time": 1703875200,
"amount": 10.45832197,
"txHash": "a1b2c3d4e5f6...",
"address": "BCVicYRSqKKt1ynJKPrXHA46hUWLrbjR49",
"pool": "bellcoin"
},
{
"time": 1703875100,
"amount": 5.12345678,
"txHash": "f6e5d4c3b2a1...",
"address": "sugar1qgrfj36m7ee37x3mjuvy8h0lxve93ydk0uz75nh",
"pool": "sugarchain"
}
]
}
/api/worker_stats
GETactive
Individual worker performance metrics and activity data
Example Response:
{
"workers": {
"BCVicYRSqKKt1ynJKPrXHA46hUWLrbjR49": {
"hashrate": 1250000,
"lastActivity": 1703875200,
"shares": { "valid": 245, "invalid": 2 }
},
"bbw7txW4a3rJbnvMYGYhUP3NtTueeMbLB5.1": {
"hashrate": 890000,
"lastActivity": 1703875150,
"shares": { "valid": 189, "invalid": 1 }
}
}
}
/api/blocks
GETactive
Block discovery history with finder information
Example Response:
{
"blocks": [
{
"height": 3569057,
"hash": "00000000000...",
"finder": "BCVicYRSqKKt1ynJKPrXHA46hUWLrbjR49.worker1",
"time": 1703875200,
"status": "confirmed",
"pool": "bellcoin"
},
{
"height": 37457745,
"hash": "00000000001...",
"finder": "sugar1qgrfj36m7ee37x3mjuvy8h0lxve93ydk0uz75nh.worker1",
"time": 1703875100,
"status": "pending",
"pool": "sugarchain"
}
]
}
Usage Examples
JavaScript/Node.js
// Fetch pool statistics
fetch('https://nomp.mofumofu.me/api/stats')
.then(response => response.json())
.then(data => {
console.log('Pool stats:', data);
});
// Live updates with Server-Sent Events
const eventSource = new EventSource('https://nomp.mofumofu.me/api/live_stats');
eventSource.onmessage = function(event) {
const stats = JSON.parse(event.data);
updateUI(stats);
};
Python
import requests
import json
# Get pool statistics
response = requests.get('https://nomp.mofumofu.me/api/stats')
stats = response.json()
print(f"Pool hashrate: {stats['pools']['bellcoin']['hashrateString']}")
# For live updates, use SSE library like sseclient
from sseclient import SSEClient
messages = SSEClient('https://nomp.mofumofu.me/api/live_stats')
for msg in messages:
data = json.loads(msg.data)
print(f"Live stats: {data}")
curl
# Get pool statistics
curl -X GET "https://nomp.mofumofu.me/api/stats" \
-H "Accept: application/json"
# Get payment history
curl -X GET "https://nomp.mofumofu.me/api/payments" \
-H "Accept: application/json"
# Listen to live stats (SSE)
curl -N "https://nomp.mofumofu.me/api/live_stats"
Important Notes
Server-Sent Events (SSE)
The /api/live_stats
endpoint uses SSE for real-time updates. Keep connections open to receive continuous data streams.
Rate Limiting
API endpoints are rate-limited to 100 requests per minute per IP address. Use the SSE endpoint for frequent updates instead of polling.
CORS Support
All API endpoints support Cross-Origin Resource Sharing (CORS) for browser-based applications.
Need Help?
Contact us if you need assistance integrating with our API