Stream Clean Web3 Data

By

Source: Dataline Blog

If you're building an AI agent on crypto markets right now, you've already done the nights. Hyperliquid SDK for perps. Polymarket gamma for odds. Coingecko for token metadata. Three RPCs for the chains you care about. Web2 scrapers for the X feed and the protocol announcement page. Glue code, fallback logic, decimal coercion, outlier filters — all of it sitting in your repo before your agent has reasoned about a single trade.

Dataline is the data + execution layer for AI agents in Web3. One call replaces that pile. You pass natural-language intent. You get back a structured answer, source attribution, and a confidence score the agent can budget against — across every market, in one schema. 19.4M on-chain transactions executed at 96.4% success across BNB, Sui, and TON; 2.5M+ ChatPilot interactions served on the same data layer.

This post walks the layer end to end: the five stages every call passes through, what the confidence score actually measures, what's covered, and how a developer or an autonomous agent reaches it.

The five stages

Every Dataline call passes through five stages. The trace is visible in the response if you ask for it (trace: true) — your agent can audit its own answer.

/ 01
Intent
Parse natural language into a typed query.
/ 02
Route
Pick the venues and endpoints that can answer it.
/ 03
Normalize
Coerce mismatched schemas into one shape.
/ 04
Aggregate
Combine sources, drop outliers, weight by liquidity.
/ 05
Output
Return data + confidence + sources + latency.

1. Intent

You pass a string like "BTC price", "ETH funding rate on HL", or "Polymarket odds for 2028 election". The intent stage maps that to a typed query: asset, venue class, time window, precision. The parser is deterministic on common shapes and falls back to an LLM only on rare inputs — so the same input deterministically produces the same routed call.

2. Route

Given a typed query, the router picks venues. For BTC price: Binance, OKX, Coinbase, Hyperliquid, Uniswap. For onchain.balances: the right RPC fan-out across the chains the wallet actually holds value on. The router is venue-aware — if Hyperliquid depth is thin for an asset right now, its weight drops before its number ever lands in the aggregate.

3. Normalize

The unglamorous, load-bearing stage. Every venue returns its own shape: different decimals, different timestamps, different field names, different ideas of what "price" means (last trade vs mid vs VWAP). Normalization coerces them to one schema. Without it, aggregation is meaningless — you'd be averaging apples and oranges.

4. Aggregate

Normalized sources fold into one answer. Outliers get filtered (anything more than N standard deviations from the rest). Sources get weighted by liquidity, recency, and historical reliability. If only one source returns, the call still succeeds — but the confidence drops because there's nothing to cross-check.

5. Output

The response carries data, a confidence score (0–1), a source list, and latency_ms. Optionally a full trace of the four prior stages. You set min_confidence on the way in — anything below your threshold returns a 409 instead of data, and your agent refuses to act:

POST /v1/intent/resolve
{
  "intent": "BTC price",
  "min_confidence": 0.9
}

→ 200
{
  "data": { "price": 67123.45 },
  "confidence": 0.98,
  "source": ["binance", "hyperliquid", "okx"],
  "latency_ms": 87
}

What confidence actually measures

A flat number is a trap. BTC = 67,123 looks identical whether it came from one stale source or twelve fresh ones, and an agent that doesn't see the difference acts on both with the same boldness. Confidence is the contract.

The score is computed as data agreement × source reliability × freshness:

  • Data agreement — how tightly the normalized values cluster. Two sources with $67,121 and $67,124 score high. Two sources with $67,000 and $68,500 score low.
  • Source reliability — historical accuracy of each venue for this query type. Hyperliquid for BTC perps weights heavier than a long-tail aggregator.
  • Freshness — age of the latest tick. Two-second-old data scores higher than thirty-second-old data.

Calibrate against confidence the way you'd calibrate against latency. min_confidence: 0.9 for trade execution, 0.6 for analytics dashboards, 0.4 for "I just want a number to render somewhere." When the score drops, your agent fails safely instead of confidently.

Confidence on every call. The point isn't to make your agent more right — it's to make your agent refuse when it would otherwise be wrong.

What's covered

The data layer reaches across the venues your agent already wants to read:

  • Crypto markets — spot, perps, funding rates, OHLCV. Hyperliquid, Binance, OKX, Coinbase, every major DEX, lending markets. CEX and DEX, EVM and non-EVM.
  • On-chain — wallet balances, decoded transaction history, position state. Ethereum, Solana, Base, Arbitrum, Optimism, Polygon, BNB Chain, Sui, TON.
  • Prediction markets — Polymarket, Kalshi, on-chain books. Live odds and resolution status in one schema.
  • News and social — filtered crypto-relevant headlines from X, Farcaster, curated outlets — what an agent reasoning about why a price moved actually needs.
  • Web2 sources — the long tail of pages, APIs, and registries Web3-only data graphs miss.

Markets and on-chain live next to news and social on purpose. Agents don't think in silos — they want the price, the position, the headline, and the X chatter in one round trip.

Three ways to reach it

Same data layer, three onboarding paths:

  1. Subscription — predictable monthly credits, four tiers from Free (500/mo) to Growth (500k/mo). Best when usage is steady.
  2. X402 — pay-per-call in USDC/USDT across Base, Arbitrum, Solana, Polygon, BNB Chain, Optimism. No signup, no key. Best when usage is bursty or distributed.
  3. MPP (Tempo) — Stripe's machine-payment protocol. Crypto rails for sub-cent micropayments, fiat rails for receipts and reconciliation. Best for agent-to-agent commerce.

And three surfaces:

  1. Direct APIPOST /v1/intent/resolve. Full endpoint surface at /developers.
  2. MCP-native — every endpoint exposed as a tool your agent discovers at runtime in Claude, Cursor, Windsurf. Six lines of config. /mcp.
  3. AGENT_SKILL.md — published skill manifest at tearline.io/AGENT_SKILL.md. Drop the URL in your system prompt; the model fetches it and calls the API directly. For autonomous agents that don't have MCP yet.

Where this fits in the stack

Data is the flagship. The rest of the Dataline stack composes around it. FlowAgent orchestrates DAG-based agent workflows on top. GhostDriver covers browser-native execution where the action lives in a web UI, not an API. ChatPilot is the conversational entry point that already crossed 2.5M interactions on this same layer. They all read with confidence and act non-custodially.

If you're building an agent that has to be right when it acts, this is the layer to build it on. Try a query in the Playground — no signup. Or wire up the MCP server in 30 seconds.

If you're building an agent that has to be right when it acts, this is the layer you'd build it on. Try a query in the playground, or wire up the MCP server in 30 seconds.

← Back to all postsNumbers Protocol… →

Plug intent.
Get data.

Try the platform behind the post.