# CANIX402 — full agent integration guide > x402-gated DeFi data and walletless transaction API (version 0.1.0). Normalized yield data and multi-router swap-group generation for autonomous agents; USDC micropayments at the gateway; no server-side signing or submission. # pragma: allowlist secret ## Overview - **Gateway base URL:** `https://canix402-api.compx.io` - **Documentation site:** https://canix402.compx.io - **Supported protocols:** Tinyman, Pact, Folks Finance, CompX, Dork.fi, Myth Finance, Haystack, Réti, Alpha Arcade, STAMM, Morpho, Aave, Aerodrome, Mallow - **Operator:** Neon Forge Ltd - **Support:** kieran@neonforge.ltd - **Terms:** https://canix402.compx.io/terms - **Release notes:** https://canix402.compx.io/release-notes Opportunity responses are normalized records with fields such as `protocol`, `opportunityType`, `opportunityId`, `assetPair`, `apy`, `apr`, optional `borrowApr` (borrow-side cost for lending markets), `tvlUsd`, `risk` (confidence, utilization, liquidation threshold, LP volatility/IL hint, reward runway, APY stability from the bounded history series, wallet health factor when address is in context), `executionShapes`, `compatibleExitShapes`, optional `entryRequirements` / `capacity` (Réti), `sourceTimestamp`, and `fetchedAt`. Lists and `POST /plans` rank with designed risk constraints before raw APY. Positions may include `debt` rows with repay exit shapes (CompX/Folks) or informational Dork.fi `debt-usd` aggregates. Numeric precision follows the published OpenAPI `x-precision` contract (typically 6 decimal places). ## Machine-readable contracts | Resource | URL | | --- | --- | | Discovery | https://canix402-api.compx.io/discovery | | OpenAPI | https://canix402-api.compx.io/openapi.json | | x402 manifest | https://canix402-api.compx.io/.well-known/x402.json | | MCP server | https://canix402.compx.io/mcp (remote `https://canix402-mcp.compx.io/mcp`, streamable-http) | | Live | https://canix402.compx.io/webmcp | | LLM index | https://canix402.compx.io/llms.txt | Always call the **gateway**, not an internal upstream API. x402 enforcement, `PAYMENT-REQUIRED`, and settlement happen at the gateway edge. ### MCP server Prefer the canix402 MCP for agent hosts (Cursor, Claude Desktop). Endpoint: `https://canix402-mcp.compx.io/mcp` (streamable-http). Metadata: `https://canix402-mcp.compx.io/.well-known/mcp`. Walletless: paid tool preflight returns payment requirements; retry with `paymentSignature`. Tools include `canix_list_opportunities`, `canix_get_opportunity_history`, `canix_list_execution_shapes`, `canix_get_positions`, `canix_list_claimable`, `canix_check_eligibility`, `canix_get_plan`, `canix_get_rebalance_plan`, `canix_validate_policy`, `canix_compose_enter`, `canix_get_execution_quote`, `canix_list_haystack_launches`, `canix_get_haystack_launch`, `canix_simulate_execution`, `canix_create_session`, `canix_refresh_session`, `canix_get_session`, `canix_create_watch`, `canix_refresh_watch`, `canix_get_watch`, and free discovery helpers. Prepaid sessions: one x402 payment unlocks N research + M quotes/plans for a TTL (`sessionReceipt` / `X-Canix-Session`); one-shots remain the default. Watch retainers: `POST /watch` registers address + thresholds and delivers signed, idempotent webhooks instead of polling positions. See https://canix402.compx.io/mcp. # pragma: allowlist secret ## x402 payment flow An agent may pay and act on Algorand only, on Base only, or on both. Nothing in ranking, eligibility, pricing, or access requires a second chain. Algorand wallet routes (`/positions`, `/opportunities/personalized`, `/eligibility`, `/plans`, Algorand quotes, and swaps) take an Algorand address and nothing else. Omitting a Base `0x` address does not lower rank, fail the request, or block payment. A Base address is required only on the call that needs it: a Morpho, Aave, or Aerodrome quote (`userAddress` is `0x…`) or a payment signed against the Base accept. Filter catalog rows with `chain=algorand` or `chain=base`. 1. **Discover** — `GET https://canix402-api.compx.io/discovery` and `GET https://canix402-api.compx.io/openapi.json` (free). 2. **Preflight** — call a paid route without `PAYMENT-SIGNATURE`; expect HTTP **402** with `PAYMENT-REQUIRED`. 3. **Sign** — client-side, selecting the accept by `network`, not by index. Algorand is first and a complete payment on its own: `algorand-mainnet`, USDC ASA `31566704`, signed ASA transfer in `paymentGroup`. Base (`eip155:8453`) is optional and the same price: EIP-3009 `transferWithAuthorization` for USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`. Match `scheme`, `network`, `asset`, `payTo`, and `maxAmountRequired` from the live accept. The Base accept is omitted until the gateway has a real Base receiver. Wallet keys stay on the client. The payment network is separate from the chain a quote executes on. 4. **Retry** — repeat the request with `PAYMENT-SIGNATURE` (base64 JSON payload). Success returns **200** and may include `PAYMENT-RESPONSE`. Default payment context (confirm against live discovery before integrating): - **Protocol version:** 2 - **Algorand accept network:** algorand-mainnet - **Discovery template network:** algorand-mainnet # pragma: allowlist secret - **Algorand USDC ASA:** 31566704 - **Base network:** eip155:8453 - **Base USDC:** 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 - **Facilitator:** https://facilitator.goplausible.xyz - **Headers:** PAYMENT-REQUIRED, PAYMENT-SIGNATURE, PAYMENT-RESPONSE Algorand envelope: `payload.paymentGroup` is a base64 signed ASA transfer and `payload.paymentIndex` is `0`. Base envelope: `payload.authorization` plus `payload.signature` (EIP-712). Do not put an Algorand `paymentGroup` on the Base accept. That Base signature is the API fee, not Morpho vault calldata. Example preflight: ``` curl -s -D - https://canix402-api.compx.io/opportunities -o /dev/null ``` ## Endpoint reference - `GET /` (Free) — API root branding and social metadata page. - `GET /health` (Free) — Service health check. - `GET /ready` (Free) — Service readiness check (Algod required; Redis soft). - `GET /metrics` (Free) — Prometheus metrics scrape endpoint (internal). - `GET /metadata` (Free) — Service metadata and policy surface. - `GET /discovery` (Free) — Machine-readable endpoint catalog for agents. - `GET /openapi.json` (Free) — OpenAPI contract document. - `GET /favicon.ico` (Free) — API favicon for directory indexing. - `GET /favicon.png` (Free) — API favicon image. - `GET /logo.png` (Free) — Service logo for directory and social indexing. - `GET /banner.png` (Free) — Service banner for directory and social indexing. - `GET /.well-known/x402` (Free) — x402 discovery fan-out document. - `GET /.well-known/x402.json` (Free) — x402 discovery manifest for agent and directory indexing. - `POST /swaps/quote` (Free) — Fetch a walletless multi-router swap quote. - `POST /swaps/optin` (Free) — Build prerequisite swap opt-ins for the winning quote. - `POST /pricing` (Free) — Fetch USD token prices for Algorand asset IDs. - `GET /opportunities` (0.01 USDC) — Top 10 aggregated DeFi opportunities ranked by risk then APY. Params: protocol=, chain=, limit=, offset=, includeInactive=, refresh=. # pragma: allowlist secret - `GET /protocols/:protocol/opportunities` (0.01 USDC) — Top 25 DeFi opportunities for a single protocol ranked by risk then APY. Params: :protocol, limit=, offset=, includeInactive=, refresh=. # pragma: allowlist secret - `GET /opportunities/search` (0.01 USDC) — Caller-filtered opportunities across supported platforms. Params: platform=, type=, minApy=, maxApy=, minTvlUsd=, assetIds=, chain=, limit=, offset=, includeInactive=, refresh=. - `GET /opportunities/personalized` (0.05 USDC) — Top opportunities tuned to a wallet's held assets. Params: address=, limit=, offset=, includeInactive=, refresh=. - `GET /opportunities/:opportunityId/history` (0.01 USDC) — Bounded APY/TVL history for one opportunity. Params: :opportunityId, window=. # pragma: allowlist secret - `POST /eligibility` (0.01 USDC) — Wallet eligibility and capacity for selected opportunities. # pragma: allowlist secret - `POST /plans` (0.25 USDC) — Compile an allocation intent into an ordered unsigned plan. # pragma: allowlist secret - `POST /plans/rebalance` (0.25 USDC) — Compile a delta rebalance plan of unsigned groups. # pragma: allowlist secret - `POST /policy/validate` (0.25 USDC) — Validate a compiled plan or quotes[] against an operator policy document. # pragma: allowlist secret - `GET /positions` (0.005 USDC) — DeFi positions held by an Algorand or Base wallet. Params: address=. - `GET /positions/claimable` (0.001 USDC) — Claimable DeFi rewards across supported protocols. Params: address=. - `GET /public/agents/brownie/positions` (Free) — Public DeFi positions for the Brownie Bot showcase wallet. - `POST /swaps/transactions` (0.005 USDC) — Build a walletless swap transaction group from the winning quote. - `GET /execution/shapes` (Free) — List verified execution shape catalog metadata. - `GET /protocols/mallow/markets` (Free) — Mallow ALGO and BTC perpetual market snapshot. - `GET /protocols/mallow/positions` (Free) — Mallow ALGO and BTC perpetual positions for one wallet. Params: address=. - `GET /protocols/haystack/launches` (0.01 USDC) — Haystack tokens still on the bonding curve. Params: q=, minProgress=, maxProgress=, order=, launchedAfter=, launchedBefore=, limit=, offset=. - `GET /protocols/haystack/launches/:tokenNum` (Free) — One Haystack launch bonding status. Params: assetId=, address=. - `POST /execution/quotes` (0.1 USDC) — Compile verified transaction shapes into unsigned Algorand groups or Base calldata. - `POST /execution/compose` (0.1 USDC) — Compose opt-in → winning swap → enter as unmerged unsigned groups. # pragma: allowlist secret - `POST /execution/simulate` (0.1 USDC) — Simulate compiled unsigned groups for predicted balance and position deltas. # pragma: allowlist secret - `POST /sessions` (0.25 USDC) — Buy a prepaid agent session receipt. # pragma: allowlist secret - `POST /sessions/refresh` (0.25 USDC) — Refresh a prepaid agent session receipt. # pragma: allowlist secret - `GET /sessions/:sessionId` (Free) — Read prepaid session remaining N/M. Params: :sessionId. - `POST /watch` (0.25 USDC) — Register a paid wallet watch retainer. # pragma: allowlist secret - `POST /watch/refresh` (0.25 USDC) — Refresh a paid wallet watch retainer. # pragma: allowlist secret - `GET /watch/:watchId` (Free) — Read watch receipt and recent threshold firings. Params: :watchId. - `POST /watch/:watchId/rotate-secret` (Free) — Rotate the watch webhook HMAC secret. Params: :watchId. ### Route notes - `GET /opportunities` — top aggregated opportunities ranked by risk then APY (default limit 10). - `GET /protocols/:protocol/opportunities` — protocol slug e.g. `tinyman`, `pact`, `folks-finance`, `compx`, `dorkfi`, `myth-finance`, `haystack`, `reti`, `alpha-arcade`, `stamm`, `morpho`, `aave`, `aerodrome`. AlgoFi and Humble LP holdings are `GET /positions` only. - `GET /opportunities/search` — filter by `platform`, `chain` (`algorand|base`), `type`, `minApy`, `maxApy`, `minTvlUsd`, `assetIds` (comma-separated ASA ids; 0 = ALGO; ANY intersection with opportunity.assetIds). - `GET /opportunities/personalized` — requires `address` (Algorand account or Base `0x` address). A Base address matches Aave positions and attaches health factor. Aerodrome farm rows are not matched from wallet ERC-20 balances. Omitting a Base address does not change rank or price. Premium price; matches opportunities to wallet-held assets using eligibility rules (full/gated venues are not recommended as enterable). Filter the mixed catalog with `chain=algorand|base` on list and search. // pragma: allowlist secret - `GET /opportunities/:id/history` — bounded APY/TVL series (`window=1d|7d|30d`, default 30d); empty until snapshots exist; includes a stability signal so snapshot APY cannot dominate plan sizing. Research SKU ~0.01 USDC. - `POST /eligibility` — requires `address` and `opportunityIds`; 0.01 USDC; returns `canEnter`, `missingAssets`, `gates`, `capacity`, `suggestedSwap`. NFD/creator gates stay unresolved (`eligibilityFullyCheckable: false`). Quote-time checks remain authoritative. // pragma: allowlist secret - `POST /plans` — requires `address` and `budget { assetId, amount }`; 0.25 USDC compiler SKU; returns ordered eligibility/setup/enter steps with unsigned groups, live multi-router opt-in → swap compose when `requiredAssetIds` differ from the budget asset, `quotes[]`, expected position delta, and fee totals. Brownie should consume this rather than forking a compiler. // pragma: allowlist secret - `POST /plans/rebalance` — requires `address` plus `targetWeights` and/or `harvestIdle`; 0.25 USDC; delta claims/exits/swaps/enters as unmerged unsigned groups (not a full unwind). // pragma: allowlist secret - `POST /execution/compose` — requires `address`, `opportunityId`, `fromAssetId`, `amount`; 0.10 USDC; sequenced unsigned groups opt-in → winning swap → enter. Groups never merged; sign only user legs. Failure modes (stale quote, missing opt-in, slippage) on step warnings. // pragma: allowlist secret - `POST /execution/simulate` — requires `address` and compiled `groups[]`; 0.10 USDC; predicted balance and position deltas without signing. Fail closed with machine-readable reasons (stale quote, not opted in, min balance, health factor, capacity). `POST /plans` attaches `data.simulation` when groups are compiled. // pragma: allowlist secret - `POST /policy/validate` — requires a versioned `policy` document plus a compiled `plan` and/or proposed `quotes[]`; 0.25 USDC; machine-readable `pass` / `reasons[]` (protocol weight, ALGO reserve, TVL/freshness, no-new-borrows, execution-ready). Fails closed when a required field is missing. Canix does not sign. // pragma: allowlist secret - `POST /sessions` — 0.25 USDC; mints a walletless prepaid receipt that unlocks N research + M quotes/plans for a TTL. One-shots remain the default. // pragma: allowlist secret - `POST /watch` — 0.25 USDC recurring retainer; address + thresholds (health factor, claimable USD, APY drop, Réti capacity) and optional HTTPS webhook. Signed, idempotent deliveries. HMAC secret shown once. No wallet keys. // pragma: allowlist secret - `GET /positions` — requires `address` (Algorand account or Base `0x` address). An Algorand address returns Algorand positions only, including Mallow open perps and resting orders. A Base address returns Aave V3 supplied and variable-debt rows plus staked Aerodrome basic-pool LP. Exactly 0.005 USDC. Morpho holdings and unclaimed AERO are not in this snapshot. Close a Mallow perp with `mainnet:mallow:v1:close:market`. Cancel a resting Mallow order, including an orphaned take-profit or stop-loss, with `mainnet:mallow:v1:cancelOrder:resting`. - `GET /positions/claimable` — requires `address`; claim desk with USD, fee/worth-claiming hints, and `claimAllQuotes` for exactly 0.001 USDC. Compile via `POST /execution/quotes` (~0.1 USDC flat; groups never merged). - `GET /execution/shapes` — free catalog of verified shape keys and requiredInputs (metadata only). `meta.caveatsDocsPath` is `protocol/docs/execution-shapes/protocol-caveats.md` (pool discovery, opt-ins, min-balance, slippage, liquidity limits, app upgrades). Do not guess those details. - `GET /protocols/mallow/markets` — free ALGO/USD and BTC/USD index, max leverage, and USDC collateral for `mainnet:mallow:v1:openLimit:attached`. `collateralUsd` is margin. `takeProfitPct` / `stopLossPct` are return on margin. Positions settle on People's Exchange with a 3 bps Mallow builder fee. - `GET /protocols/mallow/positions?address=` — free open ALGO/USD and BTC/USD positions that post USDC. Copy `positionId`, `market`, and `side` into `mainnet:mallow:v1:close:market`. Other markets are omitted. An unknown address returns an empty list. - `POST /execution/quotes` — batch unsigned groups for verified shapes; flat ~0.1 USDC per request, payable on Algorand or Base. Algorand shapes take an Algorand `userAddress` and return Algorand groups. Morpho shapes (`base:morpho:vault:*`), Aave shapes (`base:aave:v3:*`), and Aerodrome shapes (`base:aerodrome:v2:*`) take a Base `0x` `userAddress` and return unsigned Base calldata (`encodedTransactions` hex, `transactions[].evmCall`). Mallow shapes (`mainnet:mallow:v1:openLimit:attached`, `mainnet:mallow:v1:close:market`, `mainnet:mallow:v1:cancelOrder:resting`, `mainnet:mallow:v1:optIn:usdc`) return unsigned Algorand groups. Haystack Launch shapes (`mainnet:haystack:v1:launch:token`, `mainnet:haystack:v1:buy:bonding`) also compile here at the same flat price; the bonding buy is not the swap SKU. Skipping Base shapes is complete for an Algorand agent. Canix never signs or submits. Read each shape's `docsPath` plus the protocol caveats doc before filling inputs. - `GET /protocols/haystack/launches` — paid (~0.01 USDC, research session). HayLaunch tokens still bonding. Default window is the last 60 days. `q` matches name or ticker; `minProgress` / `maxProgress` bound bonding percent; `order` is `asc` or `desc` (default `desc`). Example: `GET /protocols/haystack/launches?q=len&minProgress=10&maxProgress=90&order=desc&limit=25`. - `GET /protocols/haystack/launches/{tokenNum}` — free bonding status for one token. `assetId` works after the first buy. Optional `address` adds virtual holdings. Graduated tokens point at `POST /swaps/quote`. Example: `GET /protocols/haystack/launches/175` or `GET /protocols/haystack/launches/0?assetId=3729195158&address=YOUR_ALGORAND_ADDRESS`. - Haystack launch quote — `POST /execution/quotes` with `shapeKey` `mainnet:haystack:v1:launch:token`. Input: `userAddress`, `symbol`, `name`, `assetUrl` (`ipfs://` or `https://`), `bondingTokenId` (`0` = ALGO). Optional `initialBuyAmount`. Canix does not pin images. - Haystack bonding buy — `POST /execution/quotes` with `shapeKey` `mainnet:haystack:v1:buy:bonding`. Input: `userAddress`, `tokenNum` or `assetId`, `fromAssetId`, `amount`, `slippageBps`. `fromAssetId` equal to the bonding asset pays the curve directly. Any other `fromAssetId` routes through the Haystack router in the same group. A routed buy of 90% or more of remaining real reserves is refused. - Multi-router swaps — call free `POST /swaps/quote` (parallel compare unless `router` is set), sign and submit any group from free `POST /swaps/optin`, refresh the short-lived quote, then call paid `POST /swaps/transactions` for 0.005 USDC. Amounts are asset base units. Pass the quote object unchanged; do not edit `payload`. - Walletless handoff — sign only the returned `userSignIndexes`, preserve any pre-signed members and group order, and submit the complete group through the caller's Algod client. - Swap costs — the 0.005 USDC x402 access charge is separate from router fees, DEX fees, price impact, and Algorand network fees. Free routes: `/health`, `/metadata`, `/discovery`, `/openapi.json`, `/.well-known/x402.json`, `GET /execution/shapes`, `GET /protocols/mallow/markets`, `GET /protocols/mallow/positions`, `GET /protocols/haystack/launches/{tokenNum}`, `POST /swaps/quote`, `POST /swaps/optin`. ## Error catalog - `MISSING_PAYMENT_SIGNATURE` (HTTP 402) — The paid endpoint was called without PAYMENT-SIGNATURE. - `MALFORMED_PAYMENT_SIGNATURE` (HTTP 402) — PAYMENT-SIGNATURE payload is malformed. - `EXPIRED_PAYMENT_PROOF` (HTTP 402) — PAYMENT-SIGNATURE proof has expired. - `SESSION_INVALID` (HTTP 402) — X-Canix-Session is unknown. Omit the header and pay per request, or buy a new session. - `SESSION_EXPIRED` (HTTP 402) — Prepaid session TTL has elapsed. Fail-closed; one-shots still work without the session header. - `SESSION_EXHAUSTED` (HTTP 402) — Prepaid session N/M quota is exhausted. Fail-closed; refresh with POST /sessions/refresh or pay per request. - `SESSION_UNAVAILABLE` (HTTP 402) — Session store is unavailable. Fail-closed; omit X-Canix-Session and retry with a per-request payment. - `WATCH_INVALID` (HTTP 402) — Watch receipt is unknown. Register a new paid watch with POST /watch. - `WATCH_EXPIRED` (HTTP 402) — Watch retainer TTL has elapsed. Fail-closed; pay POST /watch to register again. - `WATCH_UNAVAILABLE` (HTTP 402) — Watch store is unavailable. Fail-closed; retry later. - `WATCH_UNAUTHORIZED` (HTTP 402) — Watch HMAC secret does not match. Send the current secret in X-Canix-Watch-Secret to rotate. - `VALIDATION_ERROR` (HTTP 400) — Request validation failed. - `NOT_FOUND` (HTTP 404) — Requested resource was not found. - `INTERNAL_ERROR` (HTTP 500) — Internal server error. ## Sample responses (trimmed) ### GET /opportunities ```json { "data": [ { "protocol": "tinyman", "opportunityType": "lp", "opportunityId": "tinyman:pool:1002541853", "assetPair": "ALGO/USDC", "assetIds": [ 0, 31566704 ], "apr": 10.512, "apy": 12.5, "yieldBasis": "apy", "tvlUsd": 2450000.5, "sourceTimestamp": "2026-07-06T09:00:00.000Z", "fetchedAt": "2026-07-06T09:00:00.000Z", "notes": "sourceTimestamp reflects fetch time; upstream does not expose a per-row update time.", "risk": { "confidence": "low", "sourceAgeSeconds": 5097600, "volatilityBucket": "unknown" }, "executionReady": true, "executionShapes": [ { "shapeKey": "mainnet:tinyman:v2:addLiquidity:flexible", "protocol": "tinyman", "protocolVersion": "v2", "action": "addLiquidity", "variant": "flexible", "title": "Tinyman v2 flexible add liquidity", "summary": "Adds two-sided liquidity to an existing Tinyman AMM v2 pool using flexible amounts. Generates the documented 3-transaction group (asset1 transfer, asset2 transfer/payment, add_liquidity app call) as unsigned transactions.", "order": 0, "requiredInputs": [ "userAddress", "assetAId", "assetAAmount", "assetBId", "assetBAmount", "maxSlippageBps" ], "requiredAssetIds": [ 0, 31566704 ], "inputHints": { "assetAId": 0, "assetBId": 31566704, "poolId": "tinyman:pool:1002541853" } }, { "shapeKey": "mainnet:tinyman:v2:addLiquidity:initial", "protocol": "tinyman", "protocolVersion": "v2", "action": "addLiquidity", "variant": "initial", "title": "Tinyman v2 initial add liquidity", "summary": "Adds the first liquidity to a bootstrapped but empty Tinyman AMM v2 pool. Generates the documented 3-transaction group (asset1 transfer, asset2 transfer/payment, add_initial_liquidity app call) as unsigned transactions.", "order": 0, "requiredInputs": [ "userAddress", "assetAId", "assetAAmount", "assetBId", "assetBAmount", "maxSlippageBps" ], "requiredAssetIds": [ 0, 31566704 ], "inputHints": { "assetAId": 0, "assetBId": 31566704, "poolId": "tinyman:pool:1002541853" } }, { "shapeKey": "mainnet:tinyman:v2:addLiquidity:singleAsset", "protocol": "tinyman", "protocolVersion": "v2", "action": "addLiquidity", "variant": "singleAsset", "title": "Tinyman v2 single-asset add liquidity", "summary": "Adds one-sided liquidity to an existing Tinyman AMM v2 pool. Tinyman performs an internal swap to balance the deposit and mints pool tokens. Generates the documented 2-transaction group (asset transfer/payment, add_liquidity app call) as unsigned transactions.", "order": 0, "requiredInputs": [ "userAddress", "assetAId", "assetBId", "depositAssetId", "depositAmount", "maxSlippageBps" ], "requiredAssetIds": [ 0, 31566704 ], "inputHints": { "assetAId": 0, "assetBId": 31566704, "poolId": "tinyman:pool:1002541853" } } ], "compatibleExitShapes": [] }, { "protocol": "compx", "opportunityType": "lending", "opportunityId": "compx-lending-3491050310", "assetPair": "USDC", "assetIds": [ 31566704, 3491050538 ], "apy": 1.4, "apr": 1.4, "borrowApr": 8.5, "yieldBasis": "apr", "tvlUsd": 137.181191, "sourceTimestamp": "2026-07-14T20:47:17.000Z", "fetchedAt": "2026-07-17T12:41:14.931Z", "notes": "CompX lending market 3491050310; util=4.4%; ltv=70.0%; APR-derived yields; borrowApr is the borrow cost.", "risk": { "utilization": 4.4, "liquidationThreshold": 80, "ltv": 70, "borrowApr": 8.5, "confidence": "low", "sourceAgeSeconds": 4283377 }, "executionReady": true, "executionShapes": [ { "shapeKey": "mainnet:compx:v1:deposit:asa", "protocol": "compx", "protocolVersion": "v1", "action": "deposit", "variant": "asa", "title": "CompX v1 ASA lending deposit", "summary": "Deposits a base ASA into a CompX lending market and receives LST tokens.", "order": 0, "requiredInputs": [ "userAddress", "marketAppId", "amount" ], "requiredAssetIds": [ 31566704 ], "inputHints": { "assetId": 31566704, "marketAppId": 3491050310 } }, { "shapeKey": "mainnet:compx:v1:borrow:asa", "protocol": "compx", "protocolVersion": "v1", "action": "borrow", "variant": "asa", "title": "CompX v1 ASA lending borrow", "summary": "Borrows a base ASA from a CompX lending market against LST collateral.", "order": 0, "requiredInputs": [ "userAddress", "marketAppId", "borrowAmount", "collateralAmount" ], "requiredAssetIds": [ 31566704 ], "inputHints": { "assetId": 31566704, "marketAppId": 3491050310 } } ], "compatibleExitShapes": [ { "shapeKey": "mainnet:compx:v1:withdraw:asa", "protocol": "compx", "protocolVersion": "v1", "action": "withdraw", "variant": "asa", "title": "CompX v1 ASA lending withdraw", "summary": "Withdraws a base ASA from a CompX lending market by redeeming LST tokens.", "order": 0, "requiredInputs": [ "userAddress", "marketAppId", "amount" ], "requiredAssetIds": [ 31566704 ], "inputHints": { "assetId": 31566704, "marketAppId": 3491050310 } }, { "shapeKey": "mainnet:compx:v1:repay:asa", "protocol": "compx", "protocolVersion": "v1", "action": "repay", "variant": "asa", "title": "CompX v1 ASA lending repay", "summary": "Repays outstanding base-ASA debt on a CompX lending market.", "order": 0, "requiredInputs": [ "userAddress", "marketAppId", "amount" ], "requiredAssetIds": [ 31566704 ], "inputHints": { "assetId": 31566704, "marketAppId": 3491050310 } } ] } ], "meta": { "limit": 10, "offset": 0, "includeInactive": false, "paymentRequired": true } } ``` ### GET /opportunities/search ```json { "data": [ { "protocol": "tinyman", "opportunityType": "lp", "opportunityId": "tinyman:pool:1002541853", "assetPair": "ALGO/USDC", "assetIds": [ 0, 31566704 ], "apr": 10.512, "apy": 12.5, "yieldBasis": "apy", "tvlUsd": 2450000.5, "sourceTimestamp": "2026-07-06T09:00:00.000Z", "fetchedAt": "2026-07-06T09:00:00.000Z", "executionReady": true, "executionShapes": [ { "shapeKey": "mainnet:tinyman:v2:addLiquidity:flexible", "protocol": "tinyman", "protocolVersion": "v2", "action": "addLiquidity", "variant": "flexible", "title": "Tinyman v2 flexible add liquidity", "summary": "Adds two-sided liquidity to an existing Tinyman AMM v2 pool using flexible amounts. Generates the documented 3-transaction group (asset1 transfer, asset2 transfer/payment, add_liquidity app call) as unsigned transactions.", "order": 0, "requiredInputs": [ "userAddress", "assetAId", "assetAAmount", "assetBId", "assetBAmount", "maxSlippageBps" ], "requiredAssetIds": [ 0, 31566704 ], "inputHints": { "assetAId": 0, "assetBId": 31566704, "poolId": "tinyman:pool:1002541853" } }, { "shapeKey": "mainnet:tinyman:v2:addLiquidity:initial", "protocol": "tinyman", "protocolVersion": "v2", "action": "addLiquidity", "variant": "initial", "title": "Tinyman v2 initial add liquidity", "summary": "Adds the first liquidity to a bootstrapped but empty Tinyman AMM v2 pool. Generates the documented 3-transaction group (asset1 transfer, asset2 transfer/payment, add_initial_liquidity app call) as unsigned transactions.", "order": 0, "requiredInputs": [ "userAddress", "assetAId", "assetAAmount", "assetBId", "assetBAmount", "maxSlippageBps" ], "requiredAssetIds": [ 0, 31566704 ], "inputHints": { "assetAId": 0, "assetBId": 31566704, "poolId": "tinyman:pool:1002541853" } }, { "shapeKey": "mainnet:tinyman:v2:addLiquidity:singleAsset", "protocol": "tinyman", "protocolVersion": "v2", "action": "addLiquidity", "variant": "singleAsset", "title": "Tinyman v2 single-asset add liquidity", "summary": "Adds one-sided liquidity to an existing Tinyman AMM v2 pool. Tinyman performs an internal swap to balance the deposit and mints pool tokens. Generates the documented 2-transaction group (asset transfer/payment, add_liquidity app call) as unsigned transactions.", "order": 0, "requiredInputs": [ "userAddress", "assetAId", "assetBId", "depositAssetId", "depositAmount", "maxSlippageBps" ], "requiredAssetIds": [ 0, 31566704 ], "inputHints": { "assetAId": 0, "assetBId": 31566704, "poolId": "tinyman:pool:1002541853" } } ], "compatibleExitShapes": [] } ], "meta": { "limit": 25, "offset": 0, "includeInactive": false, "paymentRequired": true } } ``` ### GET /opportunities/personalized ```json { "data": [ { "protocol": "folks-finance", "opportunityType": "lending", "opportunityId": "folks-lending-971365552", "assetPair": "ALGO", "assetIds": [ 0 ], "apy": 4.25, "yieldBasis": "apy", "tvlUsd": 1875000.25, "sourceTimestamp": "2026-07-06T08:55:00.000Z", "fetchedAt": "2026-07-06T09:00:00.000Z", "executionReady": true, "executionShapes": [ { "shapeKey": "mainnet:folks-finance:v2:setup:depositEscrow", "protocol": "folks-finance", "protocolVersion": "v2", "action": "setup", "variant": "depositEscrow", "title": "Folks Finance v2 add deposit escrow", "summary": "Creates and funds a new Folks Finance deposit escrow for the user. Returns a 3-transaction group that must be signed by both the user and the generated escrow account.", "order": 0, "requiredInputs": [ "userAddress" ], "requiredAssetIds": [ 0 ], "inputHints": { "poolAppId": 971365552, "assetId": 0 } }, { "shapeKey": "mainnet:folks-finance:v2:setup:optEscrowAsset", "protocol": "folks-finance", "protocolVersion": "v2", "action": "setup", "variant": "optEscrowAsset", "title": "Folks Finance v2 opt deposit escrow into pool fAsset", "summary": "Funds and opts an existing Folks Finance deposit escrow into a pool fAsset so it can receive deposits.", "order": 1, "prerequisiteShapeKeys": [ "mainnet:folks-finance:v2:setup:depositEscrow" ], "requiredInputs": [ "userAddress", "escrowAddress" ], "requiredAssetIds": [ 0 ], "inputHints": { "poolAppId": 971365552, "assetId": 0 } }, { "shapeKey": "mainnet:folks-finance:v2:deposit:escrow", "protocol": "folks-finance", "protocolVersion": "v2", "action": "deposit", "variant": "escrow", "title": "Folks Finance v2 escrow deposit", "summary": "Deposits an underlying asset into a Folks Finance lending pool via a deposit escrow. fAssets accrue in the escrow rather than the user's wallet. Generates the SDK deposit group (asset transfer + deposit app call), optionally prefixed with OpUp.", "order": 2, "prerequisiteShapeKeys": [ "mainnet:folks-finance:v2:setup:optEscrowAsset" ], "requiredInputs": [ "userAddress", "assetAmount" ], "requiredAssetIds": [ 0 ], "inputHints": { "poolAppId": 971365552, "assetId": 0 } } ], "compatibleExitShapes": [], "canEnter": true, "eligibilityFullyCheckable": true }, { "protocol": "tinyman", "opportunityType": "lp", "opportunityId": "tinyman:pool:1002541853", "assetPair": "ALGO/USDC", "assetIds": [ 0, 31566704 ], "apr": 10.512, "apy": 12.5, "yieldBasis": "apy", "tvlUsd": 2450000.5, "sourceTimestamp": "2026-07-06T09:00:00.000Z", "fetchedAt": "2026-07-06T09:00:00.000Z", "executionReady": true, "executionShapes": [ { "shapeKey": "mainnet:tinyman:v2:addLiquidity:flexible", "protocol": "tinyman", "protocolVersion": "v2", "action": "addLiquidity", "variant": "flexible", "title": "Tinyman v2 flexible add liquidity", "summary": "Adds two-sided liquidity to an existing Tinyman AMM v2 pool using flexible amounts. Generates the documented 3-transaction group (asset1 transfer, asset2 transfer/payment, add_liquidity app call) as unsigned transactions.", "order": 0, "requiredInputs": [ "userAddress", "assetAId", "assetAAmount", "assetBId", "assetBAmount", "maxSlippageBps" ], "requiredAssetIds": [ 0, 31566704 ], "inputHints": { "assetAId": 0, "assetBId": 31566704, "poolId": "tinyman:pool:1002541853" } }, { "shapeKey": "mainnet:tinyman:v2:addLiquidity:initial", "protocol": "tinyman", "protocolVersion": "v2", "action": "addLiquidity", "variant": "initial", "title": "Tinyman v2 initial add liquidity", "summary": "Adds the first liquidity to a bootstrapped but empty Tinyman AMM v2 pool. Generates the documented 3-transaction group (asset1 transfer, asset2 transfer/payment, add_initial_liquidity app call) as unsigned transactions.", "order": 0, "requiredInputs": [ "userAddress", "assetAId", "assetAAmount", "assetBId", "assetBAmount", "maxSlippageBps" ], "requiredAssetIds": [ 0, 31566704 ], "inputHints": { "assetAId": 0, "assetBId": 31566704, "poolId": "tinyman:pool:1002541853" } }, { "shapeKey": "mainnet:tinyman:v2:addLiquidity:singleAsset", "protocol": "tinyman", "protocolVersion": "v2", "action": "addLiquidity", "variant": "singleAsset", "title": "Tinyman v2 single-asset add liquidity", "summary": "Adds one-sided liquidity to an existing Tinyman AMM v2 pool. Tinyman performs an internal swap to balance the deposit and mints pool tokens. Generates the documented 2-transaction group (asset transfer/payment, add_liquidity app call) as unsigned transactions.", "order": 0, "requiredInputs": [ "userAddress", "assetAId", "assetBId", "depositAssetId", "depositAmount", "maxSlippageBps" ], "requiredAssetIds": [ 0, 31566704 ], "inputHints": { "assetAId": 0, "assetBId": 31566704, "poolId": "tinyman:pool:1002541853" } } ], "compatibleExitShapes": [], "canEnter": true, "eligibilityFullyCheckable": true } ], "meta": { "limit": 10, "offset": 0, "includeInactive": false, "paymentRequired": true, "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "heldAssetCount": 2, "eligibilityApplied": true, "eligibilityEndpoint": "/eligibility" } } ``` ### GET /opportunities/:id/history ```json { "data": { "opportunityId": "tinyman:pool:1002541853", "window": "30d", "points": [ { "ts": "2026-08-04T12:00:00.000Z", "apy": 12.1, "tvlUsd": 2400000 }, { "ts": "2026-08-05T12:00:00.000Z", "apy": 12.4, "tvlUsd": 2425000 }, { "ts": "2026-08-06T12:00:00.000Z", "apy": 12.5, "tvlUsd": 2450000.5 } ], "stability": { "bucket": "high", "sampleCount": 3, "apyMean": 12.333333, "apyStdev": 0.208167 } }, "meta": { "paymentRequired": true, "windowSeconds": 2592000, "snapshotRetentionDays": 30, "snapshotCount": 3 } } ``` ### POST /eligibility ```json { "data": [ { "opportunityId": "reti-staking-12", "protocol": "reti", "found": true, "canEnter": true, "eligibilityFullyCheckable": true, "missingAssets": [], "gates": [], "capacity": { "stakerSlotsRemaining": 20, "algoRoomMicroAlgos": "50000000000", "acceptingStake": true }, "suggestedSwap": null, "reasons": [] } ], "meta": { "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fetchedAt": "2026-08-14T21:00:00.000Z", "paymentRequired": true, "quoteTimeAuthoritative": true } } ``` ### POST /plans ```json { "data": { "allocations": [ { "opportunityId": "reti-staking-12", "protocol": "reti", "opportunityType": "staking", "assetPair": "ALGO", "apy": 8.5, "allocatedAmount": "1000000", "allocatedAssetId": 0, "weightBps": 10000, "tvlUsd": 1000000, "sourceTimestamp": "2026-08-16T10:00:00.000Z", "executionReady": true, "eligibility": { "opportunityId": "reti-staking-12", "protocol": "reti", "found": true, "canEnter": true, "eligibilityFullyCheckable": true, "missingAssets": [], "gates": [], "capacity": { "stakerSlotsRemaining": 20, "algoRoomMicroAlgos": "50000000000", "acceptingStake": true }, "suggestedSwap": null, "reasons": [] }, "executionShapes": [ { "shapeKey": "mainnet:reti:v1:stake:algo", "protocol": "reti", "protocolVersion": "v1", "action": "stake", "variant": "algo", "title": "Réti ALGO stake to validator", "summary": "Stakes ALGO to a Réti validator.", "order": 0, "requiredInputs": [ "userAddress", "validatorId", "amount" ], "requiredAssetIds": [ 0 ], "inputHints": { "validatorId": 12, "assetId": 0, "depositAssetId": 0 } } ], "steps": [ { "kind": "eligibility", "order": 0, "compileStatus": "compiled", "warnings": [] }, { "kind": "enter", "order": 1, "compileStatus": "compiled", "shapeKey": "mainnet:reti:v1:stake:algo", "quoteRequest": { "shapeKey": "mainnet:reti:v1:stake:algo", "input": { "userAddress": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "validatorId": 12, "assetId": 0, "depositAssetId": 0, "amount": "1000000" } }, "quote": { "shapeKey": "mainnet:reti:v1:stake:algo", "shapeVersion": "1.0.0", "identity": { "network": "mainnet", "protocol": "reti", "protocolVersion": "v1", "action": "stake", "variant": "algo" }, "createdAt": "2026-08-16T10:00:00.000Z", "expiresAt": "2026-08-16T10:00:30.000Z", "transactions": [ { "type": "pay", "sender": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fee": "1000", "groupPresent": true } ], "encodedTransactions": [ "" ], "warnings": [], "metadata": {} }, "warnings": [] } ], "quotes": [ { "shapeKey": "mainnet:reti:v1:stake:algo", "input": { "userAddress": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "validatorId": 12, "assetId": 0, "depositAssetId": 0, "amount": "1000000" } } ] } ], "blocked": [], "expectedPositionDelta": { "summary": "Enter 1000000 of asset 0 into reti-staking-12 (reti).", "entries": [ { "opportunityId": "reti-staking-12", "protocol": "reti", "assetId": 0, "amount": "1000000", "action": "enter" } ] }, "fees": { "x402Usdc": "0.25", "estimatedNetworkFeeMicroAlgos": "1000", "estimatedNetworkFeeUsd": null }, "expiresAt": "2026-08-16T10:00:30.000Z", "warnings": [], "simulation": { "wouldSucceed": true, "reasons": [], "balanceDeltas": [ { "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "assetId": 0, "before": "5000000", "after": "3999000", "delta": "-1001000" } ], "expectedPositionDelta": { "summary": "Enter 1000000 of asset 0 on reti-staking-12 (reti).", "entries": [ { "opportunityId": "reti-staking-12", "protocol": "reti", "assetId": 0, "amount": "1000000", "action": "enter" } ] }, "groups": [ { "index": 0, "shapeKey": "mainnet:reti:v1:stake:algo", "opportunityId": "reti-staking-12", "wouldSucceed": true, "reasons": [], "balanceDeltas": [ { "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "assetId": 0, "before": "5000000", "after": "3999000", "delta": "-1001000" } ], "expectedPositionDelta": { "summary": "Enter 1000000 of asset 0 on reti-staking-12 (reti).", "entries": [ { "opportunityId": "reti-staking-12", "protocol": "reti", "assetId": 0, "amount": "1000000", "action": "enter" } ] } } ], "signed": false, "submitted": false } }, "meta": { "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "budget": { "assetId": 0, "amount": "1000000" }, "fetchedAt": "2026-08-16T10:00:00.000Z", "paymentRequired": true, "executionSubmitted": false, "quoteTimeAuthoritative": true, "eligibilityEndpoint": "/eligibility" } } ``` ### POST /plans/rebalance ```json { "data": { "mode": "harvest-idle", "book": { "totalUsd": null, "idleAlgoMicroAlgos": "4000000", "weights": [], "unweightedUsd": null }, "steps": [ { "kind": "eligibility", "order": 0, "compileStatus": "compiled", "warnings": [] }, { "kind": "enter", "order": 1, "compileStatus": "compiled", "shapeKey": "mainnet:reti:v1:stake:algo", "quoteRequest": { "shapeKey": "mainnet:reti:v1:stake:algo", "input": { "userAddress": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "validatorId": 12, "amount": "4000000" } }, "warnings": [] } ], "quotes": [ { "shapeKey": "mainnet:reti:v1:stake:algo", "input": { "userAddress": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "validatorId": 12, "amount": "4000000" } } ], "blocked": [], "expectedPositionDelta": { "summary": "Enter 4000000 of asset 0 on reti-staking-12 (reti).", "entries": [ { "opportunityId": "reti-staking-12", "protocol": "reti", "assetId": 0, "amount": "4000000", "action": "enter" } ] }, "fees": { "x402Usdc": "0.25", "estimatedNetworkFeeMicroAlgos": "1000", "estimatedNetworkFeeUsd": null }, "expiresAt": "2026-08-20T10:00:30.000Z", "warnings": [] }, "meta": { "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "harvestIdle": true, "fetchedAt": "2026-08-20T10:00:00.000Z", "paymentRequired": true, "executionSubmitted": false, "quoteTimeAuthoritative": true, "groupsMerged": false, "eligibilityEndpoint": "/eligibility" } } ``` ### POST /execution/compose ```json { "data": { "opportunityId": "reti-staking-12", "protocol": "reti", "opportunityType": "staking", "assetPair": "ALGO", "fromAssetId": 1, "toAssetId": 0, "inputAmount": "1000000", "enterAmount": "247500", "slippage": 1, "steps": [ { "kind": "eligibility", "order": 0, "compileStatus": "compiled", "warnings": [ "Eligibility is gated on missing required assets; swap-aware compose unblocks enter after the swap group confirms." ] }, { "kind": "opt-in", "order": 1, "compileStatus": "compiled", "shapeKey": "mainnet:swap:router:optin:required", "quote": { "shapeKey": "mainnet:swap:router:optin:required", "encodedTransactions": [ "" ], "userSignIndexes": [ 0 ], "groupTransactions": [ { "index": 0, "signer": "user", "encodedTransaction": "" } ] }, "warnings": [ "Missing opt-in: submit the opt-in group and wait for confirmation before submitting the swap group." ] }, { "kind": "swap", "order": 2, "compileStatus": "compiled", "shapeKey": "mainnet:swap:router:swap:fixed-input", "prerequisiteShapeKeys": [ "mainnet:swap:router:optin:required" ], "quote": { "shapeKey": "mainnet:swap:router:swap:fixed-input", "encodedTransactions": [ "" ], "userSignIndexes": [ 0 ], "groupTransactions": [ { "index": 0, "signer": "user", "encodedTransaction": "" }, { "index": 1, "signer": "logicsig", "encodedTransaction": "", "signedTransaction": "" } ] }, "warnings": [ "Stale quote: submit the swap group before quote.expiresAt.", "Slippage: enter is compiled with a haircut of quotedAmount; re-quote enter if the confirmed swap delivers less." ] }, { "kind": "enter", "order": 3, "compileStatus": "compiled", "shapeKey": "mainnet:reti:v1:stake:algo", "prerequisiteShapeKeys": [ "mainnet:swap:router:optin:required", "mainnet:swap:router:swap:fixed-input" ] } ], "quotes": [ { "shapeKey": "mainnet:reti:v1:stake:algo", "input": { "userAddress": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "amount": "247500" } } ], "warnings": [ "Groups stay unsigned and unmerged. Sign only user legs; preserve any pre-signed members." ] }, "meta": { "paymentRequired": true, "executionSubmitted": false, "groupsMerged": false } } ``` ### POST /execution/simulate ```json { "data": { "wouldSucceed": true, "reasons": [], "balanceDeltas": [ { "address": "RS7TLLQRXKBAQDAVTSZC2ZLMVMLNSCL3FOUOESJJZ5XSKFFL56UI6X33CI", "assetId": 0, "before": "5000000", "after": "3999000", "delta": "-1001000" } ], "expectedPositionDelta": { "summary": "Enter 1000000 of asset 0 on reti-staking-12 (reti).", "entries": [ { "opportunityId": "reti-staking-12", "protocol": "reti", "assetId": 0, "amount": "1000000", "action": "enter" } ] }, "groups": [ { "index": 0, "shapeKey": "mainnet:reti:v1:stake:algo", "opportunityId": "reti-staking-12", "wouldSucceed": true, "reasons": [], "balanceDeltas": [ { "address": "RS7TLLQRXKBAQDAVTSZC2ZLMVMLNSCL3FOUOESJJZ5XSKFFL56UI6X33CI", "assetId": 0, "before": "5000000", "after": "3999000", "delta": "-1001000" } ], "expectedPositionDelta": { "summary": "Enter 1000000 of asset 0 on reti-staking-12 (reti).", "entries": [ { "opportunityId": "reti-staking-12", "protocol": "reti", "assetId": 0, "amount": "1000000", "action": "enter" } ] } } ], "signed": false, "submitted": false }, "meta": { "address": "RS7TLLQRXKBAQDAVTSZC2ZLMVMLNSCL3FOUOESJJZ5XSKFFL56UI6X33CI", "fetchedAt": "2026-08-21T12:00:00.000Z", "paymentRequired": true, "executionSubmitted": false, "signed": false } } ``` ### POST /policy/validate ```json { "data": { "pass": true, "reasons": [], "policySchemaVersion": "1.0.0", "evaluatedAt": "2026-08-28T12:00:00.000Z", "signed": false, "submitted": false }, "meta": { "fetchedAt": "2026-08-28T12:00:00.000Z", "paymentRequired": true, "executionSubmitted": false, "signed": false, "quoteTimeAuthoritative": true } } ``` ### GET /protocols/{protocol}/opportunities ```json { "data": [ { "protocol": "reti", "opportunityType": "staking", "opportunityId": "reti-staking-12", "assetPair": "ALGO", "assetIds": [ 0 ], "apy": 8.5, "apr": 8.5, "yieldBasis": "apr", "tvlUsd": 125000.5, "sourceTimestamp": "2026-07-23T10:00:00.000Z", "fetchedAt": "2026-07-23T10:00:00.000Z", "entryRequirements": { "minAmount": { "assetId": 0, "amount": "1000000000" }, "eligibilityFullyCheckable": true }, "capacity": { "stakerSlotsRemaining": 20, "algoRoomMicroAlgos": "50000000000", "acceptingStake": true }, "notes": "Réti validator-level consensus staking; quote-time eligibility checks are authoritative.", "executionReady": true, "executionShapes": [ { "shapeKey": "mainnet:reti:v1:stake:algo", "protocol": "reti", "protocolVersion": "v1", "action": "stake", "variant": "algo", "title": "Réti ALGO stake to validator", "summary": "Stakes ALGO to a Réti validator via ValidatorRegistry.addStake. The registry allocates into one of the validator's pools. Builds gas ×2, ALGO payment to the registry, addStake, and optional reward-token opt-in. Enforces minEntryStake, capacity, and entry gates at quote time.", "order": 0, "requiredInputs": [ "userAddress", "validatorId", "amount" ], "requiredAssetIds": [ 0 ], "inputHints": { "validatorId": 12, "assetId": 0, "depositAssetId": 0 } } ], "compatibleExitShapes": [ { "shapeKey": "mainnet:reti:v1:unstake:algo", "protocol": "reti", "protocolVersion": "v1", "action": "unstake", "variant": "algo", "title": "Réti ALGO unstake from pool", "summary": "Removes ALGO stake from a Réti staking pool via StakingPool.removeStake. Builds gas ×2, removeStake, and optional reward-token opt-in. Partial unstake must leave at least minEntryStake (or unstake the full balance).", "order": 0, "requiredInputs": [ "userAddress", "validatorId", "poolAppId", "amount" ], "requiredAssetIds": [ 0 ], "inputHints": { "validatorId": 12, "assetId": 0, "depositAssetId": 0 } } ] } ], "meta": { "limit": 25, "offset": 0, "includeInactive": false, "paymentRequired": true } } ``` ### GET /execution/shapes ```json { "data": [ { "shapeKey": "mainnet:compx:v1:borrow:asa", "network": "mainnet", "protocol": "compx", "protocolVersion": "v1", "action": "borrow", "variant": "asa", "shapeVersion": "1.0.1", "title": "CompX v1 ASA lending borrow", "description": "Borrows a base ASA from a CompX lending market against accepted LST collateral. Collateral must be in the market's on-chain accepted_collaterals set (often a cross-market LST).", "summary": "Borrows a base ASA from a CompX lending market against accepted LST collateral.", "opportunityRole": "enter", "supportedOpportunityTypes": [ "lending" ], "requiredInputs": [ "userAddress", "marketAppId", "borrowAmount", "collateralAmount" ], "sources": [ { "kind": "sdk", "description": "@compx/sdk buildBorrowTransactions" } ], "docsPath": "protocol/docs/execution-shapes/compx-borrow-asa.md" }, { "shapeKey": "mainnet:compx:v1:repay:asa", "network": "mainnet", "protocol": "compx", "protocolVersion": "v1", "action": "repay", "variant": "asa", "shapeVersion": "1.0.1", "title": "CompX v1 ASA lending repay", "description": "Repays outstanding base-ASA debt on a CompX lending market. App-call fees are floored to at least 2000 microAlgos after SDK simulation.", "summary": "Repays outstanding base-ASA debt on a CompX lending market.", "opportunityRole": "exit", "supportedOpportunityTypes": [ "lending" ], "requiredInputs": [ "userAddress", "marketAppId", "amount" ], "sources": [ { "kind": "sdk", "description": "@compx/sdk buildRepayTransactions" } ], "docsPath": "protocol/docs/execution-shapes/compx-repay-asa.md" } ], "meta": { "paymentRequired": false, "shapeCount": 2, "note": "Catalog metadata only. Compile unsigned groups via paid POST /execution/quotes. Protocol construction caveats: protocol/docs/execution-shapes/protocol-caveats.md. Full catalog is larger; this sample is trimmed to CompX borrow/repay.", "caveatsDocsPath": "protocol/docs/execution-shapes/protocol-caveats.md" } } ``` ### POST /execution/quotes ```json { "data": [ { "shapeKey": "mainnet:tinyman:v2:addLiquidity:flexible", "shapeVersion": "1.0.0", "network": "mainnet", "expiresAt": "2026-07-23T12:00:30.000Z", "encodedTransactions": [ "", "" ], "transactions": [ { "type": "axfer", "sender": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fee": "1000", "groupPresent": true } ], "metadata": { "poolAddress": "TINYPQOLADDRESSPLACEHOLDERAAAAAAAAAAAAAAAAAAAAAAAAA" }, "warnings": [] } ], "meta": { "paymentRequired": true, "executionSubmitted": false, "quoteCount": 1, "note": "Unsigned groups only. Sign and submit locally; Canix never receives wallet keys." } } ``` ### GET /protocols/haystack/launches ```json { "data": { "launchedAfter": "2026-08-06T21:50:00.000Z", "launchedBefore": "2026-10-05T21:50:00.000Z", "order": "desc", "total": 1, "launches": [ { "tokenNum": 175, "assetId": 3729195158, "name": "LENIN", "symbol": "LENIN", "assetUrl": "ipfs://bafkreiexample", "creator": "LOLJKAN3NMRMAWAPYKQOEJPVM37KKZCMM7DMGOU2CWN45RKSDZB6QAKSMI", "bondingTokenId": 0, "launchedAt": "2026-10-02T22:56:32.000Z", "progressPercent": 12.5, "priceBonding": "0.000001", "priceUsd": "0.000002", "realTokenReserves": "700000000000000", "realBondingReserves": "5000000", "initialRealTokenReserves": "800000000000000", "bondingTargetUsd": "2500000000", "priceMultiplier": "20", "buyShapeKey": "mainnet:haystack:v1:buy:bonding" } ] }, "meta": { "paymentRequired": true, "shapeKey": "mainnet:haystack:v1:buy:bonding" } } ``` ### GET /protocols/haystack/launches/{tokenNum} ```json { "data": { "tokenNum": 175, "assetId": 3729195158, "name": "LENIN", "symbol": "LENIN", "assetUrl": "ipfs://bafkreiexample", "description": "", "socialWebsite": "", "socialX": "", "socialTelegram": "", "socialDiscord": "", "creator": "LOLJKAN3NMRMAWAPYKQOEJPVM37KKZCMM7DMGOU2CWN45RKSDZB6QAKSMI", "bondingTokenId": 0, "bondingOn": 0, "phase": "bonding", "progressPercent": 12.5, "priceBonding": "0.000001", "priceUsd": "0.000002", "realTokenReserves": "700000000000000", "realBondingReserves": "5000000", "initialRealTokenReserves": "800000000000000", "virtualTokenReserves": "1000000000000000", "virtualBondingReserves": "1000000000", "bondingTargetUsd": "2500000000", "priceMultiplier": "20", "poolAppId": 0, "lpTokenId": 0, "buyShapeKey": "mainnet:haystack:v1:buy:bonding", "userHolding": null, "note": null }, "meta": { "paymentRequired": false } } ``` ### GET /positions ```json { "data": [ { "protocol": "tinyman", "positionType": "lp", "positionId": "tinyman:lp:1002541853", "opportunityId": "tinyman:pool:1002541853", "assetId": 1002541853, "assetSymbol": "TMPOOL2", "amountRaw": "1250000", "amount": "1.250000", "usdValue": 42.5, "compatibleExitShapeKeys": [ "mainnet:tinyman:v2:removeLiquidity:multipleAssetsOut", "mainnet:tinyman:v2:removeLiquidity:singleAssetOut" ], "compatibleManageShapeKeys": [], "inputHints": { "assetAId": 0, "assetBId": 31566704, "poolId": "1002541853" } }, { "protocol": "compx", "positionType": "debt", "positionId": "compx:debt:3491050310", "opportunityId": "compx-lending-3491050310", "assetId": 31566704, "assetSymbol": "USDC", "amountRaw": "250000", "amount": "0.250000", "usdValue": 0.25, "healthFactor": 1.8, "compatibleExitShapeKeys": [ "mainnet:compx:v1:repay:asa" ], "compatibleManageShapeKeys": [], "notes": "Locked collateral 500000 of asset 3491050311 (LST units).", "inputHints": { "marketAppId": 3491050310, "assetId": 31566704 } } ], "meta": { "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fetchedAt": "2026-08-05T12:00:00.000Z", "paymentRequired": true } } ``` ### GET /positions/claimable ```json { "data": [ { "protocol": "haystack", "positionId": "haystack:reward:3321763884:usdc", "opportunityId": "haystack-staking-hay", "positionType": "reward", "assetId": 31566704, "assetSymbol": "USDC", "amountRaw": "1500000", "amount": "1.500000", "usdValue": 1.5, "claimKey": "haystack:claim:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ", "compatibleClaimShapeKeys": [ "mainnet:haystack:v1:claim:rewards" ], "quote": { "shapeKey": "mainnet:haystack:v1:claim:rewards", "input": { "userAddress": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ" } }, "estimatedNetworkFeeMicroAlgos": "5000", "estimatedNetworkFeeUsd": 0.001, "worthClaiming": true, "caveats": [ "Pending USDC from staker box; live accrual may be higher until the next drip/claim." ] }, { "protocol": "haystack", "positionId": "haystack:reward:3321763884:hay", "opportunityId": "haystack-staking-hay", "positionType": "reward", "assetId": 3160000000, "assetSymbol": "HAY", "amountRaw": "25000000", "amount": "25.000000", "usdValue": 0.5, "claimKey": "haystack:claim:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ", "compatibleClaimShapeKeys": [ "mainnet:haystack:v1:claim:rewards" ], "quote": { "shapeKey": "mainnet:haystack:v1:claim:rewards", "input": { "userAddress": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ" } }, "estimatedNetworkFeeMicroAlgos": "5000", "estimatedNetworkFeeUsd": 0.001, "worthClaiming": true } ], "meta": { "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ", "fetchedAt": "2026-08-13T12:00:00.000Z", "algoUsd": 0.2, "paymentRequired": true } } ``` ### POST /swaps/quote ```json { "data": { "router": "hogswap", "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fromAssetId": "0", "toAssetId": "31566704", "amount": "1000000", "type": "fixed-input", "quotedAmount": "185000", "minOut": "183150", "networkFeeMicroAlgos": "5000", "slippageBps": 100, "createdAt": "2026-07-30T12:00:00.000Z", "expiresAt": "2026-07-30T12:00:30.000Z", "score": { "expectedNetOut": "185000", "minOut": "183150", "expectedIn": "1000000", "maxIn": "1000000", "networkFeeMicroAlgos": "5000", "feeAlreadyNetted": true }, "alternatives": [ { "router": "haystack", "status": "quoted", "expectedNetOut": "180000", "minOut": "178200", "networkFeeMicroAlgos": "0" }, { "router": "hogswap", "status": "quoted", "expectedNetOut": "185000", "minOut": "183150", "networkFeeMicroAlgos": "5000" } ], "legs": [ { "protocol": "stamm", "poolId": "1002541853" } ], "payload": { "note": "opaque winner quote; pass unchanged" }, "note": "Pass this quote object unchanged to /swaps/optin and /swaps/transactions. Refresh after any opt-in submit." }, "meta": { "paymentRequired": false, "executionSubmitted": false } } ``` ### POST /swaps/optin ```json { "data": { "required": true, "transactions": [ { "type": "axfer", "note": "asset opt-in for toAssetId", "encoded": "" }, { "type": "appl", "note": "application opt-in for requiredAppOptIns[0]", "encoded": "" } ], "userSignIndexes": [ 0, 1 ], "createdAt": "2026-07-30T12:00:05.000Z", "expiresAt": "2026-07-30T12:02:00.000Z" }, "meta": { "paymentRequired": false, "executionSubmitted": false, "note": "Empty transactions[] means no opt-ins are missing. Sign and submit locally, then fetch a fresh quote before /swaps/transactions." } } ``` ### POST /swaps/transactions ```json { "data": { "router": "hogswap", "transactions": [ { "index": 0, "encodedTransaction": "", "signer": "user" }, { "index": 1, "encodedTransaction": "", "signer": "protocol" }, { "index": 2, "encodedTransaction": "", "signer": "user" } ], "userSignIndexes": [ 0, 2 ], "createdAt": "2026-07-30T12:00:30.000Z", "quoteExpiresAt": "2026-07-30T12:00:30.000Z", "note": "Sign only userSignIndexes members. Preserve pre-signed members and atomic group order. Submit the complete group via your own Algod client." }, "meta": { "paymentRequired": true, "executionSubmitted": false } } ``` ### GET /watch/{watchId} ```json { "data": { "uri": "canix://watch/cwatch_demo", "watchId": "cwatch_demo", "address": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ", "thresholds": { "healthFactor": 1.25, "claimableUsd": 8, "apyDropBps": 100, "retiCapacity": true }, "webhookUrl": "https://hooks.example/canix", "createdAt": "2026-09-03T12:00:00.000Z", "expiresAt": "2026-09-04T12:00:00.000Z", "ttlSeconds": 86400, "status": "active", "firings": [ { "firingId": "wfire_demo", "idempotencyKey": "wfire_cwatch_demo_healthFactor_wep_demo", "kind": "healthFactor", "firedAt": "2026-09-03T12:05:00.000Z", "threshold": 1.25, "previous": 1.4, "current": 1.1, "delivered": true, "deliveryStatus": "delivered" } ] }, "meta": { "paymentRequired": false, "access": "receipt", "receiptUri": "canix://watch/cwatch_demo", "secretShown": false } } ``` ## Trust and disclaimer Informational market data only — not financial, investment, tax, or legal advice. Data may be delayed or inaccurate; DeFi protocols carry smart-contract and market risk. API access fees paid via x402 are generally non-refundable. See https://canix402.compx.io/terms for full terms. Contact: kieran@neonforge.ltd