{"openapi":"3.1.0","info":{"title":"canix402 API","version":"1.0.0","description":"x402-gated DeFi data and walletless transaction API, including best price swaps, Haystack Launch bonding reads, prerequisite opt-ins, and paid atomic swap-group generation. Numeric yield/USD fields (apy, apr, tvlUsd) are returned with a standard precision of 6 decimal places, extended up to 12 decimal places only when needed to represent small non-zero values. Asset decimals are always sourced on-chain from algod. pragma: allowlist secret","contact":{"name":"Neon Forge Ltd","email":"kieran@neonforge.ltd","url":"https://canix402.compx.io"},"x-guidance":"Use the gateway base URL in servers[0]. Fetch /discovery and /openapi.json before integrating. Prefer the remote canix402 MCP server at https://canix402-mcp.compx.io/mcp (streamable-http, walletless pass-through) for agent tool access. Agents may use Algorand, Base, or both. Paid routes return HTTP 402 with PAYMENT-REQUIRED. Select an accept by network. Algorand is first and a complete payment (USDC ASA transfer). Base (eip155:8453) is optional EIP-3009 USDC at the same price. Omitting a Base address does not change rank, eligibility, price, or access. A Base address is required only for a Morpho, Aave, or Aerodrome quote, or a Base payment. Retry with PAYMENT-SIGNATURE. Best price swaps follow quote -> opt-in if needed -> fresh quote -> paid transaction generation -> local signing/submission. Haystack Launch: paid GET /protocols/haystack/launches lists tokens still bonding; free GET /protocols/haystack/launches/{tokenNum} reads one token; launch and bonding buys compile at POST /execution/quotes (mainnet:haystack:v1:launch:token, mainnet:haystack:v1:buy:bonding). Human and LLM docs: https://canix402.compx.io/llms.txt pragma: allowlist secret","x-precision":{"fields":["apy","apr","tvlUsd"],"defaultDecimalPlaces":6,"maxDecimalPlaces":12,"notes":"Values are rounded to 6 decimal places by default; precision is extended up to 12 decimal places when 6 would collapse a small non-zero value to zero."}},"servers":[{"url":"https://canix402-api.compx.io"}],"x-discovery":{"docsUrl":"https://canix402.compx.io/x402","llmsTxtUrl":"https://canix402.compx.io/llms.txt","mcpInstall":"https://canix402.compx.io/x402#mcp","mcpUrl":"https://canix402-mcp.compx.io/mcp","mcpTransport":"streamable-http"},"paths":{"/":{"get":{"summary":"API root branding and social metadata page","tags":["system","discovery"],"security":[],"responses":{"200":{"description":"HTML landing page with logo, banner, title, description, and social metadata","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"summary":"Service health check","tags":["system"],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"},"examples":{"default":{"$ref":"#/components/examples/HealthResponseSample"}}}}}}}},"/ready":{"get":{"summary":"Service readiness check (Algod required; Redis soft)","tags":["system"],"security":[],"responses":{"200":{"description":"Ready or degraded (Algod reachable)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadyResponse"},"examples":{"default":{"$ref":"#/components/examples/ReadyResponseSample"}}}}},"503":{"description":"Not ready (Algod unreachable)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadyResponse"}}}}}}},"/metrics":{"get":{"summary":"Prometheus metrics scrape endpoint (internal)","description":"Prometheus text exposition format. Intended for internal scrapes on the protocol component (:3000). Not exposed on the public Caddy gateway.","tags":["system","observability"],"security":[],"responses":{"200":{"description":"Prometheus metrics","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/metadata":{"get":{"summary":"Service metadata and policy surface","tags":["system","discovery"],"security":[],"responses":{"200":{"description":"Metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataResponse"},"examples":{"default":{"$ref":"#/components/examples/MetadataResponseSample"}}}}}}}},"/discovery":{"get":{"summary":"Machine-readable endpoint catalog for agents","tags":["discovery","agents"],"security":[],"responses":{"200":{"description":"Discovery document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoveryResponse"},"examples":{"default":{"$ref":"#/components/examples/DiscoveryResponseSample"}}}}}}}},"/openapi.json":{"get":{"summary":"OpenAPI contract document","tags":["discovery","openapi"],"security":[],"responses":{"200":{"description":"OpenAPI JSON","content":{"application/json":{"schema":{"type":"object","description":"This OpenAPI 3.1 document."}}}}}}},"/favicon.ico":{"get":{"summary":"API favicon for directory indexing","tags":["system","discovery"],"security":[],"responses":{"200":{"description":"Favicon image","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}}}}},"/favicon.png":{"get":{"summary":"API favicon image","tags":["system","discovery"],"security":[],"responses":{"200":{"description":"Favicon image","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}}}}},"/logo.png":{"get":{"summary":"Service logo for directory and social indexing","tags":["system","discovery"],"security":[],"responses":{"200":{"description":"Service logo image","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}}}}},"/banner.png":{"get":{"summary":"Service banner for directory and social indexing","tags":["system","discovery"],"security":[],"responses":{"200":{"description":"Service banner image","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}}}}},"/.well-known/x402.json":{"get":{"summary":"x402 discovery manifest for agent and directory indexing","tags":["discovery","agents","x402"],"security":[],"responses":{"200":{"description":"x402 discovery manifest","content":{"application/json":{"schema":{"type":"object","required":["service","name","version","description","x402Version","docsUrl","llmsTxtUrl","openapiUrl","discoveryUrl","logoUrl","bannerUrl","facilitator","chains","resources"],"properties":{"service":{"type":"string","const":"canix402"},"name":{"type":"string","const":"canix402"},"version":{"type":"string"},"description":{"type":"string"},"x402Version":{"type":"integer","const":2},"docsUrl":{"type":"string","format":"uri"},"llmsTxtUrl":{"type":"string","format":"uri"},"openapiUrl":{"type":"string","format":"uri"},"discoveryUrl":{"type":"string","format":"uri"},"logoUrl":{"type":"string","format":"uri"},"bannerUrl":{"type":"string","format":"uri"},"facilitator":{"type":"string","format":"uri"},"chains":{"type":"array","items":{"type":"object","properties":{"namespace":{"type":"string","const":"algorand"},"network":{"type":"string"},"assets":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string","const":"USDC"},"assetId":{"type":"string"},"decimals":{"type":"integer","const":6}}}}}}},"resources":{"type":"array","items":{"type":"object","required":["id","method","path","url","description","price","x402"],"properties":{"id":{"type":"string"},"method":{"type":"string","enum":["GET","POST"]},"path":{"type":"string"},"url":{"type":"string","format":"uri"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"price":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string","const":"USDC"},"network":{"type":"string"},"asset":{"type":"string"}}},"x402":{"type":"object"}}}}}},"examples":{"default":{"$ref":"#/components/examples/X402ManifestSample"}}}}}}}},"/.well-known/x402":{"get":{"summary":"x402 discovery fan-out document","tags":["discovery","agents","x402"],"security":[],"responses":{"200":{"description":"Paid resource URL list for directory registration","content":{"application/json":{"schema":{"type":"object","required":["version","resources"],"properties":{"version":{"type":"integer","const":1},"resources":{"type":"array","items":{"type":"string","format":"uri"}}}}}}}}}},"/opportunities":{"get":{"summary":"Top 10 aggregated DeFi opportunities ranked by risk then APY","description":"Returns ranked DeFi yield opportunities across supported chains (Algorand and Base). Each row includes chain. Default list mixes Algorand venues with Morpho Vaults, Aave V3 reserves, and Aerodrome basic-pool farms on Base. Filter with protocol= or chain=algorand|base. This endpoint provides normalized market data only; it does not build or submit transactions.","tags":["defi","opportunities"],"parameters":[{"name":"protocol","in":"query","schema":{"type":"string"}},{"name":"chain","in":"query","schema":{"type":"string","enum":["algorand","base"]},"description":"Omit to include every supported chain."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":10}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}},{"name":"includeInactive","in":"query","schema":{"type":"boolean"}},{"name":"refresh","in":"query","description":"Bypass Redis and refetch adapters; still writes a fresh cache entry. Default false.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/CanixSessionHeader"}],"responses":{"200":{"description":"Opportunity list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunitiesListResponse"},"examples":{"default":{"$ref":"#/components/examples/AggregateOpportunitiesSample"}}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.01"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.01"}]}}},"/opportunities/search":{"get":{"summary":"Caller-filtered opportunities across supported platforms","description":"Returns DeFi opportunities filtered by platform, chain (algorand|base), opportunity type, APY range, TVL threshold, and optional ASA assetIds. Base Morpho, Aave, and Aerodrome rows use assetAddresses instead of assetIds. This endpoint provides normalized market data only; it does not build or submit transactions.","tags":["defi","opportunities","search"],"parameters":[{"name":"platform","in":"query","schema":{"type":"string","description":"Comma-separated list of platforms."}},{"name":"chain","in":"query","schema":{"type":"string","enum":["algorand","base"]},"description":"Omit to include every supported chain."},{"name":"type","in":"query","schema":{"type":"string","description":"Comma-separated list of opportunity types."}},{"name":"minApy","in":"query","schema":{"type":"number"}},{"name":"maxApy","in":"query","schema":{"type":"number"}},{"name":"minTvlUsd","in":"query","schema":{"type":"number","minimum":0}},{"name":"assetIds","in":"query","description":"Comma-separated Algorand ASA ids (0 = ALGO). Keeps opportunities whose assetIds intersect any requested id. Rows without assetIds do not match when this filter is set.","schema":{"type":"string","example":"0,31566704"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}},{"name":"includeInactive","in":"query","schema":{"type":"boolean"}},{"name":"refresh","in":"query","description":"Bypass Redis and refetch adapters; still writes a fresh cache entry. Default false.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/CanixSessionHeader"}],"responses":{"200":{"description":"Filtered opportunity list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunitiesListResponse"},"examples":{"default":{"$ref":"#/components/examples/FilteredOpportunitiesSample"}}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.01"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.01"}]}}},"/opportunities/personalized":{"get":{"summary":"Top opportunities tuned to a wallet's held assets","description":"Returns Algorand DeFi opportunities whose underlying assets match a supplied wallet's holdings, including opted-in ASAs with positive balance and native ALGO when held. Matching applies POST /eligibility rules (min amount, ASA gates, capacity, unresolved NFD/creator gates) so full or gated venues are not recommended as enterable. Each row includes canEnter and eligibilityFullyCheckable; quote-time on-chain checks remain authoritative. Use POST /eligibility for the diagnostic (missingAssets, gates, capacity, suggestedSwap). This endpoint provides normalized market data only; it does not build or submit transactions.","x-pragma":"pragma: allowlist secret","tags":["defi","opportunities","personalized","wallet"],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string"},"description":"Algorand account address to personalize opportunities for."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":10}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}},{"name":"includeInactive","in":"query","schema":{"type":"boolean"}},{"name":"refresh","in":"query","description":"Bypass Redis and refetch adapters; still writes a fresh cache entry. Default false.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/CanixSessionHeader"}],"responses":{"200":{"description":"Personalized opportunity list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonalizedOpportunitiesListResponse"},"examples":{"default":{"$ref":"#/components/examples/PersonalizedOpportunitiesSample"}}}}},"400":{"$ref":"#/components/responses/InvalidAddress"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.05"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.05"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.05"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.05"}]}}},"/opportunities/{opportunityId}/history":{"get":{"summary":"Bounded APY/TVL history for one opportunity","description":"Returns a rolling APY and TVL series for one opportunity over a bounded window (1d, 7d, or 30d). Snapshots are stored as cheap hourly Redis buckets for ~30 days only — not a warehouse and not backfilled from explorers. The series is empty until the snapshot job has run. Includes a stability signal (APY stdev / sample count) so snapshot APY cannot dominate plan sizing. Market data only; Canix does not sign or submit transactions.","tags":["defi","opportunities","history"],"parameters":[{"name":"opportunityId","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"Stable opportunity identifier from catalog rows."},{"name":"window","in":"query","schema":{"type":"string","enum":["1d","7d","30d"],"default":"30d"},"description":"Bounded lookback window. Default 30d."},{"$ref":"#/components/parameters/CanixSessionHeader"}],"responses":{"200":{"description":"Bounded APY/TVL series. points is empty when no snapshots exist yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunityHistoryResponse"},"examples":{"default":{"$ref":"#/components/examples/OpportunityHistorySample"}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.01"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"[REDACTED]","asset":"[REDACTED]","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},"accepts":[{"scheme":"exact","network":"[REDACTED]","asset":"[REDACTED]","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.01"}]}}},"/eligibility":{"post":{"summary":"Wallet eligibility and capacity for selected opportunities","description":"Checks whether a wallet can enter one or more opportunities before requesting an execution quote. Resolves Réti entryRequirements and capacity (min amount, ASA gates, staker slots, ALGO room). NFD and creator gates are published as unresolved — canEnter is never true until eligibilityFullyCheckable is true. Returns missingAssets, gates, capacity, and an optional suggestedSwap hint (not a live quote). Quote-time on-chain checks remain authoritative. Canix does not sign or submit transactions.","tags":["defi","opportunities","eligibility","wallet"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EligibilityRequest"},"examples":{"default":{"$ref":"#/components/examples/EligibilityRequestSample"}}}}},"responses":{"200":{"description":"Eligibility diagnostics for the requested opportunities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EligibilityResponse"},"examples":{"default":{"$ref":"#/components/examples/EligibilitySample"}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.01"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","x-pragma-network":"pragma: allowlist secret","asset":"31566704","x-pragma-asset":"pragma: allowlist secret","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.01"}]},"parameters":[{"$ref":"#/components/parameters/CanixSessionHeader"}]}},"/plans":{"post":{"summary":"Compile an allocation intent into an ordered unsigned plan","description":"Agent states an allocation intent (address, budget/asset, constraints such as max protocol weight, no new borrows, execution-ready only, TVL/freshness floors). Canix returns ordered steps: eligibility, optional live multi-router swap compose (opt-in → swap → enter, driven by requiredAssetIds), protocol setup chains, and enter quotes as independent unsigned groups (never merged). Reuses quotes[] / order / prerequisiteShapeKeys. Includes expected position delta, x402 + network fee totals, and expiry. Quote-time on-chain checks remain authoritative. Canix does not sign or submit. Brownie and other agents should consume POST /plans rather than forking a compiler.","tags":["defi","plans","execution","eligibility","wallet"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRequest"},"examples":{"default":{"$ref":"#/components/examples/PlanRequestSample"}}}}},"responses":{"200":{"description":"Ordered unsigned plan with eligibility, quotes[], and fee totals","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanResponse"},"examples":{"default":{"$ref":"#/components/examples/PlanSample"}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.25"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","x-pragma-network":"pragma: allowlist secret","asset":"31566704","x-pragma-asset":"pragma: allowlist secret","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.25"}]},"parameters":[{"$ref":"#/components/parameters/CanixSessionHeader"}]}},"/plans/rebalance":{"post":{"summary":"Compile a delta rebalance plan of unsigned groups","description":"Positions are the book; opportunities are the menu. Pass address plus targetWeights (bps summing to 10000) and/or harvestIdle to claim worth-claiming rewards and redeploy idle ALGO. Returns ordered unsigned groups — claims, partial exits, optional multi-router swap compose, and enters — only the delta legs that change the book (not a full unwind-and-rebuild). Reuses claim desk, eligibility, compose, and position exit/manage shapeKeys. Groups are never merged. Canix does not sign or submit.","tags":["defi","plans","rebalance","execution","eligibility","wallet"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RebalanceRequest"},"examples":{"default":{"$ref":"#/components/examples/RebalanceRequestSample"}}}}},"responses":{"200":{"description":"Ordered unsigned delta plan with claims, exits, and enters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RebalanceResponse"},"examples":{"default":{"$ref":"#/components/examples/RebalanceSample"}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.25"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","x-pragma-network":"pragma: allowlist secret","asset":"31566704","x-pragma-asset":"pragma: allowlist secret","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.25"}]},"parameters":[{"$ref":"#/components/parameters/CanixSessionHeader"}]}},"/policy/validate":{"post":{"summary":"Validate a compiled plan or quotes[] against an operator policy document","description":"Operators bring policy; Canix evaluates a compiled plan (or proposed quotes[]) against a versioned policy document (max protocol weight, ALGO reserve floor, TVL/freshness floors, no-new-borrows, execution-ready only). Returns { pass, reasons[] }. Reuses plan/eligibility/risk fields already on the compiled object and fails closed when a required field is missing — it does not re-quote on-chain. Canix does not sign or submit. Brownie and a second agent can share the same schema (protocol/docs/policy-schema.md).","tags":["defi","policy","plans","execution","x402","agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyValidateRequest"},"examples":{"default":{"$ref":"#/components/examples/PolicyValidateRequestSample"}}}}},"responses":{"200":{"description":"Machine-readable pass/fail; never signed or submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyValidateResponse"},"examples":{"default":{"$ref":"#/components/examples/PolicyValidateSample"}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.25"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"[REDACTED]","x-pragma-network":"pragma: allowlist secret","asset":"[REDACTED]","x-pragma-asset":"pragma: allowlist secret","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},"accepts":[{"scheme":"exact","network":"[REDACTED]","asset":"[REDACTED]","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.25"}]},"parameters":[{"$ref":"#/components/parameters/CanixSessionHeader"}]}},"/positions":{"get":{"summary":"DeFi positions held by an Algorand or Base wallet","description":"Returns normalized DeFi positions for a wallet. An Algorand address is read across Algorand protocols, including Mallow open perps (close with mainnet:mallow:v1:close:market) and resting orders (cancel with mainnet:mallow:v1:cancelOrder:resting, including an orphaned take-profit or stop-loss). LP tokens indexed by HOGSWAP (STAMM, AlgoFi, Humble) are valued via GET /lp/{asset_id}?amount= — proportional NAV, null rather than guessed. Tinyman and Pact LP collectors remain canonical for those venues (no double-count by LP ASA). A Base 0x address returns Aave V3 supply and variable debt plus staked Aerodrome basic-pool LP. Unclaimed AERO is omitted. This endpoint provides position data only; it does not build or submit transactions.","x-pragma":"pragma: allowlist secret","tags":["defi","positions","wallet"],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string"},"description":"Algorand account address whose DeFi positions should be returned."},{"$ref":"#/components/parameters/CanixSessionHeader"}],"responses":{"200":{"description":"Wallet position list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletPositionsResponse"}}}},"400":{"$ref":"#/components/responses/InvalidAddress"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.005"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.005"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.005"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.005"}]}}},"/positions/claimable":{"get":{"summary":"Claimable DeFi rewards across supported protocols","description":"Returns claimable reward rows for a wallet with USD value, network-fee / worth-claiming hints, compatible claim shapeKeys, and ready-to-POST quote inputs. Use claimAllQuotes (or selected per-row quotes) with POST /execution/quotes to compile unsigned claim groups — groups are never merged. Covers Tinyman farm, stALGO TINY claim, CompX staking, Pact farm, Haystack, and Alpha Arcade. This endpoint does not build or submit transactions.","tags":["defi","positions","rewards","wallet","execution"],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string"},"description":"Algorand account address whose claimable rewards should be returned."},{"$ref":"#/components/parameters/CanixSessionHeader"}],"responses":{"200":{"description":"Claimable rewards desk","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimableRewardsResponse"},"examples":{"default":{"$ref":"#/components/examples/ClaimableRewardsSample"}}}}},"400":{"$ref":"#/components/responses/InvalidAddress"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.001"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.001"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.001"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.001"}]}}},"/public/agents/brownie/positions":{"get":{"summary":"Public DeFi positions for the Brownie Bot showcase wallet","description":"Free showcase route that returns normalized DeFi positions for the Brownie Bot treasury wallet only. The wallet address is hardcoded server-side — this is not a general free /positions browser. Use GET /positions?address= for arbitrary wallets (paid).","tags":["defi","positions","agents","showcase"],"security":[],"responses":{"200":{"description":"Brownie Bot wallet position list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletPositionsResponse"}}}},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/InternalError"}}}},"/protocols/{protocol}/opportunities":{"get":{"summary":"Top 25 DeFi opportunities for a single protocol ranked by risk then APY","description":"Returns ranked DeFi opportunities for one protocol including morpho (Base listed Morpho Vaults), aave (Aave V3 Base reserves), and aerodrome (basic volatile and stable pools with a live gauge). This endpoint provides normalized market data only; it does not build or submit transactions.","x-pragma":"pragma: allowlist secret","tags":["defi","opportunities","protocol"],"parameters":[{"name":"protocol","in":"path","required":true,"schema":{"type":"string","enum":["tinyman","pact","folks-finance","compx","dorkfi","myth-finance","haystack","reti","alpha-arcade","stamm","morpho","aave","aerodrome"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0}},{"name":"includeInactive","in":"query","schema":{"type":"boolean"}},{"name":"refresh","in":"query","description":"Bypass Redis and refetch adapters; still writes a fresh cache entry. Default false.","schema":{"type":"boolean","default":false}},{"$ref":"#/components/parameters/CanixSessionHeader"}],"responses":{"200":{"description":"Protocol opportunity list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpportunitiesListResponse"},"examples":{"default":{"$ref":"#/components/examples/ProtocolOpportunitiesSample"}}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.01"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.01"}]}}},"/protocols/mallow/markets":{"get":{"summary":"Mallow ALGO and BTC perpetual market snapshot","description":"Returns the live ALGO/USD and BTC/USD index, max leverage, USDC collateral asset, and Mallow's 3 bps builder fee. A missing pair fails that row only. Catalog data for mainnet:mallow:v1:openLimit:attached — compile the unsigned order with POST /execution/quotes. Positions settle on People's Exchange.","tags":["mallow","perps","discovery","agents"],"security":[],"responses":{"200":{"description":"ALGO and BTC market snapshot","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["markets","collateralAssetId","builderFeeBps","shapeKey"],"properties":{"markets":{"type":"array","items":{"type":"object","required":["market","status","symbol","marketId","indexPriceUsd","maxLeverage","collateralAssetId","builderFeeBps","shapeKey","reason"],"properties":{"market":{"type":"string","enum":["ALGO","BTC"]},"status":{"type":"string","enum":["ok","unavailable"]},"symbol":{"type":["string","null"]},"marketId":{"type":["string","null"]},"indexPriceUsd":{"type":["string","null"]},"maxLeverage":{"type":["integer","null"]},"collateralAssetId":{"type":"integer"},"builderFeeBps":{"type":"integer"},"shapeKey":{"type":"string"},"reason":{"type":["string","null"]}}}},"collateralAssetId":{"type":"integer"},"builderFeeBps":{"type":"integer"},"shapeKey":{"type":"string"}}}}}}}}}}},"/protocols/mallow/positions":{"get":{"summary":"Mallow ALGO and BTC perpetual positions for one wallet","description":"Returns open ALGO/USD and BTC/USD positions that post USDC, including positionId for mainnet:mallow:v1:close:market. Other markets are omitted. An unknown address returns an empty list. Compile the unsigned close with POST /execution/quotes.","tags":["mallow","perps","discovery","agents"],"security":[],"parameters":[{"name":"address","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Open ALGO and BTC positions","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["positions","collateralAssetId","shapeKey"],"properties":{"positions":{"type":"array","items":{"type":"object","required":["positionId","market","side","sizeUsd","collateralAmount","shapeKey"],"properties":{"positionId":{"type":"string"},"market":{"type":"string","enum":["ALGO","BTC"]},"side":{"type":"string","enum":["long","short"]},"sizeUsd":{"type":"string"},"collateralAmount":{"type":"string"},"shapeKey":{"type":"string"}}}},"collateralAssetId":{"type":"integer"},"shapeKey":{"type":"string"}}}}}}}}}}},"/protocols/haystack/launches":{"get":{"summary":"Haystack tokens still on the bonding curve","description":"Returns HayLaunch tokens with bondingOn = 0 inside a launch-date window. The default window is the last 60 days when launchedAfter is omitted. q is a case-insensitive name or ticker substring. minProgress and maxProgress are inclusive bonding percents from 0 to 100. order is asc or desc on bonding percent (default desc). Each row includes the buy shape key mainnet:haystack:v1:buy:bonding. Compile that buy, or mainnet:haystack:v1:launch:token, with POST /execution/quotes. Example: GET /protocols/haystack/launches?q=len&minProgress=10&maxProgress=90&order=desc&limit=25.","tags":["haystack","launch","discovery","x402","agents"],"parameters":[{"name":"q","in":"query","description":"Case-insensitive name or ticker substring.","schema":{"type":"string","maxLength":64}},{"name":"minProgress","in":"query","description":"Inclusive minimum bonding percent, 0 to 100.","schema":{"type":"number","minimum":0,"maximum":100}},{"name":"maxProgress","in":"query","description":"Inclusive maximum bonding percent, 0 to 100.","schema":{"type":"number","minimum":0,"maximum":100}},{"name":"order","in":"query","description":"Sort by bonding percent. Default desc.","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"launchedAfter","in":"query","description":"ISO timestamp. Defaults to 60 days before launchedBefore.","schema":{"type":"string","format":"date-time"}},{"name":"launchedBefore","in":"query","description":"ISO timestamp. Defaults to now.","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"$ref":"#/components/parameters/CanixSessionHeader"}],"responses":{"200":{"description":"Bonding HayLaunch tokens","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["launchedAfter","launchedBefore","order","total","launches"],"properties":{"launchedAfter":{"type":"string"},"launchedBefore":{"type":"string"},"order":{"type":"string","enum":["asc","desc"]},"total":{"type":"integer"},"launches":{"type":"array","items":{"$ref":"#/components/schemas/HaystackLaunchRow"}}}},"meta":{"type":"object","properties":{"paymentRequired":{"type":"boolean"},"shapeKey":{"type":"string","example":"mainnet:haystack:v1:buy:bonding"}}}}},"example":{"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"}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.01"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.01"}]}}},"/protocols/haystack/launches/{tokenNum}":{"get":{"summary":"One Haystack launch bonding status","description":"Returns one HayLaunch token box: phase, progress, price, reserves, and pool ids after graduation. Pass tokenNum, or assetId once the asset map exists (after the first buy). Optional address adds that wallet's virtual userHoldings. A graduated token points at POST /swaps/quote instead of the bonding buy. Example: GET /protocols/haystack/launches/175 or GET /protocols/haystack/launches/0?assetId=3729195158.","tags":["haystack","launch","discovery","agents"],"security":[],"parameters":[{"name":"tokenNum","in":"path","required":true,"description":"HayLaunch token number. Use 0 when resolving by assetId.","schema":{"type":"string"}},{"name":"assetId","in":"query","description":"ASA id. Wins over tokenNum after the first buy, when the asset map box exists.","schema":{"type":"string"}},{"name":"address","in":"query","description":"Algorand address. Adds virtual userHolding for this token.","schema":{"type":"string","minLength":58,"maxLength":58}}],"responses":{"200":{"description":"One HayLaunch token","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/HaystackLaunchDetail"},"meta":{"type":"object","properties":{"paymentRequired":{"type":"boolean"}}}}},"example":{"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}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/execution/shapes":{"get":{"summary":"List verified execution shape catalog metadata","description":"Returns the live catalog of verified transaction shapes (shapeKey, requiredInputs, opportunityRole, docsPath). meta.caveatsDocsPath points at protocol-specific construction caveats. Catalog metadata only — does not compile quotes or return unsigned transactions. Use POST /execution/quotes to compile executable groups. Do not guess pool discovery, opt-ins, min-balance, slippage, liquidity limits, or app upgrades. Read protocol/docs/execution-shapes/protocol-caveats.md (GET /execution/shapes meta.caveatsDocsPath) and each shape's docsPath.","tags":["execution","discovery","agents"],"security":[],"responses":{"200":{"description":"Execution shape catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionShapesListResponse"}}}}}}},"/execution/quotes":{"post":{"summary":"Compile verified transaction shapes into unsigned Algorand groups or Base calldata","description":"Accepts `{ quotes: [{ shapeKey, input }, ...] }` (min 1) and returns an array of fresh, validated, unsigned transaction groups in request order. Groups are never merged across quotes. On failure the whole request fails and error.details includes quoteIndex and shapeKey. Price is flat per request (not per quote item). Use when an agent has selected one or more DeFi actions and needs deterministic transaction bytes to sign locally. Currently supports all five Tinyman v2 LP shapes (flexible/initial/single-asset add; multiple-assets-out/single-asset-out remove), Tinyman v2 swap shapes (swap:fixedInput / swap:fixedOutput via Tinyman Swap Router, falling back to a single Tinyman pool when the router is not better; Tinyman-pool only, never a cross-DEX aggregator), Tinyman farm shapes (staking-v1 farm:commit / farm:uncommit / farm:claimRewards; v2 addLiquidityAndFarm flexible/single-asset that add liquidity and commit the new LP position in one atomic group, with LP tokens remaining in the wallet), Tinyman liquid-stake/restake shapes (liquid-stake-v1 mint/burn tALGO; restake-v1 increaseStake/decreaseStake/claimRewards stALGO), Folks Finance v2 lending escrow shapes (setup depositEscrow/optEscrowAsset; deposit:escrow; withdraw:escrow), Folks Finance v2 loan credit shapes (setup:loanEscrow; setup:addCollateral; collateral:sync / collateral:reduce; borrow:variable; repay:withTxn), Folks Finance xALGO liquid-stake shapes (xalgo-v1 stake/unstake immediate), Pact v1 LP add/remove shapes, Pact Smart Router unsigned swap (`mainnet:pact:smart-router:swap:fixed-input`; local graph + Pool.prepareSwap, not Haystack), CompX v1 lending shapes (deposit/withdraw ASA; borrow:asa; repay:asa) and CompX v1 staking shapes, Dork.fi v1 ASA lending shapes (deposit/withdraw; borrow:asa; repay:asa), Myth Finance dualSTAKE shapes (dualstake-v1 mint/redeem LST; farm yield accrues passively while holding the LST), Haystack v1 single-token HAY staking shapes (stake HAY; unstake HAY and claim USDC+HAY rewards; claim USDC+HAY rewards), Haystack Launch shapes (`mainnet:haystack:v1:launch:token` creates a bonding-curve ASA from an existing ipfs:// or https:// URL; `mainnet:haystack:v1:buy:bonding` buys a token still on the curve, directly in the bonding asset or through the Haystack router — list bonding tokens with paid GET /protocols/haystack/launches and read one token free at GET /protocols/haystack/launches/{tokenNum}), Réti v1 ALGO staking shapes (stake/unstake), Alpha Arcade v1 ALPHA staking shapes (stake/unstake/claim USDC), and STAMM v1 LP mint/redeem via HOGSWAP (unsigned groups; do not hardcode router app ids), and HOGSWAP v1 swap shapes (fixed-input / fixed-output; unsigned groups; routing fee already netted into expectedOut; do not hardcode router app ids), and Mallow v1 perps shapes (`mainnet:mallow:v1:openLimit:attached` for ALGO/USD or BTC/USD limit orders with leverage and attached take-profit and stop-loss; `mainnet:mallow:v1:close:market` to close an open ALGO or BTC position in full; `mainnet:mallow:v1:cancelOrder:resting` to cancel a resting order, including an orphaned take-profit or stop-loss; `mainnet:mallow:v1:optIn:usdc`). Read `GET /protocols/mallow/markets` for the live index and max leverage, `GET /protocols/mallow/positions` for a position id, and paid `GET /positions` for the wallet snapshot that includes Mallow perps and resting orders. Canix does not sign or submit transactions in this endpoint. Do not guess pool discovery, opt-ins, min-balance, slippage, liquidity limits, or app upgrades. Read protocol/docs/execution-shapes/protocol-caveats.md (GET /execution/shapes meta.caveatsDocsPath) and each shape's docsPath.","tags":["execution","transactions","x402","agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionQuoteRequest"},"examples":{"tinymanAddLiquidity":{"$ref":"#/components/examples/ExecutionQuoteRequestSample"},"tinymanAddLiquidityInitial":{"$ref":"#/components/examples/ExecutionQuoteInitialAddLiquidityRequestSample"},"tinymanAddLiquiditySingleAsset":{"$ref":"#/components/examples/ExecutionQuoteSingleAssetAddLiquidityRequestSample"},"tinymanRemoveLiquidity":{"$ref":"#/components/examples/ExecutionQuoteRemoveLiquidityRequestSample"},"tinymanRemoveLiquiditySingleAssetOut":{"$ref":"#/components/examples/ExecutionQuoteSingleAssetOutRemoveLiquidityRequestSample"},"folksSetupDepositEscrow":{"$ref":"#/components/examples/ExecutionQuoteFolksSetupDepositEscrowRequestSample"},"folksSetupOptEscrowAsset":{"$ref":"#/components/examples/ExecutionQuoteFolksSetupOptEscrowAssetRequestSample"},"folksDepositEscrow":{"$ref":"#/components/examples/ExecutionQuoteFolksDepositEscrowRequestSample"},"folksWithdrawEscrow":{"$ref":"#/components/examples/ExecutionQuoteFolksWithdrawEscrowRequestSample"},"pactAddLiquidity":{"$ref":"#/components/examples/ExecutionQuotePactAddLiquidityRequestSample"},"pactRemoveLiquidity":{"$ref":"#/components/examples/ExecutionQuotePactRemoveLiquidityRequestSample"},"compxDepositAsa":{"$ref":"#/components/examples/ExecutionQuoteCompxDepositAsaRequestSample"},"compxWithdrawAsa":{"$ref":"#/components/examples/ExecutionQuoteCompxWithdrawAsaRequestSample"},"dorkfiDepositAsa":{"$ref":"#/components/examples/ExecutionQuoteDorkfiDepositAsaRequestSample"},"dorkfiWithdrawAsa":{"$ref":"#/components/examples/ExecutionQuoteDorkfiWithdrawAsaRequestSample"},"haystackStakeHay":{"$ref":"#/components/examples/ExecutionQuoteHaystackStakeHayRequestSample"},"haystackUnstakeHay":{"$ref":"#/components/examples/ExecutionQuoteHaystackUnstakeHayRequestSample"},"haystackClaimRewards":{"$ref":"#/components/examples/ExecutionQuoteHaystackClaimRewardsRequestSample"},"stammMintLp":{"$ref":"#/components/examples/ExecutionQuoteStammMintLpRequestSample"},"stammRedeemLp":{"$ref":"#/components/examples/ExecutionQuoteStammRedeemLpRequestSample"},"hogswapSwapFixedInput":{"$ref":"#/components/examples/ExecutionQuoteHogswapSwapFixedInputRequestSample"},"hogswapSwapFixedOutput":{"$ref":"#/components/examples/ExecutionQuoteHogswapSwapFixedOutputRequestSample"},"multiQuote":{"$ref":"#/components/examples/ExecutionQuoteMultiRequestSample"}}}}},"responses":{"200":{"description":"Unsigned executable quote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionQuoteResponse"},"examples":{"default":{"$ref":"#/components/examples/ExecutionQuoteResponseSample"}}}}},"400":{"$ref":"#/components/responses/ValidationError"},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.1"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.1"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.1"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.1"}]},"parameters":[{"$ref":"#/components/parameters/CanixSessionHeader"}]}},"/execution/compose":{"post":{"summary":"Compose opt-in → winning swap → enter as unmerged unsigned groups","description":"Compiles “I hold asset A, I want this opportunity” into sequenced groups: optional ASA/app opt-in, multi-router swap (signer indexes and pre-signed members preserved), then enter — driven by requiredAssetIds. Groups are never merged. Failure modes (stale quote, missing opt-in, slippage) are listed on step warnings. Canix does not sign or submit. Caller signs user legs and submits locally in order. Quote-time on-chain checks remain authoritative.","tags":["execution","swaps","plans","x402","agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeRequest"},"examples":{"default":{"$ref":"#/components/examples/ComposeRequestSample"}}}}},"responses":{"200":{"description":"Sequenced unsigned opt-in, winning swap, and enter groups","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComposeResponse"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.1"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","x-pragma-network":"pragma: allowlist secret","asset":"31566704","x-pragma-asset":"pragma: allowlist secret","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.1"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.1"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.1"}]},"parameters":[{"$ref":"#/components/parameters/CanixSessionHeader"}]}},"/execution/simulate":{"post":{"summary":"Simulate compiled unsigned groups for predicted balance and position deltas","description":"Given compiled unsigned group(s) from a plan or execution quote, returns predicted wallet balance and position deltas without signing or submitting. Fails closed with machine-readable reasons when the group would not succeed (stale quote, not opted in, min balance, health factor too low, capacity). Canix does not sign or submit. POST /plans attaches the same simulation summary when compiled groups are available.","tags":["defi","execution","plans","simulation","x402","agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationRequest"}}}},"responses":{"200":{"description":"Predicted deltas and fail-closed reasons; never signed or submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulationResponse"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.1"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","x-pragma-network":"pragma: allowlist secret","asset":"31566704","x-pragma-asset":"pragma: allowlist secret","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.1"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.1"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.1"}]},"parameters":[{"$ref":"#/components/parameters/CanixSessionHeader"}]}},"/pricing":{"post":{"summary":"Fetch USD token prices for Algorand asset IDs","description":"Returns CompX USD oracle prices for the requested Algorand asset IDs. A null price indicates that CompX has no current price for that asset.","tags":["defi","pricing","compx","agents"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingRequest"},"examples":{"algoAndUsdc":{"value":{"assetIds":[0,31566704]}}}}}},"responses":{"200":{"description":"Current CompX USD prices for requested assets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingResponse"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/swaps/quote":{"post":{"summary":"Fetch a walletless multi-router swap quote","description":"Quotes every enabled swap router in parallel, scores expected net out, and returns the winning serializable quote without signing or submitting. Pass optional router to force a single adapter. Asset amounts are integer base units. Use the returned quote unchanged with /swaps/optin and /swaps/transactions. If prerequisite opt-ins are submitted, fetch a fresh quote before building the swap group.","tags":["defi","swaps","agents"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HaystackSwapQuoteRequest"},"examples":{"algoToUsdc":{"value":{"address":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","fromAssetId":0,"toAssetId":31566704,"x-pragma":"pragma: allowlist secret","amount":"1000000","type":"fixed-input"}}}}}},"responses":{"200":{"description":"Serializable multi-router quote, winning router, and opaque payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HaystackSwapQuoteResponse"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/UpstreamRateLimited"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/swaps/optin":{"post":{"summary":"Build prerequisite swap opt-ins for the winning quote","description":"Checks the supplied Algorand account against the winning quote and returns a fresh unsigned group containing any missing output-asset and required application opt-ins. An empty transaction group means no opt-ins are required. canix402 is walletless: the caller signs and submits every returned opt-in transaction locally, waits for confirmation, and then refreshes the quote before requesting swap transactions. This route does not claim that returned opt-ins have executed.","tags":["defi","swaps","transactions","wallet"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HaystackSwapOptInRequest"}}}},"responses":{"200":{"description":"Unsigned prerequisite group, or an empty group when no opt-ins are missing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HaystackSwapOptInResponse"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/swaps/transactions":{"post":{"summary":"Build a walletless swap transaction group from the winning quote","description":"Paid transaction-generation step for a fresh multi-router quote. The initial request may return 402 with PAYMENT-REQUIRED; satisfy the advertised 0.005 USDC requirement and retry with PAYMENT-SIGNATURE. On success, the response preserves transaction order, identifies caller members in userSignIndexes, and includes any pre-signed members from the winning router. Sign only the userSignIndexes members, combine them with the pre-signed members in the original order, and submit the complete atomic group through your own Algod client. canix402 never receives wallet keys and never submits the swap. The 0.005 USDC x402 access charge is separate from Haystack's SDK-default 10 bps output fee (including referral split), other router fees, DEX fees, route price impact, and Algorand network transaction fees.","tags":["defi","swaps","transactions","x402","agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HaystackSwapTransactionsRequest"}}}},"responses":{"200":{"description":"Ordered, walletless swap group ready for caller signing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HaystackSwapTransactionsResponse"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"402":{"$ref":"#/components/responses/PaymentRequired"},"429":{"$ref":"#/components/responses/UpstreamRateLimited"},"502":{"$ref":"#/components/responses/UpstreamError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.005"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.005"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.005"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.005"}]},"parameters":[{"$ref":"#/components/parameters/CanixSessionHeader"}]}},"/sessions":{"post":{"summary":"Buy a prepaid agent session receipt","description":"One compiler-priced x402 payment mints a walletless prepaid session receipt (canix://session/{sessionId}). The receipt unlocks N research calls and M quotes/plans until TTL. Sessions are receipts, not keys. Exact-scheme one-shots remain the default; omit X-Canix-Session to pay per request. Fail-closed on expiry, exhausted quota, or store unavailability.","tags":["sessions","x402","agents"],"responses":{"200":{"description":"Minted prepaid session receipt with remaining N/M","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.25"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","x-pragma-network":"pragma: allowlist secret","asset":"31566704","x-pragma-asset":"pragma: allowlist secret","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.25"}]}}},"/sessions/refresh":{"post":{"summary":"Refresh a prepaid agent session receipt","description":"Compiler-priced x402 payment that resets N/M quota and TTL on an existing session id, or mints a new receipt if the previous one is gone. Cannot be paid with an existing session — this route is one-shot only.","tags":["sessions","x402","agents"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRefreshRequest"}}}},"responses":{"200":{"description":"Refreshed prepaid session receipt with remaining N/M","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.25"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","x-pragma-network":"pragma: allowlist secret","asset":"31566704","x-pragma-asset":"pragma: allowlist secret","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.25"}]}}},"/sessions/{sessionId}":{"get":{"summary":"Read prepaid session remaining N/M","description":"Returns the session receipt including remaining research and quotes/plans quota and expiry. Agents should use this resource instead of the public indexer /transactions showcase. Fail-closed 402 when the receipt is unknown or expired. Exhausted-but-unexpired receipts return 200 with status exhausted.","tags":["sessions","agents","discovery"],"security":[],"parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Session receipt with remaining N/M","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"402":{"$ref":"#/components/responses/SessionError"}}}},"/watch":{"post":{"summary":"Register a paid wallet watch retainer","description":"Recurring compiler-priced x402 retainer that registers a walletless watch (address + thresholds + optional HTTPS webhook). Fires signed, idempotent notifications on health-factor, claimable-USD, APY-drop, or Réti-capacity crossings. Canix never stores wallet keys — only the address, callback, and a server-generated HMAC secret (shown once). Refresh with POST /watch/refresh before TTL. MCP resource canix://watch/{watchId} lists recent firings.","tags":["watch","x402","agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchCreateRequest"}}}},"responses":{"200":{"description":"Registered watch receipt with HMAC secret shown once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchResponse"}}}},"400":{"$ref":"#/components/responses/ValidationError"},"402":{"$ref":"#/components/responses/PaymentRequired"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.25"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"[REDACTED]","x-pragma-network":"pragma: allowlist secret","asset":"[REDACTED]","x-pragma-asset":"pragma: allowlist secret","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},"accepts":[{"scheme":"exact","network":"[REDACTED]","asset":"[REDACTED]","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.25"}]}}},"/watch/refresh":{"post":{"summary":"Refresh a paid wallet watch retainer","description":"Compiler-priced x402 payment that extends TTL on an existing watch id. Optionally rotateSecret to mint a new HMAC key (returned once). Cannot be paid with a prepaid session. Unknown or expired watches fail-closed; register again with POST /watch.","tags":["watch","x402","agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchRefreshRequest"}}}},"responses":{"200":{"description":"Refreshed watch receipt","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchResponse"}}}},"402":{"$ref":"#/components/responses/WatchError"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/InternalError"}},"x-payment-info":{"protocols":[{"x402":{}}],"price":{"mode":"fixed","currency":"USD","amount":"0.25"}},"x-x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"requirementTemplate":{"scheme":"exact","network":"[REDACTED]","x-pragma-network":"pragma: allowlist secret","asset":"[REDACTED]","x-pragma-asset":"pragma: allowlist secret","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},"accepts":[{"scheme":"exact","network":"[REDACTED]","asset":"[REDACTED]","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.25"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.25"}]}}},"/watch/{watchId}":{"get":{"summary":"Read watch receipt and recent threshold firings","description":"Returns the walletless watch receipt including thresholds, webhook URL, expiry, and recent signed-delivery firings (idempotency keys). Does not return the HMAC secret. Unknown or expired receipts fail-closed with 402 WATCH_*.","tags":["watch","agents","discovery"],"security":[],"parameters":[{"name":"watchId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Watch receipt with recent firings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchResponse"}}}},"402":{"$ref":"#/components/responses/WatchError"}}}},"/watch/{watchId}/rotate-secret":{"post":{"summary":"Rotate the watch webhook HMAC secret","description":"Mints a new webhook signing secret. Requires the current secret in X-Canix-Watch-Secret. The new secret is returned once and never stored as a wallet key. Does not extend retainer TTL — pay POST /watch/refresh for that.","tags":["watch","agents"],"security":[],"parameters":[{"name":"watchId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"X-Canix-Watch-Secret","in":"header","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Rotated watch receipt with new HMAC secret shown once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchResponse"}}}},"402":{"$ref":"#/components/responses/WatchError"}}}}},"components":{"schemas":{"HaystackLaunchRow":{"type":"object","required":["tokenNum","assetId","name","symbol","assetUrl","creator","bondingTokenId","launchedAt","progressPercent","priceBonding","priceUsd","realTokenReserves","realBondingReserves","initialRealTokenReserves","bondingTargetUsd","priceMultiplier","buyShapeKey"],"properties":{"tokenNum":{"type":"integer"},"assetId":{"type":"integer"},"name":{"type":"string"},"symbol":{"type":"string"},"assetUrl":{"type":"string"},"creator":{"type":"string"},"bondingTokenId":{"type":"integer","description":"0 is ALGO."},"launchedAt":{"type":"string","format":"date-time"},"progressPercent":{"type":"number"},"priceBonding":{"type":"string"},"priceUsd":{"type":["string","null"]},"realTokenReserves":{"type":"string"},"realBondingReserves":{"type":"string"},"initialRealTokenReserves":{"type":"string"},"bondingTargetUsd":{"type":"string","description":"Micro-USD."},"priceMultiplier":{"type":"string"},"buyShapeKey":{"type":"string","example":"mainnet:haystack:v1:buy:bonding"}}},"HaystackLaunchDetail":{"type":"object","required":["tokenNum","assetId","name","symbol","phase","bondingOn","progressPercent","buyShapeKey","userHolding","note"],"properties":{"tokenNum":{"type":"integer"},"assetId":{"type":"integer"},"name":{"type":"string"},"symbol":{"type":"string"},"assetUrl":{"type":"string"},"description":{"type":"string"},"socialWebsite":{"type":"string"},"socialX":{"type":"string"},"socialTelegram":{"type":"string"},"socialDiscord":{"type":"string"},"creator":{"type":"string"},"bondingTokenId":{"type":"integer"},"bondingOn":{"type":"integer","description":"0 is still bonding. 2 is Pact V1. 3 is Pact V2."},"phase":{"type":"string","enum":["bonding","graduated"]},"progressPercent":{"type":"number"},"priceBonding":{"type":"string"},"priceUsd":{"type":["string","null"]},"realTokenReserves":{"type":"string"},"realBondingReserves":{"type":"string"},"initialRealTokenReserves":{"type":"string"},"virtualTokenReserves":{"type":"string"},"virtualBondingReserves":{"type":"string"},"bondingTargetUsd":{"type":"string"},"priceMultiplier":{"type":"string"},"poolAppId":{"type":"integer"},"lpTokenId":{"type":"integer"},"buyShapeKey":{"type":["string","null"]},"userHolding":{"type":["string","null"],"description":"Virtual holdings when address is passed. Not a wallet ASA balance."},"note":{"type":["string","null"]}}},"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code.","enum":["VALIDATION_ERROR","INTERNAL_ERROR","NOT_FOUND","SESSION_INVALID","SESSION_EXPIRED","SESSION_EXHAUSTED","SESSION_UNAVAILABLE","WATCH_INVALID","WATCH_EXPIRED","WATCH_UNAVAILABLE","WATCH_UNAUTHORIZED","MISSING_PAYMENT_SIGNATURE","MALFORMED_PAYMENT_SIGNATURE","EXPIRED_PAYMENT_PROOF"]},"message":{"type":"string"},"details":{"description":"Optional structured context for the error."}}}}},"SessionBudget":{"type":"object","additionalProperties":false,"required":["research","quotes"],"properties":{"research":{"type":"integer","minimum":0},"quotes":{"type":"integer","minimum":0}}},"SessionReceipt":{"type":"object","additionalProperties":false,"required":["uri","sessionId","createdAt","expiresAt","ttlSeconds","budget","remaining","consumed","status"],"properties":{"uri":{"type":"string","minLength":1},"sessionId":{"type":"string","minLength":1},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"ttlSeconds":{"type":"integer","minimum":1},"budget":{"$ref":"#/components/schemas/SessionBudget"},"remaining":{"$ref":"#/components/schemas/SessionBudget"},"consumed":{"$ref":"#/components/schemas/SessionBudget"},"status":{"type":"string","enum":["active","expired","exhausted"]}}},"SessionResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/SessionReceipt"},"meta":{"type":"object","additionalProperties":false,"required":["paymentRequired","access","receiptUri"],"properties":{"paymentRequired":{"type":"boolean"},"access":{"type":"string","enum":["session","receipt"]},"receiptUri":{"type":"string","minLength":1}}}}},"SessionRefreshRequest":{"type":"object","additionalProperties":false,"properties":{"sessionId":{"type":"string","minLength":1}}},"WatchThresholds":{"type":"object","additionalProperties":false,"minProperties":1,"description":"At least one threshold is required. Health factor fires when the wallet min HF crosses below the value. Claimable USD fires when totals.claimableUsd crosses at or above the value. APY drop fires when an opportunity APY falls by at least this many basis points vs the previous snapshot. Réti capacity fires when a Réti venue becomes constrained.","properties":{"healthFactor":{"type":"number","exclusiveMinimum":0},"claimableUsd":{"type":"number","minimum":0},"apyDropBps":{"type":"integer","minimum":1,"maximum":100000},"retiCapacity":{"oneOf":[{"type":"boolean","const":true},{"type":"object","additionalProperties":false,"properties":{"minStakerSlotsRemaining":{"type":"integer","minimum":0},"minAlgoRoomMicroAlgos":{"type":"string","pattern":"^[0-9]+$"}}}]}}},"WatchFiring":{"type":"object","additionalProperties":false,"required":["firingId","idempotencyKey","kind","firedAt","threshold","previous","current","delivered","deliveryStatus"],"properties":{"firingId":{"type":"string","minLength":1},"idempotencyKey":{"type":"string","minLength":1},"kind":{"type":"string","enum":["healthFactor","claimableUsd","apyDrop","retiCapacity"]},"firedAt":{"type":"string","format":"date-time"},"threshold":{"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"}]},"previous":{"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]},"current":{"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"null"}]},"opportunityId":{"type":"string","minLength":1},"delivered":{"type":"boolean"},"deliveryStatus":{"type":"string","enum":["pending","delivered","failed","stored"]}}},"WatchReceipt":{"type":"object","additionalProperties":false,"required":["uri","watchId","address","thresholds","webhookUrl","createdAt","expiresAt","ttlSeconds","status","firings"],"properties":{"uri":{"type":"string","minLength":1},"watchId":{"type":"string","minLength":1},"address":{"type":"string","minLength":58,"maxLength":58},"thresholds":{"$ref":"#/components/schemas/WatchThresholds"},"webhookUrl":{"oneOf":[{"type":"string","minLength":1},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"ttlSeconds":{"type":"integer","minimum":1},"status":{"type":"string","enum":["active","expired"]},"firings":{"type":"array","items":{"$ref":"#/components/schemas/WatchFiring"}},"webhookSecret":{"type":"string","minLength":1,"description":"HMAC secret shown once on create, refresh-with-rotate, or rotate. Never a wallet key."}}},"WatchResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/WatchReceipt"},"meta":{"type":"object","additionalProperties":false,"required":["paymentRequired","access","receiptUri","secretShown"],"properties":{"paymentRequired":{"type":"boolean"},"access":{"type":"string","enum":["watch","receipt","rotate"]},"receiptUri":{"type":"string","minLength":1},"secretShown":{"type":"boolean"}}}}},"WatchCreateRequest":{"type":"object","additionalProperties":false,"required":["address","thresholds"],"properties":{"address":{"type":"string","minLength":58,"maxLength":58},"thresholds":{"$ref":"#/components/schemas/WatchThresholds"},"webhookUrl":{"type":"string","minLength":8,"maxLength":2048}}},"WatchRefreshRequest":{"type":"object","additionalProperties":false,"required":["watchId"],"properties":{"watchId":{"type":"string","minLength":1},"rotateSecret":{"type":"boolean"}}},"OpportunityRisk":{"type":"object","additionalProperties":false,"description":"Designed opportunity risk block (schema V2). Optional numeric fields are omitted when unknown rather than invented. confidence is always present.","required":["confidence"],"properties":{"utilization":{"type":"number","minimum":0,"description":"Lending utilization in percentage points (0–100+)."},"liquidationThreshold":{"type":"number","minimum":0,"description":"Liquidation threshold in percentage points (0–100)."},"ltv":{"type":"number","minimum":0,"description":"Loan-to-value in percentage points (0–100)."},"borrowApr":{"type":"number","description":"Borrow-side APR cost when the venue supports borrowing. Mirrors top-level borrowApr when present."},"healthFactor":{"type":["number","null"],"minimum":0,"description":"Wallet health factor for this lending venue when address is in context. Omitted on anonymous catalog rows. Null when positions were loaded but this venue has no HF snapshot."},"volatilityBucket":{"type":"string","enum":["stable","low","medium","high","unknown"],"description":"LP IL / volatility bucket. unknown when the adapter has no designed signal."},"ilHint":{"type":"string","minLength":1,"description":"Human-readable IL hint when a designed signal exists (never a guessed percentage)."},"rewardRunwayRemaining":{"type":"string","minLength":1,"pattern":"^[0-9]+$","description":"Farm/staking remaining rewards in base units (decimal string)."},"confidence":{"type":"string","enum":["high","medium","low","unknown"],"description":"Snapshot freshness from fetchedAt / cache age. high ≤ 3 minutes, medium ≤ 1 hour, otherwise low. unknown when timestamps cannot be parsed."},"sourceAgeSeconds":{"type":"integer","minimum":0,"description":"Seconds between sourceTimestamp and evaluation time."},"stability":{"type":"string","enum":["high","medium","low","unknown"],"description":"APY stability from the bounded history series (coefficient of variation). unknown when fewer than 3 snapshots exist. Omitted until history is attached."},"apyStdev":{"type":"number","minimum":0,"description":"Sample standard deviation of APY over the retained window."},"historySampleCount":{"type":"integer","minimum":0,"description":"Number of history snapshots used for stability / apyStdev."}}},"OpportunityHistoryPoint":{"type":"object","additionalProperties":false,"required":["ts","apy","tvlUsd"],"properties":{"ts":{"type":"string","format":"date-time"},"apy":{"type":"number"},"tvlUsd":{"type":"number"}}},"OpportunityHistoryStability":{"type":"object","additionalProperties":false,"required":["bucket","sampleCount"],"properties":{"bucket":{"type":"string","enum":["high","medium","low","unknown"]},"sampleCount":{"type":"integer","minimum":0},"apyMean":{"type":"number"},"apyStdev":{"type":"number"}}},"OpportunityHistoryData":{"type":"object","additionalProperties":false,"required":["opportunityId","window","points","stability"],"properties":{"opportunityId":{"type":"string","minLength":1},"window":{"type":"string","enum":["1d","7d","30d"]},"points":{"type":"array","items":{"$ref":"#/components/schemas/OpportunityHistoryPoint"}},"stability":{"$ref":"#/components/schemas/OpportunityHistoryStability"}}},"OpportunityHistoryMeta":{"type":"object","additionalProperties":false,"required":["paymentRequired","windowSeconds","snapshotRetentionDays","snapshotCount"],"properties":{"paymentRequired":{"type":"boolean","const":true},"windowSeconds":{"type":"integer","minimum":1},"snapshotRetentionDays":{"type":"integer","minimum":1},"snapshotCount":{"type":"integer","minimum":0}}},"OpportunityHistoryResponse":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/OpportunityHistoryData"},"meta":{"$ref":"#/components/schemas/OpportunityHistoryMeta"}}},"OpportunityRecord":{"type":"object","required":["protocol","opportunityType","opportunityId","assetPair","chain","apy","yieldBasis","tvlUsd","sourceTimestamp","fetchedAt","risk","executionReady","executionShapes","compatibleExitShapes"],"properties":{"protocol":{"type":"string","description":"Source platform name.","enum":["tinyman","pact","folks-finance","compx","dorkfi","myth-finance","haystack","reti","alpha-arcade","stamm","morpho","aave","aerodrome"]},"opportunityType":{"type":"string","enum":["lp","farm","staking","lending"]},"opportunityId":{"type":"string","description":"Stable identifier for the opportunity within its protocol."},"assetPair":{"type":"string","description":"Protocol-specific market identifier (e.g. ALGO/USDC or a single asset)."},"chain":{"type":"string","enum":["algorand","base"],"description":"Settlement chain. Required so a mixed Algorand + Base catalog is unambiguous."},"assetIds":{"type":"array","items":{"type":"integer"},"description":"On-chain Algorand asset ids backing the opportunity. Native ALGO is asset id 0."},"assetAddresses":{"type":"array","items":{"type":"string","minLength":1},"description":"ERC-20 addresses for EVM venues. Do not put 0x values into assetIds."},"apy":{"type":"number","description":"Yield as APY. Formatted to 6 decimal places (up to 12 for small non-zero values)."},"yieldBasis":{"type":"string","enum":["apy","apr"],"description":"Indicates whether the apy field reflects a compound APY or an APR-derived value."},"apr":{"type":"number","description":"Yield as APR when the upstream source provides it. For CompX lending this is the supply APR (same basis as apy)."},"borrowApr":{"type":"number","description":"Borrow-side APR cost when the venue supports borrowing against this market. Prefer this field for borrow cost; do not treat apr as borrow cost."},"tvlUsd":{"type":"number","description":"Total value locked / liquidity depth in USD."},"sourceTimestamp":{"type":"string","format":"date-time","description":"Upstream or on-chain update time when available; otherwise equals fetchedAt."},"fetchedAt":{"type":"string","format":"date-time","description":"When this service fetched and normalized the row."},"notes":{"type":"string","description":"Caveats about timestamp provenance, fallback identifiers, or yield estimates."},"executionReady":{"type":"boolean","description":"True when at least one enter execution shape is available. When false and executionShapes is empty, treat as research-only and do not invent shape keys."},"executionShapes":{"type":"array","items":{"$ref":"#/components/schemas/OpportunityExecutionShape"},"description":"Enter-only shapes for opening this yield opportunity. Empty means research-only."},"compatibleExitShapes":{"type":"array","items":{"$ref":"#/components/schemas/OpportunityExecutionShape"},"description":"Exit shapes for closing this opportunity when known (e.g. Folks xALGO unstake, Tinyman tALGO burn). Empty means discover exits via positions or canix_list_execution_shapes / the shape catalog."},"entryRequirements":{"$ref":"#/components/schemas/OpportunityEntryRequirements"},"capacity":{"$ref":"#/components/schemas/OpportunityCapacity"},"risk":{"$ref":"#/components/schemas/OpportunityRisk"}}},"PersonalizedOpportunityRecord":{"allOf":[{"$ref":"#/components/schemas/OpportunityRecord"},{"type":"object","required":["canEnter","eligibilityFullyCheckable"],"properties":{"canEnter":{"type":"boolean","description":"Whether the wallet currently passes checkable entry and capacity rules. Never true when eligibilityFullyCheckable is false."},"eligibilityFullyCheckable":{"type":"boolean","description":"False when NFD/creator gates are present and cannot be resolved. Use POST /eligibility for the diagnostic."}}}]},"OpportunitiesListMeta":{"type":"object","required":["limit","offset","includeInactive","paymentRequired","cacheEnabled","cacheHit","cachedAt","cacheAgeMs","cacheTtlSec"],"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"includeInactive":{"type":"boolean"},"paymentRequired":{"type":"boolean"},"cacheEnabled":{"type":"boolean","description":"True when Redis opportunity cache is configured and not disabled."},"cacheHit":{"type":"boolean","description":"True when every protocol fetch used in this response was served from Redis."},"cachedAt":{"type":["string","null"],"format":"date-time","description":"Oldest cache write timestamp among protocols used; null when cache is disabled."},"cacheAgeMs":{"type":["integer","null"],"minimum":0,"description":"Age of cachedAt relative to response time; informational only (no harsh stale flag)."},"cacheTtlSec":{"type":"integer","minimum":0,"description":"Configured Redis TTL in seconds (default 180)."}}},"PersonalizedOpportunitiesListMeta":{"allOf":[{"$ref":"#/components/schemas/OpportunitiesListMeta"},{"type":"object","required":["address","heldAssetCount","eligibilityApplied","eligibilityEndpoint"],"properties":{"address":{"type":"string","description":"Algorand address the results were personalized for."},"heldAssetCount":{"type":"integer","description":"Number of distinct held assets used for matching."},"eligibilityApplied":{"type":"boolean","enum":[true],"description":"True when ranking used POST /eligibility rules."},"eligibilityEndpoint":{"type":"string","enum":["/eligibility"],"description":"Paid diagnostic endpoint for missingAssets, gates, and capacity."}}}]},"OpportunitiesListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OpportunityRecord"}},"meta":{"$ref":"#/components/schemas/OpportunitiesListMeta"}}},"PersonalizedOpportunitiesListResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PersonalizedOpportunityRecord"}},"meta":{"$ref":"#/components/schemas/PersonalizedOpportunitiesListMeta"}}},"PositionRecord":{"type":"object","description":"A protocol-neutral economic position. Integer base units and normalized token amounts are decimal strings to preserve precision.","required":["protocol","positionType","positionId","opportunityId","assetId","assetSymbol","amountRaw","amount","usdValue","compatibleExitShapeKeys","compatibleManageShapeKeys"],"properties":{"protocol":{"type":"string","enum":["tinyman","pact","folks-finance","compx","dorkfi","myth-finance","haystack","reti","alpha-arcade","stamm","aave","aerodrome","algofi","humble","mallow"]},"positionType":{"type":"string","enum":["supplied","lp","staked","debt","reward"]},"positionId":{"type":"string","minLength":1},"opportunityId":{"type":["string","null"]},"assetId":{"type":["integer","null"],"minimum":0},"assetSymbol":{"type":["string","null"]},"amountRaw":{"type":"string","pattern":"^[0-9]+$"},"amount":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]+)?$"},"usdValue":{"type":["number","null"],"minimum":0},"assetIds":{"type":"array","items":{"type":"integer","minimum":0},"description":"Underlying ASA ids for the position (LP asset A/B). Omitted when unknown."},"healthFactor":{"type":["number","null"],"minimum":0,"description":"Protocol-reported collateral health ratio when applicable."},"sourceTimestamp":{"type":"string","format":"date-time"},"caveats":{"type":"array","items":{"type":"string"}},"notes":{"type":"string"},"inputHints":{"$ref":"#/components/schemas/OpportunityExecutionInputHints","description":"Optional selector hints for compatible exit/manage shapes. Amounts never appear."},"compatibleExitShapeKeys":{"type":"array","items":{"type":"string","minLength":1},"description":"Exit shape keys compatible with this position. Empty means do not invent keys."},"compatibleManageShapeKeys":{"type":"array","items":{"type":"string","minLength":1},"description":"Manage/claim shape keys compatible with this position."}}},"ProtocolPositionResult":{"type":"object","required":["protocol","status","positionCount","message"],"properties":{"protocol":{"type":"string","enum":["tinyman","pact","folks-finance","compx","dorkfi","myth-finance","haystack","reti","alpha-arcade","stamm","aave","aerodrome","algofi","humble","mallow"]},"status":{"type":"string","enum":["ok","partial","unavailable"]},"positionCount":{"type":"integer","minimum":0},"message":{"type":["string","null"]}}},"WalletPositionsResponse":{"type":"object","required":["data","protocols","totals","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PositionRecord"}},"protocols":{"type":"array","items":{"$ref":"#/components/schemas/ProtocolPositionResult"}},"totals":{"type":"object","description":"Aggregate USD totals. A null value means at least one relevant protocol or position could not be valued completely; null must not be interpreted as zero.","required":["suppliedUsd","borrowedUsd","rewardsUsd","netUsd"],"properties":{"suppliedUsd":{"type":["number","null"]},"borrowedUsd":{"type":["number","null"]},"rewardsUsd":{"type":["number","null"]},"netUsd":{"type":["number","null"]}}},"meta":{"type":"object","required":["address","fetchedAt"],"properties":{"address":{"type":"string","description":"Algorand address whose positions were queried."},"fetchedAt":{"type":"string","format":"date-time"},"agentId":{"type":"string","description":"Present on free public showcase routes (for example brownie)."}}}}},"ClaimableQuoteRequest":{"type":"object","required":["shapeKey","input"],"properties":{"shapeKey":{"type":"string"},"input":{"type":"object","required":["userAddress"],"additionalProperties":true,"properties":{"userAddress":{"type":"string"},"programId":{"type":"integer","minimum":1},"poolAddress":{"type":"string"},"poolAppId":{"type":"integer","minimum":1},"farmAppId":{"type":"integer","minimum":1}}}}},"ClaimableRewardRecord":{"type":"object","required":["protocol","positionId","opportunityId","positionType","assetId","assetSymbol","amountRaw","amount","usdValue","claimKey","compatibleClaimShapeKeys","quote","estimatedNetworkFeeMicroAlgos","estimatedNetworkFeeUsd","worthClaiming"],"properties":{"protocol":{"type":"string","enum":["tinyman","pact","folks-finance","compx","dorkfi","myth-finance","haystack","reti","alpha-arcade","stamm","aave","aerodrome","algofi","humble","mallow"]},"positionId":{"type":"string"},"opportunityId":{"type":["string","null"]},"positionType":{"type":"string","enum":["supplied","lp","staked","debt","reward"]},"assetId":{"type":["integer","null"],"minimum":0},"assetSymbol":{"type":["string","null"]},"amountRaw":{"type":"string","pattern":"^[0-9]+$"},"amount":{"type":"string","pattern":"^[0-9]+(?:\\.[0-9]+)?$"},"usdValue":{"type":["number","null"],"minimum":0},"claimKey":{"type":"string","description":"Stable compile identity used to dedupe claimAllQuotes (e.g. Haystack USDC+HAY share one key)."},"compatibleClaimShapeKeys":{"type":"array","minItems":1,"items":{"type":"string","minLength":1}},"quote":{"oneOf":[{"$ref":"#/components/schemas/ClaimableQuoteRequest"},{"type":"null"}]},"estimatedNetworkFeeMicroAlgos":{"type":"string","pattern":"^[0-9]+$","description":"Conservative network-fee hint in microAlgos (not a simulation)."},"estimatedNetworkFeeUsd":{"type":["number","null"],"minimum":0},"worthClaiming":{"type":["boolean","null"],"description":"true when reward USD exceeds estimated network fee USD; null when either side is unknown."},"submitMode":{"type":"string","enum":["tinyman-analytics-claim"]},"caveats":{"type":"array","items":{"type":"string"}},"notes":{"type":"string"},"inputHints":{"$ref":"#/components/schemas/OpportunityExecutionInputHints"},"sourceTimestamp":{"type":"string","format":"date-time"}}},"ClaimableRewardsResponse":{"type":"object","required":["data","protocols","totals","claimAllQuotes","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ClaimableRewardRecord"}},"protocols":{"type":"array","items":{"$ref":"#/components/schemas/ProtocolPositionResult"}},"totals":{"type":"object","description":"Aggregate claim desk totals. A null value means incomplete coverage or pricing; null must not be interpreted as zero.","required":["claimableUsd","estimatedNetworkFeeUsd","worthClaimingUsd"],"properties":{"claimableUsd":{"type":["number","null"]},"estimatedNetworkFeeUsd":{"type":["number","null"]},"worthClaimingUsd":{"type":["number","null"]}}},"claimAllQuotes":{"type":"object","required":["quotes"],"properties":{"quotes":{"type":"array","description":"Deduped quote requests ready for POST /execution/quotes. Groups are never merged.","items":{"$ref":"#/components/schemas/ClaimableQuoteRequest"}}}},"meta":{"type":"object","required":["address","fetchedAt","algoUsd","paymentRequired"],"properties":{"address":{"type":"string"},"fetchedAt":{"type":"string","format":"date-time"},"algoUsd":{"type":["number","null"],"minimum":0},"paymentRequired":{"type":"boolean","enum":[true]}}}}},"ExecutionQuoteInput":{"type":"object","required":["userAddress"],"properties":{"userAddress":{"type":"string","description":"Algorand address that will sign the transaction group."},"assetAId":{"description":"First asset id identifying the Tinyman pool pair (integer or string)."},"assetAAmount":{"type":"string","description":"Amount of asset A in base units for add-liquidity shapes (integer string recommended)."},"assetBId":{"description":"Second asset id identifying the Tinyman pool pair (integer or string). Use 0 for ALGO."},"assetBAmount":{"type":"string","description":"Amount of asset B in base units for add-liquidity shapes (integer string recommended)."},"poolTokenAmount":{"type":"string","description":"Pool token amount in base units for remove-liquidity shapes (integer string recommended)."},"depositAssetId":{"description":"Asset id to deposit for single-asset add-liquidity (must match assetAId or assetBId)."},"depositAmount":{"type":"string","description":"Deposit amount in base units for single-asset add-liquidity (integer string recommended)."},"outputAssetId":{"description":"Asset id to receive for single-asset-out remove-liquidity (must match assetAId or assetBId)."},"maxSlippageBps":{"type":"integer","minimum":0,"maximum":10000,"description":"Maximum tolerated slippage in basis points for Tinyman shapes."},"poolAppId":{"description":"Folks Finance pool application id (from discovery opportunityId)."},"assetId":{"description":"Underlying asset id for Folks Finance pool selection (from discovery assetIds)."},"assetAmount":{"type":"string","description":"Underlying asset amount in base units for Folks deposit shapes."},"amount":{"type":"string","description":"Withdraw amount in base units for Folks withdraw shapes."},"amountDenomination":{"type":"string","enum":["asset","fAsset"],"description":"Whether Folks withdraw amount is expressed in underlying asset or fAsset units."},"includeOpUp":{"type":"boolean","description":"Whether to prefix Folks deposit groups with an OpUp transaction (default true)."},"escrowAddress":{"type":"string","description":"Folks Finance deposit or loan escrow address. Resolved via indexer when omitted on deposit/withdraw shapes."},"loanAppId":{"description":"Folks Finance loan application id (distinct from pool app id). Defaults to MainnetLoans.GENERAL when omitted on loan credit shapes."},"marketAppId":{"description":"CompX or Dork.fi lending market application id."},"borrowAmount":{"type":"string","description":"Amount to borrow in base units (integer string recommended)."},"collateralAmount":{"type":"string","description":"Collateral amount in base units for CompX borrow shapes (LST-denominated)."},"collateralTokenId":{"description":"Collateral LST asset id for CompX borrow shapes. Must be in the market's on-chain accepted_collaterals set (often a cross-market LST such as cUSDC). Defaults to the market LST when omitted."},"poolId":{"type":"string","description":"Optional discovery/opportunity id for traceability."},"vaultAddress":{"type":"string","minLength":1},"assetAddress":{"type":"string","minLength":1},"shares":{"oneOf":[{"type":"integer","minimum":1},{"type":"string","minLength":1}]}}},"ExecutionShapesListResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ExecutionShapeCatalogEntry"}},"meta":{"type":"object","required":["paymentRequired","shapeCount"],"properties":{"paymentRequired":{"type":"boolean","const":false},"shapeCount":{"type":"integer","minimum":0},"note":{"type":"string"},"caveatsDocsPath":{"type":"string","minLength":1,"description":"Repository-relative path to protocol-specific execution construction caveats (pool discovery, opt-ins, min-balance, slippage, liquidity limits, app upgrades)."}}}}},"ExecutionShapeCatalogEntry":{"type":"object","additionalProperties":false,"required":["shapeKey","network","protocol","protocolVersion","action","variant","shapeVersion","title","description","summary","opportunityRole","supportedOpportunityTypes","requiredInputs","sources"],"properties":{"shapeKey":{"type":"string","minLength":1,"example":"mainnet:tinyman:v2:addLiquidity:flexible"},"network":{"type":"string","minLength":1},"protocol":{"type":"string","minLength":1},"protocolVersion":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"variant":{"type":"string","minLength":1},"shapeVersion":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"opportunityRole":{"type":"string","enum":["enter","exit","manage"]},"supportedOpportunityTypes":{"type":"array","items":{"type":"string","minLength":1}},"requiredInputs":{"type":"array","items":{"type":"string","minLength":1},"description":"Input field names required by POST /execution/quotes for this shapeKey."},"sources":{"type":"array","items":{"$ref":"#/components/schemas/ExecutionShapeSource"}},"docsPath":{"type":"string","minLength":1,"description":"Repository-relative path to shape documentation when available."}}},"ExecutionShapeSource":{"type":"object","additionalProperties":false,"required":["kind","description"],"properties":{"kind":{"type":"string","enum":["sdk","api","docs","arc56"]},"description":{"type":"string","minLength":1},"url":{"type":"string","minLength":1}}},"ExecutionQuoteRequest":{"type":"object","required":["quotes"],"properties":{"quotes":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ExecutionQuoteItem"},"description":"One or more independent quote requests. Each item compiles to its own unsigned transaction group; groups are never merged. Price is flat per request (not per item)."}}},"SerializedTransaction":{"type":"object","required":["type","sender","fee","groupPresent"],"properties":{"type":{"type":"string"},"sender":{"type":"string"},"fee":{"type":"string"},"groupPresent":{"type":"boolean"},"payment":{"type":"object","properties":{"receiver":{"type":"string"},"amount":{"type":"string"},"closeRemainderTo":{"type":"string"}}},"assetTransfer":{"type":"object","properties":{"assetIndex":{"type":"string"},"amount":{"type":"string"},"receiver":{"type":"string"},"assetSender":{"type":"string"},"closeRemainderTo":{"type":"string"}}},"applicationCall":{"type":"object","properties":{"appIndex":{"type":"string"},"onComplete":{"type":"integer"},"appArgsBase64":{"type":"array","items":{"type":"string"}},"appArgsText":{"type":"array","items":{"type":["string","null"]}},"accounts":{"type":"array","items":{"type":"string"}},"foreignApps":{"type":"array","items":{"type":"string"}},"foreignAssets":{"type":"array","items":{"type":"string"}},"boxes":{"type":"array","items":{"type":"object","properties":{"appIndex":{"type":"string"},"nameBase64":{"type":"string"}}}}}},"evmCall":{"type":"object","properties":{"to":{"type":"string","minLength":1},"data":{"type":"string","minLength":1},"value":{"type":"string","minLength":1},"chainId":{"type":"integer","minimum":1},"gasLimit":{"type":"string","minLength":1}},"required":["to","data","value","chainId"],"description":"Unsigned EVM call. Present when type is evm."}}},"ExecutableQuote":{"type":"object","required":["shapeKey","shapeVersion","identity","createdAt","expiresAt","transactions","encodedTransactions","warnings","metadata"],"properties":{"shapeKey":{"type":"string"},"shapeVersion":{"type":"string"},"identity":{"type":"object","required":["network","protocol","protocolVersion","action","variant"],"properties":{"network":{"type":"string","enum":["mainnet","testnet","base"]},"protocol":{"type":"string"},"protocolVersion":{"type":"string"},"action":{"type":"string"},"variant":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/SerializedTransaction"}},"encodedTransactions":{"type":"array","items":{"type":"string","description":"Base64-encoded unsigned Algorand transaction (msgpack)."}},"warnings":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":true},"chain":{"type":"string","enum":["algorand","base"],"description":"Settlement chain. Present on Base/EVM quotes."}}},"ExecutionQuoteResponse":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/ExecutableQuote"},"description":"Compiled quotes in the same order as request.quotes."},"meta":{"type":"object","required":["paymentRequired","executionSubmitted","quoteCount"],"properties":{"paymentRequired":{"type":"boolean","enum":[true]},"executionSubmitted":{"type":"boolean","enum":[false]},"quoteCount":{"type":"integer","minimum":1}}}}},"AlgorandBaseUnitAmount":{"description":"Positive integer amount in the asset's base units. A decimal string is preferred to preserve precision.","oneOf":[{"type":"string","pattern":"^[1-9][0-9]*$"},{"type":"integer","minimum":1}]},"PricingRequest":{"type":"object","additionalProperties":false,"required":["assetIds"],"properties":{"assetIds":{"type":"array","minItems":1,"maxItems":100,"items":{"type":"integer","minimum":0,"maximum":9007199254740991}}}},"TokenPrice":{"type":"object","required":["assetId","priceUsd"],"properties":{"assetId":{"type":"string","pattern":"^[0-9]+$"},"priceUsd":{"type":["number","null"],"minimum":0}}},"PricingResponse":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","required":["prices","source","fetchedAt"],"properties":{"prices":{"type":"array","items":{"$ref":"#/components/schemas/TokenPrice"}},"source":{"type":"string","const":"compx"},"fetchedAt":{"type":"string","format":"date-time"}}},"meta":{"type":"object","required":["paymentRequired","executionSubmitted"],"properties":{"paymentRequired":{"type":"boolean","const":false},"executionSubmitted":{"type":"boolean","const":false}}}}},"HaystackSwapQuoteRequest":{"type":"object","additionalProperties":false,"required":["address","fromAssetId","toAssetId","amount"],"properties":{"address":{"type":"string","description":"Algorand account that will sign and submit the eventual swap."},"fromAssetId":{"description":"Input ASA id; use 0 for ALGO.","oneOf":[{"type":"integer","minimum":0},{"type":"string","pattern":"^[0-9]+$"}]},"toAssetId":{"description":"Output ASA id; use 0 for ALGO.","oneOf":[{"type":"integer","minimum":0},{"type":"string","pattern":"^[0-9]+$"}]},"amount":{"$ref":"#/components/schemas/AlgorandBaseUnitAmount"},"type":{"type":"string","enum":["fixed-input","fixed-output"],"default":"fixed-input"},"router":{"type":"string","enum":["haystack","hogswap","tinyman","pact-smart-router","folks-router","asastats"],"description":"Force a single adapter. Omit to quote every enabled router and pick the best net return."},"slippage":{"type":"number","minimum":0,"maximum":100,"description":"Percent (0-100) used at quote time for routers that bake slippage into min-out. Default 1."},"disabledProtocols":{"type":"array","description":"Additional DEX protocols to exclude from routing. Tinyman (v1), Humble, Algofi, and Algomint are always disabled by canix402.","items":{"type":"string","enum":["Tinyman","Humble","TinymanV2","Algofi","Algomint","Pact","Folks","TAlgo"]},"uniqueItems":true},"maxGroupSize":{"type":"integer","minimum":1,"maximum":16,"default":16},"maxDepth":{"type":"integer","minimum":1,"maximum":4,"default":4}}},"HaystackTransactionPayload":{"type":["object","null"],"required":["iv","data"],"properties":{"iv":{"type":"string"},"data":{"type":"string"}}},"HaystackSwapQuote":{"type":"object","description":"Serializable multi-router swap quote. Preserve this object unchanged when calling the opt-in and transaction endpoints. payload is opaque winner state — do not edit it.","required":["router","address","fromAssetId","toAssetId","amount","type","quotedAmount","minOut","networkFeeMicroAlgos","slippageBps","createdAt","expiresAt","score","alternatives","legs","payload"],"properties":{"router":{"type":"string","enum":["haystack","hogswap","tinyman","pact-smart-router","folks-router","asastats"]},"address":{"type":"string"},"fromAssetId":{"type":"string","pattern":"^[0-9]+$"},"toAssetId":{"type":"string","pattern":"^[0-9]+$"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$"},"type":{"type":"string","enum":["fixed-input","fixed-output"]},"quotedAmount":{"type":"string","pattern":"^[0-9]+$","description":"Expected net output base units for the winning route."},"minOut":{"type":"string","pattern":"^[0-9]+$"},"networkFeeMicroAlgos":{"type":"string","pattern":"^[0-9]+$"},"slippageBps":{"type":"integer","minimum":0,"maximum":10000},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"Reject the quote after this time and fetch a fresh one."},"score":{"type":"object","required":["expectedNetOut","minOut","expectedIn","networkFeeMicroAlgos","feeAlreadyNetted"],"properties":{"expectedNetOut":{"type":"string","pattern":"^[0-9]+$"},"minOut":{"type":"string","pattern":"^[0-9]+$"},"expectedIn":{"type":"string","pattern":"^[0-9]+$"},"maxIn":{"type":"string","pattern":"^[0-9]+$"},"networkFeeMicroAlgos":{"type":"string","pattern":"^[0-9]+$"},"feeAlreadyNetted":{"type":"boolean"}}},"alternatives":{"type":"array","items":{"type":"object","required":["router","status"],"properties":{"router":{"type":"string","enum":["haystack","hogswap","tinyman","pact-smart-router","folks-router","asastats"]},"status":{"type":"string","enum":["quoted","error","skipped","timeout"]},"expectedNetOut":{"type":"string","pattern":"^[0-9]+$"},"minOut":{"type":"string","pattern":"^[0-9]+$"},"networkFeeMicroAlgos":{"type":"string","pattern":"^[0-9]+$"},"reason":{"type":"string"}}}},"legs":{"type":"array","items":{}},"payload":{"description":"Opaque winner-native quote. Pass back unchanged."}},"additionalProperties":false},"HaystackSwapQuoteResponse":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/HaystackSwapQuote"},"meta":{"type":"object","required":["paymentRequired","executionSubmitted"],"properties":{"paymentRequired":{"type":"boolean","const":false},"executionSubmitted":{"type":"boolean","const":false}}}}},"HaystackSwapOptInRequest":{"type":"object","additionalProperties":false,"required":["address","quote"],"properties":{"address":{"type":"string"},"quote":{"$ref":"#/components/schemas/HaystackSwapQuote"}}},"HaystackSwapTransactionsRequest":{"type":"object","additionalProperties":false,"required":["address","quote","slippage"],"properties":{"address":{"type":"string"},"quote":{"$ref":"#/components/schemas/HaystackSwapQuote"},"slippage":{"type":"number","minimum":0,"maximum":100,"description":"Maximum unfavorable movement as a percentage; for example, 1 means 1%."}}},"WalletlessTransaction":{"type":"object","required":["index","encodedTransaction","signer"],"properties":{"index":{"type":"integer","minimum":0},"encodedTransaction":{"type":"string","contentEncoding":"base64","description":"Base64-encoded unsigned transaction bytes for inspection and caller signing."},"signedTransaction":{"type":"string","contentEncoding":"base64","description":"Base64-encoded Haystack-signed blob when this member is already signed."},"signer":{"type":"string","enum":["user","haystack","protocol"],"description":"Who supplies the signature for this group member."}}},"HaystackOptInTransaction":{"type":"object","required":["index","kind","encodedTransaction","signer"],"properties":{"index":{"type":"integer","minimum":0},"kind":{"type":"string","enum":["asset-opt-in","application-opt-in"]},"encodedTransaction":{"type":"string","contentEncoding":"base64"},"signer":{"type":"string","const":"user"},"assetId":{"type":"string","pattern":"^[1-9][0-9]*$"},"appId":{"type":"string","pattern":"^[1-9][0-9]*$"}}},"WalletlessTransactionGroup":{"type":"object","required":["router","transactions","userSignIndexes","createdAt","quoteExpiresAt"],"properties":{"router":{"type":"string","enum":["haystack","hogswap","tinyman","pact-smart-router","folks-router","asastats"]},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/WalletlessTransaction"},"description":"Atomic-group order. Do not reorder members."},"userSignIndexes":{"type":"array","items":{"type":"integer","minimum":0},"description":"Indexes the caller wallet must sign. Preserve Haystack-signed members unchanged."},"createdAt":{"type":"string","format":"date-time"},"quoteExpiresAt":{"type":"string","format":"date-time"}}},"HaystackSwapOptInResponse":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","required":["required","transactions","userSignIndexes","createdAt","expiresAt"],"properties":{"required":{"type":"boolean"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/HaystackOptInTransaction"}},"userSignIndexes":{"type":"array","items":{"type":"integer","minimum":0}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}}},"meta":{"type":"object","required":["paymentRequired","executionSubmitted"],"properties":{"paymentRequired":{"type":"boolean","const":false},"executionSubmitted":{"type":"boolean","const":false}}}}},"HaystackSwapTransactionsResponse":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/WalletlessTransactionGroup"},"meta":{"type":"object","required":["paymentRequired","executionSubmitted"],"properties":{"paymentRequired":{"type":"boolean","const":true},"executionSubmitted":{"type":"boolean","const":false}}}}},"HealthResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["service","status"],"properties":{"service":{"type":"string","enum":["canix402"]},"status":{"type":"string","enum":["ok"]}}}}},"ReadyResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["service","status","checks"],"properties":{"service":{"type":"string","enum":["canix402"]},"status":{"type":"string","enum":["ready","degraded","not_ready"]},"checks":{"type":"object","required":["algod","redis"],"properties":{"algod":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"latencyMs":{"type":"number"},"error":{"type":"string"}}},"redis":{"type":"object","required":["configured","ok"],"properties":{"configured":{"type":"boolean"},"ok":{"type":"boolean"},"latencyMs":{"type":"number"},"error":{"type":"string"}}}}}}}}},"EndpointPolicyEntry":{"type":"object","required":["id","method","pathPattern","access","summary","tags"],"properties":{"id":{"type":"string"},"method":{"type":"string","enum":["GET","POST"]},"pathPattern":{"type":"string"},"access":{"type":"string","enum":["free","paid"]},"summary":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"pathParams":{"type":"array","items":{"type":"string"}},"queryParams":{"type":"array","items":{"type":"string"}},"priceUsdc":{"type":"string"}}},"MetadataResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["service","environment","supportedProtocols","endpointPolicy"],"properties":{"service":{"type":"string","enum":["canix402"]},"environment":{"type":"string"},"supportedProtocols":{"type":"array","items":{"type":"string"}},"endpointPolicy":{"type":"array","items":{"$ref":"#/components/schemas/EndpointPolicyEntry"}}}}}},"DiscoveryResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["service","apiVersion","discoveryVersion","capabilities","x402ProtocolVersion","endpoints","errorCatalog"],"properties":{"service":{"type":"string","enum":["canix402"]},"apiVersion":{"type":"string"},"discoveryVersion":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"x402ProtocolVersion":{"type":"integer","enum":[2]},"endpoints":{"type":"array","items":{"type":"object"}},"errorCatalog":{"type":"array","items":{"type":"object"}}}}}},"OpportunityExecutionInputHints":{"type":"object","additionalProperties":false,"description":"Allowlisted selector hints derived from the opportunity. Amounts never appear.","properties":{"assetId":{"type":"integer","minimum":0},"assetAId":{"type":"integer","minimum":0},"assetBId":{"type":"integer","minimum":0},"depositAssetId":{"type":"integer","minimum":0},"poolAppId":{"type":"integer","minimum":1},"marketAppId":{"type":"integer","minimum":1},"poolId":{"type":"string","minLength":1},"programId":{"type":"integer","minimum":1},"liquidityAssetId":{"type":"integer","minimum":0},"escrowAddress":{"type":"string","minLength":58,"maxLength":58},"farmAppId":{"type":"integer","minimum":1},"escrowAppId":{"type":"integer","minimum":1},"validatorId":{"type":"integer","minimum":1,"description":"Réti validator id (stake target). Amounts never appear in hints."},"loanAppId":{"type":"integer","minimum":1,"description":"Folks Finance loan application id (distinct from pool app id)."},"tierIndex":{"type":"integer","minimum":0,"description":"STAMM fee-tier index (0–5) when the LP ASA is a STAMM tier token."},"assetAddress":{"type":"string","minLength":1,"description":"Underlying ERC-20 address for EVM venues. Amounts never appear."},"mallowMarket":{"type":"string","enum":["ALGO","BTC"],"description":"Mallow market symbol for a close or cancel."},"mallowSide":{"type":"string","enum":["long","short"],"description":"Mallow position side for a close or cancel."},"pexPositionId":{"type":"string","minLength":1,"description":"People's Exchange position id for mainnet:mallow:v1:close:market."},"ownerOrderId":{"type":"string","minLength":1,"description":"Resting Mallow order id for mainnet:mallow:v1:cancelOrder:resting."}}},"OpportunityExecutionShape":{"type":"object","required":["shapeKey","protocol","protocolVersion","action","variant","title","summary","order","requiredInputs","requiredAssetIds"],"properties":{"shapeKey":{"type":"string","minLength":1},"protocol":{"type":"string","minLength":1},"protocolVersion":{"type":"string","minLength":1},"action":{"type":"string","minLength":1},"variant":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"summary":{"type":"string","minLength":1},"order":{"type":"integer","minimum":0,"description":"Execution order for multi-step opens. Alternatives share order 0."},"prerequisiteShapeKeys":{"type":"array","items":{"type":"string","minLength":1},"description":"Shape keys that must be completed before this step."},"requiredInputs":{"type":"array","items":{"type":"string","minLength":1}},"requiredAssetIds":{"type":"array","items":{"type":"integer","minimum":0},"description":"ASA ids the wallet must hold (or acquire) before entry. ALGO is 0."},"inputHints":{"$ref":"#/components/schemas/OpportunityExecutionInputHints"}}},"ExecutionQuoteItem":{"type":"object","required":["shapeKey","input"],"properties":{"shapeKey":{"type":"string","description":"Registered transaction shape key.","example":"mainnet:tinyman:v2:addLiquidity:flexible"},"input":{"$ref":"#/components/schemas/ExecutionQuoteInput"}}},"OpportunityAmountRequirement":{"type":"object","additionalProperties":false,"required":["assetId","amount"],"properties":{"assetId":{"type":"integer","minimum":0,"description":"Asset id (0 = ALGO)."},"amount":{"type":"string","pattern":"^[0-9]+$","description":"Minimum amount in base units as a decimal string."}}},"OpportunityEntryGate":{"oneOf":[{"type":"object","additionalProperties":false,"required":["kind","assetId"],"properties":{"kind":{"type":"string","enum":["asa"]},"assetId":{"type":"integer","minimum":0},"minBalance":{"type":"string","pattern":"^[0-9]+$"}}},{"type":"object","additionalProperties":false,"required":["kind","creator"],"properties":{"kind":{"type":"string","enum":["asa-creator"]},"creator":{"type":"string","minLength":58,"maxLength":58},"minBalance":{"type":"string","pattern":"^[0-9]+$"}}},{"type":"object","additionalProperties":false,"required":["kind","nfd"],"properties":{"kind":{"type":"string","enum":["nfd-linked-creators"]},"nfd":{"type":"string","minLength":1,"description":"NFD app id or name used for linked-creator gating."}}},{"type":"object","additionalProperties":false,"required":["kind","nfdRoot"],"properties":{"kind":{"type":"string","enum":["nfd-root-segment"]},"nfdRoot":{"type":"string","minLength":1,"description":"NFD root app id or name for segment ownership gating."}}}]},"OpportunityEntryRequirements":{"type":"object","additionalProperties":false,"description":"Discovery-time entry eligibility. Quote-time on-chain checks remain authoritative.","properties":{"minAmount":{"$ref":"#/components/schemas/OpportunityAmountRequirement"},"gates":{"type":"array","items":{"$ref":"#/components/schemas/OpportunityEntryGate"}},"gateMatch":{"type":"string","enum":["any","all"],"description":"How multiple ASA gates combine. Réti uses any."},"eligibilityFullyCheckable":{"type":"boolean","description":"False when gates include NFD/creator kinds that personalized matching cannot resolve."}}},"OpportunityCapacity":{"type":"object","additionalProperties":false,"required":["stakerSlotsRemaining","algoRoomMicroAlgos","acceptingStake"],"properties":{"stakerSlotsRemaining":{"oneOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Remaining staker ledger slots across pools, or null if unknown."},"algoRoomMicroAlgos":{"oneOf":[{"type":"string","pattern":"^[0-9]+$"},{"type":"null"}],"description":"Remaining ALGO headroom in microAlgos, or null if unknown."},"acceptingStake":{"type":"boolean"}}},"EligibilityRequest":{"type":"object","additionalProperties":false,"required":["address","opportunityIds"],"properties":{"address":{"type":"string","description":"Algorand account address to evaluate.","x-pragma":"pragma: allowlist secret"},"opportunityIds":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"string","minLength":1},"description":"Opportunity ids to check, in request order."},"refresh":{"type":"boolean","description":"Bypass Redis and refetch adapters; still writes a fresh cache entry."}}},"EligibilityMissingAsset":{"type":"object","additionalProperties":false,"required":["assetId","requiredAmount","heldAmount","shortfall","role"],"properties":{"assetId":{"type":"integer","minimum":0},"requiredAmount":{"type":"string","pattern":"^[0-9]+$"},"heldAmount":{"type":"string","pattern":"^[0-9]+$"},"shortfall":{"type":"string","pattern":"^[0-9]+$"},"role":{"type":"string","enum":["min-amount","asa-gate","required-asset"]}}},"EligibilityGateResult":{"oneOf":[{"type":"object","additionalProperties":false,"required":["kind","assetId","status"],"properties":{"kind":{"type":"string","enum":["asa"]},"assetId":{"type":"integer","minimum":0},"minBalance":{"type":"string","pattern":"^[0-9]+$"},"status":{"type":"string","enum":["pass","fail","unresolved"]},"heldAmount":{"type":"string","pattern":"^[0-9]+$"},"reason":{"$ref":"#/components/schemas/EligibilityReason"}}},{"type":"object","additionalProperties":false,"required":["kind","creator","status"],"properties":{"kind":{"type":"string","enum":["asa-creator"]},"creator":{"type":"string","minLength":58,"maxLength":58},"minBalance":{"type":"string","pattern":"^[0-9]+$"},"status":{"type":"string","enum":["pass","fail","unresolved"]},"heldAmount":{"type":"string","pattern":"^[0-9]+$"},"reason":{"$ref":"#/components/schemas/EligibilityReason"}}},{"type":"object","additionalProperties":false,"required":["kind","nfd","status"],"properties":{"kind":{"type":"string","enum":["nfd-linked-creators"]},"nfd":{"type":"string","minLength":1},"status":{"type":"string","enum":["pass","fail","unresolved"]},"heldAmount":{"type":"string","pattern":"^[0-9]+$"},"reason":{"$ref":"#/components/schemas/EligibilityReason"}}},{"type":"object","additionalProperties":false,"required":["kind","nfdRoot","status"],"properties":{"kind":{"type":"string","enum":["nfd-root-segment"]},"nfdRoot":{"type":"string","minLength":1},"status":{"type":"string","enum":["pass","fail","unresolved"]},"heldAmount":{"type":"string","pattern":"^[0-9]+$"},"reason":{"$ref":"#/components/schemas/EligibilityReason"}}}]},"EligibilityReason":{"type":"string","enum":["opportunity-not-found","capacity-not-accepting","capacity-no-slots","capacity-no-algo-room","below-min-amount","missing-asa-gate","unresolved-nfd-gate","unresolved-creator-gate","missing-required-asset"]},"EligibilitySuggestedSwap":{"type":"object","additionalProperties":false,"required":["fromAssetId","toAssetId","amount","reason","note"],"properties":{"fromAssetId":{"type":"integer","minimum":0},"toAssetId":{"type":"integer","minimum":0},"amount":{"type":"string","pattern":"^[0-9]+$"},"reason":{"type":"string","enum":["missing-asa-gate","missing-min-amount","missing-required-asset"]},"note":{"type":"string","minLength":1}}},"OpportunityEligibility":{"type":"object","additionalProperties":false,"required":["opportunityId","protocol","found","canEnter","eligibilityFullyCheckable","missingAssets","gates","capacity","suggestedSwap","reasons"],"properties":{"opportunityId":{"type":"string","minLength":1},"protocol":{"oneOf":[{"type":"string","enum":["tinyman","pact","folks-finance","compx","dorkfi","myth-finance","haystack","reti","alpha-arcade","stamm","morpho","aave","aerodrome"]},{"type":"null"}]},"found":{"type":"boolean"},"canEnter":{"type":"boolean"},"eligibilityFullyCheckable":{"type":"boolean"},"missingAssets":{"type":"array","items":{"$ref":"#/components/schemas/EligibilityMissingAsset"}},"gates":{"type":"array","items":{"$ref":"#/components/schemas/EligibilityGateResult"}},"capacity":{"oneOf":[{"$ref":"#/components/schemas/OpportunityCapacity"},{"type":"null"}]},"suggestedSwap":{"oneOf":[{"$ref":"#/components/schemas/EligibilitySuggestedSwap"},{"type":"null"}]},"reasons":{"type":"array","items":{"$ref":"#/components/schemas/EligibilityReason"}},"healthFactor":{"type":["number","null"],"minimum":0,"description":"Wallet health factor for this lending venue when positions already expose it. Omitted when no snapshot exists; never invented."}}},"EligibilityResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OpportunityEligibility"}},"meta":{"type":"object","additionalProperties":false,"required":["address","fetchedAt","paymentRequired","quoteTimeAuthoritative"],"properties":{"address":{"type":"string"},"fetchedAt":{"type":"string","format":"date-time"},"paymentRequired":{"type":"boolean","enum":[true]},"quoteTimeAuthoritative":{"type":"boolean","enum":[true]}}}}},"PlanBudget":{"type":"object","additionalProperties":false,"required":["assetId","amount"],"properties":{"assetId":{"type":"integer","minimum":0},"amount":{"type":"string","pattern":"^[0-9]+$","description":"Budget in asset base units."}}},"PlanConstraints":{"type":"object","additionalProperties":false,"properties":{"maxProtocolWeightBps":{"type":"integer","minimum":1,"maximum":10000},"noNewBorrows":{"type":"boolean"},"executionReadyOnly":{"type":"boolean"},"minTvlUsd":{"type":"number","minimum":0},"maxSourceAgeSeconds":{"type":"integer","minimum":0},"maxAllocations":{"type":"integer","minimum":1,"maximum":10}}},"PlanRequest":{"type":"object","additionalProperties":false,"required":["address","budget"],"properties":{"address":{"type":"string","description":"Algorand account address that will sign returned groups.","x-pragma":"pragma: allowlist secret"},"budget":{"$ref":"#/components/schemas/PlanBudget"},"constraints":{"$ref":"#/components/schemas/PlanConstraints"},"opportunityIds":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"string","minLength":1}},"refresh":{"type":"boolean"},"swapSlippage":{"type":"number","minimum":0,"maximum":100,"description":"Swap slippage percent (0–100) for swap-aware compose. Default 1."}}},"PlanData":{"type":"object","additionalProperties":false,"required":["allocations","blocked","expectedPositionDelta","fees","expiresAt","warnings"],"properties":{"allocations":{"type":"array","items":{"type":"object"}},"blocked":{"type":"array","items":{"type":"object"}},"expectedPositionDelta":{"type":"object"},"fees":{"type":"object"},"expiresAt":{"type":"string","format":"date-time"},"warnings":{"type":"array","items":{"type":"string"}},"simulation":{"$ref":"#/components/schemas/SimulationSummary"}}},"PlanResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/PlanData"},"meta":{"type":"object","additionalProperties":false,"required":["address","budget","fetchedAt","paymentRequired","executionSubmitted","quoteTimeAuthoritative","eligibilityEndpoint"],"properties":{"address":{"type":"string"},"budget":{"$ref":"#/components/schemas/PlanBudget"},"fetchedAt":{"type":"string","format":"date-time"},"paymentRequired":{"type":"boolean","enum":[true]},"executionSubmitted":{"type":"boolean","enum":[false]},"quoteTimeAuthoritative":{"type":"boolean","enum":[true]},"eligibilityEndpoint":{"type":"string","enum":["/eligibility"]}}}}},"RebalanceRequest":{"type":"object","additionalProperties":false,"required":["address"],"properties":{"address":{"type":"string","minLength":1},"targetWeights":{"type":"array","minItems":1,"maxItems":25,"items":{"type":"object","additionalProperties":false,"required":["opportunityId","weightBps"],"properties":{"opportunityId":{"type":"string","minLength":1},"weightBps":{"type":"integer","minimum":0,"maximum":10000}}}},"harvestIdle":{"type":"boolean"},"includeClaims":{"type":"boolean"},"algoReserveMicroAlgos":{"type":"string","minLength":1,"pattern":"^[0-9]+$"},"minDeltaBps":{"type":"integer","minimum":0,"maximum":10000},"constraints":{"$ref":"#/components/schemas/PlanConstraints"},"swapSlippage":{"type":"number","minimum":0,"maximum":100},"refresh":{"type":"boolean"}}},"RebalanceData":{"type":"object","additionalProperties":false,"required":["mode","book","steps","quotes","blocked","expectedPositionDelta","fees","expiresAt","warnings"],"properties":{"mode":{"type":"string","enum":["target-weights","harvest-idle","combined"]},"book":{"type":"object"},"steps":{"type":"array","items":{"type":"object"}},"quotes":{"type":"array","items":{"type":"object"}},"blocked":{"type":"array","items":{"type":"object"}},"expectedPositionDelta":{"type":"object"},"fees":{"type":"object"},"expiresAt":{"type":"string","format":"date-time"},"warnings":{"type":"array","items":{"type":"string"}},"simulation":{"$ref":"#/components/schemas/SimulationSummary"}}},"RebalanceResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/RebalanceData"},"meta":{"type":"object","additionalProperties":false,"required":["address","harvestIdle","fetchedAt","paymentRequired","executionSubmitted","quoteTimeAuthoritative","groupsMerged","eligibilityEndpoint"],"properties":{"address":{"type":"string"},"harvestIdle":{"type":"boolean"},"fetchedAt":{"type":"string","format":"date-time"},"paymentRequired":{"type":"boolean","enum":[true]},"executionSubmitted":{"type":"boolean","enum":[false]},"quoteTimeAuthoritative":{"type":"boolean","enum":[true]},"groupsMerged":{"type":"boolean","enum":[false]},"eligibilityEndpoint":{"type":"string","enum":["/eligibility"]}}}}},"ComposeRequest":{"type":"object","additionalProperties":false,"required":["address","opportunityId","fromAssetId","amount"],"properties":{"address":{"type":"string","minLength":1},"opportunityId":{"type":"string","minLength":1},"fromAssetId":{"type":"integer","minimum":0},"amount":{"type":"string","minLength":1,"pattern":"^[0-9]+$"},"slippage":{"type":"number","minimum":0,"maximum":100},"refresh":{"type":"boolean"}}},"ComposeResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/ComposeData"},"meta":{"type":"object","additionalProperties":false,"required":["address","opportunityId","fetchedAt","paymentRequired","executionSubmitted","quoteTimeAuthoritative","groupsMerged"],"properties":{"address":{"type":"string"},"opportunityId":{"type":"string","minLength":1},"fetchedAt":{"type":"string","format":"date-time"},"paymentRequired":{"type":"boolean","enum":[true]},"executionSubmitted":{"type":"boolean","enum":[false]},"quoteTimeAuthoritative":{"type":"boolean","enum":[true]},"groupsMerged":{"type":"boolean","enum":[false]}}}}},"ComposeData":{"type":"object","additionalProperties":false,"required":["opportunityId","protocol","opportunityType","assetPair","fromAssetId","toAssetId","inputAmount","enterAmount","slippage","eligibility","executionShapes","steps","quotes","expectedPositionDelta","fees","expiresAt","warnings"],"properties":{"opportunityId":{"type":"string","minLength":1},"protocol":{"type":"string","enum":["tinyman","pact","folks-finance","compx","dorkfi","myth-finance","haystack","reti","alpha-arcade","stamm","morpho","aave","aerodrome"]},"opportunityType":{"type":"string","minLength":1},"assetPair":{"type":"string"},"fromAssetId":{"type":"integer","minimum":0},"toAssetId":{"type":"integer","minimum":0},"inputAmount":{"type":"string","minLength":1,"pattern":"^[0-9]+$"},"enterAmount":{"type":"string","minLength":1,"pattern":"^[0-9]+$"},"slippage":{"type":"number","minimum":0,"maximum":100},"eligibility":{"$ref":"#/components/schemas/OpportunityEligibility"},"executionShapes":{"type":"array","items":{"$ref":"#/components/schemas/OpportunityExecutionShape"}},"steps":{"type":"array","items":{"type":"object"}},"quotes":{"type":"array","items":{"type":"object"}},"expectedPositionDelta":{"type":"object"},"fees":{"type":"object"},"expiresAt":{"type":"string","format":"date-time"},"warnings":{"type":"array","items":{"type":"string"}}}},"SimulationRequest":{"type":"object","additionalProperties":false,"required":["address","groups"],"properties":{"address":{"type":"string","minLength":1},"groups":{"type":"array","minItems":1,"maxItems":25,"items":{"$ref":"#/components/schemas/SimulationGroupInput"}}}},"SimulationGroupInput":{"type":"object","additionalProperties":false,"properties":{"shapeKey":{"type":"string","minLength":1},"expiresAt":{"type":"string","minLength":1},"opportunityId":{"type":"string","minLength":1},"identity":{"type":"object"},"transactions":{"type":"array","items":{"type":"object"}},"encodedTransactions":{"type":"array","items":{"type":"string","minLength":1}},"warnings":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","additionalProperties":true},"capacity":{"type":"object"}}},"SimulationSummary":{"type":"object","additionalProperties":false,"required":["wouldSucceed","reasons","balanceDeltas","expectedPositionDelta","groups","signed","submitted"],"properties":{"wouldSucceed":{"type":"boolean"},"reasons":{"type":"array","items":{"type":"object"}},"balanceDeltas":{"type":"array","items":{"type":"object"}},"expectedPositionDelta":{"type":"object"},"groups":{"type":"array","items":{"type":"object"}},"signed":{"type":"boolean","enum":[false]},"submitted":{"type":"boolean","enum":[false]}}},"SimulationResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/SimulationSummary"},"meta":{"type":"object","additionalProperties":false,"required":["address","fetchedAt","paymentRequired","executionSubmitted","signed"],"properties":{"address":{"type":"string"},"fetchedAt":{"type":"string","format":"date-time"},"paymentRequired":{"type":"boolean","enum":[true]},"executionSubmitted":{"type":"boolean","enum":[false]},"signed":{"type":"boolean","enum":[false]}}}}},"PolicyDocument":{"type":"object","additionalProperties":false,"required":["schemaVersion"],"properties":{"schemaVersion":{"type":"string","enum":["1.0.0"],"description":"Versioned policy contract id. Unknown versions fail closed."},"maxProtocolWeightBps":{"type":"integer","minimum":1,"maximum":10000,"description":"Cap any single protocol at this share of the subject (10000 = 100%)."},"minAlgoReserveMicroAlgos":{"type":"string","minLength":1,"pattern":"^[0-9]+$","description":"Wallet ALGO that must remain after the subject (microAlgos decimal string)."},"minTvlUsd":{"type":"number","minimum":0},"maxSourceAgeSeconds":{"type":"integer","minimum":0,"description":"Maximum age of sourceTimestamp relative to evaluatedAt."},"noNewBorrows":{"type":"boolean"},"executionReadyOnly":{"type":"boolean"}}},"PolicyQuoteSubject":{"type":"object","additionalProperties":true,"properties":{"shapeKey":{"type":"string","minLength":1},"opportunityId":{"type":"string","minLength":1},"protocol":{"type":"string","enum":["tinyman","pact","folks-finance","compx","dorkfi","myth-finance","haystack","reti","alpha-arcade","stamm","morpho","aave","aerodrome"]},"opportunityType":{"type":"string","minLength":1},"weightBps":{"type":"integer","minimum":0,"maximum":10000},"allocatedAmount":{"type":"string","minLength":1,"pattern":"^[0-9]+$"},"allocatedAssetId":{"type":"integer","minimum":0},"tvlUsd":{"type":"number"},"sourceTimestamp":{"type":"string","minLength":1},"executionReady":{"type":"boolean"},"eligibility":{"type":"object","additionalProperties":true},"identity":{"type":"object","additionalProperties":true},"quote":{"type":"object","additionalProperties":true},"input":{"type":"object","additionalProperties":true}}},"PolicyValidateRequest":{"type":"object","additionalProperties":false,"required":["policy"],"properties":{"policy":{"$ref":"#/components/schemas/PolicyDocument"},"plan":{"type":"object","additionalProperties":true,"description":"Compiled POST /plans or /plans/rebalance payload (full envelope or inner data)."},"quotes":{"type":"array","minItems":1,"maxItems":25,"items":{"$ref":"#/components/schemas/PolicyQuoteSubject"}},"walletAlgoMicroAlgos":{"type":"string","pattern":"^[0-9]+$","description":"Wallet ALGO balance in microAlgos. Required when minAlgoReserveMicroAlgos is set."},"evaluatedAt":{"type":"string","format":"date-time"}}},"PolicyReason":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","enum":["empty-subject","protocol-weight","missing-protocol","missing-weight","below-reserve","missing-reserve","below-tvl-floor","missing-tvl","source-not-fresh","missing-freshness","new-borrow","execution-not-ready","missing-execution-ready","blocked-eligibility","eligibility-not-fully-checkable"]},"message":{"type":"string","minLength":1},"opportunityId":{"type":"string","minLength":1},"protocol":{"type":"string","minLength":1},"details":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"]}}}},"PolicyValidateData":{"type":"object","additionalProperties":false,"required":["pass","reasons","policySchemaVersion","evaluatedAt","signed","submitted"],"properties":{"pass":{"type":"boolean"},"reasons":{"type":"array","items":{"$ref":"#/components/schemas/PolicyReason"}},"policySchemaVersion":{"type":"string","enum":["1.0.0"]},"evaluatedAt":{"type":"string","format":"date-time"},"signed":{"type":"boolean","enum":[false]},"submitted":{"type":"boolean","enum":[false]}}},"PolicyValidateResponse":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"$ref":"#/components/schemas/PolicyValidateData"},"meta":{"type":"object","additionalProperties":false,"required":["fetchedAt","paymentRequired","executionSubmitted","signed","quoteTimeAuthoritative"],"properties":{"fetchedAt":{"type":"string","format":"date-time"},"paymentRequired":{"type":"boolean","enum":[true]},"executionSubmitted":{"type":"boolean","enum":[false]},"signed":{"type":"boolean","enum":[false]},"quoteTimeAuthoritative":{"type":"boolean","enum":[true]}}}}},"FolksRouterDiscountTier":{"type":"object","additionalProperties":false,"required":["minFolks","discountPercent"],"properties":{"minFolks":{"type":"number","minimum":0},"maxFolksExclusive":{"type":"number","minimum":0},"discountPercent":{"type":"integer","minimum":0,"maximum":50}}},"FolksRouterDiscount":{"type":"object","additionalProperties":false,"required":["sender","userFeeDiscount","applied","tiers"],"properties":{"sender":{"description":"Sender used for GET /fetch/discount, or null when no address was supplied.","oneOf":[{"type":"string","minLength":58,"maxLength":58},{"type":"null"}]},"userFeeDiscount":{"type":"integer","minimum":0,"maximum":50,"description":"Percent off the ~0.1% Folks Router fee (0, 10, 20, 30, 40, or 50)."},"applied":{"type":"boolean","description":"True when sender was set and userFeeDiscount was passed to GET /fetch/quote."},"tiers":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/FolksRouterDiscountTier"}}}}},"responses":{"PaymentRequired":{"description":"Payment required, or a prepaid session failure when X-Canix-Session was sent. Without a session header, retry with a signed PAYMENT-SIGNATURE payload. If X-Canix-Session was sent, the body is SESSION_INVALID / SESSION_EXPIRED / SESSION_EXHAUSTED / SESSION_UNAVAILABLE and PAYMENT-REQUIRED is absent — omit the session header to fall back to a one-shot.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded JSON x402 payment requirements the client must satisfy before retrying.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"examples":{"missingPayment":{"$ref":"#/components/examples/MissingPaymentSignatureError"},"malformedPayment":{"$ref":"#/components/examples/MalformedPaymentSignatureError"},"expiredProof":{"$ref":"#/components/examples/ExpiredPaymentProofError"}}}}},"InvalidAddress":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"examples":{"invalidAddress":{"$ref":"#/components/examples/InvalidAddressError"}}}}},"ValidationError":{"description":"Request validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"examples":{"validationError":{"$ref":"#/components/examples/ValidationErrorSample"}}}}},"NotFound":{"description":"Requested resource or shape was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"examples":{"shapeNotFound":{"$ref":"#/components/examples/ShapeNotFoundError"}}}}},"InternalError":{"description":"Internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"examples":{"internalError":{"$ref":"#/components/examples/InternalError"}}}}},"UpstreamRateLimited":{"description":"The Haystack upstream rate limit was exceeded. Retry after the interval advertised by the response when available.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"UpstreamError":{"description":"Haystack or an Algorand network dependency was unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"Conflict":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"SessionError":{"description":"Prepaid session receipt error. Not an x402 payment challenge — PAYMENT-REQUIRED is absent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"examples":{"sessionInvalid":{"$ref":"#/components/examples/SessionInvalidError"},"sessionExpired":{"$ref":"#/components/examples/SessionExpiredError"},"sessionUnavailable":{"$ref":"#/components/examples/SessionUnavailableError"}}}}},"WatchError":{"description":"Watch retainer receipt error. Not an x402 payment challenge — PAYMENT-REQUIRED is absent. Register again with POST /watch or rotate with X-Canix-Watch-Secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"},"examples":{"watchInvalid":{"$ref":"#/components/examples/WatchInvalidError"},"watchExpired":{"$ref":"#/components/examples/WatchExpiredError"}}}}}},"examples":{"HealthResponseSample":{"summary":"Healthy service","value":{"data":{"service":"canix402","status":"ok"}}},"ReadyResponseSample":{"summary":"Ready service","value":{"data":{"service":"canix402","status":"ready","checks":{"algod":{"ok":true,"latencyMs":42},"redis":{"configured":false,"ok":true}}}}},"MetadataResponseSample":{"summary":"Service metadata (endpoint policy trimmed)","value":{"data":{"service":"canix402","environment":"production","supportedProtocols":["tinyman","pact","folks-finance","compx","dorkfi","myth-finance"],"endpointPolicy":[{"id":"opportunities","method":"GET","pathPattern":"/opportunities","access":"paid","summary":"Top 10 aggregated DeFi opportunities ranked by risk then APY","description":"Returns ranked Algorand DeFi yield opportunities across supported protocols including Tinyman, Pact, Folks Finance, CompX, Dork.fi, Myth Finance, and Haystack. Use when an agent needs to compare APY/APR, TVL, asset pairs, opportunity type, protocol, source freshness, and caveats before presenting or ranking yield options. This endpoint provides normalized market data only; it does not build or submit transactions.","tags":["defi","opportunities"],"queryParams":["protocol","limit","offset","includeInactive"]}]}}},"DiscoveryResponseSample":{"summary":"Discovery document (endpoints trimmed)","value":{"data":{"service":"canix402","apiVersion":"1.0.0","discoveryVersion":"1.0.0","capabilities":["algorand-defi-opportunities","x402-paid-data","wallet-personalization","agent-discovery","openapi","haystack-swaps"],"x402ProtocolVersion":2,"endpoints":[{"id":"opportunities","method":"GET","path":"/opportunities","access":"paid","summary":"Top 10 aggregated DeFi opportunities ranked by risk then APY","description":"Returns ranked Algorand DeFi yield opportunities across supported protocols including Tinyman, Pact, Folks Finance, CompX, Dork.fi, Myth Finance, and Haystack. Use when an agent needs to compare APY/APR, TVL, asset pairs, opportunity type, protocol, source freshness, and caveats before presenting or ranking yield options. This endpoint provides normalized market data only; it does not build or submit transactions.","tags":["defi","opportunities"],"pathParams":[],"queryParams":["protocol","limit","offset","includeInactive"],"responseCodes":[200,402,500],"x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"facilitator":"https://facilitator.goplausible.xyz","requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","x-pragma-network":"pragma: allowlist secret","asset":"31566704","x-pragma-asset":"pragma: allowlist secret","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.01"}]}}],"errorCatalog":[{"code":"MISSING_PAYMENT_SIGNATURE","httpStatus":402,"description":"The paid endpoint was called without PAYMENT-SIGNATURE."}]}}},"X402ManifestSample":{"summary":"x402 discovery manifest (resources trimmed)","value":{"service":"canix402","name":"canix402","version":"1.0.0","description":"x402-gated DeFi opportunity API.","x402Version":2,"docsUrl":"https://canix402.compx.io/x402","llmsTxtUrl":"https://canix402.compx.io/llms.txt","openapiUrl":"https://canix402-api.compx.io/openapi.json","discoveryUrl":"https://canix402-api.compx.io/discovery","logoUrl":"https://canix402-api.compx.io/logo.png?v=2","bannerUrl":"https://canix402-api.compx.io/banner.png?v=2","facilitator":"https://facilitator.goplausible.xyz","chains":[{"namespace":"algorand","network":"algorand-mainnet","assets":[{"symbol":"USDC","assetId":"31566704","decimals":6}]}],"resources":[{"id":"opportunities","method":"GET","path":"/opportunities","url":"https://canix402-api.compx.io/opportunities","description":"Returns ranked Algorand DeFi yield opportunities across supported protocols including Tinyman, Pact, Folks Finance, CompX, Dork.fi, Myth Finance, and Haystack. Use when an agent needs to compare APY/APR, TVL, asset pairs, opportunity type, protocol, source freshness, and caveats before presenting or ranking yield options. This endpoint provides normalized market data only; it does not build or submit transactions.","tags":["defi","opportunities"],"price":{"amount":"0.01","currency":"USDC","network":"algorand-mainnet","asset":"31566704"},"x402":{"protocolVersion":2,"requiredHeaders":["PAYMENT-REQUIRED","PAYMENT-SIGNATURE","PAYMENT-RESPONSE"],"facilitator":"https://facilitator.goplausible.xyz","requirementTemplate":{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},"accepts":[{"scheme":"exact","network":"algorand-mainnet","asset":"31566704","payTo":"REPLACE_WITH_PAYTO_ADDRESS","maxAmountRequired":"0.01"},{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"REPLACE_WITH_BASE_PAYTO_ADDRESS","maxAmountRequired":"0.01"}]}}]}},"AggregateOpportunitiesSample":{"summary":"Top aggregated opportunities","value":{"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","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":"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}}]},{"protocol":"folks-finance","opportunityType":"lending","opportunityId":"folks-lending-971254667","assetPair":"USDC","assetIds":[31566704],"apy":6.06,"yieldBasis":"apy","tvlUsd":29846.609471,"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":[31566704],"inputHints":{"poolAppId":971254667,"assetId":31566704}},{"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":[31566704],"inputHints":{"poolAppId":971254667,"assetId":31566704}},{"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":[31566704],"inputHints":{"poolAppId":971254667,"assetId":31566704}}],"compatibleExitShapes":[]}],"meta":{"limit":10,"offset":0,"includeInactive":false,"paymentRequired":true,"cacheEnabled":false,"cacheHit":false,"cachedAt":null,"cacheAgeMs":null,"cacheTtlSec":180}}},"FilteredOpportunitiesSample":{"summary":"Filtered by platform=tinyman and minApy","value":{"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,"cacheEnabled":false,"cacheHit":false,"cachedAt":null,"cacheAgeMs":null,"cacheTtlSec":180}}},"ClaimableRewardsSample":{"summary":"Claimable rewards desk with claimAllQuotes","value":{"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":"compx","positionId":"compx:reward:123456:31566704","opportunityId":"compx-staking-123456","positionType":"reward","assetId":31566704,"assetSymbol":"USDC","amountRaw":"500000","amount":"0.500000","usdValue":0.5,"claimKey":"compx:claim:123456","compatibleClaimShapeKeys":["mainnet:compx:v1:claim:rewards"],"quote":{"shapeKey":"mainnet:compx:v1:claim:rewards","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","poolAppId":123456}},"estimatedNetworkFeeMicroAlgos":"250000","estimatedNetworkFeeUsd":0.05,"worthClaiming":true,"inputHints":{"poolAppId":123456,"assetId":31566704}}],"protocols":[{"protocol":"tinyman","status":"ok","positionCount":0,"message":null},{"protocol":"compx","status":"ok","positionCount":1,"message":null},{"protocol":"pact","status":"ok","positionCount":0,"message":null},{"protocol":"haystack","status":"ok","positionCount":1,"message":null},{"protocol":"alpha-arcade","status":"ok","positionCount":0,"message":null}],"totals":{"claimableUsd":2,"estimatedNetworkFeeUsd":0.051,"worthClaimingUsd":2},"claimAllQuotes":{"quotes":[{"shapeKey":"mainnet:haystack:v1:claim:rewards","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"}},{"shapeKey":"mainnet:compx:v1:claim:rewards","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","poolAppId":123456}}]},"meta":{"address":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","fetchedAt":"2026-08-13T12:00:00.000Z","algoUsd":0.2,"paymentRequired":true}}},"OpportunityHistorySample":{"summary":"Bounded APY/TVL series for one opportunity","value":{"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}}},"PersonalizedOpportunitiesSample":{"summary":"Personalized to a wallet's held assets","value":{"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},{"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}}],"canEnter":true,"eligibilityFullyCheckable":true}],"meta":{"limit":10,"offset":0,"includeInactive":false,"paymentRequired":true,"address":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","heldAssetCount":2,"eligibilityApplied":true,"eligibilityEndpoint":"/eligibility"}}},"ProtocolOpportunitiesSample":{"summary":"Single-protocol opportunities (tinyman)","value":{"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,"cacheEnabled":false,"cacheHit":false,"cachedAt":null,"cacheAgeMs":null,"cacheTtlSec":180}}},"MissingPaymentSignatureError":{"summary":"Paid route called without PAYMENT-SIGNATURE","value":{"error":{"code":"MISSING_PAYMENT_SIGNATURE","message":"The paid endpoint was called without PAYMENT-SIGNATURE."}}},"MalformedPaymentSignatureError":{"summary":"PAYMENT-SIGNATURE payload is malformed","value":{"error":{"code":"MALFORMED_PAYMENT_SIGNATURE","message":"PAYMENT-SIGNATURE payload is malformed."}}},"ExpiredPaymentProofError":{"summary":"PAYMENT-SIGNATURE proof has expired","value":{"error":{"code":"EXPIRED_PAYMENT_PROOF","message":"PAYMENT-SIGNATURE proof has expired."}}},"InvalidAddressError":{"summary":"Invalid Algorand address","value":{"error":{"code":"VALIDATION_ERROR","message":"Query parameter 'address' is not a valid Algorand address."}}},"ValidationErrorSample":{"summary":"Invalid execution quote input","value":{"error":{"code":"VALIDATION_ERROR","message":"maxSlippageBps must be an integer between 0 and 10000."}}},"ShapeNotFoundError":{"summary":"Unknown transaction shape key","value":{"error":{"code":"NOT_FOUND","message":"No transaction shape registered for key \"mainnet:tinyman:v2:swap:does-not-exist\"."}}},"ExecutionQuoteRequestSample":{"summary":"Tinyman v2 flexible add-liquidity quote request","value":{"quotes":[{"shapeKey":"mainnet:tinyman:v2:addLiquidity:flexible","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","assetAId":31566704,"assetAAmount":"1000000","assetBId":0,"assetBAmount":"2000000","maxSlippageBps":50}}]}},"ExecutionQuoteRemoveLiquidityRequestSample":{"summary":"Tinyman v2 remove-liquidity (multiple assets out) quote request","value":{"quotes":[{"shapeKey":"mainnet:tinyman:v2:removeLiquidity:multipleAssetsOut","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","assetAId":31566704,"assetBId":0,"poolTokenAmount":"500000","maxSlippageBps":50}}]}},"ExecutionQuoteInitialAddLiquidityRequestSample":{"summary":"Tinyman v2 initial add-liquidity quote request","value":{"quotes":[{"shapeKey":"mainnet:tinyman:v2:addLiquidity:initial","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","assetAId":31566704,"assetAAmount":"1000000","assetBId":0,"assetBAmount":"2000000","maxSlippageBps":50}}]}},"ExecutionQuoteSingleAssetAddLiquidityRequestSample":{"summary":"Tinyman v2 single-asset add-liquidity quote request","value":{"quotes":[{"shapeKey":"mainnet:tinyman:v2:addLiquidity:singleAsset","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","assetAId":31566704,"assetBId":0,"depositAssetId":31566704,"depositAmount":"1000000","maxSlippageBps":50}}]}},"ExecutionQuoteSingleAssetOutRemoveLiquidityRequestSample":{"summary":"Tinyman v2 remove-liquidity (single asset out) quote request","value":{"quotes":[{"shapeKey":"mainnet:tinyman:v2:removeLiquidity:singleAssetOut","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","assetAId":31566704,"assetBId":0,"outputAssetId":31566704,"poolTokenAmount":"500000","maxSlippageBps":50}}]}},"ExecutionQuoteFolksSetupDepositEscrowRequestSample":{"summary":"Folks Finance v2 add deposit escrow quote request","value":{"quotes":[{"shapeKey":"mainnet:folks-finance:v2:setup:depositEscrow","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"}}]}},"ExecutionQuoteFolksSetupOptEscrowAssetRequestSample":{"summary":"Folks Finance v2 opt escrow into pool fAsset quote request","value":{"quotes":[{"shapeKey":"mainnet:folks-finance:v2:setup:optEscrowAsset","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","escrowAddress":"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB","poolAppId":971372237}}]}},"ExecutionQuoteFolksDepositEscrowRequestSample":{"summary":"Folks Finance v2 escrow deposit quote request","value":{"quotes":[{"shapeKey":"mainnet:folks-finance:v2:deposit:escrow","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","escrowAddress":"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB","poolAppId":971372237,"assetAmount":"1000000","poolId":"folks-lending-971372237"}}]}},"ExecutionQuoteFolksWithdrawEscrowRequestSample":{"summary":"Folks Finance v2 escrow withdraw quote request","value":{"quotes":[{"shapeKey":"mainnet:folks-finance:v2:withdraw:escrow","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","escrowAddress":"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB","poolAppId":971372237,"amount":"500000","amountDenomination":"fAsset"}}]}},"ExecutionQuotePactAddLiquidityRequestSample":{"summary":"Pact v1 two-sided add-liquidity quote request","value":{"quotes":[{"shapeKey":"mainnet:pact:v1:addLiquidity:twoSided","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","poolAppId":1072843805,"assetAId":31566704,"assetAAmount":"100000","assetBId":0,"assetBAmount":"50000","maxSlippageBps":50}}]}},"ExecutionQuotePactRemoveLiquidityRequestSample":{"summary":"Pact v1 proportional remove-liquidity quote request","value":{"quotes":[{"shapeKey":"mainnet:pact:v1:removeLiquidity:proportional","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","poolAppId":1072843805,"poolTokenAmount":"50000"}}]}},"ExecutionQuoteCompxDepositAsaRequestSample":{"summary":"CompX v1 ASA lending deposit quote request","value":{"quotes":[{"shapeKey":"mainnet:compx:v1:deposit:asa","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","marketAppId":3491050310,"amount":"100000"}}]}},"ExecutionQuoteCompxWithdrawAsaRequestSample":{"summary":"CompX v1 ASA lending withdraw quote request","value":{"quotes":[{"shapeKey":"mainnet:compx:v1:withdraw:asa","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","marketAppId":3491050310,"amount":"100000"}}]}},"ExecutionQuoteCompxStakeAsaRequestSample":{"summary":"CompX v1 ASA staking deposit quote request","value":{"quotes":[{"shapeKey":"mainnet:compx:v1:stake:asa","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","poolAppId":3500000001,"amount":"100000"}}]}},"ExecutionQuoteCompxUnstakeAsaRequestSample":{"summary":"CompX v1 ASA staking withdraw quote request","value":{"quotes":[{"shapeKey":"mainnet:compx:v1:unstake:asa","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","poolAppId":3500000001,"amount":"100000"}}]}},"ExecutionQuoteCompxClaimRewardsRequestSample":{"summary":"CompX v1 staking reward claim quote request","value":{"quotes":[{"shapeKey":"mainnet:compx:v1:claim:rewards","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","poolAppId":3500000001}}]}},"ExecutionQuoteDorkfiDepositAsaRequestSample":{"summary":"Dork.fi v1 ASA lending deposit quote request","value":{"quotes":[{"shapeKey":"mainnet:dorkfi:v1:deposit:asa","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","poolAppId":3333688282,"marketAppId":3210682240,"assetId":31566704,"amount":"100000"}}]}},"ExecutionQuoteDorkfiWithdrawAsaRequestSample":{"summary":"Dork.fi v1 ASA lending withdraw quote request","value":{"quotes":[{"shapeKey":"mainnet:dorkfi:v1:withdraw:asa","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","poolAppId":3333688282,"marketAppId":3210682240,"assetId":31566704,"amount":"100000"}}]}},"ExecutionQuoteHaystackStakeHayRequestSample":{"summary":"Haystack v1 HAY staking deposit quote request","value":{"quotes":[{"shapeKey":"mainnet:haystack:v1:stake:hay","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","amount":"100000000"}}]}},"ExecutionQuoteHaystackUnstakeHayRequestSample":{"summary":"Haystack v1 HAY unstake-and-claim quote request","value":{"quotes":[{"shapeKey":"mainnet:haystack:v1:unstake:hay","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","amount":"100000000"}}]}},"ExecutionQuoteHaystackClaimRewardsRequestSample":{"summary":"Haystack v1 staking reward claim quote request","value":{"quotes":[{"shapeKey":"mainnet:haystack:v1:claim:rewards","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ"}}]}},"ExecutionQuoteStammMintLpRequestSample":{"summary":"STAMM v1 LP mint via HOGSWAP (unsigned group)","value":{"quotes":[{"shapeKey":"mainnet:stamm:v1:mint:lp","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","poolAppId":3544790053,"tierIndex":1,"amountA":"1000000","amountB":"0","maxSlippageBps":100}}]}},"ExecutionQuoteStammRedeemLpRequestSample":{"summary":"STAMM v1 LP redeem via HOGSWAP (unsigned group)","value":{"quotes":[{"shapeKey":"mainnet:stamm:v1:redeem:lp","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","poolAppId":3544790053,"tierIndex":1,"lpAmount":"1000000","targetAsset":0,"maxSlippageBps":100}}]}},"ExecutionQuoteHogswapSwapFixedInputRequestSample":{"summary":"HOGSWAP v1 fixed-in ALGO→USDC swap (unsigned group)","value":{"quotes":[{"shapeKey":"mainnet:hogswap:v1:swap:fixed-input","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","fromAssetId":0,"toAssetId":31566704,"x-pragma-asset":"pragma: allowlist secret","amount":"1000000","maxSlippageBps":50}}]}},"ExecutionQuoteHogswapSwapFixedOutputRequestSample":{"summary":"HOGSWAP v1 exact-out ALGO→USDC swap (unsigned group)","value":{"quotes":[{"shapeKey":"mainnet:hogswap:v1:swap:fixed-output","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","fromAssetId":0,"toAssetId":31566704,"x-pragma-asset":"pragma: allowlist secret","amount":"100000","maxSlippageBps":50}}]}},"ExecutionQuoteResponseSample":{"summary":"Unsigned executable quote (transactions trimmed)","value":{"data":[{"shapeKey":"mainnet:tinyman:v2:addLiquidity:flexible","shapeVersion":"1.0.0","identity":{"network":"mainnet","protocol":"tinyman","protocolVersion":"v2","action":"addLiquidity","variant":"flexible"},"createdAt":"2026-07-08T20:00:00.000Z","expiresAt":"2026-07-08T20:00:30.000Z","transactions":[{"type":"axfer","sender":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","fee":"1000","groupPresent":true,"assetTransfer":{"assetIndex":"31566704","amount":"1000000","receiver":"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"}}],"encodedTransactions":["base64-encoded-unsigned-txn"],"warnings":[],"metadata":{"poolAddress":"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB","poolTokenId":900001,"minPoolTokenOut":"1407142"}}],"meta":{"paymentRequired":true,"executionSubmitted":false,"quoteCount":1}}},"InternalError":{"summary":"Internal server error","value":{"error":{"code":"INTERNAL_ERROR","message":"Internal server error."}}},"ExecutionQuoteMultiRequestSample":{"summary":"Batch Folks deposit setup + Tinyman LP add (two independent groups)","value":{"quotes":[{"shapeKey":"mainnet:folks-finance:v2:deposit:escrow","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","assetId":31566704,"assetAmount":"1000000","poolAppId":971372237}},{"shapeKey":"mainnet:tinyman:v2:addLiquidity:flexible","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ","assetAId":31566704,"assetAAmount":"1000000","assetBId":0,"assetBAmount":"2000000","maxSlippageBps":50}}]}},"EligibilityRequestSample":{"summary":"Eligibility request for a Réti validator","value":{"address":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","opportunityIds":["reti-staking-12"]}},"EligibilitySample":{"summary":"Wallet can enter a Réti validator","value":{"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}}},"PlanRequestSample":{"summary":"ALGO budget for a Réti enter plan","value":{"address":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","budget":{"assetId":0,"amount":"1000000"},"constraints":{"noNewBorrows":true,"executionReadyOnly":true,"maxAllocations":1},"opportunityIds":["reti-staking-12"]}},"PolicyValidateRequestSample":{"summary":"Validate a Réti enter quote against the Brownie sample policy","value":{"policy":{"schemaVersion":"1.0.0","maxProtocolWeightBps":4000,"minAlgoReserveMicroAlgos":"1000000","minTvlUsd":25000,"maxSourceAgeSeconds":86400,"noNewBorrows":true,"executionReadyOnly":true},"quotes":[{"shapeKey":"mainnet:reti:v1:stake:algo","protocol":"reti","opportunityId":"reti-staking-12","weightBps":4000,"allocatedAmount":"1000000","allocatedAssetId":0,"tvlUsd":1000000,"sourceTimestamp":"2026-08-28T12:00:00.000Z","executionReady":true}],"walletAlgoMicroAlgos":"5000000"}},"PolicyValidateSample":{"summary":"Passing policy check; never signed or submitted","value":{"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}}},"ComposeRequestSample":{"summary":"Hold USDC, compose enter into a Réti ALGO opportunity","value":{"address":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","opportunityId":"reti-staking-12","fromAssetId":1,"amount":"1000000","slippage":1}},"PlanSample":{"summary":"ALGO to Réti enter plan with unsigned group","value":{"data":{"allocations":[{"opportunityId":"reti-staking-12","protocol":"reti","quotes":[{"shapeKey":"mainnet:reti:v1:stake:algo","input":{"userAddress":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","validatorId":12,"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":"4000","estimatedNetworkFeeUsd":null},"expiresAt":"2026-08-16T10:00:30.000Z","warnings":[]},"meta":{"address":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","budget":{"assetId":0,"amount":"1000000"},"fetchedAt":"2026-08-16T10:00:00.000Z","paymentRequired":true,"executionSubmitted":false,"quoteTimeAuthoritative":true,"eligibilityEndpoint":"/eligibility"}}},"RebalanceRequestSample":{"summary":"Harvest idle ALGO and worth-claiming rewards, then redeploy","value":{"address":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","harvestIdle":true,"constraints":{"noNewBorrows":true,"executionReadyOnly":true,"maxAllocations":1}}},"RebalanceSample":{"summary":"Delta rebalance: claim then enter idle ALGO","value":{"data":{"mode":"harvest-idle","book":{"totalUsd":null,"idleAlgoMicroAlgos":"4000000","weights":[],"unweightedUsd":null},"steps":[{"kind":"enter","order":0,"compileStatus":"compiled","shapeKey":"mainnet:reti:v1:stake:algo","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"}}},"SessionInvalidError":{"summary":"Unknown or TTL-evicted session receipt","value":{"error":{"code":"SESSION_INVALID","message":"Session receipt is missing or unknown. Omit X-Canix-Session and retry with a per-request PAYMENT-SIGNATURE, or buy a new session."}}},"SessionExpiredError":{"summary":"Prepaid session TTL elapsed","value":{"error":{"code":"SESSION_EXPIRED","message":"Prepaid session has expired. Omit X-Canix-Session and retry with a per-request PAYMENT-SIGNATURE, or POST /sessions / POST /sessions/refresh."}}},"SessionUnavailableError":{"summary":"Session store unavailable","value":{"error":{"code":"SESSION_UNAVAILABLE","message":"Session store is unavailable. Omit X-Canix-Session and retry with a per-request PAYMENT-SIGNATURE."}}},"WatchInvalidError":{"summary":"Unknown watch receipt","value":{"error":{"code":"WATCH_INVALID","message":"Watch receipt is unknown. Register a new paid watch with POST /watch."}}},"WatchExpiredError":{"summary":"Watch retainer TTL elapsed","value":{"error":{"code":"WATCH_EXPIRED","message":"Watch retainer TTL has elapsed. Pay POST /watch to register again, or POST /watch/refresh before expiry."}}}},"parameters":{"CanixSessionHeader":{"name":"X-Canix-Session","in":"header","required":false,"description":"Prepaid session receipt (csess_ + 32-byte hex). When present on a session-eligible route, Caddy skips x402 and the app consumes one research or quotes unit. Omit to pay per request with PAYMENT-SIGNATURE.","schema":{"type":"string","minLength":1,"pattern":"^csess_[0-9a-f]+$"}}}}}