Class Data Onchain Query
by coord.taifoon.dev in Onchain & crypto
On-chain data query on Base, sold by Taifoon: the tokens and fee tier of a Uniswap V3 pool, or the hash of a block. An admitted data seller answers; Taifoon reads the same facts from the chain and grades the answer before you are charged. A failed answer is not charged. Answer + graded receipt. 0.03 USDC a call.
https://coord.taifoon.dev/v1/x402/class/data.onchain_query- Price
- $0.03
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 2.7 s
- 5.0 s slowest 5%
- Last check
- Passed
- 1 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://coord.taifoon.dev/v1/x402/class/data.onchain_query
Each call costs $0.03 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://coord.taifoon.dev/v1/x402/class/data.onchain_query
content-type: application/json
{
"input": {
"chainId": 8453,
"pool": "0xd0b53D9277642d899DF5C87A3966A349A798F224",
"question": "pool_tokens"
}
}Example response
The provider's example. We can't check it without paying.
Example response, 38 lines
{
"answer": {
"fee": 500,
"token0": "0x… (WETH)",
"token1": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
},
"chain_id": 8453,
"class": "data.onchain_query",
"grade": {
"checks": {
"answer_exact": true,
"data_present": true,
"fee_exact": true,
"no_error": true
},
"ok": true,
"read": {
"source": "eth_call token0()/token1()/fee() over the Base rotation"
}
},
"ok": true,
"question": "pool_tokens",
"receipt": {
"cache": {
"hit": false
},
"digest": "0x…",
"seller": "graphadvocate.com"
},
"sale": {
"id": "rs_…",
"margin_units": "20000",
"payment_tx": "0x…",
"price_units": "30000",
"seller_units": "10000"
},
"subject": "0xd0b53d9277642d899df5c87a3966a349a798f224"
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.03.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://coord.taifoon.dev/v1/x402/class/data.onchain_query' \
-H 'content-type: application/json' \
--data-raw '{"input":{"chainId":8453,"pool":"0xd0b53D9277642d899DF5C87A3966A349A798F224","question":"pool_tokens"}}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://coord.taifoon.dev/v1/x402/class/data.onchain_query' \
-H 'content-type: application/json' \
--data-raw '{"input":{"chainId":8453,"pool":"0xd0b53D9277642d899DF5C87A3966A349A798F224","question":"pool_tokens"}}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.03 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.03" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.03 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fcoord.taifoon.dev%2Fv1%2Fx402%2Fclass%2Fdata.onchain_query&method=POST
const res = await pay("https://coord.taifoon.dev/v1/x402/class/data.onchain_query", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"input": {
"chainId": 8453,
"pool": "0xd0b53D9277642d899DF5C87A3966A349A798F224",
"question": "pool_tokens"
}
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.03 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.03"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://coord.taifoon.dev/v1/x402/class/data.onchain_query",
json={
"input": {
"chainId": 8453,
"pool": "0xd0b53D9277642d899DF5C87A3966A349A798F224",
"question": "pool_tokens",
},
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 1 h ago | Passed | 402 | 2.2 s | $0.03 |
| 7 h ago | Passed | 402 | 1.3 s | $0.03 |
| 12 h ago | Passed | 402 | 350 ms | $0.03 |
| 17 h ago | Passed | 402 | 494 ms | $0.03 |
| 22 h ago | Passed | 402 | 2.3 s | $0.03 |
Show 10 older checks
| 27 h ago | Passed | 402 | 3.4 s | $0.03 |
| 31 h ago | Passed | 402 | 2.9 s | $0.03 |
| 36 h ago | Passed | 402 | 341 ms | $0.03 |
| 41 h ago | Passed | 402 | 4.6 s | $0.03 |
| 45 h ago | Passed | 402 | 2.7 s | $0.03 |
| 2 days ago | Passed | 402 | 3.1 s | $0.03 |
| 2 days ago | Passed | 402 | 1.5 s | $0.03 |
| 2 days ago | Passed | 402 | 3.3 s | $0.03 |
| 3 days ago | Passed | 402 | 4.4 s | $0.03 |
| 3 days ago | Passed | 402 | 5.0 s | $0.03 |