Check whether an approved Base token swap is eligible before supplying a wallet
Check whether an approved Base token swap is eligible before supplying a wallet. Returns verified token contracts, indicative output, liquidity sources, fee estimate, warnings, and the exact next action. No custody, signing, or execution.
by api.usesaferoute.com · discovered, not yet claimed by its owner · updated 2026-10-12
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
Check whether an approved Base token swap is eligible before supplying a wallet. Returns verified token contracts, indicative output, liquidity sources, fee estimate, warnings, and the exact next action. No custody, signing, or execution.
Tags: crypto · swap-safety · base · token-verification · route-preflight · bazaar · payment-identifier
Call contract
- Method
- POST
- Input
- json
- Output
- json
- Last paid call
- 2026-10-12
{
"amount": "25",
"from": "USDC",
"intentId": "intent_unique_1234567890",
"sourceAgentId": "buyer-agent-id",
"to": "WETH"
}{
"allowance": {
"status": "wallet_required_for_check"
},
"amount": {
"human": "25",
"raw": "25000000",
"usdcEquivalentRaw": "25000000"
},
"chainId": 8453,
"checkId": "00000000-0000-4000-8000-000000000000",
"createdAt": "2026-01-01T00:00:00.000Z",
"estimatedOutput": {
"raw": "10000000000000000"
},
"expectedSafeRouteFee": {
"amountRaw": "12500",
"bps": 10,
"indicative": true,
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
},
"expiresAt": "2026-01-01T00:01:00.000Z",
"liquidity": {
"available": true,
"sources": [
"Uniswap_V3"
]
},
"nextAction": {
"endpoint": "https://api.usesaferoute.com/v1/quote",
"method": "POST",
"price": "$0.01",
"requiredAdditionalField": "wallet"
},
"pair": {
"buyToken": "0x4200000000000000000000000000000000000006",
"from": "USDC",
"sellToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"to": "WETH"
},
"priceImpact": {
"status": "checked_on_full_quote",
"warning": "Price impact is calculated on the full wallet-bound quote."
},
"status": "eligible",
"tokenVerification": {
"buyTokenApproved": true,
"buyTokenDecimals": 18,
"sellTokenApproved": true,
"sellTokenDecimals": 6
},
"warnings": [
"Indicative preflight only; output and route are refreshed before a full quote."
]
}Use with an agent
- Discover. Agents find this listing with
GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP toolsearch_resources, or/discovery/resources. - Inspect. Fetch
/resources/28671.jsonfor the price and payment options. - Pay. Call
GET https://api.usesaferoute.com/v1/swap-safety-check. The provider answers402with its payment requirements. An x402 client signs one of the options below and retries withPAYMENT-SIGNATURE. - Execute. The provider returns
200with 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.001 / request
- Protocol
- x402 v2
- Auth
- No account or API key. Pay per request.
- Networks
- Base
- Demand
- 4 calls · 4 unique payers in 30d (public x402 Bazaar data)
x402 payment requirements
| Scheme | Network | Asset | Amount | Pay to | Timeout |
|---|---|---|---|---|---|
| exact | Base eip155:8453 | USDC | $0.001 | 0x08a6a2ddecdebdbfcb29d725042a6f3d74849e08 | 300s |
accepts[] (raw JSON)
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x08a6a2ddecdebdbfcb29d725042a6f3d74849e08",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "1000",
"amountUsd": 0.001,
"maxTimeoutSeconds": 300
}
]Schemas
Output schema (JSON Schema)
{
"properties": {
"example": {
"properties": {
"allowance": {
"properties": {
"status": {
"const": "wallet_required_for_check",
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
},
"amount": {
"properties": {
"human": {
"type": "string"
},
"raw": {
"pattern": "^\\d+$",
"type": "string"
},
"usdcEquivalentRaw": {
"pattern": "^\\d+$",
"type": "string"
}
},
"required": [
"human",
"raw",
"usdcEquivalentRaw"
],
"type": "object"
},
"attribution": {
"additionalProperties": false,
"properties": {
"intentId": {
"maxLength": 128,
"minLength": 16,
"pattern": "^[a-zA-Z0-9_-]+$",
"type": "string"
},
"referralCode": {
"maxLength": 64,
"minLength": 3,
"pattern": "^[a-zA-Z0-9_-]+$",
"type": "string"
},
"sourceAgentId": {
"maxLength": 128,
"minLength": 1,
"type": "string"
}
},
"type": "object"
},
"chainId": {
"const": 8453,
"type": "integer"
},
"checkId": {
"format": "uuid",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"estimatedOutput": {
"properties": {
"minimumRaw": {
"pattern": "^\\d+$",
"type": "string"
},
"raw": {
"pattern": "^\\d+$",
"type": "string"
}
},
"required": [
"raw"
],
"type": "object"
},
"expectedSafeRouteFee": {
"properties": {
"amountRaw": {
"pattern": "^\\d+$",
"type": "string"
},
"bps": {
"const": 10,
"type": "integer"
},
"indicative": {
"const": true,
"type": "boolean"
},
"token": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
}
},
"required": [
"bps",
"amountRaw",
"token",
"indicative"
],
"type": "object"
},
"expiresAt": {
"format": "date-time",
"type": "string"
},
"liquidity": {
"properties": {
"available": {
"const": true,
"type": "boolean"
},
"sources": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"available",
"sources"
],
"type": "object"
},
"nextAction": {
"properties": {
"endpoint": {
"format": "uri",
"type": "string"
},
"method": {
"const": "POST",
"type": "string"
},
"price": {
"const": "$0.01",
"type": "string"
},
"requiredAdditionalField": {
"const": "wallet",
"type": "string"
}
},
"required": [
"method",
"endpoint",
"price",
"requiredAdditionalField"
],
"type": "object"
},
"pair": {
"properties": {
"buyToken": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"from": {
"enum": [
"USDC",
"WETH",
"EURC",
"CBETH",
"CBBTC",
"VIRTUAL",
"AERO"
],
"type": "string"
},
"sellToken": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"to": {
"enum": [
"USDC",
"WETH",
"EURC",
"CBETH",
"CBBTC",
"VIRTUAL",
"AERO"
],
"type": "string"
}
},
"required": [
"from",
"to",
"sellToken",
"buyToken"
],
"type": "object"
},
"priceImpact": {
"properties": {
"status": {
"const": "checked_on_full_quote",
"type": "string"
},
"warning": {
"type": "string"
}
},
"required": [
"status",
"warning"
],
"type": "object"
},
"status": {
"const": "eligible",
"type": "string"
},
"tokenVerification": {
"properties": {
"buyTokenApproved": {
"const": true,
"type": "boolean"
},
"buyTokenDecimals": {
"minimum": 0,
"type": "integer"
},
"sellTokenApproved": {
"const": true,
"type": "boolean"
},
"sellTokenDecimals": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"sellTokenApproved",
"buyTokenApproved",
"sellTokenDecimals",
"buyTokenDecimals"
],
"type": "object"
},
"warnings": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"checkId",
"status",
"chainId",
"createdAt",
"expiresAt",
"pair",
"amount",
"estimatedOutput",
"tokenVerification",
"liquidity",
"priceImpact",
"allowance",
"expectedSafeRouteFee",
"warnings",
"nextAction"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}Example shape — generated from the schema, not a captured live response
{
"example": {
"allowance": {
"status": "string"
},
"amount": {
"human": "string",
"raw": "string",
"usdcEquivalentRaw": "string"
},
"attribution": {
"intentId": "string",
"referralCode": "string",
"sourceAgentId": "string"
},
"chainId": 0,
"checkId": "string",
"createdAt": "2026-01-01T00:00:00Z",
"estimatedOutput": {
"minimumRaw": "string",
"raw": "string"
},
"expectedSafeRouteFee": {
"amountRaw": "string",
"bps": 0,
"indicative": true,
"token": "string"
},
"expiresAt": "2026-01-01T00:00:00Z",
"liquidity": {
"available": true,
"sources": [
"string"
]
},
"nextAction": {
"endpoint": "https://example.com",
"method": "string",
"price": "string",
"requiredAdditionalField": "string"
},
"pair": {
"buyToken": "string",
"from": "USDC",
"sellToken": "string",
"to": "USDC"
},
"priceImpact": {
"status": "string",
"warning": "string"
},
"status": "string",
"tokenVerification": {
"buyTokenApproved": true,
"buyTokenDecimals": 0,
"sellTokenApproved": true,
"sellTokenDecimals": 0
},
"warnings": [
"string"
]
},
"type": "string"
}Examples
curl "https://api.usesaferoute.com/v1/swap-safety-check"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paidconst res = await fetch("https://api.usesaferoute.com/v1/swap-safety-check");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}import httpx
res = httpx.get("https://api.usesaferoute.com/v1/swap-safety-check")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerDetails
- Provider
- api.usesaferoute.com
- Endpoint
- https://api.usesaferoute.com/v1/swap-safety-check
- Machine-readable
/resources/28671.json