stablecoin yield api
v1 · live on mainnet
Stablecoin yield your agent can actually execute.
Discover, compare, deposit, rebalance, and withdraw across leading DeFi markets through one API. Positions and gas are denominated in USDC, so your users never need to hold a native token.
Sample response from the 1Tx instrument registry — illustrative data, not live rates.
Every venue, one shape — instrumentId · protocol · chainId · currentApy · tvl · isActive
Unified workflow
USDC native
01 — The problem
Every protocol, every chain. One integration instead of one per venue.
Without 1Tx
- Every protocol × chain is another integration to write
- An ABI and adapter per venue, kept alive as protocols upgrade
- Every venue reports APY and TVL in its own shape
- Swap, approve, deposit — three steps your user can abandon between
- Cross-chain means a bridge integration on top of all that
- Users must hold a native gas token on every chain you support
With 1Tx
- One REST API and one router
- One instrument registry — a bytes32 id per (protocol, chain, market)
- One normalized metrics shape across every venue
- Swap and deposit settle atomically in a single transaction
- Cross-chain deposits built in, routed over Circle CCTP
- USDC end to end — a smart account pays gas in USDC, no native token
02 — How it works
Discover, build, execute. Three calls.
Discover
GET /instrumentsQuery the registry by chain, protocol, asset or yield. Every instrument returns in the same shape — APY, TVL, status — across every supported protocol.
Build
POST /transactions/buyOne call returns the full unsigned transaction set — approve, then buy — quoted and ready to sign. Cross-chain deposits route over Circle CCTP in the same call.
Execute
Your wallet signsAn EOA signs each transaction, or a Safe smart account executes gaslessly — gas paid in USDC. Track settlement through the operation status endpoint.
1Tx builds the transaction; your wallet signs it.
The router never holds funds beyond a single transaction.
03 — Quickstart
From zero to a signed deposit in one file.
No SDK required — plain HTTPS and a wallet. The TypeScript snippet is type-checked in CI against the real API shapes so it cannot silently rot.
// 1Tx quickstart — deposit 100 USDC into the highest-APY instrument on Base.
// Use your existing wallet client. No 1Tx SDK required.
declare const wallet: {
account: { address: string };
sendTransaction(tx: Record<string, unknown>): Promise<unknown>;
};
export const api = async <T>(path: string, body?: object): Promise<T> =>
(await fetch(`https://api.1tx.fi/api/v1${path}`, {
method: body ? "POST" : "GET",
headers: { "content-type": "application/json", "x-api-key": process.env["1TX_API_KEY"]! },
body: body && JSON.stringify(body),
})).json();
// 1. Discover
const { data } = await api<{ data: { instrumentId: string }[] }>(
"/instruments?chainId=8453&isActive=true&sortBy=apy&sortOrder=desc&limit=1",
);
// 2. Build — point sourceChainId at wherever your USDC sits; 1Tx routes over CCTP.
const { transactions } = await api<{ transactions: Record<string, unknown>[] }>("/transactions/buy", {
userAddress: wallet.account.address,
instrumentId: data[0]!.instrumentId,
amountUsdc: "100",
sourceChainId: 8453,
});
// 3. Execute — 1Tx builds the transaction, your wallet signs it.
for (const tx of transactions) await wallet.sendTransaction(tx);
Full repo with sell, cross-chain and Safe smart-account flows: 1tx-fi/api-examples ↗
# 1. Discover — highest-APY active instrument on Base
curl -s "https://api.1tx.fi/api/v1/instruments?chainId=8453&isActive=true&sortBy=apy&sortOrder=desc&limit=1" \
-H "x-api-key: $1TX_API_KEY"
# 2. Build — the unsigned transaction set (approve, then buy).
# Cross-chain? Set sourceChainId to where your USDC sits and the
# same call routes the deposit over Circle CCTP.
curl -s -X POST "https://api.1tx.fi/api/v1/transactions/buy" \
-H "Content-Type: application/json" \
-H "x-api-key: $1TX_API_KEY" \
-d '{
"userAddress": "0xYourAddress",
"instrumentId": "0x…from step 1",
"amountUsdc": "100",
"sourceChainId": 8453,
"slippageBps": 50
}'
# 3. Execute — sign the returned transactions with your wallet.
# 1Tx builds the transaction; your wallet signs it.
Endpoints and response shapes: docs.1tx.fi ↗
# The 1Tx Claude skill — Claude Code as portfolio manager,
# backed by a Circle agent wallet (no private key in your env).
# Setup
pnpm install
cp .env.example .env # fill 1TX_* and CIRCLE_* values
# Provision the Circle agent wallet — OTP-gated session
pnpm exec circle wallet login you@example.com --type agent --init
pnpm exec circle wallet fund --address <addr> --chain BASE-SEPOLIA --token usdc
# Then ask Claude Code, in the repo:
"set up a diversified stablecoin portfolio"
# Claude will:
# 1. read the wallet and the live 1Tx instrument universe
# 2. propose a weighted allocation — explaining which metrics
# drove every pick
# 3. wait for your approval, then execute across chains
# (Circle CCTP where needed)
#
# Later, in the same session: "rebalance" · "withdraw"
# Every spend is confirmation-gated and bounded by your approved
# budget and the Circle wallet's policy limits.
The 1Tx Claude skill ships with a Circle agent wallet. Prefer to self-host the whole loop? open-allocator (MIT) ↗
04 — Built for agents
Built for agents, not just callable by them.
Most yield APIs answer read-only questions. 1Tx is designed for software that acts — with the guardrails that requires.
open-allocator
MIT · Python · 542 testsAn open-source harness for AI agents to run policy-bounded yield allocation on the 1Tx API. The research plane is read-only and free-form; the execution plane is deterministic — every decision crosses over as a validated artifact that must pass the policy gate before a transaction is built.
- policy.yaml is the constitution: allowlists, caps and gates that can only tighten, never loosen
- Diversification is measured, not labelled — a floor on effective independent positions, computed from the instruments' own history
- Dry-run by default: nothing broadcasts without --confirm
- Every step is a JSON-out CLI command — agents and humans use the same interface
The 1Tx Claude skill
Claude Code · Circle agent walletClaude Code acts as the portfolio manager: it provisions a Circle agent wallet — no private key in your environment — reads the live instrument universe, proposes a diversified allocation explaining which metrics drove every pick, and waits for approval before any spend.
- Confirmation-gated execution: the allocation table is presented and approved before anything moves
- OTP-gated policy writes — spend limits on the Circle wallet can't change without you
- Gas sponsored by Circle's Gas Station — only USDC funding is required
- Rebalance and withdraw are same-session natural language
Guardrails across the stack
05 — Live agent
A sentence in, a governed allocation out.
agents.1tx.fi runs a real book on the 1Tx API. A plain-English mandate derives the policy; a daily job keeps the book inside it. The agent proposes — deterministic code validates, signs and executes, with no model in the signing path.
The mandate
“I want to create a portfolio with a diversified core of blue-chip opportunities that seeks the highest available yields, complemented by a satellite allocation to higher-yield opportunities with contained risk and diversification across several positions, so that a loss or depeg affects only a small portion of the portfolio.”
- Blended APY
- 6.683%
- Effective positions
- 6.869
- Gas paid, all time
- $0.10
concentration, 1/Σw²
in USDC, via paymaster
| Position | Share of deployed capital | APY | |
|---|---|---|---|
| Tokemak baseUSD autopoolTokemak · Base · satellite | 16.75% | 7.49% | |
| Hyperithm USDC ApexMorpho · Monad · core | 16.46% | 7.89% | |
| August USDC V2Morpho · Monad · satellite | 16.32% | 7.58% | |
| Avantis USDC LP trancheAvantis · Base · core | 13.25% | 5.64% | |
| Steakhouse High Yield USDCMorpho · Base · core | 13.00% | 6.05% | |
| Gauntlet USDC FrontierMorpho · Base · core | 12.33% | 6.35% | |
| USDCFluid · Base · satellite | 11.89% | 4.85% |
Bars are proportional to share; APY is descriptive, not predictive.
- /bookEvery position in full — by protocol, by chain, by sleeve.
- /shelfThe universe screened each day, and what the agent did with each name.
- /mandateEvery knob the sentence produced, and the rationale behind it.
- /activityEvery transaction sent, with the USDC gas it actually cost.
06 — Capabilities
One surface for the whole flow.
Instrument registry
One bytes32 id per (protocol, chain, market). Discovery, status and metadata in one shape across every supported protocol.
Atomic router
Swap and deposit settle atomically. The API returns the full unsigned transaction set, quoted and ready to sign.
Cross-chain via CCTP
Deposits settle across chains through Circle CCTP. Standard transfer is free; fast transfer settles in seconds for a server-computed fee.
Risk & APY metrics
Normalized APY and TVL across every venue, plus portfolio analyze, compare and simulate endpoints for allocation decisions.
Guardrails
Spend caps, allowlisted router actions, OTP-gated policy changes and confirmation-gated execution. Policy can only tighten.
USDC end to end
Every amount is USDC — funding, quotes, deposits and withdrawals. A Safe smart account pays gas in USDC too, so no native token is ever required. One EIP-712 authorization, then /buy, /sell and /withdraw with idempotency keys.
07 — Security
Security, stated plainly.
Self-custody by construction.
1Tx never holds your funds beyond a single transaction. Deposits land in the underlying protocols' vaults, attributable to your wallet. There is no pooled 1Tx balance to drain.
Bounded, even for agents.
Smart-account flows carry spend caps you sign. Agent tooling is dry-run by default, confirmation-gated, and allowlisted to router buy/sell actions — a compromised prompt cannot exfiltrate via plain USDC transfers.
Found something?
Report it responsibly to security via the contact below. A formal bug bounty program is being set up. hello@1tx.fi
Deployed contracts
Underlying protocols hold the funds; the router only routes. Verify before you sign.
08 — Who it's for
Pick your integration path.
Agents & bots
An agent that can land here, get a key, run an example and deposit — no call required. Guardrails included from the first request.
Get an API key →Wallets & apps
One integration for one-click Earn across every supported protocol and chain. Optional referral fee on flow, so the integration pays for itself.
Read the docs →Fintechs & institutions
Stablecoin Earn infrastructure for regulated products. We onboard a small number of design partners directly.
For teams →09 — FAQ