PeumeAPI

Finance & crypto

Asynchronous Blockchain SQL Job

Run a read-only ClickHouse SQL query as a durable background job — for queries too heavy for the 30s synchronous window.

$0.036 per call

Call it

curl https://api.peume.com/v1/call/asynchronous-blockchain-sql-job \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "sql": "your sql"
  }
}'

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: asynchronous-blockchain-sql-job.

Parameters

sqlRequiredstring

Read-only ClickHouse SELECT/WITH query to execute as a durable background job. Same shape and rules as /onchain/sql. Rules (server-enforced or query-killing): SELECT/WITH only (read-only); table references must be database-qualified as agent.<table>; ALWAYS filter on block_date or block_number (partition key — without it the query times out); compare address columns directly against lowercase literals (wrapping the column in lower is rejected); never filter on symbol columns (unindexed full scan, and symbol matches surface scam clones — resolve a ticker to a contract address with /search/tok

max_rowsinteger

Maximum result rows to retain. Example: 5000. Defaults to 1000 (server-side), capped at 10000.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.