81trust / 100

Tools Dex Price

by x402 tools in Onchain & crypto

x402 APIPassing, checked 27 min ago

Use to price tokens by contract address, including long-tail tokens with no CoinGecko listing. Live DEX price, 24h change, volume, liquidity and market cap for up to 30 tokens per call on ethereum, base, arbitrum, optimism, polygon, bsc, avalanche, solana. One flat price per call; not charged if no address has a price.

GET https://x402-tools-production-2755.up.railway.app/tools/dex-price

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
203 ms typical, 203 ms slowest 5%
Last check
27 min ago
Next check
in 3 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://x402-tools-production-2755.up.railway.app/tools/dex-price?addresses=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913%2C0x532f27101965dd16442e59d40670faf5ebb142e4&network=base"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fx402-tools-production-2755.up.railway.app%2Ftools%2Fdex-price
const res = await pay("https://x402-tools-production-2755.up.railway.app/tools/dex-price?addresses=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913%2C0x532f27101965dd16442e59d40670faf5ebb142e4&network=base");
console.log(await res.json());

Example input

{
  "addresses": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913,0x532f27101965dd16442e59d40670faf5ebb142e4",
  "network": "base"
}

Example output

{
  "network": "base",
  "notFound": [
    "0x000000000000000000000000000000000000dead"
  ],
  "tokens": [
    {
      "address": "0x532f27101965dd16442e59d40670faf5ebb142e4",
      "change24hPct": 2.85,
      "coingeckoId": "based-brett",
      "decimals": 18,
      "fdvUsd": 57468786.31,
      "liquidityUsd": 1273603.23,
      "marketCapUsd": 57468763.64,
      "name": "Brett",
      "priceUsd": 0.0058,
      "symbol": "BRETT",
      "volume24hUsd": 469488.91
    }
  ]
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
27 min agoPassed402367 ms$0.002
4 h agoPassed402203 ms$0.002
9 h agoPassed402177 ms$0.002