API Documentation
Access X1 network statistics via JSON-RPC. All endpoints use POST method.
Base URL
https://rpc.mainnet.x1.xyzQuick Start
curl -X POST https://rpc.mainnet.x1.xyz \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"getEpochInfo","params":[]}'Endpoints
Code Examples
JAVASCRIPT
const response = await fetch('https://rpc.mainnet.x1.xyz', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'getEpochInfo',
params: []
})
});
const data = await response.json();
console.log(data.result);PYTHON
import requests
response = requests.post('https://rpc.mainnet.x1.xyz', json={
'jsonrpc': '2.0',
'id': 1,
'method': 'getEpochInfo',
'params': []
})
print(response.json()['result'])Rate Limits
The public RPC endpoint has rate limits. For production use, consider running your own node or using a dedicated RPC provider.