S
StockBud Docs

StockBud.io Configuration Schema

Schema for system configuration, deployment, and environment settings in StockBud.io

⚙️ StockBud.io Configuration Schema

Version: 1.0.0

Schema for system configuration, deployment, and environment settings in StockBud.io

Overview

This schema defines 11 data structures:


Definitions

TradingSystemConfig

Main trading system configuration

Properties

PropertyTypeRequiredDescription
environmentenum: 'development', 'staging', 'production'Deployment environment
accountsArray<BrokerAccount>Configured broker accounts
strategiesArray<StrategyConfig>Active trading strategies
risk_managementRiskManagementConfig
data_sourcesDataSourcesConfig
notificationsNotificationConfig
loggingLoggingConfig
monitoringMonitoringConfig
backupBackupConfig

TypeScript

interface TradingSystemConfig {
  /** Deployment environment */
  environment: "development" | "staging" | "production";
  /** Configured broker accounts */
  accounts: BrokerAccount[];
  /** Active trading strategies */
  strategies: StrategyConfig[];
  risk_management?: RiskManagementConfig;
  data_sources?: DataSourcesConfig;
  notifications?: NotificationConfig;
  logging?: LoggingConfig;
  monitoring?: MonitoringConfig;
  backup?: BackupConfig;
}

BrokerAccount

Broker account configuration

Properties

PropertyTypeRequiredDescription
account_idstringUnique account identifier
brokerenum: 'alpaca', 'interactive_brokers', 'td_ameritrade', 'charles_schwab'Broker name
account_typeenum: 'paper', 'live'Account type
statusenum: 'active', 'inactive', 'suspended'Account status
api_configobjectAPI configuration
trading_permissionsobjectTrading permissions
limitsobjectAccount limits
created_atstringAccount creation timestamp
updated_atstringLast update timestamp

TypeScript

interface BrokerAccount {
  /** Unique account identifier */
  account_id: string;
  /** Broker name */
  broker: "alpaca" | "interactive_brokers" | "td_ameritrade" | "charles_schwab";
  /** Account type */
  account_type: "paper" | "live";
  /** Account status */
  status: "active" | "inactive" | "suspended";
  /** API configuration */
  api_config?: Record<string, unknown>;
  /** Trading permissions */
  trading_permissions?: Record<string, unknown>;
  /** Account limits */
  limits?: Record<string, unknown>;
  /** Account creation timestamp */
  created_at?: string;
  /** Last update timestamp */
  updated_at?: string;
}

StrategyConfig

Trading strategy configuration

Properties

PropertyTypeRequiredDescription
namestringStrategy name
typeenum: 'momentum', 'mean_reversion', 'pairs_trading', 'market_making', 'trend_following', 'swing_trading', 'scalping', 'arbitrage'Strategy type
enabledbooleanWhether strategy is enabled
parametersobjectStrategy-specific parameters
universeArray<string>Trading universe symbols
scheduleobjectExecution schedule
risk_limitsobjectRisk management limits
accountsArray<string>Accounts this strategy can trade on

TypeScript

interface StrategyConfig {
  /** Strategy name */
  name: string;
  /** Strategy type */
  type: "momentum" | "mean_reversion" | "pairs_trading" | "market_making" | "trend_following" | "swing_trading" | "scalping" | "arbitrage";
  /** Whether strategy is enabled */
  enabled: boolean;
  /** Strategy-specific parameters */
  parameters: Record<string, unknown>;
  /** Trading universe symbols */
  universe?: string[];
  /** Execution schedule */
  schedule?: Record<string, unknown>;
  /** Risk management limits */
  risk_limits?: Record<string, unknown>;
  /** Accounts this strategy can trade on */
  accounts?: string[];
}

RiskManagementConfig

Risk management configuration

Properties

PropertyTypeRequiredDescription
global_limitsobjectGlobal risk limits
var_configobjectValue at Risk configuration
stress_testingobjectStress testing configuration
position_sizingobjectPosition sizing configuration

TypeScript

