Quick Start
Get up and running with Axol API in 5 minutes.
1. Get API Credentials
Sign up at axol.io to get your API key.
2. Install SDK
pip install axol-api-client
3. Make Your First Call
from axol import AxolClient
# Initialize client
client = AxolClient(api_key="your_api_key")
# Get current gas prices
gas = client.gas_prices("ethereum")
print(f"ETH Gas: {gas['fast']} gwei")
# Get block data
block = client.get_block("ethereum", "latest")
print(f"Latest block: {block['number']}")
# Stream real-time data
async def handle_gas_update(data):
print(f"Gas update: {data}")
client.ws.subscribe("gas_prices", handle_gas_update)
Common Operations
Multi-chain Balance Check
# Check balances across chains
address = "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb5"
balances = client.get_balances(address, [
"ethereum", "polygon", "arbitrum", "optimism"
])
for chain, balance in balances.items():
print(f"{chain}: {balance}")
Transaction History
# Get recent transactions
txs = client.get_transactions(
address="0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb5",
chain="ethereum",
limit=10
)
for tx in txs:
print(f"{tx['hash']}: {tx['value']} ETH")
WebSocket Streaming
import asyncio
async def stream_events():
# Connect to WebSocket
await client.ws.connect()
# Subscribe to multiple channels
await client.ws.subscribe("gas_prices", on_gas_update)
await client.ws.subscribe("new_blocks", on_new_block)
# Keep connection alive
await client.ws.run_forever()
def on_gas_update(data):
print(f"Gas: {data}")
def on_new_block(data):
print(f"Block: {data['number']}")
# Run the stream
asyncio.run(stream_events())
Rate Limits
All tiers use Compute Unit (CU) based limits:
- Starter: 400M CUs/month, 50 CUPs throughput
- Growth: 2B CUs/month, 330 CUPs throughput, 100M trace CUs
- Scale: 12B CUs/month, 1,250 CUPs throughput, 1B trace CUs
- Enterprise: Custom CUs/month, Custom CUPs throughput, Custom trace CUs
Learn more: Pricing
Next Steps
- Authentication - JWT tokens and API keys
- Blockchain Integration - Chain-specific guides
- WebSockets - Real-time streaming
- API Reference - Complete documentation