15trust / 100

Pool Swaps

by Vextorium in Onchain & crypto

x402 APIFailing, checked 4 h ago

Recent swaps of a DEX pool (Uniswap v2/v3, Aerodrome, SushiSwap, PancakeSwap... on Base, Ethereum, Arbitrum, Optimism or Polygon) read on-chain: buys and sells with USD size, price, wallet and tx, net buy/sell flow, unique buyers and the largest trades. Pass the pool or the token address (its main pool is used).

POST
https://api.vextorium.com/v1/pool-swaps
Price
$0.005
per call in USDC
Uptime
0.0%
last 30 days
Response time
-
no timed checks yet
Last check
Failed
4 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Latest check failed 4 h ago: Amount "0.005" is not in atomic token units

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://api.vextorium.com/v1/pool-swaps

Each call costs $0.005 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://api.vextorium.com/v1/pool-swaps
content-type: application/json

{
  "limit": 2,
  "minutes": 30,
  "network": "base",
  "pool": "0x4e829F8A5213c42535AB84AA40BD4aDCCE9cBa02"
}

Parameters

ParameterTypeRequiredDescription
limitintegerNo
min_usdnumberNo
minutesintegerNo1-720
networkstringNo One of: base, ethereum, arbitrum, optimism, polygon.
poolstringYesPool or token address

Example response

The provider's example. We can't check it without paying.

Example response, 55 lines
{
  "against": "WETH",
  "buys_usd": 293,
  "covered_minutes": 30,
  "dex": "aerodrome",
  "largest": [
    {
      "block": 52099782,
      "price_usd": 0.0058285059,
      "side": "sell",
      "token_amount": 49909,
      "tx": "0xa6d22cbbd29ba8d4e4c295eda92ebd98500e05e2ca869857eea2d7f388c48094",
      "usd": 290.89,
      "wallet": "0x8ea5ad2a58c1dae75394b1e8636e6518eb6dac50"
    },
    {
      "block": 52099270,
      "price_usd": 0.0058356867,
      "side": "sell",
      "token_amount": 37816.040455,
      "tx": "0xe4d203728ac07b7b8b9d4fafc1834cf252cd938405e1b35f6f75bf44ae750935",
      "usd": 220.68,
      "wallet": "0x01989c93890aed05a63d179b03424997075b6acf"
    }
  ],
  "net_flow_usd": -1049,
  "network": "base",
  "note": "The wallet is the swap recipient (sometimes a router or aggregator).",
  "pool": "0x4e829F8A5213c42535AB84AA40BD4aDCCE9cBa02",
  "recent": [
    {
      "block": 52099869,
      "price_usd": 0.0058228297,
      "side": "sell",
      "token_amount": 25795,
      "tx": "0x0192171beedfee6a262fd6363fb7ea249578cd4d2bbf7f554c9ac6e4a3d76be1",
      "usd": 150.2,
      "wallet": "0x67d03631fe51b741c0c00c4e16eb662ac84381df"
    },
    {
      "block": 52099868,
      "price_usd": 0.0058251115,
      "side": "sell",
      "token_amount": 25795,
      "tx": "0x949adf1e4617d5f2202fb9e6b6ffb15574a94986cd955e29c01be719ee6c9098",
      "usd": 150.26,
      "wallet": "0x67d03631fe51b741c0c00c4e16eb662ac84381df"
    }
  ],
  "sells_usd": 1342,
  "source": "Pool Swap events on public nodes; prices from DEX Screener",
  "token": "BRETT (0x532f27101965dd16442E59d40670FaF5eBB142E4)",
  "trades": 19,
  "unique_buyers": 3
}

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.005.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://api.vextorium.com/v1/pool-swaps' \
  -H 'content-type: application/json' \
  --data-raw '{"limit":2,"minutes":30,"network":"base","pool":"0x4e829F8A5213c42535AB84AA40BD4aDCCE9cBa02"}'

# 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://api.vextorium.com/v1/pool-swaps' \
  -H 'content-type: application/json' \
  --data-raw '{"limit":2,"minutes":30,"network":"base","pool":"0x4e829F8A5213c42535AB84AA40BD4aDCCE9cBa02"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: 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.005 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.005" });
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.005 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.vextorium.com%2Fv1%2Fpool-swaps&method=POST
const res = await pay("https://api.vextorium.com/v1/pool-swaps", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "limit": 2,
    "minutes": 30,
    "network": "base",
    "pool": "0x4e829F8A5213c42535AB84AA40BD4aDCCE9cBa02"
  }),
});
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.005 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.005"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://api.vextorium.com/v1/pool-swaps",
        json={
            "limit": 2,
            "minutes": 30,
            "network": "base",
            "pool": "0x4e829F8A5213c42535AB84AA40BD4aDCCE9cBa02",
        },
    )
    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

WhenResultHTTPTimePrice
4 h agoAmount "0.005" is not in atomic token units402237 ms$0.005
9 h agoAmount "0.005" is not in atomic token units402218 ms$0.005
14 h agoAmount "0.005" is not in atomic token units402215 ms$0.005
19 h agoAmount "0.005" is not in atomic token units402125 ms$0.005
24 h agoAmount "0.005" is not in atomic token units402144 ms$0.005
Show 10 older checks
28 h agoAmount "0.005" is not in atomic token units402147 ms$0.005
33 h agoAmount "0.005" is not in atomic token units40290 ms$0.005
38 h agoAmount "0.005" is not in atomic token units402157 ms$0.005
42 h agoAmount "0.005" is not in atomic token units402213 ms$0.005
47 h agoAmount "0.005" is not in atomic token units402101 ms$0.005
2 days agoAmount "0.005" is not in atomic token units402295 ms$0.005
2 days agoAmount "0.005" is not in atomic token units402166 ms$0.005
3 days agoAmount "0.005" is not in atomic token units40278 ms$0.005
3 days agoAmount "0.005" is not in atomic token units40291 ms$0.005
3 days agoAmount "0.005" is not in atomic token units402219 ms$0.005