An executable NEAR Intents swap
402.com.tr/api/x402/near-swap
An executable NEAR Intents swap: a binding quote with a deposit address. Send amountIn of the origin asset there before the deadline; the output goes to recipient, or it is refunded to refundTo. Funds never pass through us. Any asset NEAR Intents routes, across chains. Buying a NEAR token runs near-token-safety first and refuses a STOP token unless force=1. Track with near-swap-status.
GET
https://402.com.tr/api/x402/near-swapUptime100% of 1 check 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?amount=1&depositType=ORIGIN_CHAIN&from=USDC&recipient=intents.near&refundTo=intents.near&slippage=100&to=NEAR");
console.log(await res.json());Example input
{
"amount": "1",
"depositType": "ORIGIN_CHAIN",
"from": "USDC",
"recipient": "intents.near",
"refundTo": "intents.near",
"slippage": "100",
"to": "NEAR"
}