interface RiskManagementConfig {
  /** Global risk limits */
  global_limits?: Record<string, unknown>;
  /** Value at Risk configuration */
  var_config?: Record<string, unknown>;
  /** Stress testing configuration */
  stress_testing?: Record<string, unknown>;
  /** Position sizing configuration */
  position_sizing?: Record<string, unknown>;
}

DataSourcesConfig

Data sources configuration

Properties

PropertyTypeRequiredDescription
market_dataobjectMarket data configuration
newsobjectNews data configuration
fundamentalobjectFundamental data configuration

TypeScript

interface DataSourcesConfig {
  /** Market data configuration */
  market_data?: Record<string, unknown>;
  /** News data configuration */
  news?: Record<string, unknown>;
  /** Fundamental data configuration */
  fundamental?: Record<string, unknown>;
}

NotificationConfig

Notification system configuration

Properties

PropertyTypeRequiredDescription
emailobjectEmail notification configuration
smsobjectSMS notification configuration
slackobjectSlack notification configuration
discordobjectDiscord notification configuration
alert_levelsArray<Record<string, unknown>>Alert level routing

TypeScript

interface NotificationConfig {
  /** Email notification configuration */
  email?: Record<string, unknown>;
  /** SMS notification configuration */
  sms?: Record<string, unknown>;
  /** Slack notification configuration */
  slack?: Record<string, unknown>;
  /** Discord notification configuration */
  discord?: Record<string, unknown>;
  /** Alert level routing */
  alert_levels?: Record<string, unknown>[];
}

LoggingConfig

Logging configuration

Properties

PropertyTypeRequiredDescription
levelenum: 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'Logging level
formatstringLog message format
handlersArray<Record<string, unknown>>Log handlers
structured_loggingbooleanEnable structured JSON logging
sensitive_fieldsArray<string>Fields to redact from logs

TypeScript

interface LoggingConfig {
  /** Logging level */
  level?: "DEBUG" | "INFO" | "WARNING" | "ERROR" | "CRITICAL";
  /** Log message format */
  format?: string;
  /** Log handlers */
  handlers?: Record<string, unknown>[];
  /** Enable structured JSON logging */
  structured_logging?: boolean;
  /** Fields to redact from logs */
  sensitive_fields?: string[];
}

MonitoringConfig

System monitoring configuration

Properties

PropertyTypeRequiredDescription
metricsobjectMetrics collection configuration
health_checksobjectHealth check configuration
alertingobjectAlerting configuration

TypeScript

interface MonitoringConfig {
  /** Metrics collection configuration */
  metrics?: Record<string, unknown>;
  /** Health check configuration */
  health_checks?: Record<string, unknown>;
  /** Alerting configuration */
  alerting?: Record<string, unknown>;
}

BackupConfig

Backup and recovery configuration

Properties

PropertyTypeRequiredDescription
enabledbooleanEnable backup system
schedulestringBackup schedule (cron format)
storageobjectBackup storage configuration
retentionobjectBackup retention policy
data_typesArray<string>Types of data to backup

TypeScript

interface BackupConfig {
  /** Enable backup system */
  enabled?: boolean;
  /** Backup schedule (cron format) */
  schedule?: string;
  /** Backup storage configuration */
  storage?: Record<string, unknown>;
  /** Backup retention policy */
  retention?: Record<string, unknown>;
  /** Types of data to backup */
  data_types?: string[];
}

DeploymentConfig

Deployment configuration

Properties

PropertyTypeRequiredDescription
environmentenum: 'development', 'staging', 'production'Deployment environment
infrastructureobjectInfrastructure configuration
databaseobjectDatabase configuration
securityobjectSecurity configuration
networkingobjectNetworking configuration

TypeScript

interface DeploymentConfig {
  /** Deployment environment */
  environment: "development" | "staging" | "production";
  /** Infrastructure configuration */
  infrastructure: Record<string, unknown>;
  /** Database configuration */
  database?: Record<string, unknown>;
  /** Security configuration */
  security?: Record<string, unknown>;
  /** Networking configuration */
  networking?: Record<string, unknown>;
}

