Call it
curl https://api.peume.com/v1/call/blockchain-structured-query \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"source": "your source"
}
}'const res = await fetch("https://api.peume.com/v1/call/blockchain-structured-query", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"source": "your source"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/blockchain-structured-query",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"source": "your source"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: blockchain-structured-query.
Parameters
sourceRequiredstringFully-qualified table name. Discover tables with /onchain/schema. Example: agent.ethereum_dex_trades.
fieldsarrayColumns to return. Omit to return all columns. Example: ["block_time", "amount_usd"].
filtersarrayWHERE conditions, ANDed together. ALWAYS include a block_date bound on large tables — without it the query times out. Example: [{"field": "block_date", "op": "gte", "value": "2026-07-01"}].
sortarrayORDER BY clauses. Example: [{"field": "amount_usd", "order": "desc"}].
limitintegerMax rows to return. Example: 20. Defaults to 20 (server-side), capped at 10000.
offsetintegerRows to skip for pagination. Example: 0. Defaults to 0.
