Get started

Query the index

Read the settlement record over REST, read-only SQL, or the pre-computed rollups, and know which to reach for.

Everything Roundhouse knows is readable. There is no private tier of the dataset; the paid tiers buy you rate limit and convenience, not access.

Pick a read path by how specific your question is.

Your questionUseCost
"What is happening right now?"GET /v0/flowsFree
"Tell me about this wallet"GET /v0/agents/<w>, GET /v0/merchants/<w>Free
"Who sells X?"GET /v0/endpoints?q=XFree
"Show me the payment graph"GET /v0/graphFree
Anything with a group by in itPOST /v0/sqlFree, rate-limited
Natural language, exploratoryAI playgroundQuery Units

Fixed endpoints#

Free, no key, JSON. The full list with every parameter is the API reference; these are the ones you will reach for first.

http
GET /api/v0/flows?limit=50                    live flow of funds, newest first
GET /api/v0/transactions?limit=50             the global settlement feed
GET /api/v0/agents?q=<search>                 indexed ERC-8004 agents
GET /api/v0/agents/<wallet>                   one agent: identity + settlement stats
GET /api/v0/merchants/<wallet>                one merchant: inbound volume, customers
GET /api/v0/entities/<wallet>/settlements     raw settlements for one wallet
GET /api/v0/endpoints?q=<search>              the priced service directory
GET /api/v0/leaderboard?limit=25              agents ranked by trust
GET /api/v0/facilitators                      who relays payments, and how much
GET /api/v0/graph?days=7                      nodes and payer→payee edges

Two paging conventions, and they are not interchangeable:

  • Feeds use a cursor. next_before is an opaque token encoding the whole sort key including its tiebreaker. Pass it back as ?before=. Do not parse it, and do not construct one — a naive block_time cursor silently drops every row sharing the last row's timestamp, and on a 2-second chain most timestamps are shared.
  • The leaderboard uses an offset. A rank is a position, and score is nullable, so there is nothing stable for a cursor to compare against. ?offset= in, next_offset out.

An empty array is a real answer. A failed read is not: a rejected query returns 503 upstream_unavailable naming the resource, never 200 {"flows": []}. On a settlement index "no rows" reads as "nothing ever happened", which is the one lie the read path is built to prevent.

Read-only SQL#

For everything else. One statement, SELECT or WITH only, over the public data-layer tables.

bash
curl -sL -X POST "https://www.roundhouse.studio/api/v0/sql" \
  -H "authorization: Bearer $ROUNDHOUSE_KEY" \
  -H 'content-type: application/json' \
  -d '{
    "sql": "select date_trunc('day', block_time) as day, count(*) as settlements, sum(amount_usd) as usd from settlements where block_time > now() - interval '14 days' group by 1 order by 1 desc"
  }' | jq

The sandbox is enforced in the database, not in the request handler: a role that can read only the public tables, a read-only transaction, an 8-second statement timeout, and a hard 300-row cap. Write for those limits rather than discovering them — SQL over the index has the readable tables, the useful shapes, and the traps.

Use the rollups, not the raw table#

settlements has tens of millions of rows. An unbounded aggregate over it will hit the timeout. The pre-computed views exist so you do not have to:

ViewGrainGood for
mv_entity_rollupsone row per walletlifetime inbound/outbound volume and counts
mv_entity_dailywallet × dayan activity trend for one counterparty
mv_global_dailydaythe site-wide series behind /stats

They refresh on a schedule, so they trail the tip of the chain by up to an hour. Read surfaces fold in the newer settlements at read time, which is why a profile page and a raw mv_entity_rollups query can differ by a few rows — the page is more current, not wrong.

Rate limits and keys#

CallerSQL queries / minute
Anonymous30
Trial key from /v0/test/x402240, for 30 days
Organisation keyMetered in Query Units instead

Send a key as authorization: Bearer rh_live_… or x-api-key. Organisation keys are created in the dashboard; the trial key costs one cent and needs no account at all.

Next steps#