Access real-time Monad blockchain data including staking metrics, validator information, and block statistics. Our public API is free to use with reasonable rate limits.
network parameterMake your first API request to get current validator data:
curl "https://www.gmonads.com/api/v1/public/validators/epoch?network=testnet"https://www.gmonads.com/api/v1/publicNo authentication required. Suitable for most use cases.
All responses follow a consistent JSON format:
{
"success": true,
"data": { ... },
"meta": {
"timestamp": "2024-01-15T12:00:00.000Z",
"network": "testnet",
...
}
}Error responses include helpful information:
{
"success": false,
"error": {
"message": "Rate limit exceeded",
"code": 429
},
"documentation": "https://www.gmonads.com/api"
}async function getBlockStats() {
const response = await fetch(
'https://www.gmonads.com/api/v1/public/blocks/1m?network=testnet'
);
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
const { success, data, meta } = await response.json();
console.log('Block stats (1-min resolution):', data);
console.log('Data points:', meta.count);
return data;
}import requests
def get_block_stats():
response = requests.get(
'https://www.gmonads.com/api/v1/public/blocks/1m',
params={'network': 'testnet'}
)
response.raise_for_status()
data = response.json()
print(f"Success: {data['success']}")
print(f"Data points: {data['meta']['count']}")
return data['data']
stats = get_block_stats()Our API returns Cache-Control headers. Use them to avoid unnecessary requests and stay within rate limits.
Implement exponential backoff when you receive 429 responses. Check the Retry-After header for timing.
Choose the smallest timeframe that meets your needs. Shorter timeframes return less data and are faster.
If you need multiple data points, consider if a single endpoint with a longer timeframe could serve your needs.
Have questions or need help? Reach out to us on X:
@gmonads