The base-swap 0x trade as a Cobalt validity transaction
402.com.tr/api/x402/base-swap-validity
The base-swap 0x trade as a Cobalt validity transaction: Base includes your signed tx only while your conditions hold — a conditional order with no limit-order contract and nobody holding the trade. We never hold funds or keys; you sign and submit. Every request carries the deadline Base requires (at most 60 s out; set for you if omitted). Optional conditions: fromBlock, minNativeBalanceWei, or a
GET
https://402.com.tr/api/x402/base-swap-validityUptime100% of 5 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://402.com.tr/api/x402/base-swap-validity?amount=10&buy=ETH&sell=USDC&slippage=100&taker=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045");
console.log(await res.json());Example input
{
"amount": "10",
"buy": "ETH",
"sell": "USDC",
"slippage": "100",
"taker": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
}