adaptic-backend 1.0.152 → 1.0.153

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/generated/typeStrings/Account.cjs +0 -370
  2. package/generated/typeStrings/Account.d.ts +1 -1
  3. package/generated/typeStrings/Account.d.ts.map +1 -1
  4. package/generated/typeStrings/Account.js.map +1 -1
  5. package/generated/typeStrings/Action.cjs +7 -822
  6. package/generated/typeStrings/Action.d.ts +1 -1
  7. package/generated/typeStrings/Action.d.ts.map +1 -1
  8. package/generated/typeStrings/Action.js.map +1 -1
  9. package/generated/typeStrings/Alert.cjs +0 -804
  10. package/generated/typeStrings/Alert.d.ts +1 -1
  11. package/generated/typeStrings/Alert.d.ts.map +1 -1
  12. package/generated/typeStrings/Alert.js.map +1 -1
  13. package/generated/typeStrings/AlpacaAccount.cjs +2 -1051
  14. package/generated/typeStrings/AlpacaAccount.d.ts +1 -1
  15. package/generated/typeStrings/AlpacaAccount.d.ts.map +1 -1
  16. package/generated/typeStrings/AlpacaAccount.js.map +1 -1
  17. package/generated/typeStrings/Asset.cjs +0 -975
  18. package/generated/typeStrings/Asset.d.ts +1 -1
  19. package/generated/typeStrings/Asset.d.ts.map +1 -1
  20. package/generated/typeStrings/Asset.js.map +1 -1
  21. package/generated/typeStrings/Authenticator.cjs +1 -382
  22. package/generated/typeStrings/Authenticator.d.ts +1 -1
  23. package/generated/typeStrings/Authenticator.d.ts.map +1 -1
  24. package/generated/typeStrings/Authenticator.js.map +1 -1
  25. package/generated/typeStrings/Customer.cjs +32 -290
  26. package/generated/typeStrings/Customer.d.ts +1 -1
  27. package/generated/typeStrings/Customer.d.ts.map +1 -1
  28. package/generated/typeStrings/Customer.js.map +1 -1
  29. package/generated/typeStrings/NewsArticle.cjs +0 -405
  30. package/generated/typeStrings/NewsArticle.d.ts +1 -1
  31. package/generated/typeStrings/NewsArticle.d.ts.map +1 -1
  32. package/generated/typeStrings/NewsArticle.js.map +1 -1
  33. package/generated/typeStrings/NewsArticleAssetSentiment.cjs +1 -543
  34. package/generated/typeStrings/NewsArticleAssetSentiment.d.ts +1 -1
  35. package/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -1
  36. package/generated/typeStrings/NewsArticleAssetSentiment.js.map +1 -1
  37. package/generated/typeStrings/Order.cjs +4 -1006
  38. package/generated/typeStrings/Order.d.ts +1 -1
  39. package/generated/typeStrings/Order.d.ts.map +1 -1
  40. package/generated/typeStrings/Order.js.map +1 -1
  41. package/generated/typeStrings/Position.cjs +1 -961
  42. package/generated/typeStrings/Position.d.ts +1 -1
  43. package/generated/typeStrings/Position.d.ts.map +1 -1
  44. package/generated/typeStrings/Position.js.map +1 -1
  45. package/generated/typeStrings/Session.cjs +33 -286
  46. package/generated/typeStrings/Session.d.ts +1 -1
  47. package/generated/typeStrings/Session.d.ts.map +1 -1
  48. package/generated/typeStrings/Session.js.map +1 -1
  49. package/generated/typeStrings/StopLoss.cjs +7 -496
  50. package/generated/typeStrings/StopLoss.d.ts +1 -1
  51. package/generated/typeStrings/StopLoss.d.ts.map +1 -1
  52. package/generated/typeStrings/StopLoss.js.map +1 -1
  53. package/generated/typeStrings/TakeProfit.cjs +7 -496
  54. package/generated/typeStrings/TakeProfit.d.ts +1 -1
  55. package/generated/typeStrings/TakeProfit.d.ts.map +1 -1
  56. package/generated/typeStrings/TakeProfit.js.map +1 -1
  57. package/generated/typeStrings/Trade.cjs +38 -967
  58. package/generated/typeStrings/Trade.d.ts +1 -1
  59. package/generated/typeStrings/Trade.d.ts.map +1 -1
  60. package/generated/typeStrings/Trade.js.map +1 -1
  61. package/generated/typeStrings/User.cjs +4 -697
  62. package/generated/typeStrings/User.d.ts +1 -1
  63. package/generated/typeStrings/User.d.ts.map +1 -1
  64. package/generated/typeStrings/User.js.map +1 -1
  65. package/generated/typeStrings/VerificationToken.cjs +1 -6
  66. package/generated/typeStrings/VerificationToken.d.ts +1 -1
  67. package/generated/typeStrings/VerificationToken.d.ts.map +1 -1
  68. package/generated/typeStrings/VerificationToken.js.map +1 -1
  69. package/generated/typeStrings/index.d.ts +17 -17
  70. package/generated/typegraphql-prisma/models/Trade.d.ts +1 -1
  71. package/generated/typegraphql-prisma/resolvers/relations/Trade/TradeRelationsResolver.cjs +1 -1
  72. package/generated/typegraphql-prisma/resolvers/relations/Trade/TradeRelationsResolver.js.map +1 -1
  73. package/package.json +1 -1
  74. package/server/generated/typeStrings/Account.d.ts +1 -1
  75. package/server/generated/typeStrings/Account.d.ts.map +1 -1
  76. package/server/generated/typeStrings/Account.js.map +1 -1
  77. package/server/generated/typeStrings/Account.mjs +0 -370
  78. package/server/generated/typeStrings/Action.d.ts +1 -1
  79. package/server/generated/typeStrings/Action.d.ts.map +1 -1
  80. package/server/generated/typeStrings/Action.js.map +1 -1
  81. package/server/generated/typeStrings/Action.mjs +7 -822
  82. package/server/generated/typeStrings/Alert.d.ts +1 -1
  83. package/server/generated/typeStrings/Alert.d.ts.map +1 -1
  84. package/server/generated/typeStrings/Alert.js.map +1 -1
  85. package/server/generated/typeStrings/Alert.mjs +0 -804
  86. package/server/generated/typeStrings/AlpacaAccount.d.ts +1 -1
  87. package/server/generated/typeStrings/AlpacaAccount.d.ts.map +1 -1
  88. package/server/generated/typeStrings/AlpacaAccount.js.map +1 -1
  89. package/server/generated/typeStrings/AlpacaAccount.mjs +2 -1051
  90. package/server/generated/typeStrings/Asset.d.ts +1 -1
  91. package/server/generated/typeStrings/Asset.d.ts.map +1 -1
  92. package/server/generated/typeStrings/Asset.js.map +1 -1
  93. package/server/generated/typeStrings/Asset.mjs +0 -975
  94. package/server/generated/typeStrings/Authenticator.d.ts +1 -1
  95. package/server/generated/typeStrings/Authenticator.d.ts.map +1 -1
  96. package/server/generated/typeStrings/Authenticator.js.map +1 -1
  97. package/server/generated/typeStrings/Authenticator.mjs +1 -382
  98. package/server/generated/typeStrings/Customer.d.ts +1 -1
  99. package/server/generated/typeStrings/Customer.d.ts.map +1 -1
  100. package/server/generated/typeStrings/Customer.js.map +1 -1
  101. package/server/generated/typeStrings/Customer.mjs +32 -290
  102. package/server/generated/typeStrings/NewsArticle.d.ts +1 -1
  103. package/server/generated/typeStrings/NewsArticle.d.ts.map +1 -1
  104. package/server/generated/typeStrings/NewsArticle.js.map +1 -1
  105. package/server/generated/typeStrings/NewsArticle.mjs +0 -405
  106. package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts +1 -1
  107. package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -1
  108. package/server/generated/typeStrings/NewsArticleAssetSentiment.js.map +1 -1
  109. package/server/generated/typeStrings/NewsArticleAssetSentiment.mjs +1 -543
  110. package/server/generated/typeStrings/Order.d.ts +1 -1
  111. package/server/generated/typeStrings/Order.d.ts.map +1 -1
  112. package/server/generated/typeStrings/Order.js.map +1 -1
  113. package/server/generated/typeStrings/Order.mjs +4 -1006
  114. package/server/generated/typeStrings/Position.d.ts +1 -1
  115. package/server/generated/typeStrings/Position.d.ts.map +1 -1
  116. package/server/generated/typeStrings/Position.js.map +1 -1
  117. package/server/generated/typeStrings/Position.mjs +1 -961
  118. package/server/generated/typeStrings/Session.d.ts +1 -1
  119. package/server/generated/typeStrings/Session.d.ts.map +1 -1
  120. package/server/generated/typeStrings/Session.js.map +1 -1
  121. package/server/generated/typeStrings/Session.mjs +33 -286
  122. package/server/generated/typeStrings/StopLoss.d.ts +1 -1
  123. package/server/generated/typeStrings/StopLoss.d.ts.map +1 -1
  124. package/server/generated/typeStrings/StopLoss.js.map +1 -1
  125. package/server/generated/typeStrings/StopLoss.mjs +7 -496
  126. package/server/generated/typeStrings/TakeProfit.d.ts +1 -1
  127. package/server/generated/typeStrings/TakeProfit.d.ts.map +1 -1
  128. package/server/generated/typeStrings/TakeProfit.js.map +1 -1
  129. package/server/generated/typeStrings/TakeProfit.mjs +7 -496
  130. package/server/generated/typeStrings/Trade.d.ts +1 -1
  131. package/server/generated/typeStrings/Trade.d.ts.map +1 -1
  132. package/server/generated/typeStrings/Trade.js.map +1 -1
  133. package/server/generated/typeStrings/Trade.mjs +38 -967
  134. package/server/generated/typeStrings/User.d.ts +1 -1
  135. package/server/generated/typeStrings/User.d.ts.map +1 -1
  136. package/server/generated/typeStrings/User.js.map +1 -1
  137. package/server/generated/typeStrings/User.mjs +4 -697
  138. package/server/generated/typeStrings/VerificationToken.d.ts +1 -1
  139. package/server/generated/typeStrings/VerificationToken.d.ts.map +1 -1
  140. package/server/generated/typeStrings/VerificationToken.js.map +1 -1
  141. package/server/generated/typeStrings/VerificationToken.mjs +1 -6
  142. package/server/generated/typeStrings/index.d.ts +17 -17
  143. package/server/generated/typegraphql-prisma/models/Trade.d.ts +1 -1
  144. package/server/generated/typegraphql-prisma/models/Trade.mjs +1 -1
  145. package/server/generated/typegraphql-prisma/resolvers/relations/Trade/TradeRelationsResolver.js.map +1 -1
  146. package/server/generated/typegraphql-prisma/resolvers/relations/Trade/TradeRelationsResolver.mjs +1 -1
