Skip to content
Fourohtwo

chainhilt.ai/api/v1/swap/execute

Select the best available swap quote and return ordered unsigned transaction actions. Run the returned actions in order: up to two approvals, then the swap. Errors: 400 invalid input, 502 when no connector quotes or the swap cannot be built.

BaseAnswering
POSThttps://chainhilt.ai/api/v1/swap/execute

Uptime100% of 2 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://chainhilt.ai/api/v1/swap/execute", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"buyToken":"0x4200000000000000000000000000000000000006","chainId":8453,"sellAmount":"1000000","sellToken":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","slippageBps":100,"takerAddress":"0xE4934BB19E0B97109033dBfDcCc6957E32F9Cc60"}),
});
console.log(await res.json());

Example input

{
  "buyToken": "0x4200000000000000000000000000000000000006",
  "chainId": 8453,
  "sellAmount": "1000000",
  "sellToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "slippageBps": 100,
  "takerAddress": "0xE4934BB19E0B97109033dBfDcCc6957E32F9Cc60"
}

More from chainhilt-x402Provider status