MEV & Trading APIs
Axol provides specialized APIs for MEV (Maximal Extractable Value) extraction, trading automation, and DeFi opportunity detection. These endpoints are designed for low-latency, high-reliability applications like trading bots, liquidation bots, and arbitrage systems.
Feature Overview
| Feature | Description | Use Case |
|---|---|---|
| Gas Oracle | Multi-provider gas prices with failover | Transaction timing optimization |
| Mempool Streaming | Real-time pending transaction monitoring | Arbitrage detection, sandwich protection |
| DeFi Liquidations | Position health and opportunity detection | Liquidation bots |
| Gateway | Direct node access for low latency | Latency-critical operations |
| MEV Bundles | Flashbots bundle submission | Atomic transaction execution |
Quick Start
1. Get Gas Prices (No Auth Required)
curl https://api.axol.io/api/v1/oracle/gas/ethereum
Response:
{
"chain": "ethereum",
"slow": {"max_fee_gwei": 25.0, "priority_fee_gwei": 1.0},
"standard": {"max_fee_gwei": 27.0, "priority_fee_gwei": 2.0},
"fast": {"max_fee_gwei": 30.0, "priority_fee_gwei": 3.0},
"instant": {"max_fee_gwei": 35.0, "priority_fee_gwei": 5.0},
"base_fee_gwei": 24.0,
"network_congestion": "medium",
"stale": false
}
2. Stream Mempool Transactions
Python:
import asyncio
import websockets
import json
async def monitor():
uri = "wss://api.axol.io/api/v1/mempool/ethereum/stream"
headers = {"X-API-Key": "YOUR_KEY"}
async with websockets.connect(uri, extra_headers=headers) as ws:
await ws.send(json.dumps({
"action": "subscribe",
"filter": {"tx_types": ["swap"], "min_value_eth": 1.0}
}))
async for msg in ws:
print(json.loads(msg))
asyncio.run(monitor())
3. Find Liquidation Opportunities
curl -H "X-API-Key: YOUR_KEY" \
"https://api.axol.io/api/v1/defi/ethereum/liquidations/opportunities?min_profit_usd=100"