{"openapi":"3.0.0","paths":{"/health":{"get":{"description":"**System Function**: Performs a comprehensive health check on the DeFindex API.\n\nThis endpoint provides:\n- API service availability and connectivity\n- Database connection status (mainnet and testnet)\n- Connection pool statistics\n\nUseful for monitoring tools, load balancers, and operational dashboards.","operationId":"AppController_checkHealth","parameters":[],"responses":{"200":{"description":"API is healthy and operational","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"reachable":{"type":"boolean","description":"Whether the API is reachable and responding"}}},"indexer":{"type":"object","description":"Indexer data source health status (database)","properties":{"mainnet":{"type":"object","properties":{"database":{"type":"object","properties":{"configured":{"type":"boolean"},"healthy":{"type":"boolean"},"poolStats":{"type":"object","properties":{"totalCount":{"type":"number"},"idleCount":{"type":"number"},"waitingCount":{"type":"number"}}}}}}},"testnet":{"type":"object","properties":{"database":{"type":"object"}}}}}},"example":{"status":{"reachable":true},"indexer":{"mainnet":{"database":{"configured":true,"healthy":true,"poolStats":{"totalCount":3,"idleCount":3,"waitingCount":0}}},"testnet":{"database":{"configured":false,"healthy":false,"poolStats":null}}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}},"500":{"description":"API is experiencing issues","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"object","properties":{"indexer":{"type":"string","description":"Status of indexer service"},"reachable":{"type":"boolean","description":"Whether the API is reachable"},"errors":{"type":"array","items":{"type":"string"},"description":"Array of error messages if any"}}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}}},"summary":"API health check","tags":["App"]}},"/send":{"post":{"description":"**System Function**: Submits a pre-signed DeFindex transaction to the Stellar blockchain network.\n    \nThis endpoint allows users to submit transaction XDRs that have been prepared by other DeFindex endpoints and signed by the user. The service handles transaction submission and provides gas-free transaction processing for valid DeFindex operations.\n\n**Idempotent.** A signed XDR has one hash and the network applies it at most once, so retrying is safe: if the transaction already landed, the response is its original result and nothing is resubmitted; if it is still queued, the call waits for it. The call waits up to 60 seconds for confirmation; on a timeout, submit the same XDR again. An XDR built by this API has no upper time bound (maxTime 0), so it stays valid until its source account's sequence number moves past it: if another transaction from that account lands first, rebuild and sign again.","operationId":"StellarController_sendTransaction","parameters":[{"name":"network","required":true,"in":"query","description":"Stellar network to submit transaction to (testnet or mainnet)","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Signed transaction data ready for blockchain submission.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendXdrDto"},"examples":{"Submit signed transaction":{"value":{"xdr":"AAAAAgAAAAC7VYzjqMryr..."}}}}}},"responses":{"201":{"description":"Transaction applied on-chain (or already applied by an earlier call with the same XDR)","content":{"application/json":{"schema":{"type":"object","properties":{"txHash":{"type":"string","description":"Transaction hash"},"success":{"type":"boolean","description":"Whether the transaction succeeded"},"result":{"type":"object","nullable":true,"description":"Parsed contract return value","properties":{"type":{"type":"string","description":"Result type. Currently always `unknown`: read `value` against the function you called"},"value":{"description":"Parsed return value"}}},"ledger":{"type":"number","description":"Ledger number where transaction was included"},"createdAt":{"type":"string","description":"Transaction creation timestamp (ISO 8601)"},"latestLedger":{"type":"number","description":"Latest known ledger number"},"latestLedgerCloseTime":{"type":"string","description":"Latest ledger close time"},"feeBump":{"type":"boolean","description":"Whether fee bump was applied"},"feeCharged":{"type":"string","description":"Fee charged in stroops"}},"example":{"txHash":"6599224a0f08186e59441397202c0513e4383490c54c6fcdb1cf31d35e086d6a","success":true,"result":{"type":"unknown","value":[["4000000000"],"4021025140",null]},"ledger":65015482,"createdAt":"1792363193","latestLedger":65112150,"latestLedgerCloseTime":"1792846533","feeBump":true,"feeCharged":"287898"}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Invalid XDR, or the transaction failed on-chain: `message` is the Stellar result code (e.g. `txBadSeq`, `txBadAuth`, `txTooLate`)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"401":{"description":"Unauthorized - valid JWT token required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Submit signed transaction to Stellar blockchain","tags":["Stellar"]}},"/register":{"post":{"description":"**System Function**: Creates a new user account in the DeFindex platform. \n    This endpoint allows new users to register for access to the DeFindex API. Only `username`, `email` and `password` are read; any other field is ignored. The account is created enabled, with role USER.","operationId":"AuthController_register","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthRegisterDto"}}}},"responses":{"201":{"description":"User registered successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation message indicating successful registration"}},"example":{"message":"User defi_investor registered"}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Invalid input: malformed email, username outside its rules, or a password under 8 characters or over 72 bytes (UTF-8)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"409":{"description":"User already exists (email or username taken)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Register a new user account","tags":["Auth"]}},"/login":{"post":{"description":"**System Function**: Authenticates a user with email/password credentials and returns JWT tokens for API access.\n    This endpoint validates user credentials and provides both access and refresh tokens. The access token is used for authenticating API requests, while the refresh token can be used to obtain new access tokens when they expire.","operationId":"AuthController_login","parameters":[],"requestBody":{"required":true,"description":"User login credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthLoginDto"},"examples":{"User login":{"value":{"email":"user@example.com","password":"SecurePassword123!"}}}}}},"responses":{"200":{"description":"Authentication successful","content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","description":"Username of the authenticated user"},"role":{"type":"string","description":"Role of the authenticated user"},"access_token":{"type":"string","description":"JWT access token for API authentication"},"refresh_token":{"type":"string","description":"JWT refresh token for renewing access tokens"}},"example":{"username":"defi_investor","role":"USER","access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"401":{"description":"Unauthorized - invalid credentials","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Authenticate user and obtain JWT tokens","tags":["Auth"]}},"/refresh":{"post":{"description":"**System Function**: Obtains a new access token using a valid refresh token.\n    This endpoint allows users to refresh their expired access tokens without requiring re-authentication. Users must provide their valid refresh token to receive new access and refresh tokens.","operationId":"AuthController_refreshTokens","parameters":[],"responses":{"200":{"description":"Token refresh successful","content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","description":"Username of the user"},"role":{"type":"string","description":"Role of the user"},"access_token":{"type":"string","description":"New JWT access token for API authentication"},"refresh_token":{"type":"string","description":"New JWT refresh token for future renewals"}},"example":{"username":"defi_investor","role":"USER","access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"401":{"description":"Account disabled, or a missing, malformed or expired refresh token","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Refresh token already rotated, or the session was ended (logout, new login, disable)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Refresh JWT access token","tags":["Auth"]}},"/api-keys/generate":{"post":{"description":"Generates a new API key for the authenticated user. Only one API key per user is allowed - generating a new one will revoke the previous one.","operationId":"ApiKeysController_generateApiKey","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyGenerateDto"}}}},"responses":{"201":{"description":"API key generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","example":"sk_1234567890abcdef...","description":"The generated API key"},"id":{"type":"number","example":1,"description":"The unique identifier for the API key"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"security":[{"bearer":[]}],"summary":"Generate API Key","tags":["API Keys"]}},"/api-keys":{"get":{"description":"Retrieves all API keys for the authenticated user, without the keys themselves: each row carries only keyPrefix. The full key is returned only once, by POST /api-keys/generate.","operationId":"ApiKeysController_getUserApiKeys","parameters":[],"responses":{"200":{"description":"API keys retrieved successfully","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier for the API key"},"name":{"type":"string","description":"Name of the API key"},"keyPrefix":{"type":"string","nullable":true,"description":"The first 11 characters of the key, to tell keys apart","example":"sk_1a2b3c4d"},"createdAt":{"type":"string","description":"Creation timestamp"},"lastUsedAt":{"type":"string","nullable":true,"description":"Last usage timestamp"}}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"security":[{"bearer":[]}],"summary":"Get API Keys","tags":["API Keys"]}},"/api-keys/{keyId}/revoke":{"post":{"description":"Revokes an API key for the authenticated user","operationId":"ApiKeysController_revokeApiKey","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRevokeDto"}}}},"responses":{"200":{"description":"API key revoked successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the revocation was successful"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"security":[{"bearer":[]}],"summary":"Revoke API Key","tags":["API Keys"]}},"/logout":{"post":{"description":"Ends the console session: the refresh token stops working at once. Send the access token (JWT from /login or /refresh) as Bearer; API keys are not accepted. The access token itself stays valid until it expires (1 hour). Idempotent: calling it again answers 204.","operationId":"SessionController_logout","parameters":[],"responses":{"204":{"description":"Logged out (also when already logged out)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"401":{"description":"Bearer is an API key (console session only), or the account is disabled","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Missing, invalid or expired access token","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"security":[{"bearer":[]}],"summary":"Log out","tags":["Auth"]}},"/factory/address":{"get":{"description":"**System Function**: Retrieves the address of the factory contract for a specific Stellar network.\n\nThis endpoint provides the factory contract address that is used to create new vaults. It's essential for applications that need to interact with the factory contract to deploy new vault instances.","operationId":"FactoryController_getDefindexFactoryAddress","parameters":[{"name":"network","required":true,"in":"query","description":"Stellar network to query (testnet or mainnet)","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"responses":{"200":{"description":"Factory contract address retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Factory contract address on the specified network"}},"example":{"address":"CDKFHFJIET3A73A2YN4KV7NSV32S6YGQMUFH3DNJXLBWL4SKEGVRNFKI"}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - network parameter is required","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"Not found - no factory contract deployed for this network","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get factory contract address","tags":["Factory"]}},"/factory/create-vault":{"post":{"description":"**Manager Function - Vault Manager**: Creates a new DeFindex vault with the specified configuration parameters.\n    This endpoint allows authorized vault managers to deploy new vault contracts through the factory. The vault will be configured with the provided assets, strategies, and management parameters. This is typically used during the initial setup phase of a new investment strategy.","operationId":"FactoryController_createDefindexVault","parameters":[{"name":"network","required":true,"in":"query","description":"Stellar network to execute the transaction on (testnet or mainnet)","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Vault creation parameters. All parameters are required for vault deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVaultDto"},"examples":{"New vault creation":{"value":{"roles":{"emergencyManager":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V","feeReceiver":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V","manager":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V","rebalanceManager":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V"},"vaultFeeBps":25,"assets":[{"address":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","strategies":[{"address":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP","name":"Strategy A","paused":false}]}],"name":"MyVault","symbol":"MVLT","upgradable":true,"caller":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V"}}}}}},"responses":{"200":{"description":"Vault creation transaction prepared successfully","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 encoded transaction XDR ready for signing by Vault Manager"},"simulationResponse":{"type":"string","description":"Simulation result of the transaction"},"error":{"type":"string","description":"Error message if any"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid vault creation parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized as Vault Manager","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"Not found - no factory contract deployed for this network","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Create a new vault","tags":["Factory"]}},"/factory/create-vault-deposit":{"post":{"description":"**User Experience Function**: Creates a new DeFindex vault and performs an initial deposit in a single atomic transaction.\n    This endpoint combines vault creation and initial deposit, providing a streamlined user experience for launching a new vault with immediate funding. This is ideal for users who want to create and immediately invest in a new vault strategy.","operationId":"FactoryController_createDefindexVaultDeposit","parameters":[{"name":"network","required":true,"in":"query","description":"Stellar network to execute the transaction on (testnet or mainnet)","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Vault creation and deposit parameters. Note that some parameters may be optional.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVaultDepositDto"},"examples":{"Create vault with initial deposit":{"value":{"roles":{"emergencyManager":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V","feeReceiver":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V","manager":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V","rebalanceManager":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V"},"vaultFeeBps":25,"assets":[{"address":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","strategies":[{"address":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP","name":"Strategy A","paused":false}]}],"name":"MyVault","symbol":"MVLT","upgradable":true,"caller":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V","depositAmounts":[100,200]}}}}}},"responses":{"200":{"description":"Vault creation and deposit transaction prepared successfully","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 encoded transaction XDR ready for signing by Vault Manager"},"simulationResponse":{"type":"string","description":"Simulation result of the transaction"},"error":{"type":"string","description":"Error message if any"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid vault creation or deposit parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"Not found - no factory contract deployed for this network","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Create vault and deposit in single transaction","tags":["Factory"]}},"/factory/create-vault-auto-invest":{"post":{"description":"**Advanced Function**: Creates a new DeFindex vault and automatically invests deposited funds.\n\n    This endpoint creates a batched transaction that:\n    1. Creates the vault with initial deposit\n    2. Invests funds in specified strategies (rebalance)\n    3. Changes manager to the final address\n\n    All operations are atomic - either all succeed or all fail. This provides a seamless user experience for creating fully-invested vaults in a single transaction.","operationId":"FactoryController_createVaultAutoInvest","parameters":[{"name":"network","required":true,"in":"query","description":"Stellar network to execute the transaction on (testnet or mainnet)","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Auto-invest vault creation parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVaultAutoInvestDto"},"examples":{"Create vault with auto-invest":{"value":{"caller":"GBZXUKUYGXLASTLIXGIV2RJGWQHVRIS7AANR7AHXFPA67LNSAGO6WPPE","roles":{"emergencyManager":"GBAJGSZQRZDMHKU4DAS6FEJM7TYISAME5LNERKOT7XLMNFZ5IF5ROXOQ","rebalanceManager":"GBAJGSZQRZDMHKU4DAS6FEJM7TYISAME5LNERKOT7XLMNFZ5IF5ROXOQ","feeReceiver":"GBAJGSZQRZDMHKU4DAS6FEJM7TYISAME5LNERKOT7XLMNFZ5IF5ROXOQ","manager":"GBAJGSZQRZDMHKU4DAS6FEJM7TYISAME5LNERKOT7XLMNFZ5IF5ROXOQ"},"name":"Auto-Invest Test Vault","symbol":"AITV","vaultFee":10,"upgradable":true,"assets":[{"address":"CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC","symbol":"XLM","amount":200,"strategies":[{"address":"CCEE2VAGPXKVIZXTVIT4O5B7GCUDTZTJ5RIXBPJSZ7JWJCJ2TLK75WVW","name":"xlm_hodl_strategy","amount":100},{"address":"CAHWRPKBPX4FNLXZOAD565IBSICQPL5QX37IDLGJYOPWX22WWKFWQUBA","name":"xlm_juice_strategy","amount":100}]}]}}}}}},"responses":{"201":{"description":"Transaction XDR created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","description":"Transaction XDR to sign and submit"},"predictedVaultAddress":{"type":"string","description":"Predicted vault address from simulation (may differ from actual)"},"warning":{"type":"string","description":"Warning about address prediction reliability"}},"example":{"xdr":"AAAAAgAAAAA...","predictedVaultAddress":"CCQ2BCKKDX7HSF5TULLRFRKS4RYIC5ZZGYYTBR3XFDLZ6MMZFRJNXIEA","warning":"The vault address is predicted from simulation. Actual address may differ if network state changes."}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Invalid parameters or strategy allocations","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}},"500":{"description":"Failed to create transaction","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}}},"summary":"Create vault with auto-invest","tags":["Factory"]}},"/strategies":{"get":{"description":"Returns all registered strategies with their current TVL, APY (7d/30d/all-time), name, underlying asset, and strategy type.","operationId":"StrategyController_getStrategies","parameters":[{"name":"network","required":false,"in":"query","description":"Stellar network, defaults to mainnet","schema":{"enum":["mainnet","testnet"],"type":"string"}}],"responses":{"200":{"description":"List of strategies","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Strategy contract address"},"type":{"type":"string","description":"Strategy type"},"name":{"type":"string","description":"Strategy identifier"},"asset":{"type":"string","description":"Underlying asset contract address"},"tvl":{"type":"string","description":"TVL in the asset's smallest unit (integer string)"},"currentPps":{"type":"string","description":"Current price per share, fixed point (integer string)"},"apy7d":{"type":"string","nullable":true,"description":"APY over the last 7 days as a fraction, not a percentage (0.0641 = 6.41%). Decimal string."},"apy30d":{"type":"string","nullable":true,"description":"APY over the last 30 days as a fraction (decimal string)"},"apyAllTime":{"type":"string","nullable":true,"description":"APY since inception as a fraction (decimal string)"},"assetSymbol":{"type":"string","description":"Asset symbol (`native` is XLM)"},"assetName":{"type":"string"},"assetDecimals":{"type":"integer","description":"Decimals of the asset"}}},"example":[{"address":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP","type":"BlendStrategy","name":"blend_autocompound_fixed","asset":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","tvl":"191685420149831","currentPps":"1154931313522","apy7d":"0.06412228146672388086","apy30d":"0.07069232218358076241","apyAllTime":"0.10240590295102956734","assetSymbol":"USDC","assetName":"USD Coin","assetDecimals":7}]}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get all strategies with TVL and APY","tags":["Strategy"]}},"/vault/discover":{"get":{"description":"Queries the factory contract for main Defindex vaults and returns their addresses with total managed funds. Results are cached for 5 minutes.","operationId":"VaultController_discoverVaults","parameters":[{"name":"network","required":true,"in":"query","description":"Stellar network to query (testnet or mainnet)","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"responses":{"200":{"description":"List of main Defindex vaults with managed funds","content":{"application/json":{"schema":{"type":"object","properties":{"totalVaults":{"type":"number","description":"Total number of vaults fetched in request","example":14},"vaults":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Vault contract address"},"apy":{"type":"number","nullable":true,"description":"APY as a percentage (5.93 = 5.93%), net of fees, or null if the calculation failed"},"totalManagedFunds":{"type":"array","nullable":true,"description":"Total managed funds per asset, or null if the simulation for this vault failed","items":{"type":"object","properties":{"asset":{"type":"string","description":"Asset contract address"},"total_amount":{"type":"string","description":"Total managed amount for this asset, in the asset's smallest unit (integer string)"}}}}}}}},"example":{"totalVaults":14,"vaults":[{"address":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","totalManagedFunds":[{"asset":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","total_amount":"2566257863301"}],"apy":5.93}]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Invalid or missing `network` query parameter. Must be \"testnet\" or \"mainnet\".","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"number","example":400},"message":{"type":"string","example":"Unsupported network: invalid_value"},"error":{"type":"string","example":"Bad Request"}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded. Too many requests for your current tier. Retry after the indicated time.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}},"500":{"description":"Internal server error. Possible cause: multiple contract call failures or unexpected infrastructure issues.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}}},"summary":"Discover main Defindex vaults","tags":["Vault"]}},"/vault/{address}":{"get":{"description":"**User Experience Function**: Retrieves comprehensive information about a specific vault including metadata, total value locked (TVL), underlying assets, and current strategies.","operationId":"VaultController_getVaultInfo","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"responses":{"200":{"description":"Vault information retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Vault display name","example":"DeFindex-Vault-BeansUsdcVault"},"symbol":{"type":"string","description":"Vault token symbol/ticker","example":"BNSUSDC"},"roles":{"type":"object","description":"Administrative role assignments","properties":{"manager":{"type":"string","description":"Manager address with full administrative control","example":"G...A"},"emergencyManager":{"type":"string","description":"Emergency manager address for rescue operations","example":"G...A"},"rebalanceManager":{"type":"string","description":"Rebalance manager address for asset rebalancing","example":"G...A"},"feeReceiver":{"type":"string","description":"Fee receiver address that receives management fees","example":"G...A"}}},"assets":{"type":"array","description":"Supported underlying assets","items":{"type":"object","properties":{"address":{"type":"string","description":"Asset contract address","example":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75"},"name":{"type":"string","description":"Full asset identifier","example":"USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"},"symbol":{"type":"string","description":"Asset symbol","example":"USDC"},"strategies":{"type":"array","description":"Investment strategies available for this asset","items":{"type":"object","properties":{"address":{"type":"string","description":"Strategy contract address","example":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP"},"name":{"type":"string","description":"Strategy identifier/name","example":"usdc_blend_autocompound_fixed"},"paused":{"type":"boolean","description":"Whether strategy is currently paused","example":false}}}}}}},"totalManagedFunds":{"type":"array","description":"Current asset allocation (TVL breakdown)","items":{"type":"object","properties":{"asset":{"type":"string","description":"Asset address","example":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75"},"idle_amount":{"type":"string","description":"Amount not currently invested (string to handle large numbers)","example":"0"},"invested_amount":{"type":"string","description":"Total amount currently invested in strategies","example":"7167250947314"},"strategy_allocations":{"type":"array","description":"Per-strategy allocation breakdown","items":{"type":"object","properties":{"amount":{"type":"string","description":"Amount allocated to this strategy","example":"7167250947314"},"paused":{"type":"boolean","description":"Strategy pause status","example":false},"strategy_address":{"type":"string","description":"Strategy contract address","example":"CCSRX5E4337QMCMC3KO3RDFYI57T5NZV5XB3W3TWE4USCASKGL5URKJL"}}}},"total_amount":{"type":"string","description":"Total amount (idle + invested) for this asset","example":"7167250947314"}}}},"feesBps":{"type":"object","description":"Fee structure in basis points (1 bps = 0.01%)","properties":{"vaultFee":{"type":"number","description":"Vault management fee in basis points (0 = no fee)","example":0},"defindexFee":{"type":"number","description":"DeFindex platform fee in basis points (2000 bps = 20%)","example":2000}}},"apy":{"type":"number","description":"Last 7d APY as a percentage (19.41 = 19.41%), net of fees","example":19.41}},"example":{"name":"DeFindex-Vault-BeansUsdcVault","symbol":"BNSUSDC","roles":{"manager":"G...A","emergencyManager":"G...A","rebalanceManager":"G...A","feeReceiver":"G...A"},"assets":[{"address":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","name":"USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN","symbol":"USDC","strategies":[{"address":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP","name":"usdc_blend_autocompound_fixed","paused":false},{"address":"CCSRX5E4337QMCMC3KO3RDFYI57T5NZV5XB3W3TWE4USCASKGL5URKJL","name":"usdc_blend_autocompound_yieldblox","paused":false}]}],"totalManagedFunds":[{"asset":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","idle_amount":"0","invested_amount":"7167250947314","strategy_allocations":[{"amount":"0","paused":false,"strategy_address":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP"},{"amount":"7167250947314","paused":false,"strategy_address":"CCSRX5E4337QMCMC3KO3RDFYI57T5NZV5XB3W3TWE4USCASKGL5URKJL"}],"total_amount":"7167250947314"}],"feesBps":{"vaultFee":0,"defindexFee":2000},"apy":19.41}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get vault information","tags":["Vault"]}},"/vault/{address}/balance":{"get":{"description":"**User Experience Function**: Retrieves the balance information for a specific user in a vault, including the number of shares owned and their current value in underlying assets.\n\n`dfTokens` are vault shares; `underlyingBalance` is what those shares are worth now, one entry per vault asset. The share price rises as the vault earns, so `underlyingBalance` is not what the user deposited. To exit completely, withdraw `dfTokens` with `POST /vault/{address}/withdraw-shares`.","operationId":"VaultController_getVaultBalance","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"from","required":true,"in":"query","description":"Wallet address (G... or C...) to read","schema":{"example":"GBMZYL5BVFU3HQLNRM4AC4GTRP553KL2THIZDEZ4RCOIHJH7CK4JKY5M","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"responses":{"200":{"description":"Shares held and their current value","content":{"application/json":{"schema":{"type":"object","properties":{"dfTokens":{"type":"string","description":"Vault shares held (7 decimals), integer string"},"underlyingBalance":{"type":"array","items":{"type":"string"},"description":"Current value of those shares per vault asset, in each asset's smallest unit, in the order of `assets` in GET /vault/{address}"}},"example":{"dfTokens":"82708152010","underlyingBalance":["82342953245"]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get user vault balance","tags":["Vault"]}},"/vault/{address}/deposit":{"post":{"description":"**User Experience Function**: Allows users to deposit assets into a vault and receive vault shares in return.\n\nRead the vault first (`GET /vault/{address}`): `amounts` takes one integer per vault asset, in the order of `assets`, in each asset's smallest unit. Returns an unsigned transaction; sign it as `caller` and submit it with `POST /send`.","operationId":"VaultController_deposit","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Deposit parameters. Optional parameters: invest (defaults to true), slippageBps (defaults to 0)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositDto"}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"`[amounts deposited per asset, shares minted, invest result]`. Amounts and shares are integer strings."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":[["1000000"],"1004435",null],"functionName":"deposit","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":[["1000000"],["995000"],"GBMZYL5BVFU3HQLNRM4AC4GTRP553KL2THIZDEZ4RCOIHJH7CK4JKY5M",false]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Deposit assets into vault","tags":["Vault"]}},"/vault/{address}/withdraw":{"post":{"description":"**User Experience Function**: Allows users to withdraw specific amounts of underlying assets from a vault by burning the equivalent vault shares.\n\n`amounts` takes one integer per vault asset, in each asset's smallest unit. To withdraw everything, use `withdraw-shares` with the full `dfTokens` balance instead: withdrawing the full underlying amount leaves dust or fails on rounding.","operationId":"VaultController_withdraw","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Withdrawal parameters. Optional: slippageBps (defaults to 0)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawDto"}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"Amounts withdrawn per asset (integer strings). `params[0]` is the number of shares burned."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":["1000000"],"functionName":"withdraw","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":["1004436",["995000"],"GBMZYL5BVFU3HQLNRM4AC4GTRP553KL2THIZDEZ4RCOIHJH7CK4JKY5M"]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Withdraw specific asset amounts from vault","tags":["Vault"]}},"/vault/{address}/withdraw-shares":{"post":{"description":"**User Experience Function**: Allows users to withdraw from a vault by specifying the exact number of vault shares to burn.\n\nThe way to exit a position completely: pass the full `dfTokens` from `GET /vault/{address}/balance`.","operationId":"VaultController_withdrawShares","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Share withdrawal parameters. Optional: slippageBps (defaults to 0)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawSharesDto"}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"Amounts returned per asset (integer strings)."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":["995584"],"functionName":"withdraw","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":[1000000,[990606],"GBMZYL5BVFU3HQLNRM4AC4GTRP553KL2THIZDEZ4RCOIHJH7CK4JKY5M"]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Withdraw by burning specific amount of vault shares","tags":["Vault"]}},"/vault/{address}/apy":{"get":{"description":"**User Experience Function**: Retrieves the 7-day Annual Percentage Yield (APY) for a vault. This endpoint calculates APY based on the vault's performance over the last 7 days and returns it as an annualized percentage.","operationId":"VaultController_getApy","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"responses":{"200":{"description":"7-day APY retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"apy":{"type":"number","description":"7-day APY as a percentage (19.4 = 19.4%), net of fees, annualized","example":19.4}},"example":{"apy":19.4}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get vault 7-day Annual Percentage Yield (APY)","tags":["Vault"]}},"/vault/{address}/fees/status":{"get":{"description":"Fees accrued per strategy and how the locked fees split between the fee receiver and the protocol. Raw amounts are integer strings in the asset's smallest unit; `*Display` fields are the same amounts formatted for people.","operationId":"VaultController_getFeeStatus","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"responses":{"200":{"description":"Fee status","content":{"application/json":{"schema":{"type":"object","example":{"vaultAddress":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","feesBps":{"vaultFee":1000,"defindexFee":2000},"feeReceiver":"GDODXKVMPKS6AX4Q3W7GM4I45EQMAKMRVCNPDM7DD7METRUN6BENQKQ6","strategies":[{"strategyAddress":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP","strategyName":"usdc_blend_autocompound_fixed","asset":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","assetSymbol":"USDC","pendingGains":"28909635","pendingGainsDisplay":"2.89","lockedFees":"32974900423","lockedFeesDisplay":"3,297.49","estimatedNextLockFees":"2890963","estimatedNextLockFeesDisplay":"0.28909"}],"totals":{"asset":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","assetSymbol":"USDC","totalLockedFees":"32974900423","totalLockedFeesDisplay":"3,297.49","totalPendingGains":"28909635","totalPendingGainsDisplay":"2.89","feeReceiverShare":"26379920338","feeReceiverShareDisplay":"2,637.99","protocolShare":"6594980084","protocolShareDisplay":"659.49"},"lastUpdated":"2026-10-24T12:00:00.000Z"}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get fee status for a vault","tags":["Vault"]}},"/vault/{address}/rescue":{"post":{"description":"**Manager Function - Emergency Manager**: Emergency operation to rescue assets from a strategy that may be malfunctioning or at risk.","operationId":"VaultController_rescue","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Rescue operation parameters. All parameters are required for this emergency operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RescueFromVaultDto"}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"Return value of the contract call in simulation. Amounts are strings in the asset's smallest unit."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"rescue","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":["CCSRX5E4337QMCMC3KO3RDFYI57T5NZV5XB3W3TWE4USCASKGL5URKJL","GDBWEQX5SRUWBGKA76A6QVDWMSDXK33VBDHBVN2LPZJTI2PLLI32XFL7"]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Rescue assets from a strategy","tags":["Vault"]}},"/vault/{address}/pause-strategy":{"post":{"description":"**Manager Function - Strategy Manager**: Temporarily halts operations of a specific strategy within a vault.","operationId":"VaultController_pauseStrategy","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Strategy pause parameters. All parameters are required for this management operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseStrategyDto"}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"Return value of the contract call in simulation. Amounts are strings in the asset's smallest unit."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"pause_strategy","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":["CCSRX5E4337QMCMC3KO3RDFYI57T5NZV5XB3W3TWE4USCASKGL5URKJL","GA3GWDNI6KYNXPJQVAXMKW6O47ADEQ25KWAEWZKA5JCXQ5APL6VKZR2N"]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Pause a vault strategy","tags":["Vault"]}},"/vault/{address}/unpause-strategy":{"post":{"description":"**Manager Function - Strategy Manager**: Resumes operations of a previously paused strategy within a vault.","operationId":"VaultController_unpauseStrategy","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Strategy unpause parameters. All parameters are required for this management operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnpauseStrategyDto"}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"Return value of the contract call in simulation. Amounts are strings in the asset's smallest unit."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"unpause_strategy","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":["CCSRX5E4337QMCMC3KO3RDFYI57T5NZV5XB3W3TWE4USCASKGL5URKJL","GA3GWDNI6KYNXPJQVAXMKW6O47ADEQ25KWAEWZKA5JCXQ5APL6VKZR2N"]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Unpause a vault strategy","tags":["Vault"]}},"/vault/{address}/get/{role}":{"get":{"description":"**User Experience Function**: Unified endpoint for retrieving vault role addresses. \n    \n    **Supported roles:**\n    - **manager**: Retrieves the current manager address\n    - **emergency-manager**: Retrieves the current emergency manager address  \n    - **rebalance-manager**: Retrieves the current rebalance manager address\n    - **fee-receiver**: Retrieves the current fee receiver address\n    \n    The role parameter in the URL determines which role address will be retrieved.","operationId":"VaultController_getRole","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"role","required":true,"in":"path","schema":{"type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"responses":{"200":{"description":"Address holding the role","content":{"application/json":{"schema":{"type":"object","properties":{"function_called":{"type":"string","description":"Contract getter that was called"},"address":{"type":"string","description":"Address holding the role"}},"example":{"function_called":"get_manager","address":"GA3GWDNI6KYNXPJQVAXMKW6O47ADEQ25KWAEWZKA5JCXQ5APL6VKZR2N"}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get vault role","tags":["Vault"]}},"/vault/{address}/set/{role}":{"post":{"description":"**Manager Function**: Unified endpoint for setting vault roles. \n    \n    **Supported roles:**\n    - **manager**: Updates the manager address (requires current Manager role)\n    - **emergency-manager**: Updates the emergency manager address (requires Manager role)  \n    - **rebalance-manager**: Updates the rebalance manager address (requires Manager role)\n    - **fee-receiver**: Updates the fee receiver address (requires Manager or current fee receiver role)\n    \n    The role parameter in the URL determines which role will be updated.","operationId":"VaultController_setRole","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"role","required":true,"in":"path","schema":{"type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Role setting parameters. The role to set is determined by the URL path parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetRoleDto"},"examples":{"Set manager":{"value":{"new_address":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V","caller":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}},"Set emergency manager":{"value":{"new_address":"GACKTN5DAZGWXRWB2WLM6OPBDHAMT6SJNGLJZPQMEZBUR4JUGBX2UK7V","caller":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}}}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"Return value of the contract call in simulation. Amounts are strings in the asset's smallest unit."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"set_fee_receiver","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":[{"caller":"GA3GWDNI6KYNXPJQVAXMKW6O47ADEQ25KWAEWZKA5JCXQ5APL6VKZR2N","newManager":"GDODXKVMPKS6AX4Q3W7GM4I45EQMAKMRVCNPDM7DD7METRUN6BENQKQ6"}]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Set vault role","tags":["Vault"]}},"/vault/{address}/report":{"get":{"description":"**User Experience Function**: Generates performance reports for all strategies in the vault, tracking their performance metrics, gains/losses, and fee accrual. This operation updates strategy balances and calculates performance since the last report.","operationId":"VaultController_report","parameters":[{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}},{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}}],"responses":{"200":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"One report per strategy: `prev_balance`, `gains_or_losses` and `locked_fee`, integer strings in the asset's smallest unit."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":[{"gains_or_losses":"28909635","locked_fee":"32974900423","prev_balance":"2594859865511"},{"gains_or_losses":"0","locked_fee":"0","prev_balance":"0"}],"functionName":"report","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":[]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Generate strategy reports for vault","tags":["Vault"]}},"/vault/{address}/rebalance":{"post":{"description":"**Manager Function - Rebalance Manager**: Rebalances the strategies within a vault to optimize asset allocation and performance. This operation adjusts the distribution of assets across strategies based on predefined criteria or market conditions.","operationId":"VaultController_rebalance","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Rebalance parameters. This operation may include instructions for asset allocation, strategy adjustments, or other rebalancing criteria.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RebalanceDto"},"examples":{"Rebalance with instructions":{"value":{"instructions":[{"type":"Invest","strategy_address":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP","amount":500000},{"type":"Unwind","strategy_address":"CCBTSHPUVNKCT5V675AAVYNANHXBU26PTZK2QLS7ZLFNYRJZT5HW3VL6","amount":300000}]}},"Rebalance with swap":{"value":{"instructions":[{"type":"SwapExactIn","token_in":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","token_out":"CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA","amount":100000,"slippageToleranceBps":50}]}}}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"Return value of the contract call in simulation. Amounts are strings in the asset's smallest unit."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"rebalance","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":[[{"type":"Unwind","strategy_address":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP","amount":1000000}],"GDPOCCBO3KLNXZRZC3NSKTSMIJYWIKEAO3XRSRONSUX36RF37XXF52BA"]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Rebalance vault strategies","tags":["Vault"]}},"/vault/{address}/lock-fees":{"post":{"description":"**Manager Function**: Locks the fees accrued by the vault, preventing further accrual until the fees are released or distributed. This operation is performed by the manager to manage fee collection and distribution.","operationId":"VaultController_lockFees","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Lock fees parameters. This operation may include the new fee basis points to set.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockFeesDto"},"examples":{"Lock fees with new fee bps":{"value":{"new_fee_bps":20,"caller":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}},"Lock fees without changing fee bps":{"value":{"caller":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}}}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"One report per strategy after locking, as in GET /vault/{address}/report."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":[{"gains_or_losses":"0","locked_fee":"32974900423","prev_balance":"2594859865511"},{"gains_or_losses":"0","locked_fee":"0","prev_balance":"0"}],"functionName":"lock_fees","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":[null,"GA3GWDNI6KYNXPJQVAXMKW6O47ADEQ25KWAEWZKA5JCXQ5APL6VKZR2N"]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Lock vault fees","tags":["Vault"]}},"/vault/{address}/release-fees":{"post":{"description":"**Manager Function**: Releases the fees that were previously locked by the vault manager. This operation allows the manager to distribute or utilize the locked fees as needed.","operationId":"VaultController_releaseFees","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseFeesDto"}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"Return value of the contract call in simulation. Amounts are strings in the asset's smallest unit."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"release_fees","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":["CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP",1000000]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Release locked vault fees","tags":["Vault"]}},"/vault/{address}/distribute-fees":{"post":{"description":"**Manager Function**: Distributes the fees accrued by the vault to the designated recipients. This operation is performed by the manager to manage fee distribution effectively.","operationId":"VaultController_distributeFees","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Distribute fees parameters. All parameters are required for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributeFeesDto"}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"`[asset, amount distributed]` pairs, amounts as integer strings."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":[["CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","32974900423"]],"functionName":"distribute_fees","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":["GA3GWDNI6KYNXPJQVAXMKW6O47ADEQ25KWAEWZKA5JCXQ5APL6VKZR2N"]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Distribute vault fees","tags":["Vault"]}},"/vault/{address}/upgrade":{"post":{"description":"**Manager Function**: Upgrades the vault contract to a new version by providing the new WASM hash. This operation is performed by the manager to ensure the vault contract is up-to-date with the latest features and fixes.","operationId":"VaultController_upgrade","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"description":"Upgrade parameters. All parameters are required for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeWasmDto"},"examples":{"Upgrade vault contract":{"value":{"new_wasm_hash":"new_wasm_hash_value","caller":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}}}}}},"responses":{"201":{"description":"Unsigned transaction built for `caller`. Nothing moves until it is signed and submitted (`POST /send`).","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true,"description":"Base64 transaction envelope ready for the caller to sign. `null` when the caller is a smart wallet (C address): build your own transaction around `operationXDR`."},"simulationResponse":{"description":"Return value of the contract call in simulation. Amounts are strings in the asset's smallest unit."},"functionName":{"type":"string","description":"Contract function the transaction calls"},"operationXDR":{"type":"string","description":"Base64 of the single invokeHostFunction operation, for smart wallets and custom transactions"},"isSmartWallet":{"type":"boolean","description":"Whether `caller` is a contract (C) address"},"params":{"description":"Arguments the contract function was called with, as the API resolved them"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"upgrade","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false,"params":["<new_wasm_hash>","GA3GWDNI6KYNXPJQVAXMKW6O47ADEQ25KWAEWZKA5JCXQ5APL6VKZR2N"]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Upgrade vault contract wasm","tags":["Vault"]}},"/vault/{address}/depositors":{"get":{"description":"Returns a paginated list of all depositors with estimated balance, activity status, and transaction history. Status is computed from idleThresholdDays and minBalance thresholds (configurable per-user via VaultUserConfig, overridable by query params). NOTE: v1 only supports single-asset vaults; multi-asset vaults default to assets[0].","operationId":"VaultController_getDepositors","parameters":[{"name":"address","required":true,"in":"path","description":"Stellar address of the vault contract","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Stellar network (testnet or mainnet). Defaults to mainnet.","schema":{"enum":["testnet","mainnet"],"type":"string"}},{"name":"limit","required":false,"in":"query","description":"Results per page (max 100)","schema":{"default":25,"type":"number"}},{"name":"offset","required":false,"in":"query","schema":{"default":0,"type":"number"}},{"name":"sortBy","required":false,"in":"query","schema":{"default":"balance","type":"string","enum":["balance","lastActivityAt","totalDeposited","walletAddress"]}},{"name":"sortOrder","required":false,"in":"query","schema":{"default":"desc","type":"string","enum":["asc","desc"]}},{"name":"idleThresholdDays","required":false,"in":"query","description":"Days without activity before a depositor is classified as idle (default 30)","schema":{"type":"number"}},{"name":"minBalance","required":false,"in":"query","description":"Minimum balance in stroops of the resolved asset. Depositors below this are inactive. Example: 1 USDC (7 decimals) = 10_000_000","schema":{"type":"number"}},{"name":"status","required":false,"in":"query","description":"Filter depositors by status. Filtering is applied before pagination so total reflects only the matching set. Aggregates remain vault-wide regardless.","schema":{"type":"string","enum":["active","idle","inactive"]}}],"responses":{"200":{"description":"Depositor analytics returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDepositorsResponseDto"},"example":{"vaultAddress":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","network":"mainnet","limit":50,"offset":0,"total":1,"idleThresholdDays":30,"depositors":[{"walletAddress":"GBMZYL5BVFU3HQLNRM4AC4GTRP553KL2THIZDEZ4RCOIHJH7CK4JKY5M","status":"active","estimatedValue":"82342953245","resolvedAsset":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","lastActivityAt":"2026-10-20T14:03:11.000Z","totalDeposited":"80000000000","totalWithdrawn":"0"}],"aggregates":{"assets":[{"asset":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","assetSymbol":"USDC","totalBalance":"82342953245","activeBalance":"82342953245","idleBalance":"0","inactiveBalance":"0"}],"activeDepositors":1,"idleDepositors":0,"inactiveDepositors":0}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Bad request - invalid parameters","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"Forbidden - caller is not authorized for this operation","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get vault depositor analytics","tags":["Vault"]}},"/vault/{address}/history":{"get":{"description":"**User Experience Function**: Retrieves comprehensive historical performance data for a specific vault including Price Per Share (PPS) history, supply tracking, deposits, withdrawals, gains, fees, and APY metrics across different time periods. The endpoint supports flexible period selection (all, 7d, 30d, 90d, 1y) and data aggregation intervals (hourly, daily, weekly, monthly).","operationId":"HistoricalDataController_getVaultHistory","parameters":[{"name":"address","required":true,"in":"path","description":"Vault contract address","schema":{"example":"CC767WIU5QGJMXYHDDYJAJEF2YWPHOXOZDWD3UUAZVS4KQPRXCKPT2YZ","type":"string"}},{"name":"network","required":true,"in":"query","description":"Stellar network to query (mainnet or testnet)","schema":{"enum":["testnet","mainnet"],"type":"string"}},{"name":"period","required":false,"in":"query","description":"Time period for historical data. Period must be one of the following values: all, 7d, 30d, 90d, 1y. Default: all","schema":{"enum":["all","7d","30d","90d","1y"],"type":"string"}},{"name":"interval","required":false,"in":"query","description":"Data aggregation interval: hourly, daily, weekly, or monthly. Default: daily","schema":{"enum":["hourly","daily","weekly","monthly"],"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Start date in ISO 8601 format (overrides period parameter if provided). Example: 2025-11-10T00:00:00.000Z","schema":{"example":"2025-11-10T00:00:00.000Z","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End date in ISO 8601 format (default: current time). Example: 2025-12-10T00:00:00.000Z","schema":{"example":"2025-12-10T00:00:00.000Z","type":"string"}}],"responses":{"200":{"description":"Vault historical data retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"vaultAddress":{"type":"string","description":"Vault contract address","example":"CC767WIU5QGJMXYHDDYJAJEF2YWPHOXOZDWD3UUAZVS4KQPRXCKPT2YZ"},"vaultName":{"type":"string","description":"Vault display name","example":"DeFindex-Vault-SeevVault"},"vaultSymbol":{"type":"string","description":"Vault token symbol","example":"SVT"},"period":{"type":"string","description":"Time period queried (all, 7d, 30d, 90d, 1y)","example":"30d"},"interval":{"type":"string","description":"Data aggregation interval (hourly, daily, weekly, monthly)","example":"daily"},"currentState":{"type":"object","description":"Current vault state at the time of query","properties":{"totalSupply":{"type":"string","description":"Total vault token supply (string to handle large numbers)","example":"24145383239"},"totalManagedFunds":{"type":"array","description":"Current asset allocation across all assets","items":{"type":"object","properties":{"asset":{"type":"string","description":"Asset contract address","example":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75"},"idle_amount":{"type":"string","description":"Amount not currently invested","example":"0"},"invested_amount":{"type":"string","description":"Total amount invested in strategies","example":"124522000892"},"strategy_allocations":{"type":"array","description":"Per-strategy allocation breakdown","items":{"type":"object","properties":{"amount":{"type":"string","description":"Amount allocated to this strategy","example":"124522000892"},"paused":{"type":"boolean","description":"Whether the strategy is paused","example":false},"strategy_address":{"type":"string","description":"Strategy contract address","example":"CCSRX5E4337QMCMC3KO3RDFYI57T5NZV5XB3W3TWE4USCASKGL5URKJL"}}}},"total_amount":{"type":"string","description":"Total amount (idle + invested)","example":"124522000892"}}}},"vaultPPS":{"type":"number","description":"Current Price Per Share (PPS) of the vault","example":5.157073337145221},"assets":{"type":"array","description":"Assets and their associated strategies","items":{"type":"object","properties":{"address":{"type":"string","description":"Asset contract address","example":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75"},"strategies":{"type":"array","description":"Investment strategies for this asset","items":{"type":"object","properties":{"address":{"type":"string","description":"Strategy contract address","example":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP"},"name":{"type":"string","description":"Strategy name/identifier","example":"usdc_blend_autocompound_fixed"},"paused":{"type":"boolean","description":"Whether the strategy is paused","example":false}}}}}}},"lastUpdated":{"type":"string","description":"Timestamp of last vault state update (ISO 8601)","example":"2025-12-10T19:11:00.038Z"}}},"metrics":{"type":"object","description":"Aggregated vault performance metrics","properties":{"totalDeposits":{"type":"string","description":"Total deposits in smallest asset unit","example":"196897810000"},"totalDepositsDisplay":{"type":"string","description":"Total deposits formatted for display","example":"19,689.78"},"totalWithdrawals":{"type":"string","description":"Total withdrawals in smallest asset unit","example":"107266493935"},"totalWithdrawalsDisplay":{"type":"string","description":"Total withdrawals formatted for display","example":"10,726.64"},"uniqueDepositors":{"type":"number","description":"Number of unique accounts that have deposited","example":29},"totalTransactions":{"type":"number","description":"Total number of deposit and withdrawal transactions","example":289},"totalRebalances":{"type":"number","description":"Total number of rebalance operations","example":1},"period7d":{"type":"object","description":"7-day period performance metrics","properties":{"apy":{"type":"number","description":"7-day Annual Percentage Yield (%)","example":9923.65},"ppsChange":{"type":"number","description":"Price Per Share change over 7 days (decimal)","example":0.25658639623196144},"netDeposits":{"type":"string","description":"Net deposits (deposits - withdrawals) in smallest unit","example":"-8280000292"},"netDepositsDisplay":{"type":"string","description":"Net deposits formatted for display","example":"-828.00"},"totalGains":{"type":"string","description":"Total gains in smallest asset unit","example":"0"},"totalGainsDisplay":{"type":"string","description":"Total gains formatted for display","example":"0.00"},"totalFees":{"type":"string","description":"Total fees in smallest asset unit","example":"0"},"totalFeesDisplay":{"type":"string","description":"Total fees formatted for display","example":"0.00"}}},"period30d":{"type":"object","description":"30-day period performance metrics","properties":{"apy":{"type":"number","description":"30-day Annual Percentage Yield (%)","example":14.89},"ppsChange":{"type":"number","description":"Price Per Share change over 30 days (decimal)","example":1.0582073423171412},"netDeposits":{"type":"string","description":"Net deposits (deposits - withdrawals) in smallest unit","example":"-21026900968"},"netDepositsDisplay":{"type":"string","description":"Net deposits formatted for display","example":"-2,102.69"},"totalGains":{"type":"string","description":"Total gains in smallest asset unit","example":"0"},"totalGainsDisplay":{"type":"string","description":"Total gains formatted for display","example":"0.00"},"totalFees":{"type":"string","description":"Total fees in smallest asset unit","example":"0"},"totalFeesDisplay":{"type":"string","description":"Total fees formatted for display","example":"0.00"}}},"fullPeriod":{"type":"object","description":"Full selected period performance metrics","properties":{"days":{"type":"number","description":"Number of days in the selected period","example":30},"totalReturn":{"type":"number","description":"Total return over the period (decimal)","example":1.068675023552057},"annualizedReturn":{"type":"number","description":"Annualized return percentage (%)","example":13.806822015824105},"totalGains":{"type":"string","description":"Total gains in smallest asset unit","example":"-2"},"totalGainsDisplay":{"type":"string","description":"Total gains formatted for display","example":"-0.00"},"totalFees":{"type":"string","description":"Total fees in smallest asset unit","example":"0"},"totalFeesDisplay":{"type":"string","description":"Total fees formatted for display","example":"0.00"}}}}},"data":{"type":"array","description":"Historical time series data points","items":{"type":"object","properties":{"timestamp":{"type":"string","description":"Timestamp for this data point (ISO 8601)","example":"2025-11-10T00:00:00.000Z"},"vaultPPS":{"type":"number","description":"Price Per Share at this timestamp","example":5.102135787948024},"totalSupply":{"type":"string","description":"Total vault token supply at this timestamp","example":"21819770658"},"totalManagedFunds":{"type":"string","description":"Total managed funds at this timestamp in smallest unit","example":"111327432759"},"totalManagedFundsDisplay":{"type":"string","description":"Total managed funds formatted for display","example":"11,132.74"},"periodDeposits":{"type":"string","description":"Deposits in this period/interval in smallest unit","example":"30000000"},"periodDepositsDisplay":{"type":"string","description":"Deposits formatted for display","example":"3.00"},"periodWithdrawals":{"type":"string","description":"Withdrawals in this period/interval in smallest unit","example":"35000003"},"periodWithdrawalsDisplay":{"type":"string","description":"Withdrawals formatted for display","example":"3.50"},"netDeposits":{"type":"string","description":"Net deposits (deposits - withdrawals) in smallest unit","example":"-5000003"},"netDepositsDisplay":{"type":"string","description":"Net deposits formatted for display","example":"-0.50"},"periodGains":{"type":"string","description":"Gains in this period/interval in smallest unit","example":"0"},"periodFees":{"type":"string","description":"Realized fees distributed within this interval (sum of fee_distribution events). BigInt string in stroops. v1: distributed portion only (excludes currently locked fees).","example":"150000"},"periodFeesDisplay":{"type":"string","description":"periodFees formatted for display (decimal with commas)","example":"0.02"},"ppsChangeFromPrevious":{"type":"number","nullable":true,"description":"PPS change from previous data point (null for first point or periods with no activity)","example":0.00025893586694802906}}}}},"example":{"vaultAddress":"C...Z","vaultName":"DeFindex-Vault-Name","vaultSymbol":"SVT","period":"30d","interval":"daily","currentState":{"totalSupply":"24145383239","totalManagedFunds":[{"asset":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","idle_amount":"0","invested_amount":"124522000892","strategy_allocations":[{"amount":"0","paused":false,"strategy_address":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP"},{"amount":"124522000892","paused":false,"strategy_address":"CCSRX5E4337QMCMC3KO3RDFYI57T5NZV5XB3W3TWE4USCASKGL5URKJL"}],"total_amount":"124522000892"}],"vaultPPS":5.157073337145221,"assets":[{"address":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","strategies":[{"address":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP","name":"usdc_blend_autocompound_fixed","paused":false},{"address":"CCSRX5E4337QMCMC3KO3RDFYI57T5NZV5XB3W3TWE4USCASKGL5URKJL","name":"usdc_blend_autocompound_yieldblox","paused":false}]}],"lastUpdated":"2025-12-10T19:11:00.038Z"},"metrics":{"totalDeposits":"196897810000","totalDepositsDisplay":"19,689.78","totalWithdrawals":"107266493935","totalWithdrawalsDisplay":"10,726.64","uniqueDepositors":29,"totalTransactions":289,"totalRebalances":1,"period7d":{"apy":9923.65,"ppsChange":0.25658639623196144,"netDeposits":"-8280000292","netDepositsDisplay":"-828.00","totalGains":"0","totalGainsDisplay":"0.00","totalFees":"0","totalFeesDisplay":"0.00"},"period30d":{"apy":14.89,"ppsChange":1.0582073423171412,"netDeposits":"-21026900968","netDepositsDisplay":"-2,102.69","totalGains":"0","totalGainsDisplay":"0.00","totalFees":"0","totalFeesDisplay":"0.00"},"fullPeriod":{"days":30,"totalReturn":1.068675023552057,"annualizedReturn":13.806822015824105,"totalGains":"-2","totalGainsDisplay":"-0.00","totalFees":"0","totalFeesDisplay":"0.00"}},"data":[{"timestamp":"2025-11-10T00:00:00.000Z","vaultPPS":5.102135787948024,"totalSupply":"21819770658","totalManagedFunds":"111327432759","totalManagedFundsDisplay":"11,132.74","periodDeposits":"30000000","periodDepositsDisplay":"3.00","periodWithdrawals":"35000003","periodWithdrawalsDisplay":"3.50","netDeposits":"-5000003","netDepositsDisplay":"-0.50","periodGains":"0","periodFees":"150000","periodFeesDisplay":"0.02","ppsChangeFromPrevious":0.00025893586694802906},{"timestamp":"2025-12-01T00:00:00.000Z","vaultPPS":5.140029400646425,"totalSupply":"21186685184","totalManagedFunds":"108900184748","totalManagedFundsDisplay":"10,890.01","periodDeposits":"10000000000","periodDepositsDisplay":"1,000.00","periodWithdrawals":"35000003","periodWithdrawalsDisplay":"3.50","netDeposits":"9964999997","netDepositsDisplay":"996.49","periodGains":"0","periodFees":"0","periodFeesDisplay":"0.00","ppsChangeFromPrevious":0.008499104596970675},{"timestamp":"2025-12-02T00:00:00.000Z","vaultPPS":5.140029400646425,"totalSupply":"21186685184","totalManagedFunds":"108900184748","totalManagedFundsDisplay":"10,890.01","periodDeposits":"10000000000","periodDepositsDisplay":"1,000.00","periodWithdrawals":"35000003","periodWithdrawalsDisplay":"3.50","netDeposits":"9964999997","netDepositsDisplay":"996.49","periodGains":"0","periodFees":"0","periodFeesDisplay":"0.00","ppsChangeFromPrevious":null},{"timestamp":"2025-12-03T00:00:00.000Z","vaultPPS":5.142829984242702,"totalSupply":"25752986409","totalManagedFunds":"132443230688","totalManagedFundsDisplay":"13,244.32","periodDeposits":"10000000000","periodDepositsDisplay":"1,000.00","periodWithdrawals":"9595000222","periodWithdrawalsDisplay":"959.50","netDeposits":"404999778","netDepositsDisplay":"40.49","periodGains":"0","periodFees":"0","periodFeesDisplay":"0.00","ppsChangeFromPrevious":0.0014881516920528526},{"timestamp":"2025-12-04T00:00:00.000Z","vaultPPS":5.143874854030582,"totalSupply":"25756874528","totalManagedFunds":"132490139203","totalManagedFundsDisplay":"13,249.01","periodDeposits":"10020000000","periodDepositsDisplay":"1,002.00","periodWithdrawals":"9595000222","periodWithdrawalsDisplay":"959.50","netDeposits":"424999778","netDepositsDisplay":"42.49","periodGains":"0","periodFees":"0","periodFeesDisplay":"0.00","ppsChangeFromPrevious":0.020317019833071548},{"timestamp":"2025-12-05T00:00:00.000Z","vaultPPS":5.143874854030582,"totalSupply":"25756874528","totalManagedFunds":"132490139203","totalManagedFundsDisplay":"13,249.01","periodDeposits":"10020000000","periodDepositsDisplay":"1,002.00","periodWithdrawals":"9595000222","periodWithdrawalsDisplay":"959.50","netDeposits":"424999778","netDepositsDisplay":"42.49","periodGains":"0","periodFees":"0","periodFeesDisplay":"0.00","ppsChangeFromPrevious":null},{"timestamp":"2025-12-06T00:00:00.000Z","vaultPPS":5.149579823732469,"totalSupply":"24857656315","totalManagedFunds":"128006485425","totalManagedFundsDisplay":"12,800.64","periodDeposits":"10390000000","periodDepositsDisplay":"1,039.00","periodWithdrawals":"14595000319","periodWithdrawalsDisplay":"1,459.50","netDeposits":"-4205000319","netDepositsDisplay":"-420.50","periodGains":"0","periodFees":"0","periodFeesDisplay":"0.00","ppsChangeFromPrevious":0.01191735893903978},{"timestamp":"2025-12-07T00:00:00.000Z","vaultPPS":5.151452431717395,"totalSupply":"24143119556","totalManagedFunds":"124372131946","totalManagedFundsDisplay":"12,437.21","periodDeposits":"12990000000","periodDepositsDisplay":"1,299.00","periodWithdrawals":"20875000486","periodWithdrawalsDisplay":"2,087.50","netDeposits":"-7885000486","netDepositsDisplay":"-788.50","periodGains":"0","periodFees":"0","periodFeesDisplay":"0.00","ppsChangeFromPrevious":0.0002604537930661621},{"timestamp":"2025-12-08T00:00:00.000Z","vaultPPS":5.15253976020816,"totalSupply":"24548744779","totalManagedFunds":"126488383537","totalManagedFundsDisplay":"12,648.83","periodDeposits":"15080000000","periodDepositsDisplay":"1,508.00","periodWithdrawals":"20875000486","periodWithdrawalsDisplay":"2,087.50","netDeposits":"-5795000486","netDepositsDisplay":"-579.50","periodGains":"0","periodFees":"0","periodFeesDisplay":"0.00","ppsChangeFromPrevious":0.0004893624977686528},{"timestamp":"2025-12-09T00:00:00.000Z","vaultPPS":5.15253976020816,"totalSupply":"24548744779","totalManagedFunds":"126488383537","totalManagedFundsDisplay":"12,648.83","periodDeposits":"15080000000","periodDepositsDisplay":"1,508.00","periodWithdrawals":"20875000486","periodWithdrawalsDisplay":"2,087.50","netDeposits":"-5795000486","netDepositsDisplay":"-579.50","periodGains":"0","periodFees":"0","periodFeesDisplay":"0.00","ppsChangeFromPrevious":null},{"timestamp":"2025-12-10T00:00:00.000Z","vaultPPS":5.156661038781535,"totalSupply":"24145383239","totalManagedFunds":"124509557015","totalManagedFundsDisplay":"12,450.95","periodDeposits":"15190000000","periodDepositsDisplay":"1,519.00","periodWithdrawals":"23065000514","periodWithdrawalsDisplay":"2,306.50","netDeposits":"-7875000514","netDepositsDisplay":"-787.50","periodGains":"0","periodFees":"0","periodFeesDisplay":"0.00","ppsChangeFromPrevious":0.002218295611711163}]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Invalid parameters (invalid date format, invalid period or interval value)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"Vault not found or has no transaction history","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get vault historical performance metrics","tags":["Historical Data"]}},"/account/{walletAddress}/vault/{vaultAddress}":{"get":{"description":"**User Experience Function**: Retrieves comprehensive performance metrics for a specific account's position in a vault including current position value, ROI, APY across different periods (24h, 7d, 30d, since inception), total deposits/withdrawals, interest earned, and historical time series data tracking position value over time.","operationId":"HistoricalDataController_getAccountVaultPerformance","parameters":[{"name":"walletAddress","required":true,"in":"path","description":"Account wallet address (Stellar address)","schema":{"example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY","type":"string"}},{"name":"vaultAddress","required":true,"in":"path","description":"Vault contract address","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":true,"in":"query","description":"Stellar network to query (mainnet or testnet)","schema":{"enum":["testnet","mainnet"],"type":"string"}},{"name":"interval","required":false,"in":"query","description":"Data aggregation interval: hourly, daily, weekly, or monthly. Default: daily","schema":{"enum":["hourly","daily","weekly","monthly"],"type":"string"}},{"name":"startDate","required":false,"in":"query","description":"Start date in ISO 8601 format (default: account first deposit). Example: 2025-10-08T00:00:00.000Z","schema":{"example":"2025-10-08T00:00:00.000Z","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End date in ISO 8601 format (default: current time). Example: 2025-12-10T00:00:00.000Z","schema":{"example":"2025-12-10T00:00:00.000Z","type":"string"}},{"name":"includeEvents","required":false,"in":"query","description":"Include transaction events (deposits/withdrawals) in historical data points. Default: false","schema":{"default":false,"example":false,"type":"boolean"}}],"responses":{"200":{"description":"Account vault performance retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"accountAddress":{"type":"string","description":"Account wallet address","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"},"vaultAddress":{"type":"string","description":"Vault contract address","example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3"},"vaultName":{"type":"string","description":"Vault display name","example":"DeFindex-Vault-BeansUsdcVault"},"vaultSymbol":{"type":"string","description":"Vault token symbol","example":"BNSUSDC"},"interval":{"type":"string","description":"Data aggregation interval used","example":"daily"},"currentPosition":{"type":"object","description":"Current account position in the vault","properties":{"shares":{"type":"string","description":"Number of vault shares (dfTokens) owned by the account","example":"12630722725"},"estimatedValue":{"type":"string","description":"Estimated current value of the position in smallest asset unit","example":"13588103705"},"estimatedValueDisplay":{"type":"string","description":"Estimated current value formatted for display","example":"1,358.81"},"assets":{"type":"array","description":"Asset breakdown of the position","items":{"type":"object","properties":{"tokenAddress":{"type":"string","description":"Asset contract address","example":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75"},"symbol":{"type":"string","description":"Asset symbol","example":"USDC"},"name":{"type":"string","description":"Asset name","example":"USD Coin"},"decimals":{"type":"number","description":"Asset decimal places","example":7},"amount":{"type":"string","description":"Amount in smallest asset unit","example":"13588103705"},"amountDisplay":{"type":"string","description":"Amount formatted for display","example":"1,358.81"},"estimatedValue":{"type":"string","description":"Estimated value in smallest asset unit","example":"13588103705"},"estimatedValueDisplay":{"type":"string","description":"Estimated value formatted for display","example":"1,358.81"}}}},"lastUpdated":{"type":"string","description":"Timestamp of last position update (ISO 8601)","example":"2025-12-10T19:27:59.277Z"}}},"performance":{"type":"object","description":"Account performance metrics","properties":{"roi":{"type":"number","description":"Return on Investment as a percentage (e.g., 1.879 = 1.879% ROI). Calculated as: ((positionValue - netDeposits) / netDeposits) * 100","example":1.8790635838174747},"totalDeposited":{"type":"string","description":"Total deposited amount in smallest asset unit","example":"14988309232"},"totalDepositedDisplay":{"type":"string","description":"Total deposited formatted for display","example":"1,498.83"},"totalWithdrawn":{"type":"string","description":"Total withdrawn amount in smallest asset unit","example":"1650825330"},"totalWithdrawnDisplay":{"type":"string","description":"Total withdrawn formatted for display","example":"165.08"},"totalInterestEarned":{"type":"string","description":"Total interest earned in smallest asset unit","example":"250619803"},"totalInterestEarnedDisplay":{"type":"string","description":"Total interest earned formatted for display","example":"25.06"},"netDeposits":{"type":"string","description":"Net deposits (deposits - withdrawals) in smallest asset unit","example":"13337483902"},"netDepositsDisplay":{"type":"string","description":"Net deposits formatted for display","example":"1,333.74"},"period24h":{"type":"object","description":"24-hour period performance metrics","properties":{"apy":{"type":"number","nullable":true,"description":"24-hour Annual Percentage Yield (%)","example":20.57381881828393},"interestEarned":{"type":"string","description":"Interest earned in 24h period (smallest asset unit)","example":"6963216"},"interestEarnedDisplay":{"type":"string","description":"Interest earned formatted for display","example":"0.69"},"deposits":{"type":"string","description":"Deposits in 24h period (smallest asset unit)","example":"0"},"depositsDisplay":{"type":"string","description":"Deposits formatted for display","example":"0.00"},"withdrawals":{"type":"string","description":"Withdrawals in 24h period (smallest asset unit)","example":"0"},"withdrawalsDisplay":{"type":"string","description":"Withdrawals formatted for display","example":"0.00"}}},"period7d":{"type":"object","description":"7-day period performance metrics","properties":{"apy":{"type":"number","nullable":true,"description":"7-day Annual Percentage Yield (%)","example":36.87846441682105},"interestEarned":{"type":"string","description":"Interest earned in 7d period (smallest asset unit)","example":"68887294"},"interestEarnedDisplay":{"type":"string","description":"Interest earned formatted for display","example":"6.88"},"deposits":{"type":"string","description":"Deposits in 7d period (smallest asset unit)","example":"2111400000"},"depositsDisplay":{"type":"string","description":"Deposits formatted for display","example":"211.14"},"withdrawals":{"type":"string","description":"Withdrawals in 7d period (smallest asset unit)","example":"0"},"withdrawalsDisplay":{"type":"string","description":"Withdrawals formatted for display","example":"0.00"}}},"period30d":{"type":"object","description":"30-day period performance metrics","properties":{"apy":{"type":"number","nullable":true,"description":"30-day Annual Percentage Yield (%)","example":20.211924094493995},"interestEarned":{"type":"string","description":"Interest earned in 30d period (smallest asset unit)","example":"154563081"},"interestEarnedDisplay":{"type":"string","description":"Interest earned formatted for display","example":"15.45"},"deposits":{"type":"string","description":"Deposits in 30d period (smallest asset unit)","example":"3745425032"},"depositsDisplay":{"type":"string","description":"Deposits formatted for display","example":"374.54"},"withdrawals":{"type":"string","description":"Withdrawals in 30d period (smallest asset unit)","example":"450225024"},"withdrawalsDisplay":{"type":"string","description":"Withdrawals formatted for display","example":"45.02"}}},"sinceInception":{"type":"object","description":"Performance metrics since account first deposit","properties":{"days":{"type":"number","description":"Number of days since first deposit","example":63},"totalReturn":{"type":"number","description":"Total return since inception as a percentage (e.g., 1.879 = 1.879% return). This is the same value as ROI, representing the return from first deposit to current time","example":1.8790635838174747},"interestEarned":{"type":"string","description":"Total interest earned since inception (smallest asset unit)","example":"250619803"},"interestEarnedDisplay":{"type":"string","description":"Total interest earned formatted for display","example":"25.06"}}}}},"data":{"type":"array","description":"Historical time series data points tracking account position over time","items":{"type":"object","properties":{"timestamp":{"type":"string","description":"Timestamp for this data point (ISO 8601)","example":"2025-10-08T00:00:00.000Z"},"shares":{"type":"string","description":"Number of vault shares owned at this timestamp","example":"955783508"},"positionValue":{"type":"string","description":"Position value at this timestamp in smallest asset unit","example":"999999999"},"positionValueDisplay":{"type":"string","description":"Position value formatted for display","example":"99.99"},"vaultPPS":{"type":"number","description":"Vault Price Per Share at this timestamp","example":1.046262036074933},"netDeposits":{"type":"string","description":"Cumulative net deposits (deposits - withdrawals) at this timestamp","example":"1000000000"},"netDepositsDisplay":{"type":"string","description":"Cumulative net deposits formatted for display","example":"100.00"},"interestEarned":{"type":"string","description":"Cumulative interest earned up to this timestamp","example":"-1"},"interestEarnedDisplay":{"type":"string","description":"Cumulative interest earned formatted for display","example":"-0.00"},"interestEarnedPeriod":{"type":"string","description":"Interest earned in this period/interval (smallest asset unit)","example":"0"},"interestEarnedPeriodDisplay":{"type":"string","description":"Interest earned in period formatted for display","example":"0.00"},"changeFromPrevious":{"type":"number","nullable":true,"description":"Percentage change from previous data point (null for first point or periods with no activity)","example":200.0368128000368},"event":{"type":"object","nullable":true,"description":"Transaction event at this timestamp (only included when includeEvents=true)","properties":{"type":{"type":"string","enum":["deposit","withdraw"],"description":"Transaction type","example":"deposit"},"dfTokenAmount":{"type":"string","description":"Vault token (dfToken) amount involved in the transaction","example":"955783508"},"assets":{"type":"array","description":"Assets involved in the transaction","items":{"type":"object","properties":{"tokenAddress":{"type":"string","description":"Asset contract address","example":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75"},"symbol":{"type":"string","description":"Asset symbol","example":"USDC"},"amount":{"type":"string","description":"Asset amount in smallest unit","example":"1000000000"}}}},"transactionId":{"type":"string","description":"Stellar transaction hash","example":"d558071bd5bcdca4fb5d3f09c15af899c07b524b0c80d9a5547e70a5b1020d2e"}}}}}}},"example":{"accountAddress":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY","vaultAddress":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","vaultName":"DeFindex-Vault-BeansUsdcVault","vaultSymbol":"BNSUSDC","interval":"daily","currentPosition":{"shares":"12630722725","estimatedValue":"13588103705","estimatedValueDisplay":"1,358.81","assets":[{"tokenAddress":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","symbol":"USDC","name":"USD Coin","decimals":7,"amount":"13588103705","amountDisplay":"1,358.81","estimatedValue":"13588103705","estimatedValueDisplay":"1,358.81"}],"lastUpdated":"2025-12-10T19:27:59.277Z"},"performance":{"roi":1.8790635838174747,"totalDeposited":"14988309232","totalDepositedDisplay":"1,498.83","totalWithdrawn":"1650825330","totalWithdrawnDisplay":"165.08","totalInterestEarned":"250619803","totalInterestEarnedDisplay":"25.06","netDeposits":"13337483902","netDepositsDisplay":"1,333.74","period24h":{"apy":20.57381881828393,"interestEarned":"6963216","interestEarnedDisplay":"0.69","deposits":"0","depositsDisplay":"0.00","withdrawals":"0","withdrawalsDisplay":"0.00"},"period7d":{"apy":36.87846441682105,"interestEarned":"68887294","interestEarnedDisplay":"6.88","deposits":"2111400000","depositsDisplay":"211.14","withdrawals":"0","withdrawalsDisplay":"0.00"},"period30d":{"apy":20.211924094493995,"interestEarned":"154563081","interestEarnedDisplay":"15.45","deposits":"3745425032","depositsDisplay":"374.54","withdrawals":"450225024","withdrawalsDisplay":"45.02"},"sinceInception":{"days":63,"totalReturn":1.8790635838174747,"interestEarned":"250619803","interestEarnedDisplay":"25.06"}},"data":[{"timestamp":"2025-10-08T00:00:00.000Z","shares":"955783508","positionValue":"999999999","positionValueDisplay":"99.99","vaultPPS":1.046262036074933,"netDeposits":"1000000000","netDepositsDisplay":"100.00","interestEarned":"-1","interestEarnedDisplay":"-0.00","interestEarnedPeriod":"0","interestEarnedPeriodDisplay":"0.00","changeFromPrevious":null,"event":{"type":"deposit","dfTokenAmount":"955783508","assets":[{"tokenAddress":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","symbol":"USDC","amount":"1000000000"}],"transactionId":"d558071bd5bcdca4fb5d3f09c15af899c07b524b0c80d9a5547e70a5b1020d2e"}}]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Invalid parameters (invalid date format, invalid interval value)","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"Account has no transactions in vault or vault not found","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get account vault performance metrics","tags":["Historical Data"]}},"/account/{walletAddress}/vault/{vaultAddress}/events":{"get":{"description":"Returns a paginated list of deposit, withdraw, transfer_in, and transfer_out events for a given account in a vault, sorted newest-first by ledger. Use for tx-table / activity-log UIs. The performance endpoint (`/account/:wallet/vault/:vault`) is the right place for chart data with per-bucket event annotations.","operationId":"HistoricalDataController_getAccountEvents","parameters":[{"name":"walletAddress","required":true,"in":"path","description":"Stellar account address","schema":{"example":"GCXD3P3ALY3HNFZ6BWCDSXIAV5N2RPVDWYF4O63FE7FB3YNFHAZRHKZ6","type":"string"}},{"name":"vaultAddress","required":true,"in":"path","description":"Vault contract address","schema":{"example":"CBBAH2OAJ6N3UBJGXNFYH4QF6C6OWO4RHGGOOGDER3IJB7SGLR3Y56JO","type":"string"}},{"name":"network","required":true,"in":"query","description":"Stellar network (mainnet or testnet)","schema":{"enum":["testnet","mainnet"],"type":"string"}},{"name":"eventType","required":false,"in":"query","description":"Filter by event type: deposit, withdraw, transfer_in, transfer_out. Omit for all.","schema":{"type":"string","enum":["deposit","withdraw","transfer_in","transfer_out"]}},{"name":"startDate","required":false,"in":"query","description":"Start date in ISO 8601 format","schema":{"example":"2026-01-01T00:00:00.000Z","type":"string"}},{"name":"endDate","required":false,"in":"query","description":"End date in ISO 8601 format","schema":{"example":"2026-04-22T00:00:00.000Z","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size (max 200)","schema":{"default":50,"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Pagination offset","schema":{"default":0,"type":"number"}}],"responses":{"200":{"description":"Paginated events list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountEventsResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get an account's flat transaction history in a vault","tags":["Historical Data"]}},"/vault/{address}/active-users":{"get":{"operationId":"HistoricalDataController_getActiveUsers","parameters":[{"name":"address","required":true,"in":"path","description":"Vault contract address","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":true,"in":"query","schema":{"enum":["testnet","mainnet"],"type":"string"}},{"name":"period","required":false,"in":"query","description":"Time window (e.g. 7d, 30d, 90d). Default: 30d","schema":{"type":"string"}},{"name":"interval","required":false,"in":"query","description":"Aggregation granularity. Default: daily","schema":{"type":"string"}}],"responses":{"200":{"description":"Holder counts per day","content":{"application/json":{"schema":{"type":"object","properties":{"vaultAddress":{"type":"string"},"network":{"type":"string"},"period":{"type":"string"},"interval":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Start of the day, ISO 8601 UTC"},"activeUsers":{"type":"integer","description":"Wallets holding a positive balance at end of day"},"newUsers":{"type":"integer","description":"Wallets that started holding that day"},"churnedUsers":{"type":"integer","description":"Wallets that went to zero that day"}}}}},"example":{"vaultAddress":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","network":"mainnet","period":"7d","interval":"daily","data":[{"date":"2026-10-22T00:00:00.000Z","activeUsers":312,"newUsers":4,"churnedUsers":1},{"date":"2026-10-23T00:00:00.000Z","activeUsers":315,"newUsers":3,"churnedUsers":0}]}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Daily active users (holders), new and churned, over a period","tags":["Historical Data"]}},"/migration/defindex-to-defindex":{"post":{"description":"Builds an unsigned, atomic Stellar Router transaction that withdraws the caller's entire share balance from `fromVault` and deposits the proceeds into `toVault`. Both legs live in one transaction, so the migration either fully succeeds or fully reverts. The deposited amount is a floor derived from `slippageBps`; any surplus is left in the caller's wallet.","operationId":"MigrationController_defindexToDefindex","parameters":[{"name":"network","required":false,"in":"query","description":"Stellar network to use (testnet or mainnet)","schema":{"enum":["testnet","mainnet"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefindexToDefindexDto"}}}},"responses":{"201":{"description":"Unsigned migration transaction built successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","description":"Unsigned transaction XDR (base64)"},"simulationResponse":{"description":"Native-decoded per-invocation return values"},"functionName":{"type":"string","example":"exec"},"operationXDR":{"type":"string","description":"Base64-encoded router operation"},"isSmartWallet":{"type":"boolean","example":false}}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Invalid address, `from` is not a G-address, `fromVault` equals `toVault`, the two vaults hold different assets, or the position rounds to zero after the slippage buffer.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"The caller holds no shares in `fromVault`.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Migrate a full position between two DeFindex vaults","tags":["Migration"]}},"/stabilizer/{vaultAddress}/status":{"get":{"description":"Read only. `config` is null when the vault is not registered; `campaign` is null when it has no Boost campaign. The two are independent. Campaign amounts are stroops of the campaign asset; `lastBoostedAt` is unix seconds, 0 meaning never. Enabled per account: 403 until the feature is switched on for your API key.","operationId":"StabilizerController_getStatus","parameters":[{"name":"vaultAddress","required":true,"in":"path","description":"Vault contract address","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Mainnet only today (the default)","schema":{"enum":["mainnet"],"type":"string"}}],"responses":{"200":{"description":"Stable APY state","content":{"application/json":{"schema":{"type":"object","example":{"registered":true,"managedByStabilizer":true,"config":{"adminAddress":"GBMZYL5BVFU3HQLNRM4AC4GTRP553KL2THIZDEZ4RCOIHJH7CK4JKY5M","targetApyBps":800,"minFeeBps":0,"maxFeeBps":2000},"campaign":{"active":true,"asset":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","totalDeposited":"1000000000","totalBoosted":"42000000","totalWithdrawn":"0","available":"958000000","lastBoostedAt":1756400000},"currentFeeBps":1250}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Not available on the requested network, `minFeeBps` > `maxFeeBps`, `amount` not a positive integer string, or the Boost campaign is inactive.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"The feature is not enabled for your API key, or `caller` is not the vault's Manager (register) or stabilizer admin (other writes).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"The vault is not registered, or it has no Boost campaign.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Get the Stable APY state of a vault","tags":["Stabilizer","Stable APY"]}},"/stabilizer/{vaultAddress}/register":{"post":{"description":"Builds one transaction that registers the vault and hands its Manager role to the stabilizer contract. `caller` must be the vault's current Manager and becomes its stabilizer admin. Rates are basis points (10000 = 100%).","operationId":"StabilizerController_register","parameters":[{"name":"vaultAddress","required":true,"in":"path","description":"Vault contract address","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Mainnet only today (the default)","schema":{"enum":["mainnet"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterStabilizerDto"}}}},"responses":{"201":{"description":"Unsigned transaction for `caller`. Sign `xdr` and submit it with `POST /send`. For a smart wallet caller (C address) `xdr` is null: build your own transaction around `operationXDR`.","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true},"simulationResponse":{"description":"Return value of the contract call in simulation"},"functionName":{"type":"string","example":"register_vault"},"operationXDR":{"type":"string"},"isSmartWallet":{"type":"boolean"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"register_vault","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Not available on the requested network, `minFeeBps` > `maxFeeBps`, `amount` not a positive integer string, or the Boost campaign is inactive.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"The feature is not enabled for your API key, or `caller` is not the vault's Manager (register) or stabilizer admin (other writes).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"The vault is not registered, or it has no Boost campaign.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Register a vault with Stable APY","tags":["Stabilizer","Stable APY"]}},"/stabilizer/{vaultAddress}/target-apy":{"post":{"description":"`caller` must be the vault's stabilizer admin.","operationId":"StabilizerController_setTargetApy","parameters":[{"name":"vaultAddress","required":true,"in":"path","description":"Vault contract address","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Mainnet only today (the default)","schema":{"enum":["mainnet"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetTargetApyDto"}}}},"responses":{"200":{"description":"Unsigned transaction for `caller`. Sign `xdr` and submit it with `POST /send`. For a smart wallet caller (C address) `xdr` is null: build your own transaction around `operationXDR`.","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true},"simulationResponse":{"description":"Return value of the contract call in simulation"},"functionName":{"type":"string","example":"set_target_apy"},"operationXDR":{"type":"string"},"isSmartWallet":{"type":"boolean"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"set_target_apy","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Not available on the requested network, `minFeeBps` > `maxFeeBps`, `amount` not a positive integer string, or the Boost campaign is inactive.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"The feature is not enabled for your API key, or `caller` is not the vault's Manager (register) or stabilizer admin (other writes).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"The vault is not registered, or it has no Boost campaign.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Change the target APY","tags":["Stabilizer","Stable APY"]}},"/stabilizer/{vaultAddress}/fee-bounds":{"post":{"description":"`caller` must be the vault's stabilizer admin; `minFeeBps` <= `maxFeeBps`.","operationId":"StabilizerController_setFeeBounds","parameters":[{"name":"vaultAddress","required":true,"in":"path","description":"Vault contract address","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Mainnet only today (the default)","schema":{"enum":["mainnet"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetFeeBoundsDto"}}}},"responses":{"200":{"description":"Unsigned transaction for `caller`. Sign `xdr` and submit it with `POST /send`. For a smart wallet caller (C address) `xdr` is null: build your own transaction around `operationXDR`.","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true},"simulationResponse":{"description":"Return value of the contract call in simulation"},"functionName":{"type":"string","example":"set_fee_bounds"},"operationXDR":{"type":"string"},"isSmartWallet":{"type":"boolean"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"set_fee_bounds","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Not available on the requested network, `minFeeBps` > `maxFeeBps`, `amount` not a positive integer string, or the Boost campaign is inactive.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"The feature is not enabled for your API key, or `caller` is not the vault's Manager (register) or stabilizer admin (other writes).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"The vault is not registered, or it has no Boost campaign.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Change the fee range","tags":["Stabilizer","Stable APY"]}},"/stabilizer/{vaultAddress}/exit":{"post":{"description":"Unregisters the vault and returns the Manager role to the stabilizer admin. `caller` must be the vault's stabilizer admin.","operationId":"StabilizerController_exit","parameters":[{"name":"vaultAddress","required":true,"in":"path","description":"Vault contract address","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Mainnet only today (the default)","schema":{"enum":["mainnet"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExitStabilizerDto"}}}},"responses":{"200":{"description":"Unsigned transaction for `caller`. Sign `xdr` and submit it with `POST /send`. For a smart wallet caller (C address) `xdr` is null: build your own transaction around `operationXDR`.","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true},"simulationResponse":{"description":"Return value of the contract call in simulation"},"functionName":{"type":"string","example":"unregister_vault"},"operationXDR":{"type":"string"},"isSmartWallet":{"type":"boolean"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"unregister_vault","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Not available on the requested network, `minFeeBps` > `maxFeeBps`, `amount` not a positive integer string, or the Boost campaign is inactive.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"The feature is not enabled for your API key, or `caller` is not the vault's Manager (register) or stabilizer admin (other writes).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"The vault is not registered, or it has no Boost campaign.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Leave Stable APY","tags":["Stabilizer","Stable APY"]}},"/stabilizer/{vaultAddress}/boost/deposit":{"post":{"description":"Boost is a separate product from Stable APY that shares these routes. Anyone may fund an active campaign. `amount` is stroops of the campaign asset, as a string. 404 if the vault has no campaign, 400 if it is inactive.","operationId":"StabilizerController_boostDeposit","parameters":[{"name":"vaultAddress","required":true,"in":"path","description":"Vault contract address","schema":{"example":"CBNKCU3HGFKHFOF7JTGXQCNKE3G3DXS5RDBQUKQMIIECYKXPIOUGB2S3","type":"string"}},{"name":"network","required":false,"in":"query","description":"Mainnet only today (the default)","schema":{"enum":["mainnet"],"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostDepositDto"}}}},"responses":{"200":{"description":"Unsigned transaction for `caller`. Sign `xdr` and submit it with `POST /send`. For a smart wallet caller (C address) `xdr` is null: build your own transaction around `operationXDR`.","content":{"application/json":{"schema":{"type":"object","properties":{"xdr":{"type":"string","nullable":true},"simulationResponse":{"description":"Return value of the contract call in simulation"},"functionName":{"type":"string","example":"deposit"},"operationXDR":{"type":"string"},"isSmartWallet":{"type":"boolean"}},"example":{"xdr":"AAAAAgAAAABZnC+hqWmzwW2L...","simulationResponse":null,"functionName":"deposit","operationXDR":"AAAAAAAAABgAAAAAAAAAAVqh...","isSmartWallet":false}}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"400":{"description":"Not available on the requested network, `minFeeBps` > `maxFeeBps`, `amount` not a positive integer string, or the Boost campaign is inactive.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"403":{"description":"The feature is not enabled for your API key, or `caller` is not the vault's Manager (register) or stabilizer admin (other writes).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"404":{"description":"The vault is not registered, or it has no Boost campaign.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}}},"429":{"description":"Rate limit exceeded for your tier. Wait `Retry-After` seconds and retry.","headers":{"Retry-After":{"description":"Seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/X-RateLimit-Reset"},"x-correlation-id":{"$ref":"#/components/headers/x-correlation-id"}},"content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","example":429},"message":{"type":"string","example":"Rate limit exceeded"},"error":{"type":"string","example":"Too Many Requests"},"retryAfter":{"type":"integer","example":1}}},"example":{"statusCode":429,"message":"Rate limit exceeded","error":"Too Many Requests","retryAfter":1}}}}},"summary":"Fund a vault's Boost campaign","tags":["Stabilizer","Boost"]}}},"info":{"title":"DeFindex API","description":"Yield infrastructure for neobanks, fintechs and wallets.\n\n**Base URL:** `https://api.defindex.io`. Every route takes `?network=mainnet` (the default) or `?network=testnet`.\n\n**Auth:** send your API key as `Authorization: Bearer sk_...`.\n\n**Rate limits:** a token bucket per account (requests without a key are tracked by IP). Responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` (seconds until the bucket is full). A `429` also carries `Retry-After` and `retryAfter` in the body.\n\n| Tier | Burst | Sustained |\n|---|---|---|\n| FREE | 5 | 1/s |\n| STARTER | 20 | 10/s |\n| PROFESSIONAL | 100 | 50/s |\n| BUSINESS | 200 | 100/s |\n\n**Units:**\n- Amounts are integers in the asset's smallest unit (7 decimals for every asset DeFindex lists today: 1 USDC = `10000000`). Responses send them as strings; request bodies take JSON integers.\n- Vault shares (dfTokens) are not underlying: `GET /vault/{address}/balance` returns both. The share price rises, so the underlying value of a position is not what was deposited.\n- Multi-asset vaults take one amount per vault asset, in the order of `assets` in `GET /vault/{address}`.\n- Vault `apy` is a percentage (`8.75` = 8.75%). `/strategies` `apy7d`/`apy30d`/`apyAllTime` are fractions (`0.0641` = 6.41%).\n- Fees are basis points (`10000` = 100%).\n\n**Writes never move funds by themselves.** Each write returns an unsigned transaction (`xdr`) for the `caller`. Sign it and submit it with `POST /send` (or your own RPC). `POST /send` is idempotent: resubmitting the same signed XDR returns the original result.","version":"1.0.0","contact":{},"x-logo":{"url":"https://links.paltalabs.io/defindex-full.svg","backgroundColor":"#0e0e0e","altText":"DeFindex Logo","href":"https://defindex.io"}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"SendXdrDto":{"type":"object","properties":{"xdr":{"type":"string","description":"The signed transaction in XDR format"}},"required":["xdr"]},"AuthRegisterDto":{"type":"object","properties":{"username":{"type":"string","description":"Username: 3 to 32 letters, digits, `.`, `_` or `-`, with single spaces between words","example":"defi_investor","minLength":3,"maxLength":32},"password":{"type":"string","description":"Password: at least 8 characters and at most 72 bytes in UTF-8","example":"SecurePassword123!","minLength":8},"email":{"type":"string","description":"Email address","example":"user@example.com","maxLength":254}},"required":["username","password","email"]},"AuthLoginDto":{"type":"object","properties":{"email":{"type":"string","example":"test@example.com"},"password":{"type":"string","example":"strongpassword123"}},"required":["email","password"]},"ApiKeyGenerateDto":{"type":"object","properties":{"name":{"type":"string","example":"My Server API Key","description":"Optional name for the API key. If not provided, a default name will be used.","maxLength":100}}},"ApiKeyRevokeDto":{"type":"object","properties":{"keyId":{"type":"number","example":1,"description":"The unique identifier of the API key to revoke","minimum":1}},"required":["keyId"]},"VaultRolesDto":{"type":"object","properties":{"emergencyManager":{"type":"string","description":"Emergency manager address","example":"GBAJGSZQRZDMHKU4DAS6FEJM7TYISAME5LNERKOT7XLMNFZ5IF5ROXOQ"},"rebalanceManager":{"type":"string","description":"Rebalance manager address","example":"GBAJGSZQRZDMHKU4DAS6FEJM7TYISAME5LNERKOT7XLMNFZ5IF5ROXOQ"},"feeReceiver":{"type":"string","description":"Fee receiver address","example":"GBAJGSZQRZDMHKU4DAS6FEJM7TYISAME5LNERKOT7XLMNFZ5IF5ROXOQ"},"manager":{"type":"string","description":"Vault manager address","example":"GBAJGSZQRZDMHKU4DAS6FEJM7TYISAME5LNERKOT7XLMNFZ5IF5ROXOQ"}},"required":["emergencyManager","rebalanceManager","feeReceiver","manager"]},"StrategyDto":{"type":"object","properties":{"address":{"type":"string","description":"Strategy address"},"name":{"type":"string","description":"Strategy name"},"paused":{"type":"boolean","description":"Indicates if the strategy is paused"}},"required":["address","name","paused"]},"AssetStrategySetDto":{"type":"object","properties":{"address":{"type":"string","description":"Asset address","example":"GDAF..."},"strategies":{"description":"Strategies associated with the asset","type":"array","items":{"$ref":"#/components/schemas/StrategyDto"}}},"required":["address","strategies"]},"CreateVaultDto":{"type":"object","properties":{"roles":{"description":"Vault roles configuration","allOf":[{"$ref":"#/components/schemas/VaultRolesDto"}]},"vaultFeeBps":{"type":"number","description":"Fee amount in basis points (0-10000, where 10000 = 100%)","example":25,"minimum":0,"maximum":10000},"assets":{"description":"Assets and their strategies","example":[{"address":"CAWS...","strategies":[{"address":"CXAO...","name":"Strategy1","paused":false},{"address":"CVXA...","name":"Strategy2","paused":true}]}],"type":"array","items":{"$ref":"#/components/schemas/AssetStrategySetDto"}},"name":{"type":"string","description":"Vault name","example":"MyVault","minLength":1,"maxLength":32},"symbol":{"type":"string","description":"Vault symbol","example":"MVLT","minLength":1,"maxLength":10},"upgradable":{"type":"boolean","description":"Indicates if the vault is upgradable"},"caller":{"type":"string","description":"Caller address, the address that will call the vault creation and sign the transaction","example":"GQWE..."}},"required":["roles","vaultFeeBps","assets","name","symbol","upgradable","caller"]},"CreateVaultDepositDto":{"type":"object","properties":{"roles":{"description":"Vault roles configuration","allOf":[{"$ref":"#/components/schemas/VaultRolesDto"}]},"vaultFeeBps":{"type":"number","description":"Fee amount in basis points (0-10000, where 10000 = 100%)","example":25,"minimum":0,"maximum":10000},"assets":{"description":"Assets and their strategies","example":[{"address":"CAWS...","strategies":[{"address":"CXAO...","name":"Strategy1","paused":false},{"address":"CVXA...","name":"Strategy2","paused":true}]}],"type":"array","items":{"$ref":"#/components/schemas/AssetStrategySetDto"}},"name":{"type":"string","description":"Vault name","example":"MyVault","minLength":1,"maxLength":32},"symbol":{"type":"string","description":"Vault symbol","example":"MVLT","minLength":1,"maxLength":10},"upgradable":{"type":"boolean","description":"Indicates if the vault is upgradable"},"caller":{"type":"string","description":"Caller address, the address that will call the vault creation and sign the transaction","example":"GQWE..."},"depositAmounts":{"description":"Deposit amounts","example":[100,200],"type":"array","items":{"type":"number"}}},"required":["roles","vaultFeeBps","assets","name","symbol","upgradable","caller","depositAmounts"]},"StrategyAllocationDto":{"type":"object","properties":{"address":{"type":"string","description":"Strategy contract address","example":"CCEE2VAGPXKVIZXTVIT4O5B7GCUDTZTJ5RIXBPJSZ7JWJCJ2TLK75WVW"},"name":{"type":"string","description":"Strategy name","example":"xlm_hodl_strategy"},"amount":{"type":"number","description":"Amount to invest in this strategy (in stroops, 0 or positive integer)","example":1000000000,"minimum":0}},"required":["address","name","amount"]},"AssetAllocationDto":{"type":"object","properties":{"address":{"type":"string","description":"Asset contract address","example":"CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC"},"symbol":{"type":"string","description":"Asset symbol","example":"XLM"},"amount":{"type":"number","description":"Total amount to deposit for this asset (in stroops, must be a positive integer)","example":2000000000,"minimum":1},"strategies":{"description":"Strategies for this asset with allocation amounts (1-10 strategies)","minItems":1,"maxItems":10,"type":"array","items":{"$ref":"#/components/schemas/StrategyAllocationDto"}}},"required":["address","symbol","amount","strategies"]},"CreateVaultAutoInvestDto":{"type":"object","properties":{"caller":{"type":"string","description":"Caller address who will deposit and initially manage","example":"GBZXUKUYGXLASTLIXGIV2RJGWQHVRIS7AANR7AHXFPA67LNSAGO6WPPE"},"roles":{"description":"Vault roles configuration","allOf":[{"$ref":"#/components/schemas/VaultRolesDto"}]},"name":{"type":"string","description":"Vault name","example":"My Auto-Invest Vault","minLength":1,"maxLength":32},"symbol":{"type":"string","description":"Vault symbol","example":"MAIV","minLength":1,"maxLength":10},"vaultFee":{"type":"number","description":"Vault fee in basis points (0-10000, where 10000 = 100%)","example":10,"minimum":0,"maximum":10000},"upgradable":{"type":"boolean","description":"Whether vault is upgradable","example":true},"assets":{"description":"Asset allocations with strategies (1-10 assets)","minItems":1,"maxItems":10,"type":"array","items":{"$ref":"#/components/schemas/AssetAllocationDto"}}},"required":["caller","roles","name","symbol","vaultFee","upgradable","assets"]},"DepositDto":{"type":"object","properties":{"amounts":{"description":"One amount per vault asset, in the order of `assets` in GET /vault/{address}, each in that asset's smallest unit (7 decimals for every listed asset: 1 USDC = 10000000). JSON integers. Must contain at least one positive amount.","example":[10000000],"type":"array","items":{"type":"number","minimum":0}},"caller":{"type":"string","description":"Stellar address of the user making the deposit. Must be a valid Stellar public key.","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"},"invest":{"type":"boolean","description":"Whether to invest the deposited assets immediately into the vault strategy. Defaults to true.","example":true,"default":true},"slippageBps":{"type":"number","example":100,"description":"Slippage tolerance in basis points (bps). 10000 = 100%, 100 = 1%, 50 = 0.5%. Default is 0 bps (0%)","minimum":0,"maximum":10000,"default":0}},"required":["amounts","caller"]},"WithdrawDto":{"type":"object","properties":{"amounts":{"description":"Underlying amount to receive per vault asset, in the order of `assets` in GET /vault/{address}, each in that asset's smallest unit. JSON integers. To exit completely use withdraw-shares instead.","example":[5000000],"type":"array","items":{"type":"number","minimum":0}},"caller":{"type":"string","description":"Stellar address of the user making the withdrawal. Must be a valid Stellar public key.","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"},"slippageBps":{"type":"number","example":100,"description":"Slippage tolerance in basis points (bps). 10000 = 100%, 100 = 1%, 50 = 0.5%. Default is 0 bps (0%)","minimum":0,"maximum":10000,"default":0}},"required":["amounts","caller"]},"WithdrawSharesDto":{"type":"object","properties":{"shares":{"type":"number","description":"Vault shares (dfTokens, 7 decimals) to burn, as a JSON integer. Pass the full `dfTokens` from GET /vault/{address}/balance to exit completely.","example":1000000,"minimum":0},"caller":{"type":"string","description":"Stellar address of the user withdrawing shares. Must be a valid Stellar public key.","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"},"slippageBps":{"type":"number","example":100,"description":"Slippage tolerance in basis points (bps). 10000 = 100%, 100 = 1%, 50 = 0.5%. Default is 0 bps (0%)","minimum":0,"maximum":10000,"default":0}},"required":["shares","caller"]},"RescueFromVaultDto":{"type":"object","properties":{"strategy_address":{"type":"string","description":"Stellar address of the strategy contract to rescue assets from. Must be a valid Stellar contract address.","example":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP"},"caller":{"type":"string","description":"Stellar address of the user initiating the rescue operation. Must be a valid Stellar public key.","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}},"required":["strategy_address","caller"]},"PauseStrategyDto":{"type":"object","properties":{"strategy_address":{"type":"string","description":"Stellar address of the strategy contract to pause. Must be a valid Stellar contract address.","example":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP"},"caller":{"type":"string","description":"Stellar address of the user initiating the pause operation. Must be a valid Stellar public key.","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}},"required":["strategy_address","caller"]},"UnpauseStrategyDto":{"type":"object","properties":{"strategy_address":{"type":"string","description":"Stellar address of the strategy contract to unpause. Must be a valid Stellar contract address.","example":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP"},"caller":{"type":"string","description":"Stellar address of the user initiating the unpause operation. Must be a valid Stellar public key.","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}},"required":["strategy_address","caller"]},"SetRoleDto":{"type":"object","properties":{"new_address":{"type":"string","description":"Stellar address of the new role holder. Must be a valid Stellar public key.","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"},"caller":{"type":"string","description":"Stellar address of the user initiating the change. Must be a valid Stellar public key with appropriate permissions.","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}},"required":["new_address","caller"]},"RebalanceDto":{"type":"object","properties":{"caller":{"type":"string","description":"Stellar address of the user initiating the rebalance. Must be a valid Stellar public key **with Manager or rebalance manager role.**","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"},"instructions":{"type":"array","description":"Array of rebalance instructions. Each instruction must be a valid strategy or swap operation.","example":[{"type":"Invest","strategy_address":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP","amount":500000},{"type":"Unwind","strategy_address":"CCBTSHPUVNKCT5V675AAVYNANHXBU26PTZK2QLS7ZLFNYRJZT5HW3VL6","amount":300000},{"type":"SwapExactIn","token_in":"CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75","token_out":"CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA","amount":100000,"slippageToleranceBps":50}]}},"required":["caller","instructions"]},"LockFeesDto":{"type":"object","properties":{"new_fee_bps":{"type":"number","description":"New fee basis points (bps) to set. If not provided, fees will not be changed.","example":100,"minimum":0,"maximum":10000},"caller":{"type":"string","description":"Stellar address of the user initiating the lock fees operation. Must be a valid Stellar public key **with Manager role.**","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}},"required":["caller"]},"ReleaseFeesDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount of fees to release. Must be a positive number.","example":1000000,"minimum":0},"caller":{"type":"string","description":"Stellar address of the user initiating the release. Must be a valid Stellar public key **with Manager role.**","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"},"strategy_address":{"type":"string","description":"Stellar address of the strategy to release fees from. Must be a valid Stellar contract address.","example":"CDB2WMKQQNVZMEBY7Q7GZ5C7E7IAFSNMZ7GGVD6WKTCEWK7XOIAVZSAP"}},"required":["amount","caller","strategy_address"]},"DistributeFeesDto":{"type":"object","properties":{"caller":{"type":"string","description":"Stellar address of the user initiating the distribution. Must be a valid Stellar public key **with Manager role.**","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}},"required":["caller"]},"UpgradeWasmDto":{"type":"object","properties":{"new_wasm_hash":{"type":"string","description":"New WASM hash to upgrade the vault contract. Must be a valid hash string.","example":"1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},"caller":{"type":"string","description":"Stellar address of the user initiating the upgrade. Must be a valid Stellar public key **with Manager role.**","example":"GB7NTQG4EXB7NZEA5GNFHIHEQVTGQTZ6OWKWUD535FBEHNSEVCKZULIY"}},"required":["new_wasm_hash","caller"]},"DepositorItemDto":{"type":"object","properties":{"walletAddress":{"type":"string","description":"Stellar wallet address"},"status":{"type":"string","enum":["active","idle","inactive"]},"estimatedValue":{"type":"string","description":"Estimated value in stroops of resolvedAsset"},"resolvedAsset":{"type":"string","description":"Asset address used for estimatedValue computation"},"lastActivityAt":{"type":"string","nullable":true,"description":"ISO 8601 — null if never directly deposited/withdrew"},"totalDeposited":{"type":"string","description":"Lifetime total deposited in stroops of resolvedAsset"},"totalWithdrawn":{"type":"string","description":"Lifetime total withdrawn in stroops of resolvedAsset"}},"required":["walletAddress","status","estimatedValue","resolvedAsset","lastActivityAt","totalDeposited","totalWithdrawn"]},"DepositorAssetAggregatesDto":{"type":"object","properties":{"asset":{"type":"string","description":"Asset contract address"},"assetSymbol":{"type":"string","description":"Asset display symbol"},"totalBalance":{"type":"string","description":"Total balance across all depositors (stroops)"},"activeBalance":{"type":"string","description":"Balance of active depositors (stroops)"},"idleBalance":{"type":"string","description":"Balance of idle depositors (stroops)"},"inactiveBalance":{"type":"string","description":"Balance of inactive depositors (stroops)"}},"required":["asset","assetSymbol","totalBalance","activeBalance","idleBalance","inactiveBalance"]},"DepositorAggregatesDto":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/DepositorAssetAggregatesDto"}},"activeDepositors":{"type":"number"},"idleDepositors":{"type":"number"},"inactiveDepositors":{"type":"number"}},"required":["assets","activeDepositors","idleDepositors","inactiveDepositors"]},"GetDepositorsResponseDto":{"type":"object","properties":{"vaultAddress":{"type":"string"},"network":{"type":"string"},"limit":{"type":"number"},"offset":{"type":"number"},"total":{"type":"number"},"idleThresholdDays":{"type":"number"},"depositors":{"type":"array","items":{"$ref":"#/components/schemas/DepositorItemDto"}},"aggregates":{"$ref":"#/components/schemas/DepositorAggregatesDto"}},"required":["vaultAddress","network","limit","offset","total","idleThresholdDays","depositors","aggregates"]},"AccountEventsResponse":{"type":"object","properties":{"accountAddress":{"type":"string"},"vaultAddress":{"type":"string"},"network":{"type":"string"},"pagination":{"type":"object","description":"Pagination info","example":{"limit":50,"offset":0,"total":3}},"events":{"description":"Transaction events, newest-first by ledger","type":"array","items":{"type":"object"}}},"required":["accountAddress","vaultAddress","network","pagination","events"]},"DefindexToDefindexDto":{"type":"object","properties":{"from":{"type":"string","description":"User's Stellar public key (G-address). This account holds the source vault shares and must sign the returned XDR.","example":"GDR4KOVET27WYMB4H7UOBHKKOKXXER7ULHFIS7EMRISJUTKTS6BKQZWG"},"fromVault":{"type":"string","description":"Source DeFindex vault contract address. The full share balance held by `from` is withdrawn from this vault.","example":"CCA2ZJP5BVRXYTQH4FAGHCAUMRYCXVC4CRYC2NXHWMR7TIVX36U7F5HR"},"toVault":{"type":"string","description":"Target DeFindex vault contract address. Must expose the same assets, in the same order, as `fromVault`.","example":"CBJSNWFJ4DKVIB6MJIPNEO77RX3FK7Y46XKHU2WONOPU5MUSO4VKK55W"},"slippageBps":{"type":"number","description":"Buffer in basis points applied to the simulated withdrawal proceeds before they are deposited into the target vault. 10000 = 100%, 100 = 1%. Defaults to 10 bps (0.1%). The buffer is left behind in the wallet as dust; raising it makes the transaction more resilient to price-per-share movement between simulation and submission.","example":10,"minimum":0,"maximum":10000,"default":10}},"required":["from","fromVault","toVault"]},"RegisterStabilizerDto":{"type":"object","properties":{"caller":{"type":"string","description":"The vault's current Manager. Becomes the vault's stabilizer admin.","example":"GBMZYL5BVFU3HQLNRM4AC4GTRP553KL2THIZDEZ4RCOIHJH7CK4JKY5M"},"targetApyBps":{"type":"number","description":"Target APY in basis points (800 = 8%)","example":800,"minimum":0},"minFeeBps":{"type":"number","description":"Lowest fee the stabilizer may set, in basis points. Must be <= maxFeeBps.","example":0,"minimum":0,"maximum":10000},"maxFeeBps":{"type":"number","description":"Highest fee the stabilizer may set, in basis points (2000 = 20%)","example":2000,"minimum":0,"maximum":10000}},"required":["caller","targetApyBps","minFeeBps","maxFeeBps"]},"SetTargetApyDto":{"type":"object","properties":{"caller":{"type":"string","description":"The vault's stabilizer admin","example":"GBMZYL5BVFU3HQLNRM4AC4GTRP553KL2THIZDEZ4RCOIHJH7CK4JKY5M"},"targetApyBps":{"type":"number","description":"Target APY in basis points (800 = 8%)","example":800,"minimum":0}},"required":["caller","targetApyBps"]},"SetFeeBoundsDto":{"type":"object","properties":{"caller":{"type":"string","description":"The vault's stabilizer admin","example":"GBMZYL5BVFU3HQLNRM4AC4GTRP553KL2THIZDEZ4RCOIHJH7CK4JKY5M"},"minFeeBps":{"type":"number","description":"Lowest fee the stabilizer may set, in basis points. Must be <= maxFeeBps.","example":0,"minimum":0,"maximum":10000},"maxFeeBps":{"type":"number","description":"Highest fee the stabilizer may set, in basis points (2000 = 20%)","example":2000,"minimum":0,"maximum":10000}},"required":["caller","minFeeBps","maxFeeBps"]},"ExitStabilizerDto":{"type":"object","properties":{"caller":{"type":"string","description":"The vault's stabilizer admin. Gets the Manager role back.","example":"GBMZYL5BVFU3HQLNRM4AC4GTRP553KL2THIZDEZ4RCOIHJH7CK4JKY5M"}},"required":["caller"]},"BoostDepositDto":{"type":"object","properties":{"caller":{"type":"string","description":"Any address funding the campaign; signs the transaction","example":"GBMZYL5BVFU3HQLNRM4AC4GTRP553KL2THIZDEZ4RCOIHJH7CK4JKY5M"},"amount":{"type":"string","description":"Stroops of the campaign asset, as a positive integer string","example":"1000000000"}},"required":["caller","amount"]}},"headers":{"X-RateLimit-Limit":{"description":"Bucket size for your tier: the most requests you can burst.","schema":{"type":"integer","example":5}},"X-RateLimit-Remaining":{"description":"Requests left in the bucket right now.","schema":{"type":"integer","example":4}},"X-RateLimit-Reset":{"description":"Seconds (not a timestamp) until the bucket is full again. On a 429, seconds until the next request is allowed.","schema":{"type":"integer","example":1}},"x-correlation-id":{"description":"Request ID. Send your own `x-correlation-id` to have it echoed back; quote it when you report a problem.","schema":{"type":"string","example":"454a42d5-0166-40fe-a4ad-32e77aa44962"}}}}}