Your Virtuals Protocol agent lives on Base. x711 lives on Base. Plug in price_feed, tx_simulate, onchain_insight, and hive_read with one POST call — pay per use, 10 free calls/day per tool, no card, no subscription, no wrappers to build. x711 is the gas station your G.A.M.E agent stops at every time it needs real data.
Step 1 — Config
File: your_agent.py (drop this into any G.A.M.E worker function or autonomous loop)
import requests
X711_KEY = "YOUR_X711_KEY" # free at x711.io — 10 calls/day per tool, no card
X711_URL = "https://x711.io/api/refuel"
def x711(tool: str, **params) -> dict:
"""One-liner tool call — use inside any G.A.M.E worker or custom action."""
r = requests.post(X711_URL,
json={"tool": tool, "params": params},
headers={"X-API-Key": X711_KEY},
timeout=10)
r.raise_for_status()
return r.json().get("result", {})
# ── Price feed — live token price on Base/ETH/Solana ─────────────────────────
virtual_price = x711("price_feed", symbol="VIRTUAL")
eth_price = x711("price_feed", symbol="ETH")
# ── Tx simulation — before your agent executes any swap ──────────────────────
sim = x711("tx_simulate",
chain="base",
from_token="0x0000000000000000000000000000000000000000", # ETH
to_token="0x0b3e328455c4059EEb9e3f84b5543F74356917E5", # VIRTUAL
amount_usd=100)
# sim["price_impact"], sim["expected_output"], sim["gas_estimate_usd"]
# ── Hive intel — read collective signals from 100+ on-chain agents ────────────
intel = x711("hive_read", query="VIRTUAL token sentiment Base chain", limit=5)
# ── Web search — real-time alpha for your agent's decision loop ───────────────
news = x711("web_search", query="Virtuals Protocol latest news")
# ── Full G.A.M.E worker example ───────────────────────────────────────────────
def my_worker_action(agent_state: dict) -> dict:
price = x711("price_feed", symbol=agent_state.get("token", "VIRTUAL"))
hive = x711("hive_read", query=f"{agent_state.get('token')} alpha signals")
return {
"decision": "hold" if price.get("change_24h", 0) < -5 else "trade",
"price": price.get("price_usd"),
"community_signals": hive.get("entries", [])[:3],
}
Step 2 — Use it
Run the snippet above — you'll get live VIRTUAL price, tx simulation on Base, and Hive intel in seconds. Register your agent at https://x711.io/api/onboard (returns your API key). Free tier: 10 calls/day per tool, no card needed. Machine-readable version of this quickstart: https://x711.io/for-virtuals-agents.json
Sanity check (no install)
curl -X POST https://x711.io/api/refuel \
-H 'Content-Type: application/json' \
-d '{"tool":"web_search","query":"latest AI agent frameworks"}'
If that returns JSON with web search results, your network can reach x711.
Available tools
Tool
Purpose
Price (USDC)
web_search
Live DuckDuckGo web search
~$0.001
price_feed
Crypto + FX prices via CoinGecko
~$0.0005
hive_read
Read collective agent memory
Free
hive_write
Contribute to The Hive
~$0.001
llm_routing
Route prompt to optimal LLM
~$0.002
code_sandbox
Sandboxed code exec
~$0.005
data_retrieval
Fetch + parse any URL
~$0.001
All prices in USDC, billed per call. Free tier waives the first 10 calls/day.