{"openapi":"3.0.0","info":{"title":"STRATPO App API","version":"1.0.0","description":"API documentation for STRATO App backend - A decentralized finance platform","contact":{"name":"STRATO Team"},"license":{"name":"Apache-2.0","url":"https://www.apache.org/licenses/LICENSE-2.0.html"}},"servers":[{"url":"/api","description":"Current server"}],"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"},"status":{"type":"integer","description":"HTTP status code"},"stack":{"type":"string","description":"Error stack trace (only in development)"}}},"HealthResponse":{"type":"object","properties":{"name":{"type":"string","example":"backend"},"version":{"type":"string","example":"1.0.0"},"timestamp":{"type":"string","format":"date-time"}}}}},"paths":{"/health":{"get":{"summary":"Health check endpoint","description":"Returns the service health status, name, version, and timestamp","tags":["Health"],"security":[],"responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/bridge/requestWithdrawal":{"post":{"summary":"Submit a withdrawal request","tags":["Bridge"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["externalChainId","externalToken","stratoToken","stratoTokenAmount","externalRecipient"],"properties":{"externalChainId":{"type":"string","description":"Destination chain identifier (numeric string)"},"stratoToken":{"type":"string","description":"STRATO token contract address to withdraw"},"externalToken":{"type":"string","description":"External chain token contract address (or zero/native address mapping)"},"stratoTokenAmount":{"type":"string","description":"Amount of the STRATO token to withdraw (decimal string)"},"externalRecipient":{"type":"string","description":"Recipient address on the external chain"}}}}}},"responses":{"200":{"description":"Withdrawal transaction submitted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/bridge/requestNativeWithdrawal":{"post":{"summary":"Submit a native bridge withdrawal request","tags":["Bridge"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["externalChainId","stratoToken","stratoTokenAmount","externalRecipient"],"properties":{"externalChainId":{"type":"string","description":"Destination chain identifier (numeric string)"},"stratoToken":{"type":"string","description":"STRATO-native token contract address to bridge out"},"stratoTokenAmount":{"type":"string","description":"Amount of the STRATO token to lock (decimal string)"},"externalRecipient":{"type":"string","description":"Recipient address on the external chain"},"externalToken":{"type":"string","description":"Optional representation token address metadata for client parity"}}}}}},"responses":{"200":{"description":"Native withdrawal transaction submitted"}}}},"/bridge/depositActions":{"get":{"summary":"List available one-click save and forge actions for action-capable deposit routers","tags":["Bridge"],"responses":{"200":{"description":"List of virtual deposit action routes","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"stratoToken":{"type":"string"},"stratoTokenSymbol":{"type":"string"},"action":{"type":"number","description":"2 = AUTO_FORGE, 3 = AUTO_SAVE"},"oraclePrice":{"type":"string","description":"WAD-scaled oracle price for the output token"},"psmFeeBps":{"type":"string","description":"PSM fee applied to the bridged route token; zero for direct USDST"},"externalChainIds":{"type":"array","items":{"type":"string"},"description":"External chains whose DepositRouter supports one-click actions"}}}}}}}}}},"/bridge/bridgeableTokens/{chainId}":{"get":{"summary":"List enabled bridge routes for a chain","tags":["Bridge"],"parameters":[{"name":"chainId","in":"path","required":true,"description":"Destination chain identifier (numeric string)","schema":{"type":"string"}}],"responses":{"200":{"description":"Available enabled bridge routes for the chain","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"isDefaultRoute":{"type":"boolean"},"enabled":{"type":"boolean"},"stratoToken":{"type":"string"},"stratoTokenName":{"type":"string"},"stratoTokenSymbol":{"type":"string"},"externalToken":{"type":"string"},"externalName":{"type":"string"},"externalSymbol":{"type":"string"},"externalChainId":{"type":"string"}}}}}}}}}},"/bridge/networkConfigs":{"get":{"summary":"Fetch enabled bridge networks","tags":["Bridge"],"responses":{"200":{"description":"Enabled network configurations","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"externalChainId":{"type":"string"},"chainInfo":{"type":"object","additionalProperties":true}}}}}}}}}},"/bridge/transactions/{type}":{"get":{"summary":"Retrieve bridge transaction history","tags":["Bridge"],"parameters":[{"name":"type","in":"path","required":true,"description":"Transaction direction to query","schema":{"type":"string","enum":["withdrawal","deposit"]}},{"name":"limit","in":"query","required":false,"description":"Maximum number of records to return","schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"description":"Number of records to skip","schema":{"type":"string"}},{"name":"order","in":"query","required":false,"description":"Sort order clause (e.g. block_timestamp.desc)","schema":{"type":"string"}},{"name":"stratoToken","in":"query","required":false,"description":"Filter results by STRATO token address","schema":{"type":"string"}},{"name":"externalChainId","in":"query","required":false,"description":"Filter results by external chain identifier","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated transaction records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}},"totalCount":{"type":"integer"}}}}}}}}},"/bridge/withdrawalSummary":{"get":{"summary":"Get withdrawal summary statistics for the authenticated user","tags":["Bridge"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Withdrawal summary statistics","content":{"application/json":{"schema":{"type":"object","properties":{"totalWithdrawn30d":{"type":"string","description":"Total withdrawn in last 30 days in wei (string format)"},"pendingWithdrawals":{"type":"number","description":"Count of pending withdrawals"},"availableToWithdraw":{"type":"string","description":"Available balance to withdraw in wei (string format)"}}}}}}}}},"/cdp/vaults":{"get":{"summary":"List CDP vaults for the signed-in user","tags":["CDP"],"responses":{"200":{"description":"Vault collection","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/cdp/vault-candidates":{"get":{"summary":"List existing CDP vaults and potential vaults the user can open (based on non-collateral balance)","tags":["CDP"],"responses":{"200":{"description":"Existing vault candidates and potential vault candidates","content":{"application/json":{"schema":{"type":"object","properties":{"existingVaults":{"type":"array","items":{"type":"object","additionalProperties":true}},"potentialVaults":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}},"/cdp/vaults/{asset}":{"get":{"summary":"Fetch a single vault for an asset","tags":["CDP"],"parameters":[{"name":"asset","in":"path","required":true,"description":"Collateral token address","schema":{"type":"string"}}],"responses":{"200":{"description":"Vault information","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/deposit":{"post":{"summary":"Deposit collateral into a vault","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset","amount"],"properties":{"asset":{"type":"string","description":"Collateral token address"},"amount":{"type":"string","description":"Amount to deposit (decimal string)"}}}}}},"responses":{"200":{"description":"Deposit transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/withdraw":{"post":{"summary":"Withdraw collateral from a vault","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset","amount"],"properties":{"asset":{"type":"string","description":"Collateral token address"},"amount":{"type":"string","description":"Amount to withdraw (decimal string)"}}}}}},"responses":{"200":{"description":"Withdrawal transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/get-max-mint":{"post":{"summary":"Calculate maximum mintable USDST","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset"],"properties":{"asset":{"type":"string","description":"Collateral token address"}}}}}},"responses":{"200":{"description":"Maximum USDST amount","content":{"application/json":{"schema":{"type":"object","properties":{"maxAmount":{"type":"string"}}}}}}}}},"/cdp/mint":{"post":{"summary":"Mint USDST against collateral","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset","amount"],"properties":{"asset":{"type":"string"},"amount":{"type":"string","description":"USDST amount to mint (decimal string)"}}}}}},"responses":{"200":{"description":"Mint transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/repay":{"post":{"summary":"Repay outstanding USDST debt","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset","amount"],"properties":{"asset":{"type":"string"},"amount":{"type":"string","description":"USDST amount to repay (decimal string)"}}}}}},"responses":{"200":{"description":"Repayment transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/get-max-withdraw":{"post":{"summary":"Calculate maximum withdrawable collateral","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset"],"properties":{"asset":{"type":"string","description":"Collateral token address"}}}}}},"responses":{"200":{"description":"Maximum withdrawable amount","content":{"application/json":{"schema":{"type":"object","properties":{"maxAmount":{"type":"string"}}}}}}}}},"/cdp/withdraw-max":{"post":{"summary":"Withdraw the maximum safe collateral","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset"],"properties":{"asset":{"type":"string","description":"Collateral token address"}}}}}},"responses":{"200":{"description":"Withdrawal transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/mint-max":{"post":{"summary":"Mint the maximum safe USDST","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset"],"properties":{"asset":{"type":"string","description":"Collateral token address"}}}}}},"responses":{"200":{"description":"Mint transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/repay-all":{"post":{"summary":"Repay all debt for a vault","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset"],"properties":{"asset":{"type":"string","description":"Collateral token address"}}}}}},"responses":{"200":{"description":"Repayment transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/liquidate":{"post":{"summary":"Liquidate an unhealthy position","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["collateralAsset","borrower","debtToCover"],"properties":{"collateralAsset":{"type":"string","description":"Collateral asset address"},"borrower":{"type":"string","description":"Borrower address to liquidate"},"debtToCover":{"type":"string","description":"USDST amount to cover (decimal string)"}}}}}},"responses":{"200":{"description":"Liquidation transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/liquidatable":{"get":{"summary":"List liquidatable positions","tags":["CDP"],"responses":{"200":{"description":"Liquidatable vaults","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/cdp/max-liquidatable":{"post":{"summary":"Calculate maximum liquidatable debt","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["collateralAsset","borrower"],"properties":{"collateralAsset":{"type":"string"},"borrower":{"type":"string"}}}}}},"responses":{"200":{"description":"Maximum repayable amount","content":{"application/json":{"schema":{"type":"object","properties":{"maxAmount":{"type":"string"}}}}}}}}},"/cdp/config/{asset}":{"get":{"summary":"Read the collateral configuration for an asset","tags":["CDP"],"parameters":[{"name":"asset","in":"path","required":true,"description":"Collateral token address","schema":{"type":"string"}}],"responses":{"200":{"description":"Collateral configuration","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/assets":{"get":{"summary":"List collateral assets (optionally filter by support status)","tags":["CDP"],"parameters":[{"in":"query","name":"supported","schema":{"type":"boolean"},"description":"If true, returns only supported assets (isSupported === true). If false or omitted, returns all assets (including unsupported). Defaults to false (returns all)."}],"responses":{"200":{"description":"Asset configurations. Returns all assets by default, or only supported assets if 'supported=true' query parameter is provided.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/cdp/asset-debt-info":{"post":{"summary":"Retrieve global debt metrics for an asset","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset"],"properties":{"asset":{"type":"string"}}}}}},"responses":{"200":{"description":"Asset debt information","content":{"application/json":{"schema":{"type":"object","properties":{"currentTotalDebt":{"type":"string"},"debtFloor":{"type":"string"},"debtCeiling":{"type":"string"}}}}}}}}},"/cdp/admin/set-collateral-config":{"post":{"summary":"Update collateral parameters (admin)","description":"unitScale is not accepted. CDPEngine derives it from the token's decimals() at first listing and it cannot be changed through this call.","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset","liquidationRatio","liquidationPenaltyBps","closeFactorBps","stabilityFeeRate","debtFloor","debtCeiling","isPaused"],"properties":{"asset":{"type":"string"},"liquidationRatio":{"type":"string","description":"Liquidation ratio in WAD format"},"liquidationPenaltyBps":{"type":"integer"},"closeFactorBps":{"type":"integer"},"stabilityFeeRate":{"type":"string","description":"Stability fee in RAY format"},"debtFloor":{"type":"string"},"debtCeiling":{"type":"string"},"isPaused":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Configuration transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/admin/set-asset-paused":{"post":{"summary":"Toggle pause for a collateral asset (admin)","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset","isPaused"],"properties":{"asset":{"type":"string"},"isPaused":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Pause transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/admin/set-asset-supported":{"post":{"summary":"Toggle support for a collateral asset (admin)","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset","supported"],"properties":{"asset":{"type":"string"},"supported":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Support toggle transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/admin/set-global-paused":{"post":{"summary":"Toggle global CDP pause (admin)","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["isPaused"],"properties":{"isPaused":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Global pause transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/admin/global-paused":{"get":{"summary":"Check whether the CDP engine is paused","tags":["CDP"],"responses":{"200":{"description":"Pause status flag","content":{"application/json":{"schema":{"type":"object","properties":{"isPaused":{"type":"boolean"}}}}}}}}},"/cdp/admin/all-configs":{"get":{"summary":"List all collateral configurations (admin)","tags":["CDP"],"responses":{"200":{"description":"Collateral configuration list","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/cdp/bad-debt":{"get":{"summary":"Retrieve bad-debt balances per asset","tags":["CDP"],"responses":{"200":{"description":"Bad-debt entries","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/cdp/bad-debt/juniors/{account}":{"get":{"summary":"List junior notes for an account","tags":["CDP"],"parameters":[{"name":"account","in":"path","required":true,"description":"Account address to inspect","schema":{"type":"string"}}],"responses":{"200":{"description":"Junior note positions","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/cdp/bad-debt/open-junior-note":{"post":{"summary":"Open a junior note position","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset","amountUSDST"],"properties":{"asset":{"type":"string"},"amountUSDST":{"type":"string","description":"USDST contribution (decimal string)"}}}}}},"responses":{"200":{"description":"Junior note transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/bad-debt/top-up-junior-note":{"post":{"summary":"Top up the active junior note","tags":["CDP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amountUSDST"],"properties":{"amountUSDST":{"type":"string","description":"Additional USDST to contribute (decimal string)"}}}}}},"responses":{"200":{"description":"Junior note transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/bad-debt/claim-junior-note":{"post":{"summary":"Claim proceeds from the junior note","tags":["CDP"],"responses":{"200":{"description":"Claim transaction result","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/cdp/stats":{"get":{"summary":"Get aggregated CDP statistics by asset","tags":["CDP"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"CDP statistics aggregated by asset","content":{"application/json":{"schema":{"type":"object","properties":{"totalCollateralValueUSD":{"type":"string","description":"Total collateral value across all CDPs in USD"},"totalDebtUSD":{"type":"string","description":"Total debt across all CDPs in USD"},"globalCollateralizationRatio":{"type":"number","description":"Global collateralization ratio as percentage (collateral / debt * 100)"},"assets":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string","description":"Asset contract address"},"symbol":{"type":"string","description":"Asset symbol (e.g., WBTC, ETH)"},"totalCollateral":{"type":"string","description":"Total collateral amount (raw integer string)"},"totalScaledDebt":{"type":"string","description":"Total scaled debt amount"},"totalDebtUSD":{"type":"string","description":"Total debt in USD for this asset"},"collateralValueUSD":{"type":"string","description":"Total collateral value in USD for this asset"},"collateralizationRatio":{"type":"number","description":"Collateralization ratio as percentage (collateral / debt * 100)"},"numberOfVaults":{"type":"integer","description":"Number of vaults for this asset"}}}}}}}}}}}},"/cdp/interest":{"get":{"summary":"Get interest accrued across all CDP assets for multiple time periods","tags":["CDP"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Interest accrued per asset and totals for daily, weekly, monthly, YTD, and all-time periods","content":{"application/json":{"schema":{"type":"object","properties":{"totalDailyInterestUSD":{"type":"string","description":"Total daily interest accrued across all assets in USD (18 decimals)"},"totalWeeklyInterestUSD":{"type":"string","description":"Total weekly interest accrued across all assets in USD (18 decimals)"},"totalMonthlyInterestUSD":{"type":"string","description":"Total monthly interest accrued across all assets in USD (18 decimals)"},"totalYtdInterestUSD":{"type":"string","description":"Total year-to-date interest accrued across all assets in USD (18 decimals)"},"totalAllTimeInterestUSD":{"type":"string","description":"Total all-time interest accrued across all assets in USD (18 decimals)"},"assets":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"string","description":"Asset contract address"},"symbol":{"type":"string","description":"Asset symbol (e.g., WBTC, ETH)"},"totalDebtUSD":{"type":"string","description":"Total debt in USD for this asset (18 decimals)"},"annualRatePercent":{"type":"number","description":"Annual stability fee rate as percentage"},"dailyInterestUSD":{"type":"string","description":"Daily interest accrued for this asset in USD (18 decimals)"},"weeklyInterestUSD":{"type":"string","description":"Weekly interest accrued for this asset in USD (18 decimals)"},"monthlyInterestUSD":{"type":"string","description":"Monthly interest accrued for this asset in USD (18 decimals)"},"ytdInterestUSD":{"type":"string","description":"Year-to-date interest accrued for this asset in USD (18 decimals)"},"allTimeInterestUSD":{"type":"string","description":"All-time interest accrued for this asset in USD (18 decimals)"}}}}}}}}}}}},"/config":{"get":{"summary":"Fetch public application configuration","tags":["Configuration"],"responses":{"200":{"description":"Configuration payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/contact":{"post":{"summary":"Submit a physical metals inquiry","tags":["Contact"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","email","message"],"properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","format":"email"},"message":{"type":"string","maxLength":5000}}}}}},"responses":{"200":{"description":"Message sent successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Validation error"}}}},"/earn/token-apys":{"get":{"summary":"Get APYs for all yield-bearing tokens","description":"Returns all available APYs per token across 4 yield sources: lending pool, swap pools, vault, and safety module","tags":["Earn"],"responses":{"200":{"description":"Token APYs retrieved successfully"},"401":{"description":"Unauthorized"}}}},"/events":{"get":{"summary":"Query STRATO blockchain events","tags":["Events"],"parameters":[{"name":"order","in":"query","required":false,"description":"Order clause, e.g. block_timestamp.desc","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of events to return","schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"description":"Number of events to skip for pagination","schema":{"type":"string"}}],"responses":{"200":{"description":"Event list with total count","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","additionalProperties":true}},"total":{"type":"integer"}}}}}}}}},"/events/contracts":{"get":{"summary":"List contracts with emitted events","tags":["Events"],"responses":{"200":{"description":"Contract catalog grouped by name","content":{"application/json":{"schema":{"type":"object","properties":{"contracts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"events":{"type":"array","items":{"type":"string"}}}}}}}}}}}}},"/events/activities":{"get":{"summary":"Get activities filtered by exact (contract_name, event_name) pairs","tags":["Events"],"parameters":[{"name":"activity_types","in":"query","required":true,"description":"Comma-separated list of contract:event pairs, e.g. \"Proxy:Transfer,MercataBridge:DepositCompleted\"","schema":{"type":"string"}},{"name":"my_activity","in":"query","required":false,"description":"If true, filter by current user's address","schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of activities to return","schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"description":"Number of activities to skip for pagination","schema":{"type":"string"}}],"responses":{"200":{"description":"Activity list with total count","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","additionalProperties":true}},"total":{"type":"integer"}}}}}}}}},"/fees/quote":{"get":{"summary":"What one contract call costs the signed-in user right now","description":"The fee router's per-call charge (STRATO, or USDST before the STRATO-gas router), its price version and validity, the user's whole vouchers (each covers one call) and their balance of the fee currency.","tags":["Fees"],"responses":{"200":{"description":"Fee quote"}}}},"/lending/pools":{"get":{"summary":"Retrieve lending pool registry data","tags":["Lending"],"parameters":[{"name":"select","in":"query","required":false,"description":"Optional field selection forwarded to Cirrus","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of pools to return","schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"description":"Number of records to skip","schema":{"type":"string"}},{"name":"order","in":"query","required":false,"description":"Sort order clause","schema":{"type":"string"}}],"responses":{"200":{"description":"Lending pool details","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/lending/loans/borrow-max":{"post":{"summary":"Borrow the maximum available USDST","tags":["Lending"],"responses":{"200":{"description":"Borrow transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/collateral/withdraw-max":{"post":{"summary":"Withdraw the maximum collateral for an asset","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset"],"properties":{"asset":{"type":"string","description":"Collateral token address"}}}}}},"responses":{"200":{"description":"Withdrawal transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/collateral":{"get":{"summary":"View supplied collateral and balances","tags":["Lending"],"responses":{"200":{"description":"Collateral summary","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"post":{"summary":"Supply collateral to the lending pool","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset","amount"],"properties":{"asset":{"type":"string"},"amount":{"type":"string","description":"Amount of collateral to supply (decimal string)"}}}}}},"responses":{"200":{"description":"Supply transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"summary":"Withdraw supplied collateral","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset","amount"],"properties":{"asset":{"type":"string"},"amount":{"type":"string","description":"Amount of collateral to withdraw (decimal string)"}}}}}},"responses":{"200":{"description":"Withdrawal transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/liquidity":{"get":{"summary":"Fetch wallet liquidity and balances","tags":["Lending"],"responses":{"200":{"description":"Liquidity summary","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/loans":{"get":{"summary":"Retrieve current loans","tags":["Lending"],"responses":{"200":{"description":"Loan summary","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"post":{"summary":"Borrow USDST from the pool","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"string","description":"USDST amount to borrow (decimal string)"}}}}}},"responses":{"200":{"description":"Borrow transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"patch":{"summary":"Repay a portion of outstanding debt","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"string","description":"USDST amount to repay (decimal string)"}}}}}},"responses":{"200":{"description":"Repayment transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/pools/liquidity":{"post":{"summary":"Deposit liquidity into the lending pool","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"string","description":"Liquidity amount to deposit (decimal string)"}}}}}},"responses":{"200":{"description":"Deposit transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"summary":"Withdraw liquidity from the lending pool","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"string","description":"Liquidity amount to withdraw (decimal string)"}}}}}},"responses":{"200":{"description":"Withdrawal transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/pools/withdraw-all":{"post":{"summary":"Withdraw all available pool liquidity","tags":["Lending"],"responses":{"200":{"description":"Withdrawal transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/loans/repay-all":{"post":{"summary":"Repay all active loans","tags":["Lending"],"responses":{"200":{"description":"Repayment transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/liquidate":{"get":{"summary":"List loans currently liquidatable","tags":["Lending"],"responses":{"200":{"description":"Liquidatable loan details","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/lending/liquidate/near-unhealthy":{"get":{"summary":"List loans near the unhealthy threshold","tags":["Lending"],"parameters":[{"name":"margin","in":"query","required":false,"description":"Optional custom health-factor margin (defaults to 0.2)","schema":{"type":"number"}}],"responses":{"200":{"description":"Near-unhealthy loan details","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/lending/liquidate/{id}":{"post":{"summary":"Execute a liquidation against a loan","tags":["Lending"],"parameters":[{"name":"id","in":"path","required":true,"description":"Loan identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["collateralAsset"],"properties":{"collateralAsset":{"type":"string","description":"Collateral asset address to seize"},"repayAmount":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Amount of debt to repay (\"ALL\" to cover full debt)"},"minCollateralOut":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Minimum collateral amount to receive (slippage protection, defaults to 0)"}}}}}},"responses":{"200":{"description":"Liquidation transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/liquidations/{id}":{"post":{"summary":"Execute a liquidation (legacy endpoint)","tags":["Lending"],"parameters":[{"name":"id","in":"path","required":true,"description":"Loan identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["collateralAsset"],"properties":{"collateralAsset":{"type":"string"},"repayAmount":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Amount of debt to repay (\"ALL\" to cover full debt)"},"minCollateralOut":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Minimum collateral amount to receive (slippage protection, defaults to 0)"}}}}}},"responses":{"200":{"description":"Liquidation transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/admin/configure-asset":{"post":{"summary":"Configure lending asset parameters (admin)","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["asset","ltv","liquidationThreshold","liquidationBonus","interestRate","reserveFactor","perSecondFactorRAY"],"properties":{"asset":{"type":"string"},"ltv":{"type":"integer"},"liquidationThreshold":{"type":"integer"},"liquidationBonus":{"type":"integer"},"interestRate":{"type":"integer"},"reserveFactor":{"type":"integer"},"perSecondFactorRAY":{"type":"string","description":"Ray-formatted per-second interest factor (>= 1e27)"}}}}}},"responses":{"200":{"description":"Configuration transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/admin/sweep-reserves":{"post":{"summary":"Sweep protocol reserves (admin)","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"string","description":"Reserve amount to sweep (decimal string)"}}}}}},"responses":{"200":{"description":"Sweep transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/admin/set-debt-ceilings":{"post":{"summary":"Set global and per-asset debt ceilings (admin)","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["assetUnits","usdValue"],"properties":{"assetUnits":{"type":"string","description":"Debt ceiling measured in asset units (decimal string)"},"usdValue":{"type":"string","description":"Debt ceiling measured in USD value (decimal string)"}}}}}},"responses":{"200":{"description":"Debt ceiling transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/admin/pause":{"post":{"summary":"Pause the lending pool (admin)","tags":["Lending"],"responses":{"200":{"description":"Pause transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/admin/unpause":{"post":{"summary":"Unpause the lending pool (admin)","tags":["Lending"],"responses":{"200":{"description":"Unpause transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/safety/info":{"get":{"summary":"Retrieve safety module balances and state","tags":["Lending"],"responses":{"200":{"description":"Safety module information","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/safety/stake":{"post":{"summary":"Stake USDST into the safety module","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"string","description":"Amount of USDST to stake (decimal string)"}}}}}},"responses":{"200":{"description":"Stake transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/safety/cooldown":{"post":{"summary":"Start the safety module cooldown","tags":["Lending"],"responses":{"200":{"description":"Cooldown transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/safety/redeem":{"post":{"summary":"Redeem sUSDST shares from the safety module","tags":["Lending"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sharesAmount"],"properties":{"sharesAmount":{"type":"string","description":"Amount of sUSDST to redeem (decimal string)"}}}}}},"responses":{"200":{"description":"Redemption transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/safety/redeem-all":{"post":{"summary":"Redeem all sUSDST shares","tags":["Lending"],"responses":{"200":{"description":"Redemption transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/lending/interest":{"get":{"summary":"Get estimated protocol revenue from lending pool for multiple time periods","description":"Returns the estimated protocol revenue (FeeCollector portion) from lending interest.\n\nRevenue calculation:\n- Total interest accrues on borrowed debt\n- Only `reserveFactor` portion of interest goes to reserves\n- Of reserves, only `(10000 - safetyShareBps) / 10000` portion goes to FeeCollector as revenue\n\nFormula: revenue = interest × (reserveFactor / 10000) × ((10000 - safetyShareBps) / 10000)\n","tags":["Lending"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Estimated protocol revenue for daily, weekly, monthly, YTD, and all-time periods","content":{"application/json":{"schema":{"type":"object","properties":{"totalDailyRevenueUSD":{"type":"string","description":"Total daily protocol revenue in USD (18 decimals)"},"totalWeeklyRevenueUSD":{"type":"string","description":"Total weekly protocol revenue in USD (18 decimals)"},"totalMonthlyRevenueUSD":{"type":"string","description":"Total monthly protocol revenue in USD (18 decimals)"},"totalYtdRevenueUSD":{"type":"string","description":"Total year-to-date protocol revenue in USD (18 decimals)"},"totalAllTimeRevenueUSD":{"type":"string","description":"Total all-time protocol revenue in USD (18 decimals)"},"borrowableAsset":{"type":"object","properties":{"asset":{"type":"string","description":"Borrowable asset contract address"},"symbol":{"type":"string","description":"Asset symbol (e.g., USDST)"},"totalDebtUSD":{"type":"string","description":"Total debt in USD for this asset (18 decimals)"},"annualRatePercent":{"type":"number","description":"Annual interest rate as percentage"},"dailyRevenueUSD":{"type":"string","description":"Daily protocol revenue in USD (18 decimals)"},"weeklyRevenueUSD":{"type":"string","description":"Weekly protocol revenue in USD (18 decimals)"},"monthlyRevenueUSD":{"type":"string","description":"Monthly protocol revenue in USD (18 decimals)"},"ytdRevenueUSD":{"type":"string","description":"Year-to-date protocol revenue in USD (18 decimals)"},"allTimeRevenueUSD":{"type":"string","description":"All-time protocol revenue in USD (18 decimals)"}}}}}}}}}}},"/metal-forge/configs":{"get":{"summary":"Get MetalForge on-chain configurations","description":"Returns configured metals (with mint caps and fees) and supported payment tokens from the MetalForge contract","tags":["MetalForge"],"security":[],"responses":{"200":{"description":"MetalForge configuration","content":{"application/json":{"schema":{"type":"object","properties":{"metals":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"isEnabled":{"type":"boolean"},"mintCap":{"type":"string"},"feeBps":{"type":"integer"},"totalMinted":{"type":"string"}}}},"payTokens":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"}}}}}}}}}}}},"/metal-forge/buy":{"post":{"summary":"Buy metal tokens by paying with a supported token","description":"Approves the MetalForge contract to spend the pay token, then calls mintMetal on-chain","tags":["MetalForge"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["metalToken","payToken","payAmount","minMetalOut"],"properties":{"metalToken":{"type":"string","description":"Address of the metal token to mint"},"payToken":{"type":"string","description":"Address of the payment token"},"payAmount":{"type":"string","description":"Payment amount in wei"},"minMetalOut":{"type":"string","description":"Minimum metal output in wei (slippage protection)"}}}}}},"responses":{"200":{"description":"Mint transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}}},"/v1/metrics/tvl":{"get":{"summary":"Get protocol TVL metrics","description":"Retrieve the canonical STRATO TVL snapshot across DeFi-locked protocol balances","tags":["Metrics"],"responses":{"200":{"description":"TVL metrics payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/v1/metrics/stablecoins":{"get":{"summary":"Get stablecoin supply metrics","description":"Retrieve circulating stablecoin metrics for STRATO-recognized stable assets","tags":["Metrics"],"responses":{"200":{"description":"Stablecoin metrics payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/nfts/owned":{"get":{"summary":"List all NFTs owned by the signed-in user, aggregated across registered NFT sources","tags":["NFTs"],"responses":{"200":{"description":"Owned NFTs (kind, collection, tokenId, tokenURI)","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/nfts":{"get":{"summary":"List NFT collections","tags":["NFTs"],"parameters":[{"name":"status","in":"query","required":false,"description":"Optional Cirrus status filter (e.g. eq.2 for ACTIVE)","schema":{"type":"string"}}],"responses":{"200":{"description":"NFT collection list"}}}},"/nfts/{address}":{"get":{"summary":"Get an NFT collection with a paginated list of its items","tags":["NFTs"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"string"}},{"name":"offset","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Collection detail with items"},"404":{"description":"Collection not found"}}}},"/nfts/{address}/tokens/{tokenId}":{"get":{"summary":"Get a single NFT (owner, tokenURI, approved address)","tags":["NFTs"],"responses":{"200":{"description":"NFT item"},"404":{"description":"NFT not found"}}}},"/nfts/{address}/transfer":{"post":{"summary":"Transfer an owned NFT to another account","tags":["NFTs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"},"tokenId":{"type":"string"}}}}}},"responses":{"200":{"description":"Transaction result"}}}},"/nfts/{address}/burn":{"post":{"summary":"Burn an owned NFT (holder or approved operator, canonical ERC721Burnable semantics)","tags":["NFTs"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tokenId":{"type":"string"}}}}}},"responses":{"200":{"description":"Transaction result"}}}},"/onramp/session":{"post":{"summary":"Create a Stripe crypto onramp session","description":"Creates a new onramp session with Stripe and returns the client secret for embedding the widget.","tags":["Onramp"],"responses":{"200":{"description":"Onramp session created","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"clientSecret":{"type":"string"}}}}}}}},"400":{"description":"Onramp unavailable for this customer (geo restriction)"},"503":{"description":"Onramp temporarily disabled by Stripe"}}}},"/onramp/webhook":{"post":{"summary":"Stripe onramp webhook endpoint","description":"Receives session status updates from Stripe. Verified via Stripe-Signature header (no auth middleware).","tags":["Onramp"],"security":[],"responses":{"200":{"description":"Webhook acknowledged"},"400":{"description":"Invalid signature or missing header"}}}},"/onramp/transactions":{"get":{"summary":"Get onramp transaction history","description":"Returns the authenticated user's onramp transaction history.","tags":["Onramp"],"responses":{"200":{"description":"Transaction history","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"transactions":{"type":"array","items":{"type":"object","properties":{"stripeSessionId":{"type":"string"},"status":{"type":"string"},"destinationCurrency":{"type":"string"},"destinationNetwork":{"type":"string"},"destinationAmount":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"}}}}}}}}}}}}}},"/onramp/deposit-status":{"get":{"summary":"Check bridge deposit status by external tx hash","tags":["Onramp"],"parameters":[{"name":"txHash","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deposit status (pending, initiated, or completed)"}}}},"/oracle/price":{"get":{"summary":"Fetch oracle price data","tags":["Oracle"],"parameters":[{"name":"asset","in":"query","required":false,"schema":{"type":"string"},"description":"Optional asset address to filter for a single price"}],"responses":{"200":{"description":"Oracle price information","content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"type":"object","additionalProperties":true}},{"type":"object","additionalProperties":true}]}}}}}},"post":{"summary":"Set an oracle price (admin)","tags":["Oracle"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token","price"],"properties":{"token":{"type":"string","description":"Token address"},"price":{"type":"string","description":"Price value"}}}}}},"responses":{"200":{"description":"Price update transaction payload","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}}},"/oracle/price-history/{assetAddress}":{"get":{"summary":"Retrieve historical oracle prices","tags":["Oracle"],"parameters":[{"name":"assetAddress","in":"path","required":true,"schema":{"type":"string"}},{"name":"duration","in":"query","required":false,"description":"Time duration (1d, 7d, 1m, 3m, 6m, 1y, all). Defaults to 1m.","schema":{"type":"string"}},{"name":"end","in":"query","required":false,"description":"End timestamp (ISO string). Defaults to now.","schema":{"type":"string"}},{"name":"order","in":"query","required":false,"description":"Optional order clause (defaults to block_timestamp.asc)","schema":{"type":"string"}}],"responses":{"200":{"description":"Historical price data","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}},"totalCount":{"type":"integer"}}}}}}}}},"/oracle/strato-price-history/{assetAddress}":{"get":{"summary":"Retrieve STRATO (swap-implied) price history across all pools","description":"Computes a historical USD price for the asset from swap events in every pool it participates in (volatile, stable, and multi-token stable). Uses historical oracle prices for each counterpart token and aggregates across pools with a volume-weighted hourly average.\n","tags":["Oracle"],"parameters":[{"name":"assetAddress","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Historical STRATO price data","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}},"totalCount":{"type":"integer"}}}}}}}}},"/poolv3/pools":{"get":{"summary":"List concentrated liquidity (V3) pools","tags":["PoolV3"],"responses":{"200":{"description":"V3 pool list (deepest liquidity first)"}}},"post":{"summary":"Create a V3 pool (admin; owner is AdminRegistry, may raise a governance vote)","description":"Supply the initial price as EITHER `price` (human-readable) OR `initialSqrtPriceX96` (raw Q64.96) — exactly one is required. `tokenA` becomes token0 and `tokenB` token1, so the price is token1-per-token0 (tokenB per tokenA). `price` is converted to Q64.96 server-side using each token's decimals.","tags":["PoolV3"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tokenA","tokenB","fee"],"oneOf":[{"required":["price"]},{"required":["initialSqrtPriceX96"]}],"properties":{"tokenA":{"type":"string","description":"becomes token0"},"tokenB":{"type":"string","description":"becomes token1"},"fee":{"type":"integer","description":"fee tier in pips; must be enabled (default 500/3000/10000)"},"price":{"type":"string","description":"human-readable initial price, tokenB per tokenA (e.g. \"2000\", \"1793.25\"); converted to Q64.96 using token decimals. Provide this OR initialSqrtPriceX96"},"initialSqrtPriceX96":{"type":"string","description":"raw Q64.96 sqrt price, decimal string. Provide this OR price"}}}}}},"responses":{"200":{"description":"Transaction result"}}}},"/poolv3/fee-tiers":{"get":{"summary":"Fee tiers currently enabled on the PoolV3Factory","tags":["PoolV3"],"responses":{"200":{"description":"Enabled tiers (fee in pips with its tick spacing), ascending by fee"}}}},"/poolv3/pools/{poolAddress}":{"get":{"summary":"Fetch a V3 pool by address","tags":["PoolV3"],"parameters":[{"name":"poolAddress","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Pool detail"}}}},"/poolv3/pools/{poolAddress}/liquidity":{"get":{"summary":"Liquidity distribution across the price axis (depth-chart data)","tags":["PoolV3"],"parameters":[{"name":"poolAddress","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Active liquidity per initialized-tick interval, plus current tick/spacing"}}}},"/poolv3/positions":{"get":{"summary":"List the caller's V3 positions (optionally filtered by pool)","tags":["PoolV3"],"parameters":[{"name":"poolAddress","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Positions with computed amounts and range status"}}},"post":{"summary":"Mint a liquidity position NFT (PositionManagerV3)","description":"New positions are always minted through PositionManagerV3 and represented as ERC-721 tokens. The manager computes liquidity from the desired amounts at the current price and pulls exactly the pool-computed deposit from the caller. The deprecated pre-NFT shape (liquidity + amount0Max/amount1Max, no desired amounts) is still accepted and converted server-side.","tags":["PoolV3"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["poolAddress","tickLower","tickUpper"],"properties":{"poolAddress":{"type":"string"},"tickLower":{"type":"integer"},"tickUpper":{"type":"integer"},"amount0Desired":{"type":"string","description":"maximum token0 to deposit"},"amount1Desired":{"type":"string","description":"maximum token1 to deposit"},"amount0Min":{"type":"string","description":"minimum token0 that must be deposited (slippage check), default 0"},"amount1Min":{"type":"string","description":"minimum token1 that must be deposited (slippage check), default 0"},"liquidity":{"type":"string","description":"DEPRECATED pre-NFT shape: exact liquidity to mint (with amount0Max/amount1Max, instead of desired amounts)"},"amount0Max":{"type":"string","description":"DEPRECATED pre-NFT shape: token0 deposit ceiling"},"amount1Max":{"type":"string","description":"DEPRECATED pre-NFT shape: token1 deposit ceiling"}}}}}},"responses":{"200":{"description":"Transaction result"}}},"delete":{"summary":"Remove liquidity from a position (optionally collecting owed tokens)","description":"Address the position by `tokenId` (position NFTs) OR by poolAddress + ticks (legacy positions held directly on the pool) — exactly one addressing mode.","tags":["PoolV3"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["liquidity"],"properties":{"tokenId":{"type":"string","description":"position NFT id (NFT path)"},"poolAddress":{"type":"string","description":"legacy path"},"tickLower":{"type":"integer","description":"legacy path"},"tickUpper":{"type":"integer","description":"legacy path"},"liquidity":{"type":"string"},"amount0Min":{"type":"string","description":"slippage check (NFT path), default 0"},"amount1Min":{"type":"string","description":"slippage check (NFT path), default 0"},"collect":{"type":"boolean","description":"also collect all owed tokens"}}}}}},"responses":{"200":{"description":"Transaction result"}}}},"/poolv3/positions/increase":{"post":{"summary":"Add liquidity to an existing position NFT (same range)","tags":["PoolV3"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tokenId","amount0Desired","amount1Desired"],"properties":{"tokenId":{"type":"string"},"amount0Desired":{"type":"string"},"amount1Desired":{"type":"string"},"amount0Min":{"type":"string","description":"slippage check, default 0"},"amount1Min":{"type":"string","description":"slippage check, default 0"}}}}}},"responses":{"200":{"description":"Transaction result"}}}},"/poolv3/positions/collect":{"post":{"summary":"Collect owed tokens (burned principal + fees) from a position","description":"Same dual addressing as DELETE /positions — `tokenId` for position NFTs (the manager pokes the pool internally), or poolAddress + ticks for legacy positions (a poke transaction is prepended when the position has liquidity).","tags":["PoolV3"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tokenId":{"type":"string","description":"position NFT id (NFT path)"},"poolAddress":{"type":"string","description":"legacy path"},"tickLower":{"type":"integer","description":"legacy path"},"tickUpper":{"type":"integer","description":"legacy path"},"amount0Requested":{"type":"string"},"amount1Requested":{"type":"string"}}}}}},"responses":{"200":{"description":"Transaction result"}}}},"/poolv3/position-nfts/{tokenId}":{"get":{"summary":"The position NFT for a tokenId (resolved against the network's singleton PositionManagerV3)","tags":["PoolV3"],"parameters":[{"name":"tokenId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"NFT item (kind \"poolv3-position\") with owner and collection metadata"},"404":{"description":"No live token with this id (never minted or burned)"},"503":{"description":"PositionManagerV3 is not configured on this network"}}}},"/poolv3/amounts-for-liquidity":{"get":{"summary":"Preview token amounts for a liquidity value (or liquidity for desired amounts)","tags":["PoolV3"],"parameters":[{"name":"poolAddress","in":"query","required":true,"schema":{"type":"string"}},{"name":"tickLower","in":"query","required":true,"schema":{"type":"integer"}},{"name":"tickUpper","in":"query","required":true,"schema":{"type":"integer"}},{"name":"liquidity","in":"query","required":false,"schema":{"type":"string"}},{"name":"amount0Desired","in":"query","required":false,"schema":{"type":"string"}},{"name":"amount1Desired","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Amount preview"}}}},"/protocol-fees/revenue":{"get":{"summary":"Get aggregated protocol revenue across all protocols","tags":["Protocol Fees"],"security":[{"BearerAuth":[]}],"responses":{"200":{"description":"Aggregated protocol revenue data","content":{"application/json":{"schema":{"type":"object","properties":{"totalRevenue":{"type":"string","description":"Total aggregated revenue across all protocols"},"byProtocol":{"type":"object","properties":{"cdp":{"$ref":"#/components/schemas/ProtocolRevenue"},"lending":{"$ref":"#/components/schemas/ProtocolRevenue"},"swap":{"$ref":"#/components/schemas/ProtocolRevenue"},"stablePool":{"$ref":"#/components/schemas/ProtocolRevenue"},"poolV3":{"$ref":"#/components/schemas/ProtocolRevenue"},"metalForge":{"$ref":"#/components/schemas/ProtocolRevenue"},"gas":{"$ref":"#/components/schemas/ProtocolRevenue"}}},"aggregated":{"$ref":"#/components/schemas/RevenueByPeriod"}}}}}}}}},"/protocol-fees/revenue/{protocol}":{"get":{"summary":"Get protocol revenue for a specific protocol","tags":["Protocol Fees"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"protocol","in":"path","required":true,"schema":{"type":"string","enum":["cdp","lending","swap","stablePool","poolV3","metalForge","gas"]},"description":"Protocol to get revenue for"},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["daily","weekly","monthly","ytd","allTime"]},"description":"Optional time period filter"}],"responses":{"200":{"description":"Protocol revenue data","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProtocolRevenue"},{"$ref":"#/components/schemas/RevenuePeriod"}]}}}},"400":{"description":"Invalid protocol or period parameter"}}}},"/protocol-fees/revenue/period/{period}":{"get":{"summary":"Get protocol revenue by period (aggregated or specific protocol)","tags":["Protocol Fees"],"security":[{"BearerAuth":[]}],"parameters":[{"name":"period","in":"path","required":true,"schema":{"type":"string","enum":["daily","weekly","monthly","ytd","allTime"]},"description":"Time period to get revenue for"},{"name":"protocol","in":"query","required":false,"schema":{"type":"string","enum":["cdp","lending","swap","stablePool","poolV3","metalForge","gas"]},"description":"Optional protocol filter"}],"responses":{"200":{"description":"Revenue data for the specified period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenuePeriod"}}}},"400":{"description":"Invalid period or protocol parameter"}}}},"/refer/deposit":{"post":{"summary":"Deposit tokens to escrow for referral","tags":["Refer"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tokens","amounts","ephemeralAddress","expiry"],"properties":{"tokens":{"type":"array","items":{"type":"string"},"description":"Array of token contract addresses (with or without 0x prefix)"},"amounts":{"type":"array","items":{"type":"string"},"description":"Array of amounts in wei (as strings to avoid overflow)"},"ephemeralAddress":{"type":"string","description":"Ephemeral address for the recipient (with or without 0x prefix)"},"expiry":{"type":"number","description":"Expiry time in seconds from now (e.g., 604800 for 7 days)"},"quantity":{"type":"number","description":"Number of referrals this deposit supports (must be a positive integer)"}}}}}},"responses":{"200":{"description":"Deposit transaction submitted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}}}},"get":{"summary":"Get escrow deposit information","tags":["Refer"],"parameters":[{"name":"ephemeralAddress","in":"query","required":true,"description":"Ephemeral address (with or without 0x prefix)","schema":{"type":"string"}},{"name":"tokenAddress","in":"query","required":true,"description":"Token contract address (with or without 0x prefix)","schema":{"type":"string"}},{"name":"escrowContractAddress","in":"query","required":true,"description":"Escrow contract address (with or without 0x prefix)","schema":{"type":"string"}}],"responses":{"200":{"description":"Deposit information retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"sender":{"type":"string"},"token":{"type":"string"},"amount":{"type":"string"},"redeemed":{"type":"boolean"}}}}}}}},"404":{"description":"Deposit not found"}}}},"/refer/redeem":{"post":{"summary":"Redeem escrow deposit","tags":["Refer"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["r","s","v","recipientAddress"],"properties":{"r":{"type":"string","description":"r component of signature (hex string)"},"s":{"type":"string","description":"s component of signature (hex string)"},"v":{"type":"number","description":"v component of signature (recovery id, 27 or 28)"},"recipientAddress":{"type":"string","description":"Recipient address (with or without 0x prefix)"}}}}}},"responses":{"200":{"description":"Redemption request submitted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object"}}}}}},"400":{"description":"Invalid request parameters"},"500":{"description":"Redemption server error or misconfiguration"}}}},"/refer/referrals":{"get":{"summary":"Get all active referrals for the current user","tags":["Refer"],"responses":{"200":{"description":"List of active referrals retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"ephemeralAddress":{"type":"string"},"sender":{"type":"string"},"tokens":{"type":"array","items":{"type":"string"}},"amounts":{"type":"array","items":{"type":"string"}},"expiry":{"type":"number"}}}}}}}}}}}},"/refer/cancel":{"post":{"summary":"Cancel an expired referral deposit","tags":["Refer"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ephemeralAddress"],"properties":{"ephemeralAddress":{"type":"string","description":"Ephemeral address of the deposit to cancel (with or without 0x prefix)"}}}}}},"responses":{"200":{"description":"Cancellation transaction submitted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}},"400":{"description":"Invalid request parameters"},"403":{"description":"Deposit not eligible for cancellation (not expired or not owned by user)"}}}},"/refer/history":{"get":{"summary":"Get referral history (Redeemed and Cancelled events)","tags":["Refer"],"responses":{"200":{"description":"Referral history retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"eventName":{"type":"string"},"ephemeralAddress":{"type":"string"},"tokens":{"type":"array","items":{"type":"string"}},"amounts":{"type":"array","items":{"type":"string"}},"sender":{"type":"string"},"recipient":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"blockTimestamp":{"type":"string","format":"date-time"}}}}}}}}}}}},"/refer/status":{"get":{"summary":"Get referral status (active, redeemed, or cancelled)","tags":["Refer"],"parameters":[{"name":"ephemeralAddress","in":"query","required":true,"description":"Ephemeral address (with or without 0x prefix)","schema":{"type":"string"}}],"responses":{"200":{"description":"Referral status retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"status":{"type":"string","enum":["active","redeemed","cancelled"]},"eventName":{"type":"string","nullable":true},"blockTimestamp":{"type":"string","format":"date-time","nullable":true}}}}}}}},"400":{"description":"Invalid ephemeral address"}}}},"/rewards/overview":{"get":{"summary":"Get global Rewards contract overview data","tags":["Rewards"],"responses":{"200":{"description":"Rewards overview data","content":{"application/json":{"schema":{"type":"object","properties":{"rewardToken":{"type":"string","description":"Address of the reward token (CATA)","example":"2680dc6693021cd3fefb84351570874fbef8332a"},"totalRewardsEmission":{"type":"string","description":"Total emission rate across all activities (points per second)","example":"1000000000000000000"},"lastBlockHandled":{"type":"string","description":"Highest block number seen (for monitoring)","example":"12345"},"activityIds":{"type":"array","items":{"type":"integer"},"description":"Array of all activity IDs","example":[1,2,3]}}}}}},"401":{"description":"Unauthorized"}}}},"/rewards/activities":{"get":{"summary":"Get all activities in the system (without user-specific data)","tags":["Rewards"],"responses":{"200":{"description":"List of all activities","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"activityId":{"type":"integer"},"name":{"type":"string"},"activityType":{"type":"integer"},"emissionRate":{"type":"string"},"accRewardPerStake":{"type":"string"},"lastUpdateTime":{"type":"string"},"totalStake":{"type":"string"},"sourceContract":{"type":"string"}}}}}}},"401":{"description":"Unauthorized"}}}},"/rewards/activities/me":{"get":{"summary":"Get all activities with user-specific data for the authenticated user","tags":["Rewards"],"responses":{"200":{"description":"Activities with user-specific data and rewards breakdown","content":{"application/json":{"schema":{"type":"object","properties":{"unclaimedRewards":{"type":"string","description":"Total unclaimed rewards in wei (claimable now)","example":"5000000000000000000"},"claimedRewards":{"type":"string","description":"Total claimed rewards in wei (from RewardsClaimed events)","example":"10000000000000000000"},"activities":{"type":"array","items":{"type":"object","properties":{"activityId":{"type":"integer"},"name":{"type":"string"},"activityType":{"type":"integer"},"emissionRate":{"type":"string"},"accRewardPerStake":{"type":"string"},"lastUpdateTime":{"type":"string"},"totalStake":{"type":"string"},"sourceContract":{"type":"string"},"userInfo":{"type":"object","properties":{"stake":{"type":"string"},"userIndex":{"type":"string"}}},"personalEmissionRate":{"type":"string"}}}}}}}}},"400":{"description":"Invalid user address"},"401":{"description":"Unauthorized"}}}},"/rewards/claim-all":{"post":{"summary":"Claim all rewards from all activities","tags":["Rewards"],"responses":{"200":{"description":"Claim transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"txHash":{"type":"string"}}}}}},"401":{"description":"Unauthorized"}}}},"/rewards/claim/{activityId}":{"post":{"summary":"Claim rewards for a specific activity","tags":["Rewards"],"parameters":[{"in":"path","name":"activityId","required":true,"schema":{"type":"integer"},"description":"The activity ID to claim rewards from","example":1}],"responses":{"200":{"description":"Claim transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"txHash":{"type":"string"}}}}}},"400":{"description":"Invalid activity ID"},"401":{"description":"Unauthorized"}}}},"/rewards/leaderboard":{"get":{"summary":"Get leaderboard of top reward earners","tags":["Rewards"],"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","default":10,"minimum":1,"maximum":100},"description":"Maximum number of entries to return"},{"in":"query","name":"offset","schema":{"type":"integer","default":0,"minimum":0},"description":"Number of entries to skip"}],"responses":{"200":{"description":"Leaderboard response with entries and pagination info","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer"},"address":{"type":"string"},"totalRewardsEarned":{"type":"string","description":"Total rewards earned (unclaimed + pending rewards)"}}}},"total":{"type":"integer","description":"Total number of entries available"},"offset":{"type":"integer","description":"Current offset"},"limit":{"type":"integer","description":"Current limit"}}}}}},"401":{"description":"Unauthorized"}}}},"/rewards/leaderboard/me":{"get":{"summary":"Get the current user's rank on the leaderboard","tags":["Rewards"],"responses":{"200":{"description":"User rank response","content":{"application/json":{"schema":{"type":"object","properties":{"rank":{"type":"integer","nullable":true,"description":"User's rank (1-based), null if not on leaderboard"},"totalRewardsEarned":{"type":"string","nullable":true,"description":"Total rewards earned by the user"},"total":{"type":"integer","description":"Total number of users on the leaderboard"}}}}}},"401":{"description":"Unauthorized"}}}},"/rpc/{chainId}":{"post":{"summary":"Proxy a request to an RPC endpoint","tags":["RPC"],"parameters":[{"name":"chainId","in":"path","required":true,"description":"The chain ID; e.g. 1 for Ethereum mainnet, 11155111 for Sepolia","schema":{"type":"integer"}}],"responses":{"200":{"description":"The response from the RPC endpoint"}}}},"/swap-pools":{"get":{"summary":"List available swap pools","tags":["Swap"],"parameters":[{"name":"select","in":"query","required":false,"description":"Optional field projection forwarded to Cirrus","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of pools to return","schema":{"type":"string"}},{"name":"offset","in":"query","required":false,"description":"Number of pools to skip","schema":{"type":"string"}},{"name":"order","in":"query","required":false,"description":"Sort order clause","schema":{"type":"string"}}],"responses":{"200":{"description":"Swap pool list","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"post":{"summary":"Create a new swap pool","tags":["Swap"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tokenA","tokenB"],"properties":{"tokenA":{"type":"string","description":"Address of token A"},"tokenB":{"type":"string","description":"Address of token B"}}}}}},"responses":{"200":{"description":"Pool creation transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/swap-pools/positions":{"get":{"summary":"List user LP token positions","tags":["Swap"],"responses":{"200":{"description":"Liquidity positions","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/swap-pools/{tokenAddress1}/{tokenAddress2}":{"get":{"summary":"Fetch pools for a token pair","tags":["Swap"],"parameters":[{"name":"tokenAddress1","in":"path","required":true,"description":"Address of the first token","schema":{"type":"string"}},{"name":"tokenAddress2","in":"path","required":true,"description":"Address of the second token","schema":{"type":"string"}}],"responses":{"200":{"description":"Matching pools","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/swap-pools/{poolAddress}":{"get":{"summary":"Fetch a swap pool by address","tags":["Swap"],"parameters":[{"name":"poolAddress","in":"path","required":true,"description":"Pool contract address","schema":{"type":"string"}}],"responses":{"200":{"description":"Pool information","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/swap-pools/{poolAddress}/liquidity":{"post":{"summary":"Add liquidity with both tokens","tags":["Swap"],"parameters":[{"name":"poolAddress","in":"path","required":true,"description":"Pool contract address","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tokenBAmount","maxTokenAAmount"],"properties":{"tokenBAmount":{"type":"string","description":"Amount of token B to deposit (decimal string)"},"maxTokenAAmount":{"type":"string","description":"Maximum token A amount to pair (decimal string)"}}}}}},"responses":{"200":{"description":"Liquidity transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"summary":"Remove liquidity from the pool","tags":["Swap"],"parameters":[{"name":"poolAddress","in":"path","required":true,"description":"Pool contract address","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["lpTokenAmount"],"properties":{"lpTokenAmount":{"type":"string","description":"LP token amount to redeem (decimal string)"}}}}}},"responses":{"200":{"description":"Liquidity transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/swap-pools/{poolAddress}/liquidity/single":{"post":{"summary":"Add liquidity using a single token","tags":["Swap"],"parameters":[{"name":"poolAddress","in":"path","required":true,"description":"Pool contract address","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["singleTokenAmount","isAToB"],"properties":{"singleTokenAmount":{"type":"string","description":"Amount of the input token (decimal string)"},"isAToB":{"type":"boolean","description":"Direction of the deposit (true for token A to B)"}}}}}},"responses":{"200":{"description":"Liquidity transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/swap-pools/{poolAddress}/liquidity/multi-token":{"post":{"summary":"Add liquidity to a multi-token stable pool","tags":["Swap"],"parameters":[{"name":"poolAddress","in":"path","required":true,"description":"Pool contract address","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amounts","minMintAmount"],"properties":{"amounts":{"type":"array","items":{"type":"string"},"description":"Token amounts indexed by coin position (decimal strings)"},"minMintAmount":{"type":"string","description":"Minimum LP tokens to mint (decimal string)"},"stakeLPToken":{"type":"boolean","description":"Whether to stake LP tokens in RewardsChef"}}}}}},"responses":{"200":{"description":"Liquidity transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"summary":"Remove liquidity proportionally from a multi-token stable pool","tags":["Swap"],"parameters":[{"name":"poolAddress","in":"path","required":true,"description":"Pool contract address","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["lpTokenAmount","minAmounts"],"properties":{"lpTokenAmount":{"type":"string","description":"LP token amount to redeem (decimal string)"},"minAmounts":{"type":"array","items":{"type":"string"},"description":"Minimum amounts per coin (decimal strings)"},"includeStakedLPToken":{"type":"boolean","description":"Whether to include staked LP tokens"}}}}}},"responses":{"200":{"description":"Liquidity transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/swap-pools/{poolAddress}/liquidity/multi-token/one-coin":{"delete":{"summary":"Remove liquidity as a single coin from a multi-token stable pool","tags":["Swap"],"parameters":[{"name":"poolAddress","in":"path","required":true,"description":"Pool contract address","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["lpTokenAmount","coinIndex","minReceived"],"properties":{"lpTokenAmount":{"type":"string","description":"LP token amount to redeem (decimal string)"},"coinIndex":{"type":"integer","description":"Index of the coin to receive"},"minReceived":{"type":"string","description":"Minimum amount to receive (decimal string)"},"includeStakedLPToken":{"type":"boolean","description":"Whether to include staked LP tokens"}}}}}},"responses":{"200":{"description":"Liquidity transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/swap":{"post":{"summary":"Execute a token swap","tags":["Swap"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["poolAddress","isAToB","amountIn","minAmountOut"],"properties":{"poolAddress":{"type":"string"},"isAToB":{"type":"boolean"},"amountIn":{"type":"string","description":"Input token amount (decimal string)"},"minAmountOut":{"type":"string","description":"Minimum acceptable output (decimal string)"}}}}}},"responses":{"200":{"description":"Swap transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/swap-history/{poolAddress}":{"get":{"summary":"Retrieve swap history for a pool","tags":["Swap"],"parameters":[{"name":"poolAddress","in":"path","required":true,"description":"Pool contract address","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number (defaults to 1)","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Page size (defaults to 10)","schema":{"type":"integer"}},{"name":"sender","in":"query","required":false,"description":"Filter by sender address (user who performed the swap)","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated swap history","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}},"totalCount":{"type":"integer"}}}}}}}}},"/swap-pools/set-rates":{"post":{"summary":"Update pool fee rates (admin)","tags":["Swap"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["poolAddress","swapFeeRate","lpSharePercent"],"properties":{"poolAddress":{"type":"string"},"swapFeeRate":{"type":"number","description":"Swap fee in basis points (0-10000)"},"lpSharePercent":{"type":"number","description":"LP share percentage in basis points (0-10000)"}}}}}},"responses":{"200":{"description":"Rate update transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/swap-pools/toggle-pause":{"post":{"summary":"Toggle pause state of a swap pool (admin)","tags":["Swap"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["poolAddress","isPaused"],"properties":{"poolAddress":{"type":"string"},"isPaused":{"type":"boolean","description":"true to pause, false to unpause"}}}}}},"responses":{"200":{"description":"Transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/swap-pools/toggle-disable":{"post":{"summary":"Toggle disabled state of a swap pool (admin)","tags":["Swap"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["poolAddress","isDisabled"],"properties":{"poolAddress":{"type":"string"},"isDisabled":{"type":"boolean","description":"true to disable, false to enable"}}}}}},"responses":{"200":{"description":"Transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/tokens/balance":{"get":{"summary":"Retrieve token balances for the signed-in user","tags":["Tokens"],"parameters":[{"name":"select","in":"query","required":false,"description":"Optional field selection forwarded to Cirrus","schema":{"type":"string"}},{"name":"address","in":"query","required":false,"description":"Optional token address filter","schema":{"type":"string"}}],"responses":{"200":{"description":"Token balance entries","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/tokens/transferable":{"get":{"summary":"List transferable tokens","tags":["Tokens"],"responses":{"200":{"description":"Transferable token list","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/tokens/stats":{"get":{"summary":"Get token statistics including total supply and market cap","tags":["Tokens"],"responses":{"200":{"description":"Token statistics with total market cap","content":{"application/json":{"schema":{"type":"object","properties":{"totalMarketCap":{"type":"string","description":"Total market cap across all tokens"},"tokens":{"type":"array","description":"Array of tokens sorted by market cap descending","items":{"type":"object","properties":{"address":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"totalSupply":{"type":"string"},"marketCap":{"type":"string"}}}}}}}}}}}},"/tokens/check-recipient":{"get":{"summary":"Check whether a recipient address has activity on STRATO","tags":["Tokens"],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Recipient account nonce (0 = no activity)","content":{"application/json":{"schema":{"type":"object","properties":{"nonce":{"type":"integer"}}}}}}}}},"/tokens/{address}":{"get":{"summary":"Fetch token metadata by address","tags":["Tokens"],"parameters":[{"name":"address","in":"path","required":true,"description":"Token contract address","schema":{"type":"string"}}],"responses":{"200":{"description":"Token metadata","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/tokens":{"get":{"summary":"List tokens registered on STRATO","tags":["Tokens"],"parameters":[{"name":"select","in":"query","required":false,"description":"Optional field selection forwarded to Cirrus","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Optional status filter","schema":{"type":"string"}}],"responses":{"200":{"description":"Token list","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"post":{"summary":"Create a new token (admin)","tags":["Tokens"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","description","symbol","initialSupply","customDecimals"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"symbol":{"type":"string"},"initialSupply":{"type":"string","description":"Initial supply expressed as a decimal string"},"customDecimals":{"type":"integer"},"images":{"type":"string","description":"JSON-encoded array of image URIs"},"files":{"type":"string","description":"JSON-encoded array of file URIs"},"fileNames":{"type":"string","description":"JSON-encoded array of file names"}}}}}},"responses":{"200":{"description":"Token creation transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/tokens/transfer":{"post":{"summary":"Transfer tokens to another address","tags":["Tokens"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address","to","value"],"properties":{"address":{"type":"string","description":"Token contract address"},"to":{"type":"string","description":"Recipient address"},"value":{"type":"string","description":"Transfer amount (decimal string)"}}}}}},"responses":{"200":{"description":"Transfer transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/tokens/bulk-transfer":{"post":{"summary":"Transfer tokens to multiple recipients in bulk","tags":["Tokens"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address","transfers"],"properties":{"address":{"type":"string","description":"Token contract address"},"transfers":{"type":"array","description":"Array of transfer items (max 100)","items":{"type":"object","required":["to","value"],"properties":{"to":{"type":"string","description":"Recipient address"},"value":{"type":"string","description":"Transfer amount (wei string)"}}}}}}}}},"responses":{"200":{"description":"Bulk transfer results","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string"},"status":{"type":"string"},"hash":{"type":"string"},"error":{"type":"string"}}}},"successCount":{"type":"integer"},"failureCount":{"type":"integer"}}}}}}}}},"/tokens/approve":{"post":{"summary":"Approve a spender for token allowances","tags":["Tokens"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address","spender","value"],"properties":{"address":{"type":"string","description":"Token contract address"},"spender":{"type":"string","description":"Spender address"},"value":{"type":"string","description":"Allowance amount (decimal string)"}}}}}},"responses":{"200":{"description":"Approval transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/tokens/transferFrom":{"post":{"summary":"Transfer tokens on behalf of another address","tags":["Tokens"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address","from","to","value"],"properties":{"address":{"type":"string","description":"Token contract address"},"from":{"type":"string","description":"Source address"},"to":{"type":"string","description":"Recipient address"},"value":{"type":"string","description":"Transfer amount (decimal string)"}}}}}},"responses":{"200":{"description":"Transfer transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/tokens/setStatus":{"post":{"summary":"Update a token's status (admin)","tags":["Tokens"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address","status"],"properties":{"address":{"type":"string"},"status":{"type":"integer","enum":[1,2,3],"description":"1=PENDING, 2=ACTIVE, 3=LEGACY"}}}}}},"responses":{"200":{"description":"Status update transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/tokens/v2":{"get":{"summary":"Get user tokens (v2)","tags":["Tokens"],"parameters":[{"name":"select","in":"query","required":false,"description":"Optional field selection forwarded to Cirrus","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Optional status filter","schema":{"type":"string"}}],"responses":{"200":{"description":"User tokens list","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/tokens/v2/earning-assets":{"get":{"summary":"Get earning assets for the signed-in user (v2)","tags":["Tokens"],"responses":{"200":{"description":"Earning assets list","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/tokens/v2/net-balance":{"get":{"summary":"Get current net balance (assets minus debt) for the signed-in user","tags":["Tokens"],"responses":{"200":{"description":"Net balance snapshot","content":{"application/json":{"schema":{"type":"object","properties":{"netBalance":{"type":"number"},"totalBorrowed":{"type":"number"},"totalAssetValue":{"type":"number"}}}}}}}}},"/tokens/v2/balance-history":{"get":{"summary":"Get token balance history for the signed-in user (v2)","tags":["Tokens"],"responses":{"200":{"description":"Net balance history","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/tokens/v2/net-balance-history":{"get":{"summary":"Get net balance history for the signed-in user (v2)","tags":["Tokens"],"responses":{"200":{"description":"Net balance history","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/tokens/v2/borrowing-history":{"get":{"summary":"Get borrowing history for the signed-in user (v2)","tags":["Tokens"],"responses":{"200":{"description":"Borrowing history","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/tokens/v2/pool-price-history":{"get":{"summary":"Get pool price history for a given pool (v2)","tags":["Tokens"],"responses":{"200":{"description":"Pool price history","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}},"/trade/tokens":{"get":{"summary":"List all tokens tradable on any pool (V2, stable, or V3)","tags":["Trade"],"responses":{"200":{"description":"Tradable tokens with user balances and pool balances"}}}},"/trade/tokens/{tokenAddress}/pairs":{"get":{"summary":"List tokens tradable against the given token","tags":["Trade"],"parameters":[{"name":"tokenAddress","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Pairable tokens with user balances and pool balances"}}}},"/trade/pools/{tokenAddress1}/{tokenAddress2}":{"get":{"summary":"All pools that can trade the pair, normalized across pool types (V2, stable, V3 fee tiers)","tags":["Trade"],"parameters":[{"name":"tokenAddress1","in":"path","required":true,"description":"The input-side token; pool sides are oriented to it","schema":{"type":"string"}},{"name":"tokenAddress2","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Normalized TradePool list (label, fee, oriented balances, spot and oracle rates, TVL)"}}}},"/trade/quote":{"get":{"summary":"Exact quotes for a pair across every candidate pool, computed with each contract's own math","tags":["Trade"],"parameters":[{"name":"tokenIn","in":"query","required":true,"schema":{"type":"string"}},{"name":"tokenOut","in":"query","required":true,"schema":{"type":"string"}},{"name":"amount","in":"query","required":true,"description":"Positive wei amount of the independent side","schema":{"type":"string"}},{"name":"type","in":"query","required":true,"description":"EXACT_INPUT quotes output for a given input; EXACT_OUTPUT quotes required input","schema":{"type":"string","enum":["EXACT_INPUT","EXACT_OUTPUT"]}}],"responses":{"200":{"description":"Per-pool quotes plus the best executable pool address"}}}},"/trade/swap":{"post":{"summary":"Execute a swap on any pool type; the pool address determines the contract call","tags":["Trade"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["poolAddress","tokenIn","tokenOut","amountIn","minAmountOut"],"properties":{"poolAddress":{"type":"string"},"tokenIn":{"type":"string"},"tokenOut":{"type":"string"},"amountIn":{"type":"string","description":"Input amount in wei (executed as exact input on all pool types)"},"minAmountOut":{"type":"string","description":"Slippage floor in wei"}}}}}},"responses":{"200":{"description":"Swap transaction payload"}}}},"/trade/history/{tokenAddress1}/{tokenAddress2}":{"get":{"summary":"Unified swap history for a pair across all pool types","tags":["Trade"],"parameters":[{"name":"tokenAddress1","in":"path","required":true,"schema":{"type":"string"}},{"name":"tokenAddress2","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"sender","in":"query","required":false,"description":"Filter to the user's trades","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated merged history; entries carry poolName (\"V2\" / \"Stable\" / \"V3 0.3%\")"}}}},"/user/me":{"get":{"summary":"Retrieve profile information for the signed-in user","tags":["User"],"responses":{"200":{"description":"Current user details","content":{"application/json":{"schema":{"type":"object","properties":{"userAddress":{"type":"string"},"isAdmin":{"type":"boolean"},"userName":{"type":"string"}}}}}}}}},"/user/admin":{"get":{"summary":"List registered protocol administrators","tags":["Admin"],"responses":{"200":{"description":"Administrator addresses","content":{"application/json":{"schema":{"type":"object","properties":{"admins":{"type":"array","items":{"type":"string"}}}}}}}}},"post":{"summary":"Grant administrator access","tags":["Admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userAddress"],"properties":{"userAddress":{"type":"string","description":"Address to promote to admin"}}}}}},"responses":{"201":{"description":"Admin grant transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"delete":{"summary":"Revoke administrator access","tags":["Admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userAddress"],"properties":{"userAddress":{"type":"string","description":"Address to revoke admin rights from"}}}}}},"responses":{"200":{"description":"Admin revoke transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/user/admin/contract/search":{"get":{"summary":"Search contracts by name or address","tags":["Admin"],"parameters":[{"name":"search","in":"query","required":true,"description":"Search term for contract discovery","schema":{"type":"string"}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/user/admin/contract/details":{"get":{"summary":"Retrieve contract metadata by address","tags":["Admin"],"parameters":[{"name":"address","in":"query","required":true,"description":"Contract address to inspect","schema":{"type":"string"}}],"responses":{"200":{"description":"Contract detail payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/user/admin/vote":{"post":{"summary":"Create an admin issue by calling the target function directly","tags":["Admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["target","func","args"],"properties":{"target":{"type":"string","description":"Contract address to call"},"func":{"type":"string","description":"Function to call on the target contract"},"args":{"type":"array","description":"Positional raw argument values","items":{}}}}}}},"responses":{"200":{"description":"Issue transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/user/admin/vote/simulate":{"post":{"summary":"Dry-run an administrative vote (no signing or commit)","description":"Simulates casting a vote on an issue and returns the vote tx result with the issue's \"effect if executed\" (target.func(args) run as the AdminRegistry) nested under `effect`.\n","tags":["Admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["target","func","args"],"properties":{"target":{"type":"string"},"func":{"type":"string"},"args":{"type":"array","items":{}}}}}}},"responses":{"200":{"description":"Simulated vote result (with nested effect)","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/user/admin/vote/by-id":{"post":{"summary":"Cast an administrative vote by issue ID","tags":["Admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["issueId"],"properties":{"issueId":{"type":"string","description":"The ID of the issue to vote on"}}}}}},"responses":{"200":{"description":"Vote transaction payload","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/user/admin/dismiss":{"post":{"summary":"Dismiss an issue (only works if proposer is the only voter)","tags":["Admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["issueId"],"properties":{"issueId":{"type":"string","description":"The ID of the issue to dismiss"}}}}}},"responses":{"200":{"description":"Issue dismissed successfully","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/user/admin/issues":{"get":{"summary":"List open administrative issues with pagination","tags":["Admin"],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","default":1},"description":"Page number"},{"in":"query","name":"limit","schema":{"type":"integer","default":10},"description":"Items per page"}],"responses":{"200":{"description":"Governance issue overview","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/user/admin/issues/executed":{"get":{"summary":"List executed administrative issues with pagination","tags":["Admin"],"parameters":[{"in":"query","name":"page","schema":{"type":"integer","default":1},"description":"Page number"},{"in":"query","name":"limit","schema":{"type":"integer","default":10},"description":"Items per page"}],"responses":{"200":{"description":"Paginated executed issues","content":{"application/json":{"schema":{"type":"object","properties":{"executed":{"type":"array"},"executedTotal":{"type":"integer"}}}}}}}}},"/vault/info":{"get":{"summary":"Get vault global state","description":"Retrieve the vault's global state including total equity, withdrawable equity, NAV per share, and per-asset data","tags":["Vault"],"responses":{"200":{"description":"Vault info retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"totalEquity":{"type":"string","description":"Total vault equity in USD (18 decimals)"},"withdrawableEquity":{"type":"string","description":"Withdrawable equity in USD (18 decimals)"},"totalShares":{"type":"string","description":"Total vault shares (18 decimals)"},"navPerShare":{"type":"string","description":"NAV per share in USD (18 decimals)"},"apy":{"type":"string","description":"APY as decimal"},"paused":{"type":"boolean","description":"Whether the vault is paused"},"assets":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"balance":{"type":"string"},"minReserve":{"type":"string"},"withdrawable":{"type":"string"},"priceUsd":{"type":"string"},"valueUsd":{"type":"string"}}}},"deficitAssets":{"type":"array","items":{"type":"string"},"description":"Array of asset addresses below minimum reserve"},"shareTokenSymbol":{"type":"string"},"shareTokenAddress":{"type":"string"},"botExecutor":{"type":"string"}}}}}}}}},"/vault/user":{"get":{"summary":"Get user's vault position","description":"Retrieve the authenticated user's position in the vault","tags":["Vault"],"responses":{"200":{"description":"User position retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"userShares":{"type":"string","description":"User's vault shares (18 decimals)"},"userValueUsd":{"type":"string","description":"User's position value in USD (18 decimals)"}}}}}}}}},"/vault/user/activity":{"get":{"summary":"Get user's vault deposit/withdrawal activity","description":"Retrieve the authenticated user's deposit and withdrawal history","tags":["Vault"],"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","default":20},"description":"Maximum number of activity items to return"}],"responses":{"200":{"description":"User activity retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"activity":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["deposit","withdrawal"]},"timestamp":{"type":"string"},"assetSymbol":{"type":"string"},"amountIn":{"type":"string"},"sharesMinted":{"type":"string"},"sharesBurned":{"type":"string"},"valueUsd":{"type":"string"}}}}}}}}}}}},"/vault/balances":{"get":{"summary":"Get user's token balances for vault assets","description":"Retrieve the authenticated user's balances for all supported vault assets. Only returns tokens where the user has a positive balance.","tags":["Vault"],"responses":{"200":{"description":"User balances retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"balances":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Token contract address"},"symbol":{"type":"string","description":"Token symbol"},"name":{"type":"string","description":"Token name"},"balance":{"type":"string","description":"User's balance (18 decimals)"},"priceUsd":{"type":"string","description":"Current price in USD (18 decimals)"},"images":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"}}}}}}}}}}}}}}},"/vault/transactions":{"get":{"summary":"Get bot swap transactions","description":"Retrieve recent swap transactions executed by the vault's bot","tags":["Vault"],"parameters":[{"in":"query","name":"limit","schema":{"type":"integer","default":10},"description":"Maximum number of transactions to return"}],"responses":{"200":{"description":"Transactions retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["swap"]},"timestamp":{"type":"string"},"tokenIn":{"type":"object","properties":{"address":{"type":"string"},"symbol":{"type":"string"},"amount":{"type":"string"}}},"tokenOut":{"type":"object","properties":{"address":{"type":"string"},"symbol":{"type":"string"},"amount":{"type":"string"}}}}}}}}}}}}}},"/vault/deposit":{"post":{"summary":"Deposit tokens into the vault","description":"Deposit a supported token into the vault and receive vault shares","tags":["Vault"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token","amount"],"properties":{"token":{"type":"string","description":"Token contract address"},"amount":{"type":"string","description":"Amount to deposit (18 decimals)"}}}}}},"responses":{"200":{"description":"Deposit transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}}},"/vault/withdraw/preview":{"get":{"summary":"Preview withdrawal basket","description":"Get a preview of the tokens that would be received for a given withdrawal amount","tags":["Vault"],"parameters":[{"in":"query","name":"amountUsd","required":true,"schema":{"type":"string"},"description":"USD value to preview (18 decimals)"}],"responses":{"200":{"description":"Withdrawal basket preview","content":{"application/json":{"schema":{"type":"object","properties":{"basket":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"weightPercent":{"type":"string"},"usdValue":{"type":"string"},"tokenAmount":{"type":"string"},"included":{"type":"boolean"}}}}}}}}}}}},"/vault/withdraw":{"post":{"summary":"Withdraw from the vault","description":"Withdraw by specifying USD value to redeem. Payouts are drawn proportionally from withdrawable assets.","tags":["Vault"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amountUsd"],"properties":{"amountUsd":{"type":"string","description":"USD value to withdraw (18 decimals)"}}}}}},"responses":{"200":{"description":"Withdrawal transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"},"basket":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"amount":{"type":"string"}}}}}}}}}}}},"/vault/withdraw-shares":{"post":{"summary":"Withdraw from the vault by burning an exact number of shares","description":"Burns the given number of vault shares and pays out their current USD value proportionally from withdrawable assets. Pass the user's full share balance to withdraw everything without leaving dust.","tags":["Vault"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["shares"],"properties":{"shares":{"type":"string","description":"Number of shares to burn (18 decimals)"}}}}}},"responses":{"200":{"description":"Withdrawal transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}}},"/vault/admin/pause":{"post":{"summary":"Pause the vault (admin only)","description":"Pause the vault to block deposits and withdrawals","tags":["Vault Admin"],"responses":{"200":{"description":"Pause transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}}},"/vault/admin/unpause":{"post":{"summary":"Unpause the vault (admin only)","description":"Unpause the vault to allow deposits and withdrawals","tags":["Vault Admin"],"responses":{"200":{"description":"Unpause transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}}},"/vault/admin/reserves":{"post":{"summary":"Set minimum reserve for an asset (admin only)","description":"Configure the minimum reserve amount for a supported asset","tags":["Vault Admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token","minReserve"],"properties":{"token":{"type":"string","description":"Asset contract address"},"minReserve":{"type":"string","description":"New minimum reserve amount (18 decimals)"}}}}}},"responses":{"200":{"description":"Set reserve transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}}},"/vault/admin/executor":{"post":{"summary":"Set bot executor address (admin only)","description":"Update the bot executor address that holds vault assets","tags":["Vault Admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["executor"],"properties":{"executor":{"type":"string","description":"New bot executor address"}}}}}},"responses":{"200":{"description":"Set executor transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}}},"/vault/admin/assets":{"post":{"summary":"Add a supported asset (admin only)","description":"Add a new asset to the vault's supported assets list","tags":["Vault Admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string","description":"Asset contract address to add"}}}}}},"responses":{"200":{"description":"Add asset transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}},"delete":{"summary":"Remove a supported asset (admin only)","description":"Remove an asset from the vault's supported assets list. Asset must have zero balance.","tags":["Vault Admin"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string","description":"Asset contract address to remove"}}}}}},"responses":{"200":{"description":"Remove asset transaction result","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"hash":{"type":"string"}}}}}}}}}},"tags":[]}