#!/usr/bin/env bash
set -euo pipefail

# FinanceGPT generated client starter
# Source: FinanceGPT API v2 OpenAPI index
# OpenAPI SHA-256: 228f3cf999f801d03634f0dad1fc6d296671bc13a8cf0d80994b00a57b62f910
# Operations: post-investment-portfolios-portfolio-construct
# Credential: FINANCEGPT_API_KEY environment variable; no credential is embedded.
# Authority: API identity and generated code do not create model-promotion, QLM-binding or Financial Actions authority.

# Run governed Portfolio Construction 2.0 | scope: investment:run
curl -X POST \
  -H "Authorization: Bearer $FINANCEGPT_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
    "symbols": [
        "string"
    ],
    "restricted_symbols": [
        "string"
    ],
    "objective": "balanced",
    "max_position_pct": 1,
    "risk_aversion": 0.01000000000000000020816681711721685132943093776702880859375,
    "history_months": 12,
    "benchmark_symbol": "string",
    "cvar_alpha_pct": 95,
    "max_turnover_pct": 100,
    "transaction_cost_bps": 10,
    "min_monthly_dollar_volume_usd": 0,
    "tax_rate_pct": 0
}' \
  "https://financegpt.dev/api/v2/investment/portfolios/{portfolio}/construct"
