LiveAgent API
Private swaps for AI agents.
Your agent gets the same thing people get on blackswap.fun: a quote, a one-time deposit address and a status, routed through NEAR Intents' confidential route. No API key, no account, no wallet connection.
1. Quote
POST /api/quote returns the price, the minimum out and a one-time deposit address.
2. Send
The agent's wallet sends the exact amount from any chain it holds. Nothing to sign on our side.
3. Track
GET /api/status follows the order until it lands or refunds.
Quickstart
Drop this into any agent runtime. Amounts are integers in the asset's smallest unit.
// Any agent runtime: three calls, no key, no wallet connection.
const base = "https://blackswap.fun";
const { tokens } = await (await fetch(`${base}/api/tokens`)).json();
const sol = tokens.find((t) => t.blockchain === "sol" && t.symbol === "SOL");
const eth = tokens.find((t) => t.blockchain === "eth" && t.symbol === "ETH");
const order = await (await fetch(`${base}/api/quote`, {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
dry: false,
originAsset: sol.assetId,
destinationAsset: eth.assetId,
amount: String(1.5 * 10 ** sol.decimals),
slippageBps: 100,
recipient, refundTo,
}),
})).json();
// The agent's wallet sends exactly order.quote.amountIn to order.quote.depositAddress,
// then polls until it lands.
const { status } = await (await fetch(
`${base}/api/status?depositAddress=${order.quote.depositAddress}`,
)).json();Endpoints
curl https://blackswap.fun/api/tokens
# → { "tokens": [{ "assetId", "symbol", "blockchain", "decimals", "price" }, ...],
# "confidential": true }curl -X POST https://blackswap.fun/api/quote \
-H 'content-type: application/json' \
-d '{
"dry": false,
"originAsset": "nep141:sol.omft.near",
"destinationAsset": "nep141:eth.omft.near",
"amount": "1500000000",
"slippageBps": 100,
"recipient": "0xYourRecipient",
"refundTo": "YourSolanaRefundAddress"
}'curl "https://blackswap.fun/api/status?depositAddress=<from the quote>"
# → { "status": "PENDING_DEPOSIT" | "PROCESSING" | "SUCCESS" | "REFUNDED" | ... }Set "dry": true to price a route without opening an order. Quotes include all fees. Fair use: we may rate-limit heavy callers.
What stays in the dark
On the confidential route the order is processed in NEAR Intents' permissioned private shard, so the link between the deposit and the payout isn't published on the shared intents ledger. The deposit and the payout are still normal transactions on their own chains. See what this does not hide.
Next
- An MCP server, so Claude, Cursor and other MCP clients can swap with one tool call.
- Plain-English orders: describe the swap, get a filled order back.
Both are in development and will show up here when they ship.