EnvironmentVariables

Environment variables configuration

Properties

PropertyTypeRequiredDescription
api_keysobjectAPI keys for external services
database_urlsobjectDatabase connection URLs
feature_flagsobjectFeature flags
system_settingsobjectSystem settings

TypeScript

interface EnvironmentVariables {
  /** API keys for external services */
  api_keys?: Record<string, unknown>;
  /** Database connection URLs */
  database_urls?: Record<string, unknown>;
  /** Feature flags */
  feature_flags?: Record<string, unknown>;
  /** System settings */
  system_settings?: Record<string, unknown>;
}

Usage Example

import type { TradingSystemConfig, BrokerAccount, StrategyConfig, RiskManagementConfig, DataSourcesConfig, NotificationConfig, LoggingConfig, MonitoringConfig, BackupConfig, DeploymentConfig, EnvironmentVariables } from '@stockbud/schemas';
 
// Create a new TradingSystemConfig
const example: TradingSystemConfig = {
  environment: "example-value",
  accounts: [],
  strategies: [],
};

Full JSON Schema

Click to expand raw JSON Schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "StockBud.io Configuration Schema",
  "description": "Schema for system configuration, deployment, and environment settings in StockBud.io",
  "version": "1.0.0",
  "type": "object",
  "definitions": {
    "TradingSystemConfig": {
      "type": "object",
      "description": "Main trading system configuration",
      "required": [
        "environment",
        "accounts",
        "strategies"
      ],
      "properties": {
        "environment": {
          "type": "string",
          "enum": [
            "development",
            "staging",
            "production"
          ],
          "description": "Deployment environment"
        },
        "accounts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/BrokerAccount"
          },
          "description": "Configured broker accounts"
        },
        "strategies": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/StrategyConfig"
          },
          "description": "Active trading strategies"
        },
        "risk_management": {
          "$ref": "#/definitions/RiskManagementConfig"
        },
        "data_sources": {
          "$ref": "#/definitions/DataSourcesConfig"
        },
        "notifications": {
          "$ref": "#/definitions/NotificationConfig"
        },
        "logging": {
          "$ref": "#/definitions/LoggingConfig"
        },
        "monitoring": {
          "$ref": "#/definitions/MonitoringConfig"
        },
        "backup": {
          "$ref": "#/definitions/BackupConfig"
        }
      }
    },
    "BrokerAccount": {
      "type": "object",
      "description": "Broker account configuration",
      "required": [
        "account_id",
        "broker",
        "account_type",
        "status"
      ],
      "properties": {
        "account_id": {
          "type": "string",
          "description": "Unique account identifier"
        },
        "broker": {
          "type": "string",
          "enum": [
            "alpaca",
            "interactive_brokers",
            "td_ameritrade",
            "charles_schwab"
          ],
          "description": "Broker name"
        },
        "account_type": {
          "type": "string",
          "enum": [
            "paper",
            "live"
          ],
          "description": "Account type"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "inactive",
            "suspended"
          ],
          "description": "Account status"
        },
        "api_config": {
          "type": "object",
          "properties": {
            "base_url": {
              "type": "string",
              "format": "uri"
            },
            "api_version": {
              "type": "string"
            },
            "rate_limits": {
              "type": "object",
              "properties": {
                "requests_per_minute": {
                  "type": "integer"
                },
                "orders_per_minute": {
                  "type": "integer"
                }
              }
            },
            "timeout": {
              "type": "integer",
              "minimum": 1
            },
            "retry_attempts": {
              "type": "integer",
              "minimum": 0
            }
          },
          "description": "API configuration"
        },
        "trading_permissions": {
          "type": "object",
          "properties": {
            "equity_trading": {
              "type": "boolean"
            },
            "options_trading": {
              "type": "boolean"
            },
            "crypto_trading": {
              "type": "boolean"
            },
            "margin_trading": {
              "type": "boolean"
            },
            "day_trading": {
              "type": "boolean"
            },
            "extended_hours": {
              "type": "boolean"
            }
          },
          "description": "Trading permissions"
        },
        "limits": {
          "type": "object",
          "properties": {
            "max_position_size": {
              "type": "number"
            },
            "max_daily_trades": {
              "type": "integer"
            },
            "max_order_value": {
              "type": "number"
            },
            "buying_power_limit": {
              "type": "number"
            }
          },
          "description": "Account limits"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Account creation timestamp"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "description": "Last update timestamp"
        }
      }
    },
    "StrategyConfig": {
      "type": "object",
      "description": "Trading strategy configuration",
      "required": [
        "name",
        "type",
        "enabled",
        "parameters"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Strategy name"
        },
        "type": {
          "type": "string",
          "enum": [
            "momentum",
            "mean_reversion",
            "pairs_trading",
            "market_making",
            "trend_following",
            "swing_trading",
            "scalping",
            "arbitrage"
          ],
          "description": "Strategy type"
        },
        "enabled": {
          "type": "boolean",
          "description": "Whether strategy is enabled"
        },
        "parameters": {
          "type": "object",
          "description": "Strategy-specific parameters"
        },
        "universe": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Trading universe symbols"
        },
        "schedule": {
          "type": "object",
          "properties": {
            "cron": {
              "type": "string"
            },
            "timezone": {
              "type": "string"
            },
            "market_hours_only": {
              "type": "boolean"
            }
          },
          "description": "Execution schedule"
        },
        "risk_limits": {
          "type": "object",
          "properties": {
            "max_position_size": {
              "type": "number"
            },
            "max_drawdown": {
              "type": "number"
            },
            "stop_loss_pct": {
              "type": "number"
            },
            "take_profit_pct": {
              "type": "number"
            }
          },
          "description": "Risk management limits"
        },
        "accounts": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Accounts this strategy can trade on"
        }
      }
    },
    "RiskManagementConfig": {
      "type": "object",
      "description": "Risk management configuration",
      "properties": {
        "global_limits": {
          "type": "object",
          "properties": {
            "max_portfolio_risk": {
              "type": "number"
            },
            "max_sector_concentration": {
              "type": "number"
            },
            "max_single_position": {
              "type": "number"
            },
            "max_daily_loss": {
              "type": "number"
            },
            "max_monthly_loss": {
              "type": "number"
            }
          },
          "description": "Global risk limits"
        },
        "var_config": {
          "type": "object",
          "properties": {
            "confidence_level": {
              "type": "number"
            },
            "lookback_days": {
              "type": "integer"
            },
            "calculation_method": {
              "type": "string",
              "enum": [
                "historical",
                "parametric",
                "monte_carlo"
              ]
            }
          },
          "description": "Value at Risk configuration"
        },
        "stress_testing": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "scenarios": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "market_shock": {
                    "type": "number"
                  },
                  "sector_shocks": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "description": "Stress testing configuration"
        },
        "position_sizing": {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "fixed",
                "kelly",
                "volatility_adjusted",
                "risk_parity"
              ]
            },
            "base_size": {
              "type": "number"
            },
            "volatility_lookback": {
              "type": "integer"
            }
          },
          "description": "Position sizing configuration"
        }
      }
    },
    "DataSourcesConfig": {
      "type": "object",
      "description": "Data sources configuration",
      "properties": {
        "market_data": {
          "type": "object",
          "properties": {
            "primary_provider": {
              "type": "string",
              "enum": [
                "alpaca",
                "yahoo",
                "alpha_vantage",
                "polygon"
              ]
            },
            "backup_providers": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "real_time_enabled": {
              "type": "boolean"
            },
            "historical_lookback": {
              "type": "integer"
            },
            "update_frequency": {
              "type": "integer"
            }
          },
          "description": "Market data configuration"
        },
        "news": {
          "type": "object",
          "properties": {
            "providers": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "sentiment_analysis": {
              "type": "boolean"
            },
            "languages": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "update_frequency": {
              "type": "integer"
            }
          },
          "description": "News data configuration"
        },
        "fundamental": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string"
            },
            "update_frequency": {
              "type": "string",
              "enum": [
                "daily",
                "weekly",
                "monthly",
                "quarterly"
              ]
            },
            "metrics": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "description": "Fundamental data configuration"
        }
      }
    },
    "NotificationConfig": {
      "type": "object",
      "description": "Notification system configuration",
      "properties": {
        "email": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "smtp_server": {
              "type": "string"
            },
            "smtp_port": {
              "type": "integer"
            },
            "username": {
              "type": "string"
            },
            "use_tls": {
              "type": "boolean"
            },
            "recipients": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "description": "Email notification configuration"
        },
        "sms": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "provider": {
              "type": "string",
              "enum": [
                "twilio",
                "aws_sns"
              ]
            },
            "phone_numbers": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "description": "SMS notification configuration"
        },
        "slack": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "webhook_url": {
              "type": "string",
              "format": "uri"
            },
            "channels": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "description": "Slack notification configuration"
        },
        "discord": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "webhook_url": {
              "type": "string",
              "format": "uri"
            },
            "channels": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "description": "Discord notification configuration"
        },
        "alert_levels": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "level": {
                "type": "string",
                "enum": [
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "channels": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "description": "Alert level routing"
        }
      }
    },
    "LoggingConfig": {
      "type": "object",
      "description": "Logging configuration",
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "DEBUG",
            "INFO",
            "WARNING",
            "ERROR",
            "CRITICAL"
          ],
          "description": "Logging level"
        },
        "format": {
          "type": "string",
          "description": "Log message format"
        },
        "handlers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "file",
                  "console",
                  "syslog",
                  "http"
                ]
              },
              "level": {
                "type": "string"
              },
              "filename": {
                "type": "string"
              },
              "max_bytes": {
                "type": "integer"
              },
              "backup_count": {
                "type": "integer"
              }
            }
          },
          "description": "Log handlers"
        },
        "structured_logging": {
          "type": "boolean",
          "description": "Enable structured JSON logging"
        },
        "sensitive_fields": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Fields to redact from logs"
        }
      }
    },
    "MonitoringConfig": {
      "type": "object",
      "description": "System monitoring configuration",
      "properties": {
        "metrics": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "collection_interval": {
              "type": "integer"
            },
            "retention_days": {
              "type": "integer"
            },
            "custom_metrics": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "description": "Metrics collection configuration"
        },
        "health_checks": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "interval": {
              "type": "integer"
            },
            "timeout": {
              "type": "integer"
            },
            "endpoints": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "description": "Health check configuration"
        },
        "alerting": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean"
            },
            "thresholds": {
              "type": "object",
              "properties": {
                "cpu_usage": {
                  "type": "number"
                },
                "memory_usage": {
                  "type": "number"
                },
                "disk_usage": {
                  "type": "number"
                },
                "error_rate": {
                  "type": "number"
                }
              }
            }
          },
          "description": "Alerting configuration"
        }
      }
    },
    "BackupConfig": {
      "type": "object",
      "description": "Backup and recovery configuration",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enable backup system"
        },
        "schedule": {
          "type": "string",
          "description": "Backup schedule (cron format)"
        },
        "storage": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "local",
                "s3",
                "gcs",
                "azure"
              ]
            },
            "location": {
              "type": "string"
            },
            "encryption": {
              "type": "boolean"
            },
            "compression": {
              "type": "boolean"
            }
          },
          "description": "Backup storage configuration"
        },
        "retention": {
          "type": "object",
          "properties": {
            "daily": {
              "type": "integer"
            },
            "weekly": {
              "type": "integer"
            },
            "monthly": {
              "type": "integer"
            },
            "yearly": {
              "type": "integer"
            }
          },
          "description": "Backup retention policy"
        },
        "data_types": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "portfolio",
              "trades",
              "logs",
              "config",
              "metrics"
            ]
          },
          "description": "Types of data to backup"
        }
      }
    },
    "DeploymentConfig": {
      "type": "object",
      "description": "Deployment configuration",
      "required": [
        "environment",
        "infrastructure"
      ],
      "properties": {
        "environment": {
          "type": "string",
          "enum": [
            "development",
            "staging",
            "production"
          ],
          "description": "Deployment environment"
        },
        "infrastructure": {
          "type": "object",
          "properties": {
            "provider": {
              "type": "string",
              "enum": [
                "aws",
                "gcp",
                "azure",
                "local",
                "docker"
              ]
            },
            "region": {
              "type": "string"
            },
            "availability_zones": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "instance_type": {
              "type": "string"
            },
            "scaling": {
              "type": "object",
              "properties": {
                "min_instances": {
                  "type": "integer"
                },
                "max_instances": {
                  "type": "integer"
                },
                "target_cpu": {
                  "type": "number"
                },
                "target_memory": {
                  "type": "number"
                }
              }
            }
          },
          "description": "Infrastructure configuration"
        },
        "database": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "postgresql",
                "mysql",
                "mongodb",
                "sqlite"
              ]
            },
            "host": {
              "type": "string"
            },
            "port": {
              "type": "integer"
            },
            "name": {
              "type": "string"
            },
            "ssl": {
              "type": "boolean"
            },
            "connection_pool": {
              "type": "object",
              "properties": {
                "min_connections": {
                  "type": "integer"
                },
                "max_connections": {
                  "type": "integer"
                },
                "idle_timeout": {
                  "type": "integer"
                }
              }
            }
          },
          "description": "Database configuration"
        },
        "security": {
          "type": "object",
          "properties": {
            "encryption_at_rest": {
              "type": "boolean"
            },
            "encryption_in_transit": {
              "type": "boolean"
            },
            "api_keys_rotation": {
              "type": "boolean"
            },
            "access_control": {
              "type": "object",
              "properties": {
                "authentication": {
                  "type": "string",
                  "enum": [
                    "jwt",
                    "oauth2",
                    "api_key"
                  ]
                },
                "authorization": {
                  "type": "string",
                  "enum": [
                    "rbac",
                    "abac"
                  ]
                },
                "session_timeout": {
                  "type": "integer"
                }
              }
            }
          },
          "description": "Security configuration"
        },
        "networking": {
          "type": "object",
          "properties": {
            "vpc_id": {
              "type": "string"
            },
            "subnet_ids": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "security_groups": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "load_balancer": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "application",
                    "network"
                  ]
                },
                "ssl_certificate": {
                  "type": "string"
                }
              }
            }
          },
          "description": "Networking configuration"
        }
      }
    },
    "EnvironmentVariables": {
      "type": "object",
      "description": "Environment variables configuration",
      "properties": {
        "api_keys": {
          "type": "object",
          "patternProperties": {
            "^[A-Z_]+_API_KEY$": {
              "type": "string"
            }
          },
          "description": "API keys for external services"
        },
        "database_urls": {
          "type": "object",
          "patternProperties": {
            "^[A-Z_]+_DATABASE_URL$": {
              "type": "string"
            }
          },
          "description": "Database connection URLs"
        },
        "feature_flags": {
          "type": "object",
          "patternProperties": {
            "^ENABLE_[A-Z_]+$": {
              "type": "boolean"
            }
          },
          "description": "Feature flags"
        },
        "system_settings": {
          "type": "object",
          "properties": {
            "DEBUG": {
              "type": "boolean"
            },
            "LOG_LEVEL": {
              "type": "string"
            },
            "MAX_WORKERS": {
              "type": "integer"
            },
            "TIMEOUT": {
              "type": "integer"
            }
          },
          "description": "System settings"
        }
      }
    }
  },
  "properties": {
    "trading_system": {
      "$ref": "#/definitions/TradingSystemConfig"
    },
    "deployment": {
      "$ref": "#/definitions/DeploymentConfig"
    },
    "environment_variables": {
      "$ref": "#/definitions/EnvironmentVariables"
    }
  }
}