D

DEX Data & Agent Utilities · Treasury

by DEX Data & Agent Utilities

GETBase

$0.03

per call · USD Coin on Base

US Treasury par yield curve, every constant maturity from 1 month to 30 years for a published business day. Returns curve[] with tenor, months and percent, spreads (2s10s, 3m10y, 5s30s) and an explicit inversion flag - the real question is whether the curve is inverted, not what fourteen numbers are. A tenor Treasury did not publish is null, never zero. Pass ?latest=1 OR ?date=YYYY-MM-DD, not both. Errors: 400 conflicting_params|bad_latest|bad_date, 404 no_curve with the available range.

Endpoint

GET https://x402.donnyautomation.com/treasury

3

Calls / 30d

3

Unique payers / 30d

Sep 9

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://x402.donnyautomation.com/treasury", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://x402.donnyautomation.com/treasury?latest=1" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "attribution": "Daily Treasury Par Yield Curve Rates, U.S. Department of the Treasury (public domain).",
  "curve": [
    {
      "months": 3,
      "percent": 3.91,
      "tenor": "3 Mo"
    },
    {
      "months": 24,
      "percent": 4.25,
      "tenor": "2 Yr"
    },
    {
      "months": 120,
      "percent": 4.7,
      "tenor": "10 Yr"
    }
  ],
  "date": "2026-08-03",
  "inversion": {
    "2s10s": false,
    "3m10y": false,
    "anyInverted": false
  },
  "isLatest": true,
  "spreads": {
    "2s10s": 0.45,
    "3m10y": 0.79,
    "5s30s": 0.83,
    "unit": "percentage points"
  },
  "ts": "2026-08-03T00:00:00.000Z"
}

Payment details

Pay to0x2740651e046c59ab2a6510401140643292d3a96f
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of DeFi and the homepage with a featured placement.

Get featured →

More from DEX Data & Agent Utilities & similar services

D

DEX Data & Agent Utilities · Base Liquidity

x402.donnyautomation.com

Per-venue USD liquidity and TVL for a pair on Base across BaseSwap, SushiSwap and Uniswap v3. Returns totalTvlUsd, venueCount, deepestVenue and venues[] with each venue share and reserves. Requires ?pair=SYM/SYM (e.g. WETH/USDC). Errors: 400 bad_pair (malformed, or a ticker unknown on this chain), 404 no_pools, 502 upstream_read_failed. Raw pool numbers are /reserves; a one-word verdict is /risk; price is /price. Chain-pinned; bare /liquidity = BSC.

GETBaseDeFi
$0.01 / call4 calls / 30d
D

DEX Data & Agent Utilities · V4hooks

x402.donnyautomation.com

Uniswap v4 hook capability scan on Base mainnet. Decodes all 14 permission bits from the hook address per v4-core Hooks.sol, flags swap custody, fee-taking and EIP-1967 upgradeability, and verifies source by Basescan/Sourcify/Blockscout consensus. Returns custodyClass PASSIVE|FLOW_CONTROL|FEE_TAKING|SWAP_CUSTODY|OPAQUE, flags[], riskFlags[] and verificationState. Requires ?address=0x + 40 hex. Errors: 400 invalid_address, 502 analysis_failed. Capability analysis - it never outputs SAFE.

GETBaseDeFi
$0.01 / call3 calls / 30d
D

DEX Data & Agent Utilities · GAS

x402.donnyautomation.com

Live gas price on BNB Chain, Polygon, Arbitrum, Base, Avalanche and Optimism, converted to USD and ranked cheapest-first. Gwei is NOT comparable across chains because the gas token differs in price; USD is the only honest ranking. Returns chains[] with gasPriceGwei, baseFeeGwei, nativeUsd and costUsd for transfer, erc20Transfer and swap, plus cheapest and mostExpensive. Optional ?chain=all or one chain key; 400 unknown_chain otherwise. Send chain=all - a bare call skips the free tier.

GETBaseOnchain Data
$0.01 / call3 calls / 30d