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

# FinanceGPT generated client starter
# Source: FinanceGPT API v2 OpenAPI index
# OpenAPI SHA-256: 228f3cf999f801d03634f0dad1fc6d296671bc13a8cf0d80994b00a57b62f910
# Operations: post-investment-derivatives-synthetic-options
# 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.

# Generate a sealed FINANCEGPT SYNTHETIC option chain from a promoted LQM | scope: investment:run
curl -X POST \
  -H "Authorization: Bearer $FINANCEGPT_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
    "symbol": "string",
    "promotion_uid": "string",
    "spot": 1.0000000000000000209225608301284726753266340892878361046314239501953125e-8,
    "risk_free_rate_pct": 0,
    "dividend_yield_pct": 0,
    "realized_vol_pct": 0.1000000000000000055511151231257827021181583404541015625,
    "garch_vol_pct": 0.1000000000000000055511151231257827021181583404541015625,
    "regime_code": 0,
    "sector_factor": 0,
    "theme_factor": 0,
    "moneyness_min": 0.75,
    "moneyness_max": 1.25
}' \
  "https://financegpt.dev/api/v2/investment/derivatives/synthetic-options"
