Buy a safety-checked Base DEX swap quote for USDC, WETH, EURC, cbETH, cbBTC, VIRTUAL, or A
Buy a safety-checked Base DEX swap quote for USDC, WETH, EURC, cbETH, cbBTC, VIRTUAL, or AERO. Returns unsigned calldata or a buyer-signable gasless payload; SafeRoute never holds funds, signs, or broadcasts.
10000 (raw units)
price
3
calls / 30d
2
unique payers
2026-09-14
updated
Provider
api.usesaferoute.com · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x08a6a2ddecdebdbfcb29d725042a6f3d74849e08",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "10000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"amount": "25",
"executionMode": "standard",
"from": "USDC",
"intentId": "intent_unique_1234567890",
"referralCode": "PARTNER_CODE",
"sourceAgentId": "buyer-agent-id",
"to": "WETH",
"wallet": "0x1111111111111111111111111111111111111111"
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"approvalRequired": false,
"buyAmount": "10000000000000000",
"buyToken": "0x4200000000000000000000000000000000000006",
"chainId": 8453,
"createdAt": "2026-01-01T00:00:00.000Z",
"executionMode": "standard",
"expiresAt": "2026-01-01T00:01:00.000Z",
"feeBps": 10,
"inputFormat": "simple",
"payloadHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"quoteId": "00000000-0000-4000-8000-000000000000",
"receipt": {
"buyAmount": "10000000000000000",
"buyToken": "0x4200000000000000000000000000000000000006",
"chainId": 8453,
"createdAt": "2026-01-01T00:00:00.000Z",
"executionMode": "standard",
"expiresAt": "2026-01-01T00:01:00.000Z",
"feeBps": 10,
"feeRecipient": "0x3333333333333333333333333333333333333333",
"payloadHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"quoteId": "00000000-0000-4000-8000-000000000000",
"sellAmount": "25000000",
"sellToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"taker": "0x1111111111111111111111111111111111111111",
"usdcNotional": "25000000"
},
"receiptSignature": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sellAmount": "25000000",
"sellToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"simulation": {
"status": "passed"
},
"taker": "0x1111111111111111111111111111111111111111",
"transaction": {
"data": "0x",
"to": "0x2222222222222222222222222222222222222222",
"value": "0"
},
"usdNotional": "25000000"
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"additionalProperties": false,
"properties": {
"amount": {
"description": "Human-readable sell amount, capped at $500 USDC equivalent",
"pattern": "^\\d+(?:\\.\\d+)?$",
"type": "string"
},
"executionMode": {
"default": "standard",
"enum": [
"standard",
"gasless"
],
"type": "string"
},
"from": {
"description": "Approved Base sell-token symbol",
"enum": [
"USDC",
"WETH",
"EURC",
"CBETH",
"CBBTC",
"VIRTUAL",
"AERO"
],
"type": "string"
},
"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"
},
"to": {
"description": "Approved Base buy-token symbol",
"enum": [
"USDC",
"WETH",
"EURC",
"CBETH",
"CBBTC",
"VIRTUAL",
"AERO"
],
"type": "string"
},
"wallet": {
"description": "Buyer-controlled taker wallet",
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
}
},
"required": [
"from",
"to",
"amount",
"wallet"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"additionalProperties": false,
"anyOf": [
{
"required": [
"transaction"
]
},
{
"required": [
"gasless"
]
}
],
"properties": {
"approvalRequired": {
"type": "boolean"
},
"approvalSpender": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"buyAmount": {
"pattern": "^\\d+$",
"type": "string"
},
"buyToken": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"chainId": {
"const": 8453,
"type": "integer"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"executionMode": {
"enum": [
"standard",
"gasless"
],
"type": "string"
},
"expiresAt": {
"format": "date-time",
"type": "string"
},
"feeAmount": {
"pattern": "^\\d+$",
"type": "string"
},
"feeBps": {
"const": 10,
"type": "integer"
},
"feeToken": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"gasless": {
"properties": {
"buyerMustSignAndSubmit": {
"const": true,
"type": "boolean"
},
"relayRequiresBuyerZeroXApiKey": {
"const": true,
"type": "boolean"
},
"relaySubmitEndpoint": {
"format": "uri",
"type": "string"
},
"target": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"trade": {
"type": "object"
}
},
"required": [
"trade",
"target",
"relaySubmitEndpoint",
"relayRequiresBuyerZeroXApiKey",
"buyerMustSignAndSubmit"
],
"type": "object"
},
"inputFormat": {
"enum": [
"simple",
"advanced"
],
"type": "string"
},
"minBuyAmount": {
"pattern": "^\\d+$",
"type": "string"
},
"payloadHash": {
"pattern": "^0x[a-fA-F0-9]{64}$",
"type": "string"
},
"quoteId": {
"format": "uuid",
"type": "string"
},
"receipt": {
"additionalProperties": false,
"properties": {
"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"
},
"buyAmount": {
"pattern": "^\\d+$",
"type": "string"
},
"buyToken": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"chainId": {
"const": 8453,
"type": "integer"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"executionMode": {
"enum": [
"standard",
"gasless"
],
"type": "string"
},
"expiresAt": {
"format": "date-time",
"type": "string"
},
"feeAmount": {
"pattern": "^\\d+$",
"type": "string"
},
"feeBps": {
"const": 10,
"type": "integer"
},
"feeRecipient": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"feeToken": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"gaslessTarget": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"payloadHash": {
"pattern": "^0x[a-fA-F0-9]{64}$",
"type": "string"
},
"quoteId": {
"format": "uuid",
"type": "string"
},
"sellAmount": {
"pattern": "^\\d+$",
"type": "string"
},
"sellToken": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"taker": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"transactionTo": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"transactionValue": {
"pattern": "^\\d+$",
"type": "string"
},
"usdcNotional": {
"pattern": "^\\d+$",
"type": "string"
}
},
"required": [
"quoteId",
"chainId",
"createdAt",
"expiresAt",
"sellToken",
"buyToken",
"sellAmount",
"buyAmount",
"taker",
"executionMode",
"usdcNotional",
"feeBps",
"feeRecipient",
"payloadHash"
],
"type": "object"
},
"receiptSignature": {
"pattern": "^[a-fA-F0-9]{64}$",
"type": "string"
},
"sellAmount": {
"pattern": "^\\d+$",
"type": "string"
},
"sellToken": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"simulation": {
"additionalProperties": false,
"properties": {
"reason": {
"type": "string"
},
"status": {
"enum": [
"passed",
"skipped",
"failed"
],
"type": "string"
}
},
"required": [
"status"
],
"type": "object"
},
"taker": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"transaction": {
"additionalProperties": false,
"properties": {
"data": {
"pattern": "^0x[a-fA-F0-9]*$",
"type": "string"
},
"gas": {
"pattern": "^\\d+$",
"type": "string"
},
"gasPrice": {
"pattern": "^\\d+$",
"type": "string"
},
"to": {
"pattern": "^0x[a-fA-F0-9]{40}$",
"type": "string"
},
"value": {
"pattern": "^\\d+$",
"type": "string"
}
},
"required": [
"to",
"data",
"value"
],
"type": "object"
},
"transactionDataHash": {
"pattern": "^0x[a-fA-F0-9]{64}$",
"type": "string"
},
"usdNotional": {
"pattern": "^\\d+$",
"type": "string"
}
},
"required": [
"quoteId",
"chainId",
"createdAt",
"expiresAt",
"sellToken",
"buyToken",
"sellAmount",
"buyAmount",
"feeBps",
"executionMode",
"usdNotional",
"approvalRequired",
"taker",
"payloadHash",
"simulation",
"receipt",
"receiptSignature",
"inputFormat"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
},
"payment-identifier": {
"info": {
"required": false
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
"maxLength": 128,
"minLength": 16,
"pattern": "^[a-zA-Z0-9_-]+$",
"type": "string"
},
"required": {
"type": "boolean"
}
},
"required": [
"required"
],
"type": "object"
}
}
}Use it
curl
curl "https://api.usesaferoute.com/v1/quote" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://api.usesaferoute.com/v1/quote");
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.get("https://api.usesaferoute.com/v1/quote")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/7490.json, and this resource appears in /discovery/resources and /discovery/search.