AL
Monitoring · x402 · early usage

CEX-DEX arbitrage spread calculator - compares a global reference price (Coinbase spot,…

CEX-DEX arbitrage spread calculator - compares a global reference price (Coinbase spot, CoinGecko fallback) against a DEX pool price and returns gross/net spread and an is_profitable flag after an assumed gas cost. Paid in USDC on Base.

by alphapipeline-eu.onrender.com · discovered, not yet claimed by its owner · updated 2026-10-01

30d calls1
30d payers1
MethodGET
Outputjson

Mirrored from Coinbase's public x402 Bazaar. The description is the provider's own text and has not been reviewed here; the payment requirements are copied as published.

What it does

CEX-DEX arbitrage spread calculator - compares a global reference price (Coinbase spot, CoinGecko fallback) against a DEX pool price and returns gross/net spread and an is_profitable flag after an assumed gas cost. Paid in USDC on Base.

Tags: crypto · arbitrage · cex · dex · bazaar

Call contract

Method
GET
Input
query parameters
Output
json
Last paid call
2026-10-01
Input example from Bazaar metadata
{
  "network": "base",
  "symbol": "SUI",
  "token_address": "0x0000000000000000000000000000000000000000",
  "trade_size_usd": 1000
}
Output example
{
  "assumed_gas_cost_usd": 0.05,
  "cex_price_usd": 3.521,
  "data_source": "coinbase+geckoterminal",
  "dex_price_usd": 3.503,
  "direction": "DEX_TO_CEX",
  "generated_at": {
    "kst": "2026-09-07 21:00:00 KST",
    "utc": "2026-09-07T12:00:00Z"
  },
  "gross_spread_pct": 0.52,
  "is_profitable": false,
  "min_spread_threshold_pct": 0.8,
  "net_spread_pct": 0.45,
  "network": "base",
  "notice": "CEX-side price is Coinbase spot (CoinGecko fallback), not a specific exchange orderbook - it does not reflect actual tradable depth on any single exchange. DEX-side price is read from GeckoTerminal's pool price fields. net_spread_pct only subtracts an assumed flat gas cost - it does NOT subtract the DEX pool's own swap fee (see pool_fee_pct), CEX trading fees, CEX deposit/withdrawal availability, or slippage beyond trade_size_usd. A spread that looks profitable before the pool fee may not be after it - re-verify with live quotes before executing a real trade.",
  "pool_address": "0x4a3636608d7bc5776cb19eb72caa36ebb9bd9e5b",
  "pool_fee_pct": 0.3,
  "status_message": "Spread is 0.45%, below 0.8% threshold (Unprofitable).",
  "symbol": "SUI",
  "trade_size_usd": 1000
}

Use with an agent

  1. Discover. Agents find this listing with GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP tool search_resources, or /discovery/resources.
  2. Inspect. Fetch /resources/30150.json for the price and payment options.
  3. Pay. Call GET https://alphapipeline-eu.onrender.com/v1/arb/spread-matrix. The provider answers 402 with its payment requirements. An x402 client signs one of the options below and retries with PAYMENT-SIGNATURE.
  4. Execute. The provider returns 200 with the data. Agent Bazaar is not in the request path and never sees your payment.

For humans

You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.

Pricing & payment

Price
$0.02 / request
Protocol
x402 v2
Auth
No account or API key. Pay per request.
Networks
Base
Demand
1 calls · 1 unique payers in 30d (public x402 Bazaar data)

x402 payment requirements

SchemeNetworkAssetAmountPay toTimeout
exactBase
eip155:8453
USDC$0.020x2bcfA4F7E1fA5E96934846A7dEa623398Ed7f752300s
accepts[] (raw JSON)
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "payTo": "0x2bcfA4F7E1fA5E96934846A7dEa623398Ed7f752",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "20000",
    "amountUsd": 0.02,
    "maxTimeoutSeconds": 300
  }
]

Schemas

Output schema (JSON Schema)
{
  "properties": {
    "example": {
      "properties": {
        "assumed_gas_cost_usd": {
          "title": "Assumed Gas Cost Usd",
          "type": "number"
        },
        "cex_price_usd": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cex Price Usd"
        },
        "data_source": {
          "title": "Data Source",
          "type": "string"
        },
        "dex_price_usd": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Dex Price Usd"
        },
        "direction": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Direction"
        },
        "generated_at": {
          "properties": {
            "kst": {
              "title": "Kst",
              "type": "string"
            },
            "utc": {
              "title": "Utc",
              "type": "string"
            }
          },
          "required": [
            "utc",
            "kst"
          ],
          "title": "TimestampPair",
          "type": "object"
        },
        "gross_spread_pct": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Gross Spread Pct"
        },
        "is_profitable": {
          "title": "Is Profitable",
          "type": "boolean"
        },
        "min_spread_threshold_pct": {
          "title": "Min Spread Threshold Pct",
          "type": "number"
        },
        "net_spread_pct": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Net Spread Pct"
        },
        "network": {
          "title": "Network",
          "type": "string"
        },
        "notice": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Notice"
        },
        "pool_address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Pool Address"
        },
        "pool_fee_pct": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "DEX pool's fee tier parsed from GeckoTerminal's pool name (e.g. 0.05 for a 0.05% pool). Informational only - net_spread_pct does NOT subtract it.",
          "title": "Pool Fee Pct"
        },
        "status_message": {
          "title": "Status Message",
          "type": "string"
        },
        "symbol": {
          "title": "Symbol",
          "type": "string"
        },
        "trade_size_usd": {
          "title": "Trade Size Usd",
          "type": "number"
        }
      },
      "required": [
        "generated_at",
        "symbol",
        "network",
        "status_message",
        "is_profitable",
        "trade_size_usd",
        "assumed_gas_cost_usd",
        "min_spread_threshold_pct",
        "data_source"
      ],
      "title": "ArbSpreadResponse",
      "type": "object"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "type"
  ],
  "type": "object"
}
Example shape — generated from the schema, not a captured live response
{
  "example": {
    "assumed_gas_cost_usd": 0,
    "cex_price_usd": null,
    "data_source": "string",
    "dex_price_usd": null,
    "direction": null,
    "generated_at": {
      "kst": "string",
      "utc": "string"
    },
    "gross_spread_pct": null,
    "is_profitable": true,
    "min_spread_threshold_pct": 0,
    "net_spread_pct": null,
    "network": "string",
    "notice": null,
    "pool_address": null,
    "pool_fee_pct": null,
    "status_message": "string",
    "symbol": "string",
    "trade_size_usd": 0
  },
  "type": "string"
}

Examples

curl
curl -X GET 'https://alphapipeline-eu.onrender.com/v1/arb/spread-matrix'
# -> 402 Payment Required; read PAYMENT-REQUIRED
# retry the identical request with PAYMENT-SIGNATURE
JavaScript
const res = await fetch("https://alphapipeline-eu.onrender.com/v1/arb/spread-matrix", {
  "method": "GET"
});
if (res.status === 402) {
  const { accepts } = await res.json();
  // pay one of accepts[] via an x402 client, then retry with the payment header
}
Python
import httpx
res = httpx.request("GET", "https://alphapipeline-eu.onrender.com/v1/arb/spread-matrix")
if res.status_code == 402:
    accepts = res.json()["accepts"]
    # pay one of accepts[] via an x402 client, then retry with the payment header

Details

Provider
alphapipeline-eu.onrender.com
Endpoint
https://alphapipeline-eu.onrender.com/v1/arb/spread-matrix
Machine-readable
/resources/30150.json