# HALOWERK defiwerk DEX Quote

> HALOWERK defiwerk DEX Quote is a paid API for AI agents from defi.halowerk.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Queries every connected DEX on a given chain for the best output amount for a token swap, including single-hop and two-hop routes, without executing any transaction.

## Facts

- Endpoint: POST https://defi.halowerk.com/dex/quote?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/halowerk-defiwerk-dex-quote-2e031f37
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5-_J8RIOuMYKsbmDXKOmT

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability halowerk-defiwerk-dex-quote-2e031f37 -d '<json body>'
```

Example prompt: Can you get me a DEX quote on Base for swapping 500 USDC (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) to WETH (0x4200000000000000000000000000000000000006), with 30 bps slippage and multi-hop routes enabled?

## When to prefer this

Use this endpoint when you need a read-only, multi-DEX aggregated price quote on Base, Ethereum, Arbitrum, Optimism, or Polygon without executing a swap. Prefer it over single-DEX quoters when you want the best price across all fee tiers and pool types simultaneously, or when you need two-hop route pricing. It is ideal for pre-trade analysis, arbitrage detection, and portfolio dashboards where execution is handled separately.

## Known failure modes

- Unsupported chain returns validation error
- Invalid token address format (non-EX pattern) returns 400
- No liquidity found for the pair returns empty or zero quote
- RPC node timeout causes delayed or failed response
- Extremely large input amounts may return inaccurate quotes due to pool depth limits

## How this service works

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 exactly as a real swap would traverse them. Nothing is executed, submitted or handed to a router — every

## Output

Returns the best output token amount across all queried DEXes (Uniswap V3 at each fee tier, constant-product pools, Solidly-style pools), the route taken (single-hop or two-hop), the DEX and fee tier selected, and a derived amount_out_min based on the caller's slippage tolerance. No transaction is submitted or signed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "enum": [
    "base",
    "ethereum",
    "arbitrum",
    "optimism",
    "polygon"
   ],
   "type": "string"
  },
  "token_in": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "amount_in": {
   "type": "string",
   "pattern": "^[0-9]+(\\.[0-9]+)?$",
   "description": "Input amount in whole token units, as a decimal string, e.g. \"1.5\"."
  },
  "token_out": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  },
  "slippage_bps": {
   "type": "integer",
   "default": 50,
   "maximum": 5000,
   "minimum": 0,
   "description": "Caller slippage tolerance in basis points; only used to derive amount_out_min."
  },
  "include_multihop": {
   "type": "boolean",
   "default": true,
   "description": "Also price routes through one intermediate token."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/halowerk-defiwerk-dex-quote-2e031f37/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi.halowerk.com](https://www.zero.xyz/host/defi.halowerk.com/llms.txt)
