Defi Swap Quote
by Saylor Innovations Data Desk in Onchain & crypto
Compare Paraswap and KyberSwap quotes for an EVM token swap on 7 chains - output amount, USD value, gas, best aggregator and advantage in basis points
https://saylorinnovations.com/api/defi/swap-quote- Price
- $0.01
- per call in USDC
- Uptime
- 76.9%
- last 30 days
- Response time
- 428 ms
- 805 ms slowest 5%
- Last check
- Passed
- 2 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
GET https://saylorinnovations.com/api/defi/swap-quote
Each call costs $0.01 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
GET https://saylorinnovations.com/api/defi/swap-quote?amount=1&chain=ethereum&from=ETH&to=USDCParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Amount of the from token in whole units, e.g. 1.5 |
chain | string | No | ethereum (default), base, arbitrum, optimism, polygon, bsc, avalanche |
from | string | Yes | Token symbol or address to sell |
to | string | Yes | Token symbol or address to buy |
Example response
The provider's example. We can't check it without paying.
Example response, 40 lines
{
"advantage_over_next_bps": 0.8,
"best": "KyberSwap",
"best_amount_out": 2432.128359,
"chain": "ethereum",
"effective_price": 2432.128359,
"from": {
"address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"amount": 1,
"symbol": "ETH"
},
"note": "Indicative sell quotes before slippage, fees and gas; nothing is signed or executed. Net of gas the better aggregator can differ, so compare usd_out minus gas_usd for small trades.",
"quotes": [
{
"aggregator": "KyberSwap",
"amount_out": 2432.128359,
"dexes": [
"pmm-1/uniswapv3"
],
"gas_usd": 0.12820052466337872,
"price_impact_note": null,
"usd_out": 2436.0765781557607
},
{
"aggregator": "Paraswap",
"amount_out": 2431.940998,
"dexes": [
"uniswapv3"
],
"gas_usd": 0.029569,
"price_impact_note": null,
"usd_out": 2430.8976953119
}
],
"source": "Paraswap and KyberSwap aggregator APIs",
"to": {
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"symbol": "USDC"
}
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.01.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://saylorinnovations.com/api/defi/swap-quote?amount=1&chain=ethereum&from=ETH&to=USDC'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - 'https://saylorinnovations.com/api/defi/swap-quote?amount=1&chain=ethereum&from=ETH&to=USDC' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.01 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.01" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.01 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fsaylorinnovations.com%2Fapi%2Fdefi%2Fswap-quote
const res = await pay("https://saylorinnovations.com/api/defi/swap-quote?amount=1&chain=ethereum&from=ETH&to=USDC");
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.01 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.01"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.get("https://saylorinnovations.com/api/defi/swap-quote?amount=1&chain=ethereum&from=ETH&to=USDC")
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 2 h ago | Passed | 402 | 630 ms | $0.01 |
| 5 h ago | Passed | 402 | 428 ms | $0.01 |
| 8 h ago | Passed | 402 | 381 ms | $0.01 |
| 11 h ago | Passed | 402 | 805 ms | $0.01 |
| 14 h ago | Passed | 402 | 420 ms | $0.01 |
Show 8 older checks
| 17 h ago | Passed | 402 | 440 ms | $0.01 |
| 21 h ago | Expected HTTP 402, got 404 | 404 | 213 ms | - |
| 26 h ago | Expected HTTP 402, got 404 | 404 | 559 ms | - |
| 31 h ago | Expected HTTP 402, got 404 | 404 | 580 ms | - |
| 36 h ago | Passed | 402 | 759 ms | $0.01 |
| 41 h ago | Passed | 402 | 481 ms | $0.01 |
| 47 h ago | Passed | 402 | 361 ms | $0.01 |
| 2 days ago | Passed | 402 | 408 ms | $0.01 |
History
| 19 Oct 2026 | Price on Solana changed from 92134 units of So11111111111111111111111111111111111111112 to 92813 units of So11111111111111111111111111111111111111112 |
| 19 Oct 2026 | Price on Solana changed from 92327 units of So11111111111111111111111111111111111111112 to 92134 units of So11111111111111111111111111111111111111112 |
| 19 Oct 2026 | Price on Solana changed from 91777 units of So11111111111111111111111111111111111111112 to 92327 units of So11111111111111111111111111111111111111112 |
| 19 Oct 2026 | Price on Solana changed from 92248 units of So11111111111111111111111111111111111111112 to 91777 units of So11111111111111111111111111111111111111112 |
| 19 Oct 2026 | Price on Solana changed from 92875 units of So11111111111111111111111111111111111111112 to 92248 units of So11111111111111111111111111111111111111112 |