86trust / 100

Search Pools

by CoinGecko in Onchain & crypto

x402 APIPassing, checked 3 h ago

Search onchain DEX pools and token, by contract address, name, or token symbol.

GET https://pro-api.coingecko.com/api/v3/x402/onchain/search/pools

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
167 ms typical, 167 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://pro-api.coingecko.com/api/v3/x402/onchain/search/pools?include=base_token&network=eth&page=1&query=weth"
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%2Fpro-api.coingecko.com%2Fapi%2Fv3%2Fx402%2Fonchain%2Fsearch%2Fpools
const res = await pay("https://pro-api.coingecko.com/api/v3/x402/onchain/search/pools?include=base_token&network=eth&page=1&query=weth");
console.log(await res.json());

Example input

{
  "include": "base_token",
  "network": "eth",
  "page": 1,
  "query": "weth"
}

Example output

{
  "data": [
    {
      "attributes": {
        "address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
        "base_token_price_native_currency": "1.0",
        "base_token_price_quote_token": "3662.46",
        "base_token_price_usd": "3653.12491645176",
        "fdv_usd": "11007041041",
        "market_cap_usd": null,
        "name": "WETH / USDC 0.05%",
        "pool_created_at": "2021-12-29T12:35:14Z",
        "price_change_percentage": {
          "h1": "0.51",
          "h24": "7.71",
          "h6": "0.86",
          "m15": "0.21",
          "m30": "0.31",
          "m5": "0"
        },
        "quote_token_price_base_token": "0.00027304",
        "quote_token_price_native_currency": "0.000273040545093221",
        "quote_token_price_usd": "0.998343707926245",
        "reserve_in_usd": "163988541.3812",
        "transactions": {
          "h1": {
            "buyers": 83,
            "buys": 97,
            "sellers": 124,
            "sells": 144
          },
          "h24": {
            "buyers": 1625,
            "buys": 2966,
            "sellers": 2399,
            "sells": 3847
          },
          "m15": {
            "buyers": 19,
            "buys": 19,
            "sellers": 27,
            "sells": 27
          },
          "m30": {
            "buyers": 45,
            "buys": 49,
            "sellers": 57,
            "sells": 61
          },
          "m5": {
            "buyers": 7,
            "buys": 7,
            "sellers": 2,
            "sells": 2
          }
        },
        "volume_usd": {
          "h1": "16798158.0138526",
          "h24": "536545444.904535",
          "h6": "164054610.850188",
          "m15": "2056262.885098",
          "m30": "4081230.098456",
          "m5": "868581.7348314"
        }
      },
      "id": "eth_0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
      "relationships": {
        "base_token": {
          "data": {
            "id": "eth_0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "type": "token"
          }
        },
        "dex": {
          "data": {
            "id": "uniswap_v3",
            "type": "dex"
          }
        },
        "quote_token": {
          "data": {
            "id": "eth_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "type": "token"
          }
        }
      },
      "type": "pool"
    }
  ],
  "included": [
    {
      "attributes": {
        "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "coingecko_coin_id": "weth",
        "decimals": 18,
        "image_url": "https://assets.coingecko.com/coins/images/2518/small/weth.png?1696503332",
        "name": "Wrapped Ether",
        "symbol": "WETH"
      },
      "id": "eth_0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "type": "token"
    }
  ]
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402167 ms$0.01
8 h agoPassed402229 ms$0.01