> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tilt.io/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: 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_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.
      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
    CustomizeIndexTaxSummary:
      type: object
      properties:
        short_term_gain:
          type: string
          format: decimal
          pattern: ^-?\d{0,9}(?:\.\d{0,6})?$
        short_term_loss:
          type: string
          format: decimal
          pattern: ^-?\d{0,9}(?:\.\d{0,6})?$
        long_term_gain:
          type: string
          format: decimal
          pattern: ^-?\d{0,9}(?:\.\d{0,6})?$
        long_term_loss:
          type: string
          format: decimal
          pattern: ^-?\d{0,9}(?:\.\d{0,6})?$
        short_term_net:
          type: string
          format: decimal
          pattern: ^-?\d{0,9}(?:\.\d{0,6})?$
        long_term_net:
          type: string
          format: decimal
          pattern: ^-?\d{0,9}(?:\.\d{0,6})?$
        tax_due:
          type: string
          format: decimal
          pattern: ^-?\d{0,9}(?:\.\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
    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
  securitySchemes:
    ProAPIToken:
      type: apiKey
      in: header
      name: X-Api-Key

````