Skip to content
Fourohtwo

defi.halowerk.com/dex/quote

For a given chain, token pair and input amount, every connected DEX is queried through its own contracts: Uniswap V3 through the Quoter via eth_call across all fee tiers, constant-product pools through the pool maths on live reserves, Solidly-style pools through their own getAmountOut. Two-hop routes through the wrapped native token and the chain USDC are included, priced by chaining the hops exac

BaseUnchecked
POSThttps://defi.halowerk.com/dex/quote

UptimeNot checked yet

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

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://defi.halowerk.com/dex/quote", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"amount_in":"1","chain":"base","token_in":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","token_out":"0x4200000000000000000000000000000000000006"}),
});
console.log(await res.json());

Example input

{
  "amount_in": "1",
  "chain": "base",
  "token_in": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "token_out": "0x4200000000000000000000000000000000000006"
}

More from HALOWERK defiwerk