@@ -1,21 +1,21 @@
1
1
  export declare const typeStrings: {
2
- readonly session: "\nYour response should adhere to the following type definition for the \"Session\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Session = {\n // Token associated with the session for authentication. TYPESTRING.\n sessionToken: string;\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model. TYPESTRING. GQL.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Refresh token for the external account, if applicable. TYPESTRING.\n refresh_token?: string;\n // Access token for the external account, if applicable. TYPESTRING.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable. TYPESTRING.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n // Unique credential ID for the authenticator. TYPESTRING.\n credentialID: string;\n // Public key associated with the authenticator. TYPESTRING.\n publicKey: string;\n // Counter for the number of authentication attempts. TYPESTRING.\n counter: number;\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user. TYPESTRING. GQL.\n alpacaAccounts: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n any\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n }[];\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n};\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\n";
3
- readonly user: "\nYour response should adhere to the following type definition for the \"User\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type User = {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Refresh token for the external account, if applicable. TYPESTRING.\n refresh_token?: string;\n // Access token for the external account, if applicable. TYPESTRING.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable. TYPESTRING.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n // Token associated with the session for authentication. TYPESTRING.\n sessionToken: string;\n // Expiration date and time of the session.\n expires: Date;\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n // Unique credential ID for the authenticator. TYPESTRING.\n credentialID: string;\n // Public key associated with the authenticator. TYPESTRING.\n publicKey: string;\n // Counter for the number of authentication attempts. TYPESTRING.\n counter: number;\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user. TYPESTRING. GQL.\n alpacaAccounts: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n any\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action. GQL.\n order?: {\n any\n };\n }[];\n }[];\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of. TYPESTRING. GQL.\n trade: {\n any\n };\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n any\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n any\n }[];\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n }[];\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n};\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\n";
4
- readonly alpacaAccount: "\nYour response should adhere to the following type definition for the \"AlpacaAccount\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type AlpacaAccount = {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Refresh token for the external account, if applicable. TYPESTRING.\n refresh_token?: string;\n // Access token for the external account, if applicable. TYPESTRING.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable. TYPESTRING.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n // Token associated with the session for authentication. TYPESTRING.\n sessionToken: string;\n // Expiration date and time of the session.\n expires: Date;\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n // Unique credential ID for the authenticator. TYPESTRING.\n credentialID: string;\n // Public key associated with the authenticator. TYPESTRING.\n publicKey: string;\n // Counter for the number of authentication attempts. TYPESTRING.\n counter: number;\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n any\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action. GQL.\n order?: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n }[];\n }[];\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of. TYPESTRING. GQL.\n trade: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n };\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n any\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n any\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n};\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\n";
5
- readonly position: "\nYour response should adhere to the following type definition for the \"Position\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Position = {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n any\n };\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n any\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n any\n }[];\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action. GQL.\n order?: {\n any\n };\n }[];\n }[];\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n any\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n any\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n any\n }[];\n };\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of. TYPESTRING. GQL.\n trade: {\n any\n };\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n // Title of the news article.\n title: string;\n // Full content of the news article.\n content?: string;\n // Source of the news article (e.g., Bloomberg, Reuters).\n source: string;\n // Domain of the source website.\n sourceDomain?: string;\n // URL to the original news article, must be unique.\n url: string;\n // Sentiment analysis result of the article.\n sentiment: string;\n // List of authors who wrote the article.\n authors: string[];\n // Summary or abstract of the news article.\n summary?: string;\n // URL to the banner image of the article.\n bannerImage?: string;\n // Publication time of the article.\n timePublished: string;\n // Category or genre of the news article.\n category?: string;\n // Topics covered in the news article.\n topics: string[];\n // URL to the logo image of the news source.\n logo?: string;\n // List of asset sentiments related to this news article. TYPESTRING. GQL.\n assets: NewsArticleAssetSentiment[];\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable. TYPESTRING. GQL.\n alpacaAccount?: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Refresh token for the external account, if applicable. TYPESTRING.\n refresh_token?: string;\n // Access token for the external account, if applicable. TYPESTRING.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable. TYPESTRING.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n // Token associated with the session for authentication. TYPESTRING.\n sessionToken: string;\n // Expiration date and time of the session.\n expires: Date;\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n // Unique credential ID for the authenticator. TYPESTRING.\n credentialID: string;\n // Public key associated with the authenticator. TYPESTRING.\n publicKey: string;\n // Counter for the number of authentication attempts. TYPESTRING.\n counter: number;\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action. GQL.\n order?: {\n any\n };\n }[];\n }[];\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of. TYPESTRING. GQL.\n trade: {\n any\n };\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n };\n};\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\n";
6
- readonly authenticator: "\nYour response should adhere to the following type definition for the \"Authenticator\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Authenticator = {\n // Unique credential ID for the authenticator. TYPESTRING.\n credentialID: string;\n // Public key associated with the authenticator. TYPESTRING.\n publicKey: string;\n // Counter for the number of authentication attempts. TYPESTRING.\n counter: number;\n // Relation to the User model. TYPESTRING. GQL.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Refresh token for the external account, if applicable. TYPESTRING.\n refresh_token?: string;\n // Access token for the external account, if applicable. TYPESTRING.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable. TYPESTRING.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n // Token associated with the session for authentication. TYPESTRING.\n sessionToken: string;\n // Expiration date and time of the session.\n expires: Date;\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user. TYPESTRING. GQL.\n alpacaAccounts: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n any\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n }[];\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n};\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\n";
7
- readonly account: "\nYour response should adhere to the following type definition for the \"Account\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Account = {\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Refresh token for the external account, if applicable. TYPESTRING.\n refresh_token?: string;\n // Access token for the external account, if applicable. TYPESTRING.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable. TYPESTRING.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n // Relation to the User model. TYPESTRING. GQL.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n };\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n // Token associated with the session for authentication. TYPESTRING.\n sessionToken: string;\n // Expiration date and time of the session.\n expires: Date;\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n // Unique credential ID for the authenticator. TYPESTRING.\n credentialID: string;\n // Public key associated with the authenticator. TYPESTRING.\n publicKey: string;\n // Counter for the number of authentication attempts. TYPESTRING.\n counter: number;\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user. TYPESTRING. GQL.\n alpacaAccounts: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n any\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n }[];\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n};\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\n";
8
- readonly verificationToken: "\nYour response should adhere to the following type definition for the \"VerificationToken\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type VerificationToken = {\n // Identifier associated with the token (e.g., user ID). TYPESTRING.\n identifier: string;\n // The verification token string, must be unique. TYPESTRING.\n token: string;\n // Expiration date and time of the token. TYPESTRING.\n expires: Date;\n};\n";
9
- readonly customer: "\nYour response should adhere to the following type definition for the \"Customer\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Customer = {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // List of users associated with the customer. TYPESTRING. GQL.\n users: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Refresh token for the external account, if applicable. TYPESTRING.\n refresh_token?: string;\n // Access token for the external account, if applicable. TYPESTRING.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable. TYPESTRING.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n // Token associated with the session for authentication. TYPESTRING.\n sessionToken: string;\n // Expiration date and time of the session.\n expires: Date;\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n // Unique credential ID for the authenticator. TYPESTRING.\n credentialID: string;\n // Public key associated with the authenticator. TYPESTRING.\n publicKey: string;\n // Counter for the number of authentication attempts. TYPESTRING.\n counter: number;\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user. TYPESTRING. GQL.\n alpacaAccounts: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n any\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n }[];\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n }[];\n};\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\n";
10
- readonly asset: "\nYour response should adhere to the following type definition for the \"Asset\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Asset = {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n any\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n any\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n any\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n any\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action. GQL.\n order?: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n }[];\n }[];\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n any\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n any\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n any\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n any\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n };\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of. TYPESTRING. GQL.\n trade: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n any\n };\n };\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable. TYPESTRING. GQL.\n alpacaAccount?: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n any\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n any\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n any\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n any\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n };\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n // Title of the news article.\n title: string;\n // Full content of the news article.\n content?: string;\n // Source of the news article (e.g., Bloomberg, Reuters).\n source: string;\n // Domain of the source website.\n sourceDomain?: string;\n // URL to the original news article, must be unique.\n url: string;\n // Sentiment analysis result of the article.\n sentiment: string;\n // List of authors who wrote the article.\n authors: string[];\n // Summary or abstract of the news article.\n summary?: string;\n // URL to the banner image of the article.\n bannerImage?: string;\n // Publication time of the article.\n timePublished: string;\n // Category or genre of the news article.\n category?: string;\n // Topics covered in the news article.\n topics: string[];\n // URL to the logo image of the news source.\n logo?: string;\n // List of asset sentiments related to this news article. TYPESTRING. GQL.\n assets: NewsArticleAssetSentiment[];\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n};\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\n";
11
- readonly trade: "\nYour response should adhere to the following type definition for the \"Trade\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Trade = {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Refresh token for the external account, if applicable. TYPESTRING.\n refresh_token?: string;\n // Access token for the external account, if applicable. TYPESTRING.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable. TYPESTRING.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n // Token associated with the session for authentication. TYPESTRING.\n sessionToken: string;\n // Expiration date and time of the session.\n expires: Date;\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n // Unique credential ID for the authenticator. TYPESTRING.\n credentialID: string;\n // Public key associated with the authenticator. TYPESTRING.\n publicKey: string;\n // Counter for the number of authentication attempts. TYPESTRING.\n counter: number;\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n };\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n any\n };\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n any\n }[];\n };\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable. TYPESTRING. GQL.\n alpacaAccount?: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n any\n };\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n any\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n any\n }[];\n };\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n // Title of the news article.\n title: string;\n // Full content of the news article.\n content?: string;\n // Source of the news article (e.g., Bloomberg, Reuters).\n source: string;\n // Domain of the source website.\n sourceDomain?: string;\n // URL to the original news article, must be unique.\n url: string;\n // Sentiment analysis result of the article.\n sentiment: string;\n // List of authors who wrote the article.\n authors: string[];\n // Summary or abstract of the news article.\n summary?: string;\n // URL to the banner image of the article.\n bannerImage?: string;\n // Publication time of the article.\n timePublished: string;\n // Category or genre of the news article.\n category?: string;\n // Topics covered in the news article.\n topics: string[];\n // URL to the logo image of the news source.\n logo?: string;\n // List of asset sentiments related to this news article. TYPESTRING. GQL.\n assets: NewsArticleAssetSentiment[];\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action. GQL.\n order?: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n any\n };\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n any\n }[];\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n }[];\n};\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\n";
12
- readonly action: "\nYour response should adhere to the following type definition for the \"Action\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Action = {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of. TYPESTRING. GQL.\n trade: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n any\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n any\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n any\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n any\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n };\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable. TYPESTRING. GQL.\n alpacaAccount?: {\n any\n };\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n any\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n };\n };\n // The order associated with this action. GQL.\n order?: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n any\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n any\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n any\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n any\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n any\n };\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable. TYPESTRING. GQL.\n alpacaAccount?: {\n any\n };\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n any\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\n";
13
- readonly order: "\nYour response should adhere to the following type definition for the \"Order\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Order = {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Refresh token for the external account, if applicable. TYPESTRING.\n refresh_token?: string;\n // Access token for the external account, if applicable. TYPESTRING.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable. TYPESTRING.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n // Token associated with the session for authentication. TYPESTRING.\n sessionToken: string;\n // Expiration date and time of the session.\n expires: Date;\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n // Unique credential ID for the authenticator. TYPESTRING.\n credentialID: string;\n // Public key associated with the authenticator. TYPESTRING.\n publicKey: string;\n // Counter for the number of authentication attempts. TYPESTRING.\n counter: number;\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n }[];\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n };\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of. TYPESTRING. GQL.\n trade: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n any\n };\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n any\n }[];\n };\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n };\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n any\n };\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n any\n }[];\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n }[];\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable. TYPESTRING. GQL.\n alpacaAccount?: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n any\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n any\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n any\n }[];\n };\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n // Title of the news article.\n title: string;\n // Full content of the news article.\n content?: string;\n // Source of the news article (e.g., Bloomberg, Reuters).\n source: string;\n // Domain of the source website.\n sourceDomain?: string;\n // URL to the original news article, must be unique.\n url: string;\n // Sentiment analysis result of the article.\n sentiment: string;\n // List of authors who wrote the article.\n authors: string[];\n // Summary or abstract of the news article.\n summary?: string;\n // URL to the banner image of the article.\n bannerImage?: string;\n // Publication time of the article.\n timePublished: string;\n // Category or genre of the news article.\n category?: string;\n // Topics covered in the news article.\n topics: string[];\n // URL to the logo image of the news source.\n logo?: string;\n // List of asset sentiments related to this news article. TYPESTRING. GQL.\n assets: NewsArticleAssetSentiment[];\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\n";
14
- readonly stopLoss: "\nYour response should adhere to the following type definition for the \"StopLoss\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type StopLoss = {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n // An order that is associated with this stop loss. GQL.\n Order: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n any\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n any\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n any\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n any\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n };\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of. TYPESTRING. GQL.\n trade: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n any\n };\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n };\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n any\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable. TYPESTRING. GQL.\n alpacaAccount?: {\n any\n };\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n any\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\n";
15
- readonly takeProfit: "\nYour response should adhere to the following type definition for the \"TakeProfit\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type TakeProfit = {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n // An order that is associated with this take profit. GQL.\n Order: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n any\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n any\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n any\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n any\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n }[];\n };\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of. TYPESTRING. GQL.\n trade: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n any\n };\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n any\n };\n };\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n any\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable. TYPESTRING. GQL.\n alpacaAccount?: {\n any\n };\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n any\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\n";
16
- readonly alert: "\nYour response should adhere to the following type definition for the \"Alert\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Alert = {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified. TYPESTRING.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model. TYPESTRING. GQL.\n customer?: {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n };\n // List of accounts associated with the user. TYPESTRING. GQL.\n accounts: {\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Refresh token for the external account, if applicable. TYPESTRING.\n refresh_token?: string;\n // Access token for the external account, if applicable. TYPESTRING.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable. TYPESTRING.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n }[];\n // List of sessions associated with the user. TYPESTRING. GQL.\n sessions: {\n // Token associated with the session for authentication. TYPESTRING.\n sessionToken: string;\n // Expiration date and time of the session.\n expires: Date;\n }[];\n // List of authenticators for the user. TYPESTRING. GQL.\n authenticators: {\n // Unique credential ID for the authenticator. TYPESTRING.\n credentialID: string;\n // Public key associated with the authenticator. TYPESTRING.\n publicKey: string;\n // Counter for the number of authentication attempts. TYPESTRING.\n counter: number;\n }[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n any\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action. GQL.\n order?: {\n any\n };\n }[];\n }[];\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of. TYPESTRING. GQL.\n trade: {\n any\n };\n };\n // The asset this order is for. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n any\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n any\n }[];\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n any\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: {\n any\n }[];\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n };\n};\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\n";
17
- readonly newsArticle: "\nYour response should adhere to the following type definition for the \"NewsArticle\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type NewsArticle = {\n // Title of the news article.\n title: string;\n // Full content of the news article.\n content?: string;\n // Source of the news article (e.g., Bloomberg, Reuters).\n source: string;\n // Domain of the source website.\n sourceDomain?: string;\n // URL to the original news article, must be unique.\n url: string;\n // Sentiment analysis result of the article.\n sentiment: string;\n // List of authors who wrote the article.\n authors: string[];\n // Summary or abstract of the news article.\n summary?: string;\n // URL to the banner image of the article.\n bannerImage?: string;\n // Publication time of the article.\n timePublished: string;\n // Category or genre of the news article.\n category?: string;\n // Topics covered in the news article.\n topics: string[];\n // URL to the logo image of the news source.\n logo?: string;\n // List of asset sentiments related to this news article. TYPESTRING. GQL.\n assets: {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: NewsArticle;\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n any\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n any\n }[];\n }[];\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n any\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n any\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n any\n };\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n any\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable. TYPESTRING. GQL.\n alpacaAccount?: {\n any\n };\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: NewsArticleAssetSentiment[];\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n }[];\n};\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\n";
18
- readonly newsArticleAssetSentiment: "\nYour response should adhere to the following type definition for the \"NewsArticleAssetSentiment\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type NewsArticleAssetSentiment = {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model. TYPESTRING. GQL.\n news: {\n // Title of the news article.\n title: string;\n // Full content of the news article.\n content?: string;\n // Source of the news article (e.g., Bloomberg, Reuters).\n source: string;\n // Domain of the source website.\n sourceDomain?: string;\n // URL to the original news article, must be unique.\n url: string;\n // Sentiment analysis result of the article.\n sentiment: string;\n // List of authors who wrote the article.\n authors: string[];\n // Summary or abstract of the news article.\n summary?: string;\n // URL to the banner image of the article.\n bannerImage?: string;\n // Publication time of the article.\n timePublished: string;\n // Category or genre of the news article.\n category?: string;\n // Topics covered in the news article.\n topics: string[];\n // URL to the logo image of the news source.\n logo?: string;\n // List of asset sentiments related to this news article. TYPESTRING. GQL.\n assets: NewsArticleAssetSentiment[];\n };\n // Relation to the Asset model. TYPESTRING. GQL.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image. TYPESTRING.\n logoUrl?: string;\n // Description of the asset. TYPESTRING.\n description?: string;\n // Central Index Key for the asset. TYPESTRING.\n cik?: string;\n // Stock exchange where the asset is listed. TYPESTRING.\n exchange?: string;\n // Currency in which the asset is traded. TYPESTRING.\n currency?: string;\n // Country where the asset is based. TYPESTRING.\n country?: string;\n // Sector classification of the asset. TYPESTRING.\n sector?: string;\n // Industry classification of the asset. TYPESTRING.\n industry?: string;\n // Physical address associated with the asset. TYPESTRING.\n address?: string;\n // Official website of the asset. TYPESTRING.\n officialSite?: string;\n // Fiscal year-end date of the asset. TYPESTRING.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter. TYPESTRING.\n latestQuarter?: string;\n // Market capitalization of the asset. TYPESTRING.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization. TYPESTRING.\n ebitda?: string;\n // Price-to-Earnings ratio. TYPESTRING.\n peRatio?: string;\n // Price/Earnings to Growth ratio. TYPESTRING.\n pegRatio?: string;\n // Book value per share. TYPESTRING.\n bookValue?: string;\n // Dividend per share. TYPESTRING.\n dividendPerShare?: string;\n // Dividend yield percentage. TYPESTRING.\n dividendYield?: string;\n // Earnings per share. TYPESTRING.\n eps?: string;\n // Revenue per share over the trailing twelve months. TYPESTRING.\n revenuePerShareTTM?: string;\n // Profit margin percentage. TYPESTRING.\n profitMargin?: string;\n // Operating margin over the trailing twelve months. TYPESTRING.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months. TYPESTRING.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months. TYPESTRING.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months. TYPESTRING.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months. TYPESTRING.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months. TYPESTRING.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings. TYPESTRING.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue. TYPESTRING.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset. TYPESTRING.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy. TYPESTRING.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy. TYPESTRING.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold. TYPESTRING.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell. TYPESTRING.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell. TYPESTRING.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio. TYPESTRING.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio. TYPESTRING.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months. TYPESTRING.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio. TYPESTRING.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio. TYPESTRING.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio. TYPESTRING.\n evToEbitda?: string;\n // Beta coefficient measuring volatility. TYPESTRING.\n beta?: string;\n // 52-week high price of the asset. TYPESTRING.\n week52High?: string;\n // 52-week low price of the asset. TYPESTRING.\n week52Low?: string;\n // 50-day moving average price. TYPESTRING.\n day50MovingAverage?: string;\n // 200-day moving average price. TYPESTRING.\n day200MovingAverage?: string;\n // Total number of shares outstanding. TYPESTRING.\n sharesOutstanding?: string;\n // Date when the next dividend is paid. TYPESTRING.\n dividendDate?: string;\n // Date when the asset goes ex-dividend. TYPESTRING.\n exDividendDate?: string;\n // Last ask price of the asset. TYPESTRING.\n askPrice?: string;\n // Last bid price of the asset. TYPESTRING.\n bidPrice?: string;\n // List of trades involving this asset. TYPESTRING. GQL.\n trades: {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // Analysis supporting the trade decision as markdown text. TYPESTRING.\n analysis: string;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed. TYPESTRING.\n timestamp: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n any\n };\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n any\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n any\n }[];\n };\n // List of actions associated with this trade. TYPESTRING. GQL.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action. GQL.\n order?: {\n any\n };\n }[];\n }[];\n // List of orders involving this asset. TYPESTRING. GQL.\n orders: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The Alpaca account this order is associated with. TYPESTRING. GQL.\n alpacaAccount: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n any\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n any\n }[];\n // List of positions held in this Alpaca account. TYPESTRING. GQL.\n positions: {\n any\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n any\n }[];\n };\n // The action this order is associated with. TYPESTRING. GQL.\n action: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The trade this action is part of. TYPESTRING. GQL.\n trade: {\n any\n };\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n }[];\n // List of positions involving this asset. TYPESTRING. GQL.\n positions: {\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable. TYPESTRING. GQL.\n alpacaAccount?: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca. TYPESTRING.\n APIKey: string;\n // API secret for authenticating requests to Alpaca. TYPESTRING.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Minimum order size for the account. TYPESTRING.\n minOrderSize: number;\n // Maximum order size for the account. TYPESTRING.\n maxOrderSize: number;\n // Minimum percentage change (from intraday high/low) to consider for a trade signal. TYPESTRING.\n minPercentageChange: number;\n // Volume threshold for a trade signal (minimum volume qualifier to consider an asset for trading). TYPESTRING.\n volumeThreshold: number;\n // Relation to the User model who owns this Alpaca account. TYPESTRING.\n user: {\n any\n };\n // List of trades executed through this Alpaca account. TYPESTRING.\n trades: {\n any\n }[];\n // List of orders placed through this Alpaca account. TYPESTRING.\n orders: {\n any\n }[];\n // List of alerts generated for this Alpaca account. TYPESTRING.\n alerts: {\n any\n }[];\n };\n }[];\n // List of news article sentiments related to this asset. TYPESTRING. GQL.\n newsMentions: NewsArticleAssetSentiment[];\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n};\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\n";
2
+ readonly session: "\nYour response should adhere to the following type definition for the \"Session\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Session = {\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model.\n user: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model.\n customer?: {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n };\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // List of positions held in this Alpaca account.\n positions: {\n // Relation to the Asset model.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n }[];\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n };\n};\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\n";
3
+ readonly user: "\nYour response should adhere to the following type definition for the \"User\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type User = {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // Relation to the Customer model.\n customer?: {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n };\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // List of positions held in this Alpaca account.\n positions: {\n // Relation to the Asset model.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n }[];\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n};\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\n";
4
+ readonly alpacaAccount: "\nYour response should adhere to the following type definition for the \"AlpacaAccount\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type AlpacaAccount = {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // List of positions held in this Alpaca account.\n positions: {\n // Relation to the Asset model.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n};\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\n";
5
+ readonly position: "\nYour response should adhere to the following type definition for the \"Position\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Position = {\n // Relation to the Asset model.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n};\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\n";
6
+ readonly authenticator: "\nYour response should adhere to the following type definition for the \"Authenticator\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Authenticator = {\n\n};\n";
7
+ readonly account: "\nYour response should adhere to the following type definition for the \"Account\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Account = {\n // Type of the account (e.g., OAuth provider).\n type: string;\n // Provider of the account (e.g., Google, GitHub).\n provider: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // State of the session associated with the account.\n session_state?: string;\n};\n";
8
+ readonly verificationToken: "\nYour response should adhere to the following type definition for the \"VerificationToken\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type VerificationToken = {\n\n};\n";
9
+ readonly customer: "\nYour response should adhere to the following type definition for the \"Customer\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Customer = {\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // List of users associated with the customer.\n users: {\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // URL to the user's profile image.\n image?: string;\n // The role assigned to the user, determining permissions.\n role: UserRole;\n // A short biography or description of the user.\n bio?: string;\n // The user's job title or position.\n jobTitle?: string;\n // The type of Alpaca account the user currently holds.\n currentAccount: AlpacaAccountType;\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: {\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // List of positions held in this Alpaca account.\n positions: {\n // Relation to the Asset model.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n }[];\n }[];\n // OpenAI API key for the user.\n openaiAPIKey?: string;\n // OpenAI API Language model selected by the user\n openaiModel?: OpenaiModel;\n }[];\n};\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OpenaiModel {\n GPT_4O = \"GPT_4O\",\n GPT_4O_MINI = \"GPT_4O_MINI\",\n O1_PREVIEW = \"O1_PREVIEW\",\n O1_MINI = \"O1_MINI\"\n}\n\n";
10
+ readonly asset: "\nYour response should adhere to the following type definition for the \"Asset\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Asset = {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n};\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\n";
11
+ readonly trade: "\nYour response should adhere to the following type definition for the \"Trade\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Trade = {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // List of actions associated with this trade.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action.\n order?: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The asset this order is for.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n }[];\n};\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\n";
12
+ readonly action: "\nYour response should adhere to the following type definition for the \"Action\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Action = {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action.\n order?: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The asset this order is for.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n";
13
+ readonly order: "\nYour response should adhere to the following type definition for the \"Order\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Order = {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The asset this order is for.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n";
14
+ readonly stopLoss: "\nYour response should adhere to the following type definition for the \"StopLoss\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type StopLoss = {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n // An order that is associated with this stop loss.\n Order: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The asset this order is for.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n";
15
+ readonly takeProfit: "\nYour response should adhere to the following type definition for the \"TakeProfit\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type TakeProfit = {\n // Must be a positive number and ≥ base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n // An order that is associated with this take profit.\n Order: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\n stopLoss?: {\n // Must be a positive number. For SELL orders: stopPrice ≤ current market price. For BUY orders: stopPrice ≥ current market price.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // The asset this order is for.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n REPLACED = \"REPLACED\",\n PENDING_CANCEL = \"PENDING_CANCEL\",\n PENDING_REPLACE = \"PENDING_REPLACE\",\n ACCEPTED = \"ACCEPTED\",\n PENDING_NEW = \"PENDING_NEW\",\n ACCEPTED_FOR_BIDDING = \"ACCEPTED_FOR_BIDDING\",\n STOPPED = \"STOPPED\",\n REJECTED = \"REJECTED\",\n SUSPENDED = \"SUSPENDED\",\n CALCULATED = \"CALCULATED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n";
16
+ readonly alert: "\nYour response should adhere to the following type definition for the \"Alert\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Alert = {\n // Message content of the alert.\n message: string;\n // Type of the alert, defined by AlertType enum.\n type: AlertType;\n // Indicates whether the alert has been read by the user.\n isRead: boolean;\n};\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\n";
17
+ readonly newsArticle: "\nYour response should adhere to the following type definition for the \"NewsArticle\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type NewsArticle = {\n // Title of the news article.\n title: string;\n // Full content of the news article.\n content?: string;\n // Source of the news article (e.g., Bloomberg, Reuters).\n source: string;\n // Domain of the source website.\n sourceDomain?: string;\n // URL to the original news article, must be unique.\n url: string;\n // Sentiment analysis result of the article.\n sentiment: string;\n // List of authors who wrote the article.\n authors: string[];\n // Summary or abstract of the news article.\n summary?: string;\n // URL to the banner image of the article.\n bannerImage?: string;\n // Publication time of the article.\n timePublished: string;\n // Category or genre of the news article.\n category?: string;\n // Topics covered in the news article.\n topics: string[];\n // URL to the logo image of the news source.\n logo?: string;\n};\n";
18
+ readonly newsArticleAssetSentiment: "\nYour response should adhere to the following type definition for the \"NewsArticleAssetSentiment\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type NewsArticleAssetSentiment = {\n // URL of the news article, must be unique.\n url: string;\n // Relation to the Asset model.\n asset: {\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n };\n // Relevancy score indicating how relevant the news is to the asset.\n relevancyScore?: string;\n // Sentiment score derived from the news content.\n sentimentScore?: string;\n // Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).\n sentimentLabel?: string;\n};\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\n";
19
19
  readonly economicEvent: "\nYour response should adhere to the following type definition for the \"EconomicEvent\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type EconomicEvent = {\n // Title or name of the economic event.\n title: string;\n // Detailed description of the economic event.\n description?: string;\n // Date and time when the economic event is scheduled to occur.\n date: Date;\n // Importance level of the event, defined by EventImportance enum.\n importance: EventImportance;\n};\nexport enum EventImportance {\n LOW = \"LOW\",\n MEDIUM = \"MEDIUM\",\n HIGH = \"HIGH\"\n}\n\n";
20
20
  };
21
21
  export default typeStrings;