openapi: 3.1.0 info: title: Breeze Admin API description: A comprehensive API for managing yield farming operations, funds, and user authentication contact: name: Breeze Team email: support@breeze.com license: name: Proprietary url: https://breeze.com/license version: 1.0.0 servers: - url: http://localhost:8080 description: Local development server - url: https://api.breeze.com description: Production server tags: - name: Admin description: Administrative operations paths: /admin/agent/metrics: get: tags: - Admin operationId: get_agent_metrics responses: '200': description: Global and per-asset metrics for tracked agents aggregated from agent_data.tokens and user_fund content: application/json: schema: $ref: '#/components/schemas/AdminAgentMetricsResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/assign-fund-to-organization: post: tags: - Admin operationId: assign_fund_to_organization requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiAssignFundToOrganization' required: true responses: '200': description: Fund assigned to partner successfully content: application/json: schema: $ref: '#/components/schemas/ApiAssignFundOperationResult' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/close-fund/{fund_id}: post: tags: - Admin operationId: close_fund parameters: - name: fund_id in: path description: Fund ID to close required: true schema: type: string responses: '200': description: Close fund job submitted successfully '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/create-fund: post: tags: - Admin operationId: process_create_fund requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiCreateFundRequest' required: true responses: '200': description: Fund created successfully content: application/json: schema: $ref: '#/components/schemas/CreateFundApiResult' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/create-selective-yield-sources: post: tags: - Admin operationId: create_selective_yield_sources requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiSelectiveYieldSources' required: true responses: '200': description: selective yield sources created successfully '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/delete-empty-strategy: post: tags: - Admin operationId: delete_empty_strategy requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiInputForDeletingEmptyStrategy' required: true responses: '200': description: Strategy deleted successfully '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/delete-strategy-template: post: tags: - Admin operationId: delete_strategy_template requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiInputForDeletingStrategy' required: true responses: '200': description: Strategy template deleted successfully content: application/json: schema: $ref: '#/components/schemas/ApiDeleteStrategyOperationResult' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/funds: get: tags: - Admin operationId: list_all_funds responses: '200': description: All funds retrieved successfully content: application/json: schema: type: array items: $ref: '#/components/schemas/AdminFundListItem' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] post: tags: - Admin operationId: create_fund_admin requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiCreateFundRequest' required: true responses: '200': description: Fund created successfully content: application/json: schema: $ref: '#/components/schemas/CreateFundApiResult' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/funds/{fund_id}: get: tags: - Admin operationId: get_fund_detail parameters: - name: fund_id in: path description: Fund ID required: true schema: type: string responses: '200': description: Fund detail retrieved successfully content: application/json: schema: $ref: '#/components/schemas/AdminFundDetail' '404': description: Fund not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] put: tags: - Admin operationId: update_fund_admin parameters: - name: fund_id in: path description: Fund ID required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiUpdateFundAdminRequest' required: true responses: '200': description: Fund updated successfully '404': description: Fund not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/funds/{fund_id}/metrics: get: tags: - Admin operationId: get_fund_metrics parameters: - name: fund_id in: path description: Fund ID required: true schema: type: string - name: start_timestamp in: query description: Start timestamp for metrics range (ISO 8601 format) required: true schema: type: string - name: end_timestamp in: query description: End timestamp for metrics range (ISO 8601 format) required: true schema: type: string - name: aggregation_window in: query description: Aggregation window (e.g., '1h', '1d', '7d', '30d') - defaults to '1d' required: false schema: type: string responses: '200': description: Fund metrics retrieved successfully content: application/json: schema: $ref: '#/components/schemas/ApiFundMetricsResponse' '400': description: Invalid parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Fund not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/funds/{fund_id}/rebalance-history: get: tags: - Admin operationId: get_fund_rebalance_history_admin parameters: - name: fund_id in: path description: Fund ID required: true schema: type: string - name: per_page in: query description: Limit of records to return required: true schema: type: integer format: int64 minimum: 0 - name: page in: query description: Offset of records to return required: true schema: type: integer format: int64 minimum: 0 - name: include_failed in: query description: Include failed rebalance history required: true schema: type: boolean responses: '200': description: Fund rebalance history retrieved successfully content: application/json: schema: $ref: '#/components/schemas/PaginatedResponse' '404': description: Fund not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/jobs/{job_id}/cancel: post: tags: - Admin operationId: cancel_job parameters: - name: job_id in: path description: Job ID to cancel required: true schema: type: string responses: '200': description: Job cancelled successfully content: application/json: schema: $ref: '#/components/schemas/ApiCancelJobResult' '400': description: Job cannot be cancelled (already completed, failed, or cancelled) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Job not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/jobs/{job_id}/retry: post: tags: - Admin operationId: retry_job parameters: - name: job_id in: path description: Job ID to retry required: true schema: type: string responses: '200': description: Job queued for retry successfully content: application/json: schema: $ref: '#/components/schemas/ApiRetryJobResult' '400': description: Job cannot be retried (not in failed or cancelled state) content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Job not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/list-admin-jobs: get: tags: - Admin operationId: list_all_admin_jobs parameters: - name: page in: query description: 'Page number for pagination (default: 1)' required: false schema: type: integer format: int32 minimum: 0 - name: per_page in: query description: 'Items per page (default: 20, max: 100)' required: false schema: type: integer format: int32 minimum: 0 responses: '200': description: Admin jobs retrieved successfully content: application/json: schema: $ref: '#/components/schemas/PaginatedResponse' '400': description: Invalid query parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/metrics: get: tags: - Admin operationId: get_metrics parameters: - name: start_timestamp in: query description: Start timestamp for metrics range (ISO 8601 format) required: true schema: type: string - name: end_timestamp in: query description: End timestamp for metrics range (ISO 8601 format) required: true schema: type: string - name: aggregation_window in: query description: Aggregation window (e.g., '1h', '1d', '7d', '30d') - defaults to '30d' required: false schema: type: string responses: '200': description: Platform metrics retrieved successfully (same format as strategy/metrics) content: application/json: schema: $ref: '#/components/schemas/AdminMetricsResponse' '400': description: Invalid parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/migrate-org-to-strategy: post: tags: - Admin operationId: migrate_org_to_strategy requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiInputForMigratingToStrategy' required: true responses: '200': description: Strategy migrated org to strategy successfully '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/org-fund-access: get: tags: - Admin operationId: get_org_fund_access responses: '200': description: Organization fund access records retrieved successfully content: application/json: schema: type: array items: {} '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/organizations: get: tags: - Admin operationId: get_organizations responses: '200': description: All organizations retrieved successfully content: application/json: schema: $ref: '#/components/schemas/AdminOrganizationsResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] post: tags: - Admin operationId: create_organization_admin requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateOrganizationRequest' required: true responses: '200': description: Organization created successfully content: application/json: schema: $ref: '#/components/schemas/CreateOrganizationResponse' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/organizations/{org_id}: get: tags: - Admin operationId: get_organization_detail_handler parameters: - name: org_id in: path description: Organization ID required: true schema: type: string responses: '200': description: Organization details retrieved successfully content: application/json: schema: $ref: '#/components/schemas/AdminOrganizationDetailResponse' '404': description: Organization not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] put: tags: - Admin operationId: update_organization_admin parameters: - name: org_id in: path description: Organization ID required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiUpdateOrganizationAdminRequest' required: true responses: '200': description: Organization updated successfully '404': description: Organization not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/organizations/{org_id}/invites: post: tags: - Admin operationId: create_organization_invite parameters: - name: org_id in: path description: Organization ID required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateOrganizationInviteRequest' required: true responses: '200': description: Invitation created successfully content: application/json: schema: $ref: '#/components/schemas/CreateOrganizationInviteResponse' '400': description: Bad request - invalid email or role content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Organization not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/organizations/{org_id}/invites/{invite_id}/revoke: post: tags: - Admin operationId: revoke_organization_invite parameters: - name: org_id in: path description: Organization ID required: true schema: type: string - name: invite_id in: path description: Invitation ID to revoke required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RevokeOrganizationInviteRequest' required: true responses: '200': description: Invitation revoked successfully content: application/json: schema: $ref: '#/components/schemas/RevokeOrganizationInviteResponse' '404': description: Organization or invitation not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/overview: get: tags: - Admin operationId: get_overview responses: '200': description: Platform overview with all metrics content: application/json: schema: $ref: '#/components/schemas/PlatformSummary' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/strategies: get: tags: - Admin operationId: list_all_strategies responses: '200': description: All strategies retrieved successfully content: application/json: schema: type: array items: $ref: '#/components/schemas/AdminStrategyListItem' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/strategies/{strategy_id}: get: tags: - Admin operationId: get_strategy_detail parameters: - name: strategy_id in: path description: Strategy ID required: true schema: type: string responses: '200': description: Strategy detail retrieved successfully content: application/json: schema: $ref: '#/components/schemas/AdminStrategyDetail' '404': description: Strategy not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] put: tags: - Admin operationId: update_strategy_admin parameters: - name: strategy_id in: path description: Strategy ID required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiInputForUpdatingStrategyInstance' required: true responses: '200': description: Strategy updated successfully '404': description: Strategy not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] delete: tags: - Admin operationId: delete_strategy_admin parameters: - name: strategy_id in: path description: Strategy ID required: true schema: type: string responses: '200': description: Strategy deleted successfully '400': description: Strategy has funds and cannot be deleted content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Strategy not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/strategies/{strategy_id}/close-funds: post: tags: - Admin operationId: close_strategy_funds_admin parameters: - name: strategy_id in: path description: Strategy ID to close all funds for required: true schema: type: string responses: '200': description: Close fund jobs submitted successfully for all funds in strategy '404': description: Strategy not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/strategies/{strategy_id}/metrics: get: tags: - Admin operationId: get_strategy_metrics parameters: - name: strategy_id in: path description: Strategy ID required: true schema: type: string - name: start_timestamp in: query description: Start timestamp for metrics range (ISO 8601 format) required: true schema: type: string - name: end_timestamp in: query description: End timestamp for metrics range (ISO 8601 format) required: true schema: type: string - name: aggregation_window in: query description: Aggregation window (e.g., '1h', '1d', '7d', '30d') - defaults to '1d' required: false schema: type: string responses: '200': description: Strategy metrics retrieved successfully content: application/json: schema: $ref: '#/components/schemas/ApiStrategyMetricUniversal' '400': description: Invalid parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '404': description: Strategy not found content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/templates: get: tags: - Admin operationId: get_templates responses: '200': description: Strategy templates retrieved successfully content: application/json: schema: $ref: '#/components/schemas/Vec' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/unassign-fund-to-organization: post: tags: - Admin operationId: unassign_fund_to_organization requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiUnAssignFundFromOrganization' required: true responses: '200': description: Fund assigned to partner successfully content: application/json: schema: $ref: '#/components/schemas/ApiAssignFundOperationResult' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/update-fund: post: tags: - Admin operationId: update_fund requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiFundUpdateRequest' required: true responses: '200': description: Fund constraints updated successfully '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/update-fund-delegated-withdrawer: post: tags: - Admin operationId: update_fund_delegated_withdrawer requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiUpdateFundDelegatedWithdrawerRequest' required: true responses: '200': description: Fund delegated withdrawer update job submitted successfully '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/update-fund-fees: post: tags: - Admin operationId: update_fund_fees requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiFundFees' required: true responses: '200': description: Fund fees updated successfully '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/update-fund-rebalance-settings: post: tags: - Admin operationId: update_fund_rebalance_settings requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiFundRebalanceSettings' required: true responses: '200': description: Fund rebalance settings updated successfully '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/update-org-tags: post: tags: - Admin operationId: update_organization_tags requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiUpdateOrganizationTagsInputs' required: true responses: '200': description: Organization tags updated successfully '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/update-selective-yield-sources: post: tags: - Admin operationId: update_selective_yield_sources requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiInputForUpdatingSelectiveYieldSource' required: true responses: '200': description: selective yield sources updated successfully '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/update-strategy-template: put: tags: - Admin operationId: update_strategy_template requestBody: content: application/json: schema: $ref: '#/components/schemas/ApiInputForUpdatingStrategy' required: true responses: '200': description: Strategy template updated successfully content: application/json: schema: $ref: '#/components/schemas/ApiCreateStrategyTemplateResult' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /admin/yield-sources: get: tags: - Admin operationId: get_yield_sources responses: '200': description: Yield sources grouped by asset retrieved successfully content: application/json: schema: $ref: '#/components/schemas/AdminYieldSourcesResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] /organization/get-job-status: get: tags: - Admin operationId: get_job_status parameters: - name: task_id in: query description: Task ID required: true schema: type: string responses: '200': description: Fund job status content: application/json: schema: $ref: '#/components/schemas/ApiJobStatus' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' security: - bearer_auth: [] components: schemas: ApiSelectiveYieldSources: type: object required: - mint - yield_sources properties: mint: type: string yield_sources: $ref: '#/components/schemas/ApiSelectiveYieldSource' ApiJobStatus: type: object required: - job_id - job_type - payload - state - created_at - updated_at properties: additional_fund_metadata: type: - array - 'null' items: $ref: '#/components/schemas/ApiFundWithBaseAssetMapper' created_at: type: integer format: int64 minimum: 0 error: type: - string - 'null' job_id: type: string job_type: type: string payload: type: string state: type: string updated_at: type: integer format: int64 minimum: 0 AdminOrganizationMember: type: object description: Organization member from Clerk required: - id - user_id - identifier - role - created_at properties: created_at: type: integer format: int64 description: When the membership was created (Unix timestamp) minimum: 0 first_name: type: - string - 'null' description: User's first name id: type: string description: Membership ID identifier: type: string description: User's email or identifier image_url: type: - string - 'null' description: User's profile image URL last_name: type: - string - 'null' description: User's last name role: type: string description: Role in the organization (e.g., "org:admin", "org:member") user_id: type: string description: User ID AdminStrategyFee: type: object description: Fee info for admin strategy detail required: - fee_bps - fee_recipient - fee_type - frequency_seconds properties: fee_bps: type: integer format: int32 minimum: 0 fee_recipient: type: string fee_type: type: string frequency_seconds: type: integer format: int64 minimum: 0 ApiSelectiveYieldSource: type: object properties: drift_lending: type: - string - 'null' jup_lend: type: - string - 'null' kamino: type: - string - 'null' marginfiv2: type: - string - 'null' CreateOrganizationInviteRequest: type: object description: Request body for creating an organization invitation required: - email_address properties: email_address: type: string description: Email address to send the invitation to inviter_user_id: type: - string - 'null' description: 'Optional: User ID of the person creating the invitation (for tracking purposes)' role: type: string description: Role to assign to the invited user (e.g., "org:member", "org:admin") RevokeOrganizationInviteResponse: type: object description: Response for revoking an organization invitation required: - invitation - message properties: invitation: $ref: '#/components/schemas/AdminOrganizationInvitation' description: The revoked invitation details message: type: string description: Success message ApiCancelJobResult: type: object required: - message - job_id - previous_state - new_state properties: job_id: type: string message: type: string new_state: type: string previous_state: type: string PaginatedResponse: type: object description: Paginated response wrapper required: - data - meta properties: data: type: array items: $ref: '#/components/schemas/ProtocolYieldSources' meta: $ref: '#/components/schemas/PaginationMeta' description: Pagination metadata ApiFundRebalanceSettings: type: object required: - fund_id properties: fund_id: type: string min_position_settle_time: type: - integer - 'null' format: int64 minimum: 0 min_rebalance_value: type: - integer - 'null' format: int64 minimum: 0 rebalance_period: type: - integer - 'null' format: int64 minimum: 0 unallocated_threshold: type: - integer - 'null' format: int64 minimum: 0 ApiStrategyMetricUniversal: type: object required: - start - end - aggregation_window - strategy_id - data - combined_asset_value_over_time - per_asset_value_over_time - fee_distribution_metrics properties: aggregation_window: type: string description: Aggregation window (e.g., "1h", "1d", "5m") representing time between data points combined_asset_value_over_time: type: array items: $ref: '#/components/schemas/CombinedAssetValueOverTime' data: type: array items: $ref: '#/components/schemas/UniversalStrategyMetrics' description: Array of aggregated metric data points end: type: string description: End timestamp of the data range fee_distribution_metrics: type: array items: $ref: '#/components/schemas/ApiDailyFeeDistribution' per_asset_value_over_time: type: object additionalProperties: type: array items: $ref: '#/components/schemas/AssetValuePair' propertyNames: type: string start: type: string description: Start timestamp of the data range strategy_id: type: array items: type: string description: Strategy ID for the metrics AdminMetricsResponse: type: object description: 'Admin metrics response - aggregates ALL strategies/funds platform-wide Same structure as strategy/metrics but for entire platform' required: - start - end - aggregation_window - total_strategies - total_funds - data - combined_asset_value_over_time - per_asset_value_over_time - fee_distribution_metrics properties: aggregation_window: type: string description: Aggregation window (e.g., "1h", "1d", "5m") combined_asset_value_over_time: type: array items: $ref: '#/components/schemas/CombinedAssetValueOverTime' description: Combined asset value over time (all assets) data: type: array items: $ref: '#/components/schemas/UniversalStrategyMetrics' description: Array of aggregated metric data points over time end: type: string description: End timestamp of the data range fee_distribution_metrics: type: array items: $ref: '#/components/schemas/ApiDailyFeeDistribution' description: Fee distribution metrics over time per_asset_value_over_time: type: object description: Per-asset value over time additionalProperties: type: array items: $ref: '#/components/schemas/AssetValuePair' propertyNames: type: string start: type: string description: Start timestamp of the data range total_funds: type: integer description: Total number of funds included minimum: 0 total_strategies: type: integer description: Total number of strategies included minimum: 0 ApiAssignFundToOrganization: type: object required: - organization_id - organization_fund_id properties: organization_fund_id: type: string organization_id: type: string ApiDailyFeeDistribution: type: object required: - time - total_amount_distributed properties: time: type: string total_amount_distributed: type: number format: double ApiUpdateFundDelegatedWithdrawerRequest: type: object required: - fund_id properties: delegated_withdrawer: type: - string - 'null' description: Set to `null` to clear the delegated withdrawer. fund_id: type: string CreateOrganizationInviteResponse: type: object description: Response for creating an organization invitation required: - invitation - message properties: invitation: $ref: '#/components/schemas/AdminOrganizationInvitation' description: The created invitation details message: type: string description: Success message AdminStrategyCurrentData: type: object description: Current live data for admin strategy detail required: - tvl_usd - total_deposits_usd - yield_earnings_usd - total_users - total_fees_distributed_usd - apy - allocated_usd - unallocated_usd - protocol_allocations properties: allocated_usd: type: number format: double description: Allocated to yield (USD) apy: type: number format: double description: Weighted APY protocol_allocations: type: array items: $ref: '#/components/schemas/ProtocolValues' description: Protocol breakdown total_deposits_usd: type: number format: double description: Total deposits (USD) - from user_fund table total_fees_distributed_usd: type: number format: double description: Total fees distributed (USD) total_users: type: integer format: int64 description: Total unique users minimum: 0 tvl_usd: type: number format: double description: Total value locked (USD) unallocated_usd: type: number format: double description: Unallocated amount (USD) yield_earnings_usd: type: number format: double description: 'Yield earnings: TVL - deposits' StrategyInstanceStatus: type: string enum: - active - pending - failed - updating FundMetricDataPoint: type: object description: Single fund metric data point required: - time - current_value_usd - current_value - allocated_to_yield_usd - allocated_to_yield - unallocated_amount_usd - unallocated_amount - total_deposits - deposits_usd - withdrawals_usd - current_apy - risk_level - share_price - base_asset_price_usd - user_count - allocation_count properties: allocated_to_yield: type: number format: double description: Amount allocated to yield in base asset allocated_to_yield_usd: type: number format: double description: Amount allocated to yield in USD allocation_count: type: number format: double description: Number of allocations base_asset_price_usd: type: number format: double description: Base asset price in USD current_apy: type: number format: double description: Current APY current_value: type: number format: double description: Current value in base asset (with decimals applied) current_value_usd: type: number format: double description: Current value in USD deposits_usd: type: number format: double description: Deposits in USD risk_level: type: number format: double description: Risk level share_price: type: number format: double description: Share price time: type: string description: Timestamp (ISO 8601) total_deposits: type: number format: double description: Total deposits in base asset unallocated_amount: type: number format: double description: Unallocated amount in base asset unallocated_amount_usd: type: number format: double description: Unallocated amount in USD user_count: type: number format: double description: User count withdrawals_usd: type: number format: double description: Withdrawals in USD ApiTemplateAsset: type: object required: - mint - yield_sources properties: mint: type: string yield_sources: $ref: '#/components/schemas/ApiTemplateYieldSource' ApiInputForDeletingEmptyStrategy: type: object required: - org_id - strategy_name properties: org_id: type: string strategy_name: type: string AdminStrategyListItem: type: object description: Strategy list item for admin back-office views (minimal for fast listing) required: - id - name - organization_name - assets - status - created_at - updated_at properties: assets: type: array items: type: string description: List of asset mints in this strategy created_at: type: integer format: int64 description: Created timestamp minimum: 0 id: type: string description: Strategy ID name: type: string description: Strategy name organization_name: type: string description: Organization name (from Breeze DB or Clerk) status: type: string description: Strategy status updated_at: type: integer format: int64 description: Updated timestamp minimum: 0 PaginationMeta: type: object description: Pagination metadata required: - page - per_page - total - total_pages - has_more properties: has_more: type: boolean description: Whether there are more pages page: type: integer format: int32 description: Current page number minimum: 0 per_page: type: integer format: int32 description: Number of items per page minimum: 0 total: type: integer format: int64 description: Total number of items minimum: 0 total_pages: type: integer format: int32 description: Total number of pages minimum: 0 RevokeOrganizationInviteRequest: type: object description: Request body for revoking an organization invitation required: - requesting_user_id properties: requesting_user_id: type: string description: User ID of the person requesting the revocation ApiInputForUpdatingStrategy: type: object required: - template_id - name - visibility_tags - assets - fees properties: assets: type: array items: $ref: '#/components/schemas/ApiTemplateAsset' description: type: - string - 'null' fees: type: array items: $ref: '#/components/schemas/ApiStrategyFee' name: type: string template_id: type: string visibility_tags: type: array items: type: string AdminFundAllocation: type: object description: Fund allocation detail for admin required: - index - yield_source_type - protocol - protocol_id - position_id - deposit_amount - current_value - deposit_timestamp properties: apy: type: - number - 'null' format: double description: Current APY for the allocation (from yield source) current_value: type: integer format: int64 description: Current value (raw) minimum: 0 deposit_amount: type: integer format: int64 description: Deposit amount (raw) minimum: 0 deposit_timestamp: type: integer format: int64 description: Deposit timestamp index: type: integer format: int32 description: Allocation index minimum: 0 position_id: type: string description: Position ID protocol: type: string description: Protocol name protocol_id: type: string description: Protocol ID (yield source pubkey) yield_source_type: type: string description: Yield source type ApiYieldSourceTarget: type: object required: - yield_source_type - protocol properties: protocol: type: string yield_source_type: type: string AdminStrategyFundDetail: type: object description: Fund detail for admin strategy detail required: - fund_id - base_asset_mint - base_asset_decimals - current_value - current_value_usd - deposits - deposits_usd - allocated_to_yield - allocated_to_yield_usd - unallocated - unallocated_usd - user_count - asset_price_usd properties: allocated_to_yield: type: integer description: Allocated to yield in base asset minimum: 0 allocated_to_yield_usd: type: number format: double description: Allocated to yield in USD asset_price_usd: type: number format: double description: Current asset price (USD) base_asset_decimals: type: integer format: int32 description: Base asset decimals minimum: 0 base_asset_mint: type: string description: Base asset token mint current_value: type: integer description: Current value in base asset minimum: 0 current_value_usd: type: number format: double description: Current value in USD deposits: type: integer description: Total deposits in base asset minimum: 0 deposits_usd: type: number format: double description: Total deposits in USD fund_id: type: string description: Fund ID unallocated: type: integer description: Unallocated in base asset minimum: 0 unallocated_usd: type: number format: double description: Unallocated in USD user_count: type: integer format: int64 description: User count for this fund minimum: 0 ApiUnAssignFundFromOrganization: type: object required: - organization_fund_id properties: organization_fund_id: type: string CreateFundApiResult: type: object required: - status - task_id - message properties: message: type: string status: type: string task_id: type: string ApiInputForMigratingToStrategy: type: object required: - strategy_name - org_id - breeze_fee_recipient_key - breeze_fee_percentage - fee_payout_frequency_seconds properties: breeze_fee_percentage: type: number format: double breeze_fee_recipient_key: type: string fee_payout_frequency_seconds: type: string org_id: type: string strategy_name: type: string ApiInputForUpdatingStrategyInstance: type: object properties: name: type: - string - 'null' description: New name for the strategy (optional) FundRef: type: object required: - mint - fund_id properties: allocation_percent: type: - number - 'null' format: double fund_id: type: string mint: type: string CombinedAssetValueOverTime: type: object required: - time - assets properties: assets: type: object additionalProperties: type: number format: double propertyNames: type: string time: type: string ApiCreateFundRequest: type: object required: - base_asset_mint - yield_source_ids - strategy_id - risk_aversion_bps - risk_max properties: base_asset_mint: type: string description: Base asset mint address (e.g., USDC mint) constraints: type: - array - 'null' items: $ref: '#/components/schemas/ApiFundConstraint' description: Optional constraints for yield strategies fees: type: - array - 'null' items: $ref: '#/components/schemas/ApiFundFee' description: Optional fees configuration organization_id: type: - string - 'null' description: Optional organization ID to associate with the fund rebalance_settings: oneOf: - type: 'null' - $ref: '#/components/schemas/ApiCreateFundRebalanceSettings' description: Optional rebalance settings risk_aversion_bps: type: integer format: int64 description: Risk aversion in basis points (0-10000) minimum: 0 risk_max: type: integer format: int64 description: Maximum risk level (0-100) minimum: 0 strategy_id: type: string description: Strategy instance ID this fund belongs to yield_source_ids: $ref: '#/components/schemas/ApiYieldSourceIds' description: Yield source IDs - one per protocol, must match base asset mint AdminFundDetail: type: object description: Detailed fund information for admin back-office views required: - fund_id - base_asset_mint - base_asset_decimals - base_asset_token_account - authority - index_number - lookup_table - bump - token_account_bump - total_shares - share_price - current_value - status - current_value_usd - allocated_to_yield - allocated_to_yield_usd - unallocated_amount - unallocated_amount_usd - last_value_tracked_at - updated_at_timestamp - updated_at_slot - risk_max - risk_aversion_bps - total_deposits - total_users - has_fees - fees - last_rebalance_slot - allocations - constraints properties: allocated_to_yield: type: integer description: Amount allocated to yield (raw) minimum: 0 allocated_to_yield_usd: type: number format: double description: Amount allocated to yield in USD allocation_percent: type: - number - 'null' format: double description: Allocation percent within strategy allocations: type: array items: $ref: '#/components/schemas/AdminFundAllocation' description: Current yield allocations authority: type: string description: Fund authority base_asset_decimals: type: integer format: int32 description: Base asset decimals minimum: 0 base_asset_mint: type: string description: Base asset token mint address base_asset_price_usd: type: - number - 'null' format: double description: Base asset price in USD base_asset_token_account: type: string description: Base asset token account bump: type: integer format: int32 description: Fund bump minimum: 0 constraints: type: array items: $ref: '#/components/schemas/AdminFundConstraint' description: Fund constraints current_apy: type: - number - 'null' format: double description: Current APY current_risk: type: - integer - 'null' format: int32 description: Current risk level minimum: 0 current_value: type: integer description: Current value in base asset (raw) minimum: 0 current_value_usd: type: number format: double description: Current value in USD fees: type: array items: $ref: '#/components/schemas/AdminFundFee' description: Fee configurations fund_id: type: string description: Fund ID has_fees: type: boolean description: Whether fund has fees configured index_number: type: integer format: int64 description: Fund index number minimum: 0 last_rebalance_slot: type: integer format: int64 description: Last rebalance slot minimum: 0 last_rebalance_timestamp: type: - integer - 'null' format: int64 description: Last rebalance timestamp minimum: 0 last_refresh_timestamp: type: - integer - 'null' format: int64 description: Last refresh timestamp minimum: 0 last_snapshot_timestamp: type: - integer - 'null' format: int64 description: Last snapshot timestamp minimum: 0 last_value_tracked_at: type: integer format: int64 description: Last value tracked at slot minimum: 0 lookup_table: type: string description: Lookup table address min_position_settle_time: type: - integer - 'null' format: int64 description: Minimum position settle time minimum: 0 min_rebalance_value: type: - integer - 'null' format: int64 description: Minimum rebalance value minimum: 0 organization_id: type: - string - 'null' description: Organization ID (if known) organization_name: type: - string - 'null' description: Organization name (if known) rebalance_error: type: - string - 'null' description: Last rebalance error (if any) rebalance_period: type: - integer - 'null' format: int64 description: Rebalance period in seconds minimum: 0 risk_aversion_bps: type: integer format: int64 description: Risk aversion basis points minimum: 0 risk_max: type: integer format: int64 description: Risk max setting minimum: 0 share_price: type: integer format: int64 description: Current share price minimum: 0 status: type: string description: Fund status (Live, Paused, WithdrawOnly) strategy_id: type: - string - 'null' description: Strategy ID this fund belongs to (if any) strategy_name: type: - string - 'null' description: Strategy name (if any) token_account_bump: type: integer format: int32 description: Token account bump minimum: 0 total_deposits: type: integer description: Total deposits in base asset (raw) minimum: 0 total_shares: type: integer description: Current total shares minimum: 0 total_users: type: integer format: int64 description: Total unique users minimum: 0 unallocated_amount: type: integer description: Unallocated amount (raw) minimum: 0 unallocated_amount_usd: type: number format: double description: Unallocated amount in USD unallocated_threshold: type: - integer - 'null' format: int64 description: Unallocated threshold for triggering rebalance minimum: 0 updated_at_slot: type: integer format: int64 description: Updated at slot minimum: 0 updated_at_timestamp: type: integer format: int64 description: Updated at timestamp minimum: 0 ApiConstraintType: type: string enum: - MaxPercentage - MaxBaseAssetAmount ApiInputForUpdatingSelectiveYieldSource: type: object required: - mint - yield_sources properties: mint: type: string yield_sources: $ref: '#/components/schemas/ApiSelectiveYieldSource' ApiFundConstraint: type: object required: - yield_source_target - constraint_type - value properties: constraint_type: $ref: '#/components/schemas/ApiConstraintType' value: type: integer format: int64 minimum: 0 yield_source_target: $ref: '#/components/schemas/ApiYieldSourceTarget' AdminAgentMetricsResponse: type: object required: - total_agents - total_deposit_interactions - total_withdraw_interactions - asset_metrics - agents_with_user_funds - total_agent_user_fund_records - total_distinct_funds_touched properties: agents_with_user_funds: type: integer format: int64 description: Distinct agent users that currently have at least one user_fund row minimum: 0 asset_metrics: type: array items: $ref: '#/components/schemas/AdminAgentAssetMetrics' description: Per-asset metrics aggregated by mint total_agent_user_fund_records: type: integer format: int64 description: Total number of user_fund rows for tracked agents minimum: 0 total_agents: type: integer format: int64 description: Total number of tracked agents (rows in agent_data) minimum: 0 total_deposit_interactions: type: integer format: int64 description: Sum of all agent deposit interactions minimum: 0 total_distinct_funds_touched: type: integer format: int64 description: Distinct funds touched by tracked agents via user_fund minimum: 0 total_withdraw_interactions: type: integer format: int64 description: Sum of all agent withdraw interactions minimum: 0 CreateOrganizationResponse: type: object description: Response for creating a new organization required: - organization - message properties: message: type: string description: Success message organization: $ref: '#/components/schemas/AdminOrganization' description: The created organization details ApiFundUpdateRequest: type: object required: - fund_id - constraints properties: constraints: type: array items: $ref: '#/components/schemas/ApiFundConstraint' fund_id: type: string risk_aversion_bps: type: - integer - 'null' format: int64 minimum: 0 risk_max: type: - integer - 'null' format: int64 minimum: 0 AdminOrganizationDetailResponse: type: object description: Response for single organization detail endpoint required: - id - name - created_at - updated_at - tags - strategy_count - fund_count - members - invitations properties: created_at: type: integer format: int64 description: When the organization was created (Unix timestamp) minimum: 0 fee_distribution_key: type: - string - 'null' description: Fee distribution public key fund_count: type: integer description: Number of funds in this organization minimum: 0 id: type: string description: Organization ID invitations: type: array items: $ref: '#/components/schemas/AdminOrganizationInvitation' description: Pending invitations for this organization members: type: array items: $ref: '#/components/schemas/AdminOrganizationMember' description: Current members of this organization name: type: string description: Organization name slug: type: - string - 'null' description: Organization slug strategy_count: type: integer description: Number of strategies in this organization minimum: 0 tags: type: array items: type: string description: Tags associated with the organization updated_at: type: integer format: int64 description: When the organization was last updated (Unix timestamp) minimum: 0 ApiUpdateFundRebalanceSettings: type: object description: Rebalance settings for updating a fund (without fund_id since it's in the path) properties: min_position_settle_time: type: - integer - 'null' format: int64 description: Minimum time to wait before settling a position (in seconds) minimum: 0 min_rebalance_value: type: - integer - 'null' format: int64 description: Minimum value required to trigger a rebalance minimum: 0 rebalance_period: type: - integer - 'null' format: int64 description: Rebalance period in seconds minimum: 0 unallocated_threshold: type: - integer - 'null' format: int64 description: Unallocated threshold amount minimum: 0 ApiUpdateFundConstraintsSettings: type: object description: Constraints and risk settings for updating a fund (without fund_id since it's in the path) properties: constraints: type: - array - 'null' items: $ref: '#/components/schemas/ApiFundConstraint' description: Fund constraints (yield strategy limits) risk_aversion_bps: type: - integer - 'null' format: int64 description: Risk aversion in basis points (0-10000) minimum: 0 risk_max: type: - integer - 'null' format: int64 description: Maximum risk level (0-100) minimum: 0 ApiYieldSource: type: object required: - pubkey - source - yield_type - current_apy - risk - updated_at_timestamp - base_assets properties: base_assets: type: array items: type: string description: List of supported base assets current_apy: type: number format: double description: Current annual percentage yield pubkey: type: string description: Unique identifier for the yield source risk: type: integer format: int32 description: Risk level (0-255, lower is safer) minimum: 0 source: type: string description: Protocol/source name (e.g., "kamino", "marginfi", "drift") updated_at_timestamp: type: integer format: int64 description: Timestamp when the data was last updated minimum: 0 yield_type: type: string description: Type of yield source (e.g., "Lending", "TokenStaking", etc.) ErrorResponse: type: object required: - message properties: message: type: string description: Error message description AdminOrganization: type: object description: Admin organization item with Clerk info and platform data required: - id - name - slug - created_at - updated_at - tags - strategy_count - fund_count properties: created_at: type: integer format: int64 description: Created timestamp (from Clerk) minimum: 0 fee_distribution_key: type: - string - 'null' description: Fee distribution key (from Breeze DB) fund_count: type: integer description: Number of funds for this organization minimum: 0 id: type: string description: Organization ID (Clerk ID) name: type: string description: Organization name slug: type: string description: Organization slug strategy_count: type: integer description: Number of strategies for this organization minimum: 0 tags: type: array items: type: string description: Tags assigned to this organization (from Breeze DB) updated_at: type: integer format: int64 description: Updated timestamp (from Clerk) minimum: 0 StrategyInstance: type: object required: - id - org_id - name - template_id - funds - fee_info - created_at - updated_at properties: created_at: type: integer format: int64 minimum: 0 description: type: - string - 'null' fee_info: type: array items: $ref: '#/components/schemas/FeeInfoForStrategy' funds: type: array items: $ref: '#/components/schemas/FundRef' id: type: string name: type: string org_id: type: string status: $ref: '#/components/schemas/StrategyInstanceStatus' template_id: type: string updated_at: type: integer format: int64 minimum: 0 AssetValuePair: type: object required: - time - asset - usd_value - value_in_base_asset properties: asset: type: string fund_id: type: - string - 'null' time: type: string usd_value: type: number format: double value_in_base_asset: type: number format: double ApiFundFeeDistribution: type: object description: Fee distribution data point for fund metrics required: - time - total_amount_distributed properties: time: type: string description: Timestamp (ISO 8601) total_amount_distributed: type: number format: double description: Total amount distributed ApiFundMetricsResponse: type: object description: Fund metrics response for admin back-office required: - start - end - aggregation_window - fund_id - base_asset_mint - data - fee_distribution_metrics properties: aggregation_window: type: string description: Aggregation window (e.g., "1h", "1d", "7d") base_asset_mint: type: string description: Base asset mint data: type: array items: $ref: '#/components/schemas/FundMetricDataPoint' description: Array of metric data points end: type: string description: End timestamp of the data range fee_distribution_metrics: type: array items: $ref: '#/components/schemas/ApiFundFeeDistribution' description: Fee distribution data over time fund_id: type: string description: Fund ID start: type: string description: Start timestamp of the data range PlatformSummary: type: object description: Platform-wide summary metrics required: - total_tvl_usd - total_users - total_strategies - total_funds - total_organizations - total_allocated_usd - total_unallocated_usd - total_fees_earned_usd - total_yield_earned_usd - average_apy properties: average_apy: type: number format: double description: Platform-wide average APY (weighted by TVL) total_allocated_usd: type: number format: double description: Total allocated to yield (USD) total_fees_earned_usd: type: number format: double description: Total fees earned across all strategies (USD) total_funds: type: integer description: Total number of funds minimum: 0 total_organizations: type: integer description: Total number of organizations minimum: 0 total_strategies: type: integer description: Total number of strategies minimum: 0 total_tvl_usd: type: number format: double description: Total value locked across all funds (USD) total_unallocated_usd: type: number format: double description: Total unallocated (USD) total_users: type: integer format: int64 description: Total unique users across all funds minimum: 0 total_yield_earned_usd: type: number format: double description: Total yield earned across all strategies (USD) Vec: type: array items: allOf: - $ref: '#/components/schemas/StrategyInstance' description: The full strategy instance data - type: object required: - apy - total_users properties: apy: type: number format: double description: Weighted APY of the strategy (from latest snapshot, may be stale). Defaults to 0 if no snapshot. total_users: type: integer format: int64 description: Total unique users in the strategy (from latest snapshot, may be stale). Defaults to 0 if no snapshot. minimum: 0 description: Strategy with pre-computed metrics for list views (avoids N+1 queries) ApiFundFees: type: object required: - fund_id - fees properties: fees: type: array items: $ref: '#/components/schemas/ApiFundFee' fund_id: type: string AdminYieldSourcesResponse: type: object description: Response type for admin yield sources grouped by asset required: - total_assets - assets properties: assets: type: array items: $ref: '#/components/schemas/AdminAssetYieldSources' description: Yield sources by asset total_assets: type: integer description: Total number of assets with yield sources configured minimum: 0 AdminOrganizationsResponse: type: object description: Response for admin organizations endpoint required: - total - organizations properties: organizations: type: array items: $ref: '#/components/schemas/AdminOrganization' description: List of organizations total: type: integer description: Total number of organizations minimum: 0 AdminAgentAssetMetrics: type: object required: - mint - deposit_interactions - withdraw_interactions - deposits - withdrawals - user_fund_deposits properties: deposit_interactions: type: integer format: int64 description: Sum of agent deposit interactions for this asset minimum: 0 deposits: type: integer description: Sum of tracked agent deposit amounts for this asset from `agent_data.tokens[*].deposits` minimum: 0 mint: type: string description: Asset mint address user_fund_deposits: type: integer description: Sum of `user_fund.deposit` for tracked agents for this asset minimum: 0 withdraw_interactions: type: integer format: int64 description: Sum of agent withdraw interactions for this asset minimum: 0 withdrawals: type: integer description: Sum of tracked agent withdraw amounts for this asset from `agent_data.tokens[*].withdrawals` minimum: 0 CreateOrganizationRequest: type: object description: Request body for creating a new organization via Clerk required: - name properties: name: type: string description: Organization name slug: type: - string - 'null' description: Optional slug override tags: type: array items: type: string description: Optional tags to set for the organization ApiDeleteStrategyOperationResult: type: object required: - message - strategy_id properties: message: type: string strategy_id: type: string ApiCreateFundRebalanceSettings: type: object properties: min_position_settle_time: type: - integer - 'null' format: int64 description: Minimum position settle time in seconds minimum: 0 min_rebalance_value: type: - integer - 'null' format: int64 description: Minimum rebalance value in lamports minimum: 0 rebalance_period: type: - integer - 'null' format: int64 description: Rebalance period in seconds minimum: 0 unallocated_threshold: type: - integer - 'null' format: int64 description: Unallocated threshold in lamports minimum: 0 ApiStrategyFee: type: object required: - fee_type - percentage - recipient - frequency_seconds properties: fee_type: type: string frequency_seconds: type: integer format: int64 minimum: 0 percentage: type: number format: double recipient: type: string ApiUpdateFundFeesSettings: type: object description: Fee settings for updating a fund (without fund_id since it's in the path) required: - fees properties: fees: type: array items: $ref: '#/components/schemas/ApiFundFee' description: List of fee configurations for the fund ApiInputForDeletingStrategy: type: object required: - strategy_id properties: strategy_id: type: string AdminFundFee: type: object description: Fund fee detail for admin required: - fee_type - fee_bps - recipient properties: fee_bps: type: integer format: int32 description: Fee in basis points (100 = 1%) minimum: 0 fee_type: type: string description: Fee type (e.g., "ProtocolBase", "App", "Performance") recipient: type: string description: Fee recipient address AdminAssetYieldSources: type: object description: Yield source configuration for a specific asset (for admin endpoint) required: - mint - yield_sources properties: mint: type: string description: Base asset mint address yield_sources: $ref: '#/components/schemas/ApiSelectiveYieldSource' description: Yield sources configured for this asset by protocol AdminOrganizationInvitation: type: object description: Organization invitation from Clerk required: - id - email_address - role - status - created_at properties: created_at: type: integer format: int64 description: When the invitation was created (Unix timestamp) minimum: 0 email_address: type: string description: Email address the invitation was sent to id: type: string description: Invitation ID role: type: string description: Role assigned to the invitation status: type: string description: Status of the invitation (pending, accepted, revoked) FeeInfoForStrategy: type: object required: - fee_bps - fee_recipient - frequency_seconds - fee_type properties: fee_bps: type: integer format: int32 minimum: 0 fee_recipient: type: string fee_type: type: string frequency_seconds: type: integer format: int64 minimum: 0 ApiRetryJobResult: type: object required: - message - job_id - previous_state - new_state properties: job_id: type: string message: type: string new_state: type: string previous_state: type: string AdminStrategyDetail: type: object description: Detailed admin strategy response with current live data required: - id - name - template_id - organization_id - organization_name - status - created_at - updated_at - fees - current_data - funds properties: created_at: type: integer format: int64 description: Created timestamp minimum: 0 current_data: $ref: '#/components/schemas/AdminStrategyCurrentData' description: Current live metrics description: type: - string - 'null' description: Strategy description fees: type: array items: $ref: '#/components/schemas/AdminStrategyFee' description: Fee configuration funds: type: array items: $ref: '#/components/schemas/AdminStrategyFundDetail' description: Fund details id: type: string description: Strategy ID name: type: string description: Strategy name organization_id: type: string description: Organization ID that owns this strategy organization_name: type: string description: Organization name (from Breeze DB or Clerk) status: type: string description: Strategy status template_id: type: string description: Template ID this strategy was created from updated_at: type: integer format: int64 description: Updated timestamp minimum: 0 ApiYieldSourceIds: type: object required: - drift - kamino - marginfi - jupiter_lend properties: drift: type: string description: Drift protocol yield source ID (Put the Pubkey::default() if not used) jupiter_lend: type: string description: Jupiter Lend protocol yield source ID (Put the Pubkey::default() if not used) kamino: type: string description: Kamino protocol yield source ID (Put the Pubkey::default() if not used) marginfi: type: string description: MarginFi protocol yield source ID (Put the Pubkey::default() if not used) ApiFundWithBaseAssetMapper: type: object required: - fund_id - mint properties: fund_id: type: string mint: type: string ProtocolYieldSources: type: object required: - protocol - yield_sources - count properties: count: type: integer description: Number of yield sources in this protocol minimum: 0 protocol: type: string description: Protocol/source name (e.g., "kamino", "marginfi", "drift") yield_sources: type: array items: $ref: '#/components/schemas/ApiYieldSource' description: List of yield sources for this protocol ApiAssignFundOperationResult: type: object required: - message - fund_id - organization_id properties: fund_id: type: string message: type: string organization_id: type: string ApiTemplateYieldSource: type: object properties: drift_lending: type: - string - 'null' jup_lend: type: - string - 'null' kamino: type: - string - 'null' marginfiv2: type: - string - 'null' ApiUpdateOrganizationTagsInputs: type: object required: - organization_id - tags properties: organization_id: type: string tags: type: array items: type: string AdminFundListItem: type: object description: Fund list item for admin back-office views (minimal for fast listing) required: - fund_id - base_asset_mint - status - current_value properties: base_asset_mint: type: string description: Base asset token mint address current_value: type: integer description: Current value in base asset (raw) minimum: 0 fund_id: type: string description: Fund ID organization_id: type: - string - 'null' description: Organization ID (if known) organization_name: type: - string - 'null' description: Organization name (if known) status: type: string description: Fund status (Live, Paused, WithdrawOnly) strategy_name: type: - string - 'null' description: Strategy name (if any) ApiCreateStrategyTemplateResult: type: object required: - message - strategy_name - template_id properties: message: type: string strategy_name: type: string template_id: type: string ApiFundFee: type: object required: - fee_type - fee_bps - recipient properties: fee_bps: type: integer format: int32 minimum: 0 fee_type: type: string recipient: type: string ApiUpdateOrganizationAdminRequest: type: object description: Request body for updating an organization via admin endpoint properties: name: type: - string - 'null' description: Optional new name for the organization tags: type: - array - 'null' items: type: string description: Optional tags to set for the organization (replaces existing tags) ProtocolValues: type: object required: - asset - usd_value - protocol - apy properties: apy: type: number format: double asset: type: string protocol: type: string usd_value: type: number format: double AdminFundConstraint: type: object description: Fund constraint detail for admin required: - yield_source_type - protocol - constraint_type - value properties: constraint_type: type: string description: Constraint type ("MaxPercentage" or "MaxBaseAssetAllocation") protocol: type: string description: Protocol name value: type: integer format: int64 description: Constraint value minimum: 0 yield_source_type: type: string description: Yield source type ApiUpdateFundAdminRequest: type: object description: Request body for updating a fund via admin endpoint properties: delegated_withdrawer: type: - string - 'null' description: Optional delegated withdraw authority (submits an admin job). Set `null` to clear. fees_settings: oneOf: - type: 'null' - $ref: '#/components/schemas/ApiUpdateFundFeesSettings' description: Optional fee settings to update (submits an admin job) fund_settings: oneOf: - type: 'null' - $ref: '#/components/schemas/ApiUpdateFundConstraintsSettings' description: Optional fund constraints and risk settings to update (submits an admin job) rebalance_settings: oneOf: - type: 'null' - $ref: '#/components/schemas/ApiUpdateFundRebalanceSettings' description: Optional rebalance settings to update UniversalStrategyMetrics: type: object required: - time - allocated_to_yield_usd - current_value_usd - number_of_snapshots - total_deposits_usd - unallocated_amount_usd - organization_cumulative_earnings - deposits_usd - withdrawals_usd - current_apy - risk_level properties: allocated_to_yield_usd: type: number format: double current_apy: type: number format: double current_value_usd: type: number format: double deposits_usd: type: number format: double number_of_snapshots: type: number format: double organization_cumulative_earnings: type: number format: double risk_level: type: number format: double time: type: string total_deposits_usd: type: number format: double unallocated_amount_usd: type: number format: double withdrawals_usd: type: number format: double securitySchemes: api_key: type: apiKey in: header name: x-api-key bearer_auth: type: http scheme: bearer bearerFormat: JWT