> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tilt.now/llms.txt
> Use this file to discover all available pages before exploring further.

# Optimize Account Portfolio

> Get the customized weights for a client.



## OpenAPI

````yaml POST /api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/
openapi: 3.0.3
info:
  title: TILT
  version: 0.0.1
servers: []
security: []
paths:
  /api/v1/custom/org/{organization_uuid}/clients/{client_uuid}/accounts/{account_uuid}/optimize/:
    post:
      tags:
        - api
      description: Get the customized weights for a client.
      operationId: api_v1_custom_org_clients_accounts_optimize_create
      parameters:
        - in: path
          name: account_uuid
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: client_uuid
          schema:
            type: string
            format: uuid
          required: true
        - in: query
          name: expand
          schema:
            type: string
            minLength: 1
          description: >-
            Comma-separated optional expansions. Currently supports
            sleeve_tracking_errors.
        - in: path
          name: organization_uuid
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomizeIndex'
          description: ''
      security:
        - ProAPIToken: []
components:
  schemas:
    CustomizeIndex:
      type: object
      properties:
        weights:
          type: array
          items:
            $ref: '#/components/schemas/CustomizeIndexTickerWeight'
        summary:
          $ref: '#/components/schemas/CustomizeIndexSummary'
        tax_budget_result:
          allOf:
            - $ref: '#/components/schemas/TaxBudgetResult'
          nullable: true
        tax_summary:
          allOf:
            - $ref: '#/components/schemas/CustomizeIndexTaxSummary'
          nullable: true
        factor_exposures_summary:
          allOf:
            - $ref: '#/components/schemas/FactorExposuresSummary'
          nullable: true
          description: >-
            Factor exposure summary report showing benchmark, optimized, active,
            ideal, and initial exposures for each factor.
        trade_attribution:
          type: array
          items:
            $ref: '#/components/schemas/TradeAttribution'
          nullable: true
          description: >-
            Trade attribution report explaining why each trade was made,
            including flags for tax loss harvesting, tilt exposure changes,
            trade restrictions, and constraint-driven trades.
        sleeve_tracking_errors:
          allOf:
            - $ref: '#/components/schemas/SleeveTrackingErrors'
          description: >-
            Path-aware sleeve tracking error, included only with
            expand=sleeve_tracking_errors.
      required:
        - summary
        - tax_summary
        - weights
    CustomizeIndexTickerWeight:
      type: object
      properties:
        ticker:
          type: string
        ticker_symbol:
          type: string
          nullable: true
        ticker_name:
          type: string
          nullable: true
        optimized_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        initial_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        benchmark_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        active_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        imputed_alpha:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        tax_alpha:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        no_trade:
          type: boolean
        no_hold:
          type: boolean
        no_buy:
          type: boolean
        no_sell:
          type: boolean
      required:
        - active_weight
        - benchmark_weight
        - imputed_alpha
        - initial_weight
        - no_buy
        - no_hold
        - no_sell
        - no_trade
        - optimized_weight
        - tax_alpha
        - ticker
    CustomizeIndexSummary:
      type: object
      properties:
        total_optimized_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,6})?$
        total_benchmark_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,6})?$
        total_ideal_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,6})?$
        total_active_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,6})?$
        imputed_alpha:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          nullable: true
        transaction_cost:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          nullable: true
        simple_tcost:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          nullable: true
        commissions_bps:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          nullable: true
        market_impact_bps:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          nullable: true
        bid_ask_cost_bps:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          nullable: true
        nav:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,8})?$
          nullable: true
        turnover:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,6})?$
          nullable: true
        benchmark_risk_annualized_percentage:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,8})?$
          nullable: true
        active_risk_annualized_percentage:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,8})?$
          nullable: true
        optimized_risk_annualized_percentage:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,8})?$
          nullable: true
        tilt_risk_annualized_percentage:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,8})?$
          nullable: true
        average_drift:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,8})?$
          nullable: true
        max_drift:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,8})?$
          nullable: true
        resolved_tax_gamma:
          type: string
          format: decimal
          pattern: ^-?\d{0,4}(?:\.\d{0,6})?$
          nullable: true
        tax_gamma_iterations:
          type: integer
          nullable: true
      required:
        - total_active_weight
        - total_benchmark_weight
        - total_ideal_weight
        - total_optimized_weight
    TaxBudgetResult:
      type: object
      properties:
        requested_budget_usd:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,2})?$
        estimated_tax_usd:
          type: string
          format: decimal
          pattern: ^-?\d{0,38}(?:\.\d{0,2})?$
        status:
          $ref: '#/components/schemas/TaxBudgetResultStatusEnum'
        selected_gamma:
          type: number
          format: double
        evaluation_count:
          type: integer
        termination_reason:
          type: string
      required:
        - estimated_tax_usd
        - evaluation_count
        - requested_budget_usd
        - selected_gamma
        - status
        - termination_reason
    CustomizeIndexTaxSummary:
      type: object
      properties:
        short_term_gain:
          type: string
          format: decimal
          pattern: ^-?\d{0,34}(?:\.\d{0,6})?$
        short_term_loss:
          type: string
          format: decimal
          pattern: ^-?\d{0,34}(?:\.\d{0,6})?$
        long_term_gain:
          type: string
          format: decimal
          pattern: ^-?\d{0,34}(?:\.\d{0,6})?$
        long_term_loss:
          type: string
          format: decimal
          pattern: ^-?\d{0,34}(?:\.\d{0,6})?$
        short_term_net:
          type: string
          format: decimal
          pattern: ^-?\d{0,34}(?:\.\d{0,6})?$
        long_term_net:
          type: string
          format: decimal
          pattern: ^-?\d{0,34}(?:\.\d{0,6})?$
        tax_due:
          type: string
          format: decimal
          pattern: ^-?\d{0,34}(?:\.\d{0,6})?$
      required:
        - long_term_gain
        - long_term_loss
        - long_term_net
        - short_term_gain
        - short_term_loss
        - short_term_net
        - tax_due
    FactorExposuresSummary:
      type: object
      properties:
        exposures:
          type: array
          items:
            $ref: '#/components/schemas/FactorExposureSummary'
          description: List of factor exposure summaries
      required:
        - exposures
    TradeAttribution:
      type: object
      properties:
        ticker:
          type: string
        ticker_symbol:
          type: string
          nullable: true
        ticker_name:
          type: string
          nullable: true
        imputed_alpha:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
        benchmark_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        tax_alpha:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
        trade_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        active_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        initial_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        optimized_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        risk_aversion_alpha:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          nullable: true
        tax_loss_harvesting_sell:
          type: boolean
        tax_loss_harvesting_buy:
          type: boolean
        tilt_exposure_sell:
          type: boolean
        tilt_exposure_buy:
          type: boolean
        no_hold_restriction:
          type: boolean
        no_trade_restriction:
          type: boolean
        no_buy_restriction:
          type: boolean
        no_sell_restriction:
          type: boolean
        hold_benchmark_restriction:
          type: boolean
        initial_active_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,8})?$
        reduced_active_weight:
          type: boolean
        constraints_and_hedging:
          type: boolean
      required:
        - active_weight
        - benchmark_weight
        - constraints_and_hedging
        - hold_benchmark_restriction
        - imputed_alpha
        - initial_active_weight
        - initial_weight
        - no_buy_restriction
        - no_hold_restriction
        - no_sell_restriction
        - no_trade_restriction
        - optimized_weight
        - reduced_active_weight
        - tax_alpha
        - tax_loss_harvesting_buy
        - tax_loss_harvesting_sell
        - ticker
        - tilt_exposure_buy
        - tilt_exposure_sell
        - trade_weight
    SleeveTrackingErrors:
      type: object
      properties:
        schema_version:
          type: integer
        as_of_date:
          type: string
          format: date
          nullable: true
        overlap_method:
          type: string
        sleeves:
          type: array
          items:
            $ref: '#/components/schemas/SleeveTrackingErrorPath'
        unattributed_optimized_weights:
          type: array
          items:
            $ref: '#/components/schemas/UnattributedOptimizedWeight'
      required:
        - as_of_date
        - overlap_method
        - schema_version
        - sleeves
        - unattributed_optimized_weights
    TaxBudgetResultStatusEnum:
      enum:
        - compliant
      type: string
      description: '* `compliant` - compliant'
    FactorExposureSummary:
      type: object
      properties:
        factor:
          type: string
          description: The factor name
        benchmark_exposure:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          description: Benchmark exposure to this factor
        optimized_exposure:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          description: Optimized portfolio exposure to this factor
        active_exposure:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          description: Active exposure to this factor (optimized - benchmark)
        ideal_exposure:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          nullable: true
          description: Ideal exposure to this factor
        initial_exposure:
          type: string
          format: decimal
          pattern: ^-?\d{0,7}(?:\.\d{0,8})?$
          nullable: true
          description: Initial portfolio exposure to this factor
      required:
        - active_exposure
        - benchmark_exposure
        - factor
        - optimized_exposure
    SleeveTrackingErrorPath:
      type: object
      properties:
        path:
          type: array
          items:
            type: string
            format: uuid
        absolute_sleeve_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,20})?$
        attributed_optimized_total_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,20})?$
        tracking_error_annualized_percentage:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,20})?$
          nullable: true
        coverage_status:
          $ref: '#/components/schemas/CoverageStatusEnum'
        covered_benchmark_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,20})?$
        missing_risk_model_tilt_asset_ids:
          type: array
          items:
            type: string
        non_evaluation_reason:
          type: string
          nullable: true
        constituents:
          type: array
          items:
            $ref: '#/components/schemas/SleeveTrackingErrorConstituent'
      required:
        - absolute_sleeve_weight
        - attributed_optimized_total_weight
        - constituents
        - coverage_status
        - covered_benchmark_weight
        - missing_risk_model_tilt_asset_ids
        - non_evaluation_reason
        - path
        - tracking_error_annualized_percentage
    UnattributedOptimizedWeight:
      type: object
      properties:
        tilt_asset_id:
          type: string
        optimized_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,20})?$
      required:
        - optimized_weight
        - tilt_asset_id
    CoverageStatusEnum:
      enum:
        - complete
        - partial
        - unavailable
      type: string
      description: |-
        * `complete` - complete
        * `partial` - partial
        * `unavailable` - unavailable
    SleeveTrackingErrorConstituent:
      type: object
      properties:
        tilt_asset_id:
          type: string
        benchmark_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,20})?$
        attributed_optimized_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,20})?$
        optimized_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,20})?$
          nullable: true
        active_weight:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,20})?$
          nullable: true
        ownership_share:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,20})?$
          nullable: true
        overlapping_path_count:
          type: integer
          nullable: true
        tracking_error_contribution:
          type: string
          format: decimal
          pattern: ^-?\d{0,10}(?:\.\d{0,20})?$
          nullable: true
      required:
        - active_weight
        - attributed_optimized_weight
        - benchmark_weight
        - optimized_weight
        - overlapping_path_count
        - ownership_share
        - tilt_asset_id
        - tracking_error_contribution
  securitySchemes:
    ProAPIToken:
      type: apiKey
      in: header
      name: X-Api-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.