Skip to content
Fourohtwo

An indicative quote for swapping any asset NEAR Intents routes

402.com.tr/api/x402/near-swap-quote

An indicative quote for swapping any asset NEAR Intents routes — NEAR, USDC, USDT, BTC, SOL and more, across chains. Name assets as a symbol (USDC = on NEAR, USDC@base for another chain), a NEAR token account, or a 1Click asset id. Returns amount out, minimum out, USD in and out, the rate, the cost in percent lost to fees and price impact, and the expected time. Nothing is reserved or paid.

BaseAnswering
GEThttps://402.com.tr/api/x402/near-swap-quote

Uptime100% of 3 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/near-swap-quote?amount=100&from=USDC&to=NEAR");
console.log(await res.json());

Example input

{
  "amount": "100",
  "from": "USDC",
  "to": "NEAR"
}