adaptic-backend 1.0.196 → 1.0.197

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 (106) hide show
  1. package/generated/typeStrings/Action.cjs +105 -61
  2. package/generated/typeStrings/Action.d.ts +1 -1
  3. package/generated/typeStrings/Action.d.ts.map +1 -1
  4. package/generated/typeStrings/Action.js.map +1 -1
  5. package/generated/typeStrings/Alert.cjs +12 -5
  6. package/generated/typeStrings/Alert.d.ts +1 -1
  7. package/generated/typeStrings/Alert.d.ts.map +1 -1
  8. package/generated/typeStrings/Alert.js.map +1 -1
  9. package/generated/typeStrings/AlpacaAccount.cjs +0 -5
  10. package/generated/typeStrings/AlpacaAccount.d.ts +1 -1
  11. package/generated/typeStrings/AlpacaAccount.d.ts.map +1 -1
  12. package/generated/typeStrings/AlpacaAccount.js.map +1 -1
  13. package/generated/typeStrings/Asset.cjs +0 -24
  14. package/generated/typeStrings/Asset.d.ts +1 -1
  15. package/generated/typeStrings/Asset.d.ts.map +1 -1
  16. package/generated/typeStrings/Asset.js.map +1 -1
  17. package/generated/typeStrings/Customer.cjs +0 -6
  18. package/generated/typeStrings/Customer.d.ts +1 -1
  19. package/generated/typeStrings/Customer.d.ts.map +1 -1
  20. package/generated/typeStrings/Customer.js.map +1 -1
  21. package/generated/typeStrings/EconomicEvent.cjs +9 -4
  22. package/generated/typeStrings/EconomicEvent.d.ts +1 -1
  23. package/generated/typeStrings/EconomicEvent.d.ts.map +1 -1
  24. package/generated/typeStrings/EconomicEvent.js.map +1 -1
  25. package/generated/typeStrings/MarketSentiment.cjs +21 -8
  26. package/generated/typeStrings/MarketSentiment.d.ts +1 -1
  27. package/generated/typeStrings/MarketSentiment.d.ts.map +1 -1
  28. package/generated/typeStrings/MarketSentiment.js.map +1 -1
  29. package/generated/typeStrings/NewsArticleAssetSentiment.cjs +0 -24
  30. package/generated/typeStrings/NewsArticleAssetSentiment.d.ts +1 -1
  31. package/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -1
  32. package/generated/typeStrings/NewsArticleAssetSentiment.js.map +1 -1
  33. package/generated/typeStrings/Order.cjs +0 -81
  34. package/generated/typeStrings/Order.d.ts +1 -1
  35. package/generated/typeStrings/Order.d.ts.map +1 -1
  36. package/generated/typeStrings/Order.js.map +1 -1
  37. package/generated/typeStrings/Position.cjs +63 -22
  38. package/generated/typeStrings/Position.d.ts +1 -1
  39. package/generated/typeStrings/Position.d.ts.map +1 -1
  40. package/generated/typeStrings/Position.js.map +1 -1
  41. package/generated/typeStrings/Trade.cjs +236 -108
  42. package/generated/typeStrings/Trade.d.ts +1 -1
  43. package/generated/typeStrings/Trade.d.ts.map +1 -1
  44. package/generated/typeStrings/Trade.js.map +1 -1
  45. package/generated/typeStrings/User.cjs +32 -16
  46. package/generated/typeStrings/User.d.ts +1 -1
  47. package/generated/typeStrings/User.d.ts.map +1 -1
  48. package/generated/typeStrings/User.js.map +1 -1
  49. package/generated/typeStrings/index.d.ts +12 -12
  50. package/generated/typegraphql-prisma/models/Action.d.ts +1 -1
  51. package/generated/typegraphql-prisma/resolvers/relations/Action/ActionRelationsResolver.cjs +1 -1
  52. package/generated/typegraphql-prisma/resolvers/relations/Action/ActionRelationsResolver.js.map +1 -1
  53. package/package.json +1 -1
  54. package/server/generated/typeStrings/Action.d.ts +1 -1
  55. package/server/generated/typeStrings/Action.d.ts.map +1 -1
  56. package/server/generated/typeStrings/Action.js.map +1 -1
  57. package/server/generated/typeStrings/Action.mjs +105 -61
  58. package/server/generated/typeStrings/Alert.d.ts +1 -1
  59. package/server/generated/typeStrings/Alert.d.ts.map +1 -1
  60. package/server/generated/typeStrings/Alert.js.map +1 -1
  61. package/server/generated/typeStrings/Alert.mjs +12 -5
  62. package/server/generated/typeStrings/AlpacaAccount.d.ts +1 -1
  63. package/server/generated/typeStrings/AlpacaAccount.d.ts.map +1 -1
  64. package/server/generated/typeStrings/AlpacaAccount.js.map +1 -1
  65. package/server/generated/typeStrings/AlpacaAccount.mjs +0 -5
  66. package/server/generated/typeStrings/Asset.d.ts +1 -1
  67. package/server/generated/typeStrings/Asset.d.ts.map +1 -1
  68. package/server/generated/typeStrings/Asset.js.map +1 -1
  69. package/server/generated/typeStrings/Asset.mjs +0 -24
  70. package/server/generated/typeStrings/Customer.d.ts +1 -1
  71. package/server/generated/typeStrings/Customer.d.ts.map +1 -1
  72. package/server/generated/typeStrings/Customer.js.map +1 -1
  73. package/server/generated/typeStrings/Customer.mjs +0 -6
  74. package/server/generated/typeStrings/EconomicEvent.d.ts +1 -1
  75. package/server/generated/typeStrings/EconomicEvent.d.ts.map +1 -1
  76. package/server/generated/typeStrings/EconomicEvent.js.map +1 -1
  77. package/server/generated/typeStrings/EconomicEvent.mjs +9 -4
  78. package/server/generated/typeStrings/MarketSentiment.d.ts +1 -1
  79. package/server/generated/typeStrings/MarketSentiment.d.ts.map +1 -1
  80. package/server/generated/typeStrings/MarketSentiment.js.map +1 -1
  81. package/server/generated/typeStrings/MarketSentiment.mjs +21 -8
  82. package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts +1 -1
  83. package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -1
  84. package/server/generated/typeStrings/NewsArticleAssetSentiment.js.map +1 -1
  85. package/server/generated/typeStrings/NewsArticleAssetSentiment.mjs +0 -24
  86. package/server/generated/typeStrings/Order.d.ts +1 -1
  87. package/server/generated/typeStrings/Order.d.ts.map +1 -1
  88. package/server/generated/typeStrings/Order.js.map +1 -1
  89. package/server/generated/typeStrings/Order.mjs +0 -81
  90. package/server/generated/typeStrings/Position.d.ts +1 -1
  91. package/server/generated/typeStrings/Position.d.ts.map +1 -1
  92. package/server/generated/typeStrings/Position.js.map +1 -1
  93. package/server/generated/typeStrings/Position.mjs +63 -22
  94. package/server/generated/typeStrings/Trade.d.ts +1 -1
  95. package/server/generated/typeStrings/Trade.d.ts.map +1 -1
  96. package/server/generated/typeStrings/Trade.js.map +1 -1
  97. package/server/generated/typeStrings/Trade.mjs +236 -108
  98. package/server/generated/typeStrings/User.d.ts +1 -1
  99. package/server/generated/typeStrings/User.d.ts.map +1 -1
  100. package/server/generated/typeStrings/User.js.map +1 -1
  101. package/server/generated/typeStrings/User.mjs +32 -16
  102. package/server/generated/typeStrings/index.d.ts +12 -12
  103. package/server/generated/typegraphql-prisma/models/Action.d.ts +1 -1
  104. package/server/generated/typegraphql-prisma/models/Action.mjs +1 -1
  105. package/server/generated/typegraphql-prisma/resolvers/relations/Action/ActionRelationsResolver.js.map +1 -1
  106. package/server/generated/typegraphql-prisma/resolvers/relations/Action/ActionRelationsResolver.mjs +1 -1
@@ -40,28 +40,44 @@ export type User = {
40
40
  openaiModel?: OpenaiModel;
41
41
  };
42
42
 
43
- export enum UserRole {
44
- OWNER = "OWNER",
45
- ADMIN = "ADMIN",
46
- USER = "USER"
43
+ enum UserRole {
44
+ /// The primary owner with full control over the platform.
45
+ OWNER
46
+
47
+ /// An administrative user with elevated permissions.
48
+ ADMIN
49
+
50
+ /// A regular user with standard access.
51
+ USER
47
52
  }
48
53
 
49
- export enum AlpacaAccountType {
50
- PAPER = "PAPER",
51
- LIVE = "LIVE"
54
+ enum AlpacaAccountType {
55
+ /// A simulated trading account for testing strategies without real money.
56
+ PAPER
57
+
58
+ /// A live trading account with real funds.
59
+ LIVE
52
60
  }
53
61
 
54
- export enum SubscriptionPlan {
55
- FREE = "FREE",
56
- PRO = "PRO",
57
- BUSINESS = "BUSINESS"
62
+ enum SubscriptionPlan {
63
+ /// A free plan with limited features.
64
+ FREE
65
+
66
+ /// A professional plan with enhanced features.
67
+ PRO
68
+
69
+ /// A business plan tailored for organizational needs.
70
+ BUSINESS
58
71
  }
59
72
 
60
- export enum OpenaiModel {
61
- GPT_4O = "GPT_4O",
62
- GPT_4O_MINI = "GPT_4O_MINI",
63
- O1_PREVIEW = "O1_PREVIEW",
64
- O1_MINI = "O1_MINI"
73
+ enum OpenaiModel {
74
+ GPT_4O
75
+
76
+ GPT_4O_MINI
77
+
78
+ O1_PREVIEW
79
+
80
+ O1_MINI
65
81
  }
66
82
 
67
83
  `;
@@ -1,2 +1,2 @@
1
- export declare const UserTypeString = "\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 id: number;\n name?: string;\n plan?: SubscriptionPlan;\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 id: string;\n type: AlpacaAccountType;\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 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";
1
+ export declare const UserTypeString = "\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 id: number;\n name?: string;\n plan?: SubscriptionPlan;\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 id: string;\n type: AlpacaAccountType;\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\nenum UserRole {\n /// The primary owner with full control over the platform.\n OWNER\n\n /// An administrative user with elevated permissions.\n ADMIN\n\n /// A regular user with standard access.\n USER\n}\n\nenum AlpacaAccountType {\n /// A simulated trading account for testing strategies without real money.\n PAPER\n\n /// A live trading account with real funds.\n LIVE\n}\n\nenum SubscriptionPlan {\n /// A free plan with limited features.\n FREE\n\n /// A professional plan with enhanced features.\n PRO\n\n /// A business plan tailored for organizational needs.\n BUSINESS\n}\n\nenum OpenaiModel {\n GPT_4O\n\n GPT_4O_MINI\n\n O1_PREVIEW\n\n O1_MINI\n}\n\n";
2
2
  //# sourceMappingURL=User.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/User.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,+lDA+D1B,CAAC"}
1
+ {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/User.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,s2DA+E1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/generated/typeStrings/User.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+D7B,CAAC"}
1
+ {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/generated/typeStrings/User.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+E7B,CAAC"}
@@ -1,23 +1,23 @@
1
1
  export declare const typeStrings: {
2
- readonly marketSentiment: "\nYour response should adhere to the following type definition for the \"MarketSentiment\" 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 MarketSentiment = {\n // The current level of market sentiment.\n sentiment: MarketSentimentLevel;\n // A one-sentence description of the market sentiment, including specific references to stock market index values, recent changes, trends, and technical indicators, as well as quotes from major news sources.\n description: string;\n // A detailed, multi-paragraph description of the market sentiment, including extensive analyses, references, quotes from major news sources, and links to articles.\n longDescription: string;\n};\n\nexport enum MarketSentimentLevel {\n VERY_BEARISH = \"VERY_BEARISH\",\n SOMEWHAT_BEARISH = \"SOMEWHAT_BEARISH\",\n BEARISH = \"BEARISH\",\n NEUTRAL = \"NEUTRAL\",\n SOMEWHAT_BULLISH = \"SOMEWHAT_BULLISH\",\n BULLISH = \"BULLISH\",\n VERY_BULLISH = \"VERY_BULLISH\"\n}\n\n";
2
+ readonly marketSentiment: "\nYour response should adhere to the following type definition for the \"MarketSentiment\" 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 MarketSentiment = {\n // The current level of market sentiment.\n sentiment: MarketSentimentLevel;\n // A one-sentence description of the market sentiment, including specific references to stock market index values, recent changes, trends, and technical indicators, as well as quotes from major news sources.\n description: string;\n // A detailed, multi-paragraph description of the market sentiment, including extensive analyses, references, quotes from major news sources, and links to articles.\n longDescription: string;\n};\n\nenum MarketSentimentLevel {\n /// Extremely negative outlook on the market.\n VERY_BEARISH\n\n /// Moderately negative outlook on the market.\n SOMEWHAT_BEARISH\n\n /// Negative outlook on the market.\n BEARISH\n\n /// Neutral outlook on the market.\n NEUTRAL\n\n /// Positive outlook on the market.\n SOMEWHAT_BULLISH\n\n /// Moderately positive outlook on the market.\n BULLISH\n\n /// Extremely positive outlook on the market.\n VERY_BULLISH\n}\n\n";
3
3
  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 id: string;\n name?: string;\n email?: string;\n };\n};\n\n";
4
- 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 id: number;\n name?: string;\n plan?: SubscriptionPlan;\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 id: string;\n type: AlpacaAccountType;\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 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";
5
- 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 id: string;\n qty: number;\n asset: Asset;\n }[];\n};\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\n";
6
- 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 symbol: string;\n name: string;\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 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";
4
+ 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 id: number;\n name?: string;\n plan?: SubscriptionPlan;\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 id: string;\n type: AlpacaAccountType;\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\nenum UserRole {\n /// The primary owner with full control over the platform.\n OWNER\n\n /// An administrative user with elevated permissions.\n ADMIN\n\n /// A regular user with standard access.\n USER\n}\n\nenum AlpacaAccountType {\n /// A simulated trading account for testing strategies without real money.\n PAPER\n\n /// A live trading account with real funds.\n LIVE\n}\n\nenum SubscriptionPlan {\n /// A free plan with limited features.\n FREE\n\n /// A professional plan with enhanced features.\n PRO\n\n /// A business plan tailored for organizational needs.\n BUSINESS\n}\n\nenum OpenaiModel {\n GPT_4O\n\n GPT_4O_MINI\n\n O1_PREVIEW\n\n O1_MINI\n}\n\n";
5
+ 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 id: string;\n qty: number;\n asset: Asset;\n }[];\n};\n\n";
6
+ 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 symbol: string;\n name: string;\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\nenum AssetType {\n /// Represents a share of ownership in a corporation.\n STOCK\n\n /// Exchange-Traded Fund, a type of investment fund traded on stock exchanges.\n ETF\n\n /// A mutual fund that pools money from many investors to purchase securities.\n MUTUAL_FUND\n\n /// Digital or virtual currencies using cryptography for security.\n CRYPTOCURRENCY\n\n /// A market index representing a collection of stocks.\n INDEX\n\n /// Physical goods such as gold, oil, or agricultural products.\n COMMODITY\n\n /// Traditional currencies used in international trade.\n CURRENCY\n\n /// Contracts that give the holder the right to buy or sell an asset at a set price.\n OPTION\n\n /// Financial contracts obligating the buyer to purchase an asset at a future date.\n FUTURE\n\n /// Debt securities issued by entities to raise capital.\n BOND\n\n /// Securities that give the holder the right to purchase stock at a specific price.\n WARRANT\n\n /// American Depositary Receipts representing shares in foreign companies.\n ADR\n\n /// Global Depositary Receipts representing shares in foreign companies.\n GDR\n\n /// Units of ownership in investment funds or trusts.\n UNIT\n\n /// Rights granted to shareholders, such as voting or dividend rights.\n RIGHT\n\n /// Real Estate Investment Trusts, companies that own or finance income-producing real estate.\n REIT\n\n /// Investment products structured to meet specific needs.\n STRUCTURED_PRODUCT\n\n /// Financial contracts to exchange cash flows between parties.\n SWAP\n\n /// Immediate exchange of financial instruments.\n SPOT\n\n /// Agreements to buy or sell an asset at a future date.\n FORWARD\n\n /// Any other type of asset not classified above.\n OTHER\n}\n\n";
7
7
  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\n";
8
8
  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\n";
9
9
  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\n";
10
- 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 id: string;\n name?: string;\n email?: string;\n }[];\n};\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\n";
11
- 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\n symbol: string;\n // Full name of the asset\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\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";
12
- 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 symbol: string;\n name: string;\n type: AssetType;\n };\n // List of actions associated with this trade.\n actions: {\n id: string;\n sequence: number;\n type: ActionType;\n note: string;\n status: ActionStatus;\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 CANCELED = \"CANCELED\"\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 CANCELED = \"CANCELED\"\n}\n\n";
13
- 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 qty?: number;\n notional?: number;\n side: OrderSide;\n type: OrderType;\n orderClass: OrderClass;\n timeInForce: TimeInForce;\n limitPrice?: number;\n stopPrice?: number;\n stopLoss?: {\n // Must be a positive number. Price must be at a threshold to limit losses when the asset’s market price moves unfavourably beyond a specified point. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be ≥ basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n };\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01, and is always greater than stopPrice. Price must be at a threshold to lock in profits when the asset’s market price moves favourably beyond a specified point.\n limitPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n };\n trailPrice?: number;\n trailPercent?: number;\n extendedHours?: boolean;\n status: OrderStatus;\n submittedAt?: Date;\n strikePrice?: number;\n expirationDate?: Date;\n optionType?: OptionType;\n };\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 CANCELED = \"CANCELED\"\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 HELD = \"HELD\",\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 OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n";
14
- 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. Required if 'notional' is not provided. For 'MARKET' orders with 'timeInForce' set to 'DAY', 'qty' can be fractional.\n qty?: number;\n // Notional dollar amount to trade. Required if 'qty' is not provided. Only valid for 'MARKET' orders with 'timeInForce' set to 'DAY'.\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. Options are 'SIMPLE', 'BRACKET', 'OCO', 'OTO'. Default is 'SIMPLE'. For 'BRACKET' orders, 'takeProfit' and 'stopLoss' are required.\n orderClass: OrderClass;\n // Time in force for the order ('DAY', 'GTC', 'OPG', 'CLS', 'IOC', 'FOK').\n timeInForce: TimeInForce;\n // Limit price of the order. Required for 'LIMIT' and 'STOP_LIMIT' order types. Must be a positive number. For 'BUY' orders, 'limitPrice' represents the maximum price to pay; for 'SELL' orders, it represents the minimum price to accept.\n limitPrice?: number;\n // Stop price of the order. Required for 'STOP' and 'STOP_LIMIT' order types. Must be a positive number. For 'BUY' 'STOP_LIMIT' orders, 'stopPrice' must be less than or equal to 'limitPrice'. For 'SELL' 'STOP_LIMIT' orders, 'stopPrice' must be greater than or equal to 'limitPrice'.\n stopPrice?: number;\n // Stop loss object. Required for 'BRACKET' and 'OTO' order classes when setting a stop-loss order. For 'BUY' bracket orders, 'stopLoss.stopPrice' must be less than 'takeProfit.limitPrice'.\n stopLoss?: {\n // Must be a positive number. Price must be at a threshold to limit losses when the asset’s market price moves unfavourably beyond a specified point. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be ≥ basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n };\n // Take profit object. Required for 'BRACKET' and 'OTO' order classes when setting a take-profit order. For 'BUY' bracket orders, 'takeProfit.limitPrice' must be greater than 'stopLoss.stopPrice'.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01, and is always greater than stopPrice. Price must be at a threshold to lock in profits when the asset’s market price moves favourably beyond a specified point.\n limitPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n };\n // Trail price for 'TRAILING_STOP' orders. Must be a positive number. Either 'trailPrice' or 'trailPercent' is required when 'type' is 'TRAILING_STOP'.\n trailPrice?: number;\n // Trail percent for 'TRAILING_STOP' orders. Must be a positive number. Either 'trailPrice' or 'trailPercent' is required when 'type' is 'TRAILING_STOP'.\n trailPercent?: number;\n // Whether the order is eligible for execution outside regular trading hours. Only valid for 'LIMIT' orders with 'timeInForce' set to 'DAY'. Defaults to false.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // The asset this order is for.\n asset: {\n symbol: string;\n name: string;\n type: AssetType;\n };\n // Strike price for option orders. Required when 'asset.type' is 'OPTION'. Must be a positive number.\n strikePrice?: number;\n // Expiration date for option orders. Required when 'asset.type' is 'OPTION'. Must be a valid date in the future.\n expirationDate?: Date;\n // Type of option contract ('CALL' or 'PUT'). Required when 'asset.type' is 'OPTION'.\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 HELD = \"HELD\",\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";
10
+ 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 id: string;\n name?: string;\n email?: string;\n }[];\n};\n\n";
11
+ 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\n symbol: string;\n // Full name of the asset\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n};\n\n";
12
+ 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 symbol: string;\n name: string;\n type: AssetType;\n };\n // List of actions associated with this trade.\n actions: {\n id: string;\n sequence: number;\n type: ActionType;\n note: string;\n status: ActionStatus;\n }[];\n};\n\nenum OptionType {\n /// A contract that gives the holder the right to buy the underlying asset.\n CALL\n\n /// A contract that gives the holder the right to sell the underlying asset.\n PUT\n}\n\nenum TradeSignal {\n /// A bullish signal when a short-term moving average crosses above a long-term moving average.\n GOLDEN_CROSS\n\n /// Signal generated when a short-term moving average crosses above or below a long-term moving average.\n MOVING_AVERAGE_CROSSOVER\n\n /// Indicates that the Relative Strength Index (RSI) is over the overbought threshold.\n RSI_OVERBOUGHT\n\n /// Indicates that the Relative Strength Index (RSI) is below the oversold threshold.\n RSI_OVERSOLD\n\n /// A signal generated by the Moving Average Convergence Divergence (MACD) indicator crossing.\n MACD_CROSSOVER\n\n /// Occurs when the price breaks above or below the Bollinger Bands.\n BOLLINGER_BANDS_BREAKOUT\n\n /// A signal indicating a reversal in the current trend.\n TREND_REVERSAL\n\n /// A sudden increase in market volatility.\n VOLATILITY_SPIKE\n\n /// Signals based on specific price patterns and actions.\n PRICE_ACTION\n\n /// A surge in the implied volatility of options contracts.\n IMPLIED_VOLATILITY_SURGE\n\n /// When the price breaks above a resistance level, indicating potential upward movement.\n BREAKOUT_ABOVE_RESISTANCE\n\n /// When the price breaks below a support level, indicating potential downward movement.\n BREAKDOWN_BELOW_SUPPORT\n\n /// When the price holds above a support level, indicating strength.\n SUPPORT_LEVEL_HOLD\n\n /// When the price holds below a resistance level, indicating weakness.\n RESISTANCE_LEVEL_HOLD\n\n /// Signals based on Fibonacci retracement levels.\n FIBONACCI_RETRACEMENT\n\n /// Wave patterns identified using Elliott Wave theory.\n ELLIOTT_WAVE\n\n /// Signals generated by the Parabolic SAR indicator.\n PARABOLIC_SAR\n\n /// Indicates the strength of a trend based on the Average Directional Index (ADX).\n ADX_TREND_STRENGTH\n\n /// Indicates that the Commodity Channel Index (CCI) is over the overbought threshold.\n CCI_OVERBOUGHT\n\n /// Indicates that the Commodity Channel Index (CCI) is below the oversold threshold.\n CCI_OVERSOLD\n\n /// Indicates that the Stochastic Oscillator is below the oversold threshold.\n STOCHASTIC_OVERSOLD\n\n /// Indicates that the Stochastic Oscillator is above the overbought threshold.\n STOCHASTIC_OVERBOUGHT\n\n /// Signals based on divergence between price and an indicator.\n DIVERGENCE_SIGNAL\n\n /// Patterns identified using Gann Fan techniques.\n GANN_FAN\n\n /// Occurs when the price breaks out of the Donchian Channels.\n DONCHIAN_CHANNEL_BREAKOUT\n\n /// Signals based on pivot point levels.\n PIVOT_POINT\n\n /// Occurs when the price breaks out of the Keltner Channels.\n KELTNER_CHANNEL_BREAK\n\n /// Signals generated by the Heikin Ashi moving average crossover.\n HEIKIN_ASHI_CROSSOVER\n\n /// A sudden surge in trading volume.\n VOLUME_SURGE\n\n /// Imbalance in the order book indicating potential price movement.\n ORDER_BOOK_IMBALANCE\n\n /// Anomalies detected in time series data.\n TIME_SERIES_ANOMALY\n\n /// Level indicating potential mean reversion trading opportunities.\n MEAN_REVERSION_LEVEL\n\n /// Signals based on pair trading strategies.\n PAIR_TRADING_SIGNAL\n\n /// Thresholds based on sentiment score.\n SENTIMENT_SCORE_THRESHOLD\n\n /// Changes in news sentiment related to the asset.\n NEWS_SENTIMENT_CHANGE\n\n /// Impact of order flow on price movement.\n ORDER_FLOW_IMPACT\n\n /// Movements driven by liquidity in the market.\n LIQUIDITY_DRIVEN_MOVE\n\n /// Predictions generated by machine learning models.\n MACHINE_LEARNING_PREDICTION\n\n /// Triggers based on sentiment analysis.\n SENTIMENT_ANALYSIS_TRIGGER\n\n /// No specific signal or reason for the trade.\n NO_SIGNAL\n}\n\nenum TradeStrategy {\n /// Analyzes historical price data to predict future movements.\n TECHNICAL_ANALYSIS\n\n /// Follows the trend of an asset's price movement.\n TREND_FOLLOWING\n\n /// Capitalizes on price discrepancies between assets.\n MEAN_REVERSION\n\n /// Uses options contracts to hedge risk or generate income.\n OPTIONS_STRATEGY\n\n /// Utilizes momentum to amplify returns on investments.\n MOMENTUM_STRATEGY\n\n /// Exploits price differences between markets or related assets.\n ARBITRAGE\n\n /// Uses statistical methods to identify profitable trades.\n STATISTICAL_ARBITRAGE\n\n /// Provides liquidity to the market by continuously buying and selling.\n MARKET_MAKING\n\n /// Uses news events to predict and capitalize on market movements.\n NEWS_BASED_STRATEGY\n\n /// Analyzes sentiment data to predict market movements.\n SENTIMENT_ANALYSIS\n\n /// Supplies liquidity to earn profits from bid-ask spreads.\n LIQUIDITY_PROVISION\n\n /// Profits from small price changes by executing numerous trades.\n SCALPING\n\n /// Trades based on volatility patterns in the market.\n VOLATILITY_TRADING\n\n /// Executes trades based on economic indicators and data releases.\n EVENT_DRIVEN\n\n /// Trades based on breakout patterns from established support or resistance levels.\n BREAKOUT_STRATEGY\n\n /// Trades based on the flow and volume of orders in the market.\n ORDER_FLOW_TRADING\n\n /// Pairs assets to capitalize on relative price movements between them.\n PAIR_TRADING\n\n /// Trades based on the rotation of funds between different market sectors.\n SECTOR_ROTATION\n\n /// Executes a large number of trades at high speed to capitalize on small price changes.\n HIGH_FREQUENCY_TRADING\n\n /// Utilizes machine vision techniques to analyze market data and execute trades.\n MACHINE_VISION_ANALYSIS\n\n /// No specific strategy or approach to trading.\n NO_STRATEGY\n}\n\nenum TradeStatus {\n /// The trade is pending and has not yet been processed.\n PENDING\n\n /// The trade is currently open and active.\n OPEN\n\n /// The trade is partially filled.\n PARTIAL\n\n /// The trade has been fully completed.\n COMPLETED\n\n /// The trade has been canceled.\n CANCELED\n}\n\nenum ActionType {\n /// Initiates a purchase of an asset.\n BUY\n\n /// Identifies a suitable option contract and initiates its purchase.\n BUY_OPTION\n\n /// Exercises an option to buy or sell the underlying asset.\n EXERCISE_OPTION\n\n /// Initiates the sale of an asset.\n SELL\n\n /// Cancels an existing trade action.\n CANCEL\n\n /// Modifies the parameters of an existing trade.\n ADJUST\n\n /// Implements a hedging strategy to mitigate risk.\n HEDGE\n}\n\nenum ActionStatus {\n /// The trade action is planned and awaiting execution.\n STAGED\n\n /// The trade action has been executed but not yet finalized.\n EXECUTED\n\n /// The trade action has been fully completed.\n COMPLETED\n\n /// The trade action have been canceled.\n CANCELED\n}\n\n";
13
+ 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 qty?: number;\n notional?: number;\n side: OrderSide;\n type: OrderType;\n orderClass: OrderClass;\n timeInForce: TimeInForce;\n limitPrice?: number;\n stopPrice?: number;\n stopLoss?: {\n // Must be a positive number. Price must be at a threshold to limit losses when the asset’s market price moves unfavourably beyond a specified point. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be ≥ basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n };\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01, and is always greater than stopPrice. Price must be at a threshold to lock in profits when the asset’s market price moves favourably beyond a specified point.\n limitPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n };\n trailPrice?: number;\n trailPercent?: number;\n extendedHours?: boolean;\n status: OrderStatus;\n strikePrice?: number;\n expirationDate?: Date;\n optionType?: OptionType;\n };\n};\n\nenum OrderSide {\n /// Represents the buying side of a trade action.\n BUY\n\n /// Represents the selling side of a trade action.\n SELL\n}\n\nenum OrderType {\n /// Executes immediately at the best available current market price.\n MARKET\n\n /// Executes only at the specified limit price or better.\n LIMIT\n\n /// Becomes a market order once the stop price is triggered.\n STOP\n\n /// Becomes a limit order once the stop price is triggered.\n STOP_LIMIT\n\n /// Adjusts the stop price based on a specified trail amount or percentage.\n TRAILING_STOP\n}\n\nenum OrderClass {\n /// A single standalone order without additional conditions.\n SIMPLE\n\n /// A primary order with attached take-profit and stop-loss orders to automatically manage the trade.\n BRACKET\n\n /// OCO (One-Cancels-Other): A pair of orders where the execution of one cancels the other.\n OCO\n\n /// OSO (One Sends Other): A chain of orders where the execution of one order triggers the placement of another.\n OSO\n\n /// OTO (One-Triggers-Other): Similar to BRACKET, where the execution of one order triggers the placement of another.\n OTO\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nenum TimeInForce {\n /// The order is valid for the day and expires at market close.\n DAY\n\n /// The order is valid until canceled by the user.\n GTC\n\n /// The order is valid for the opening of the market.\n OPG\n\n /// The order is valid until the close of the market.\n CLS\n\n /// The order must be executed immediately or canceled.\n IOC\n\n /// The order must be executed immediately or canceled.\n FOK\n}\n\nenum OrderStatus {\n /// The order has been staged in Adaptic to be sent to Alpaca. This is the initial status.\n STAGED\n\n /// The order has been received by Alpaca, and routed to exchanges for execution. This is the usual initial state of an order after being received.\n NEW\n\n /// The order has been partially filled.\n PARTIALLY_FILLED\n\n /// The order has been filled, and no further updates will occur for the order.\n FILLED\n\n /// The order is done executing for the day, and will not receive further updates until the next trading day.\n DONE_FOR_DAY\n\n /// The order has been canceled, and no further updates will occur for the order. This can be either due to a cancel request by the user, or the order has been canceled by the exchanges due to its time-in-force.\n CANCELED\n\n /// The order has expired, and no further updates will occur for the order.\n EXPIRED\n\n /// The order is waiting to be triggered, usually for stop or stop-limit orders.\n HELD\n\n /// The order was replaced by another order, or was updated due to a market event such as corporate action.\n REPLACED\n\n /// The order is waiting to be canceled.\n PENDING_CANCEL\n\n /// The order is waiting to be replaced by another order. The order will reject cancel request while in this state.\n PENDING_REPLACE\n\n /// The order has been received by Alpaca, but hasn’t yet been routed to the execution venue. This could be seen often outside of trading session hours.\n ACCEPTED\n\n /// The order has been received by Alpaca, and routed to the exchanges, but has not yet been accepted for execution. This state only occurs on rare occasions.\n PENDING_NEW\n\n /// The order has been received by exchanges, and is evaluated for pricing. This state only occurs on rare occasions.\n ACCEPTED_FOR_BIDDING\n\n /// The order has been stopped, and a trade is guaranteed for the order, usually at a stated price or better, but has not yet occurred. This state only occurs on rare occasions.\n STOPPED\n\n /// The order has been rejected, and no further updates will occur for the order. This state occurs on rare occasions and may occur based on various conditions decided by the exchanges.\n REJECTED\n\n /// The order has been suspended, and is not eligible for trading. This state only occurs on rare occasions.\n SUSPENDED\n\n /// The order has been completed for the day (either filled or done for day), but remaining settlement calculations are still pending. This state only occurs on rare occasions.\n CALCULATED\n}\n\n";
14
+ 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. Required if 'notional' is not provided. For 'MARKET' orders with 'timeInForce' set to 'DAY', 'qty' can be fractional.\n qty?: number;\n // Notional dollar amount to trade. Required if 'qty' is not provided. Only valid for 'MARKET' orders with 'timeInForce' set to 'DAY'.\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. Options are 'SIMPLE', 'BRACKET', 'OCO', 'OTO'. Default is 'SIMPLE'. For 'BRACKET' orders, 'takeProfit' and 'stopLoss' are required.\n orderClass: OrderClass;\n // Time in force for the order ('DAY', 'GTC', 'OPG', 'CLS', 'IOC', 'FOK').\n timeInForce: TimeInForce;\n // Limit price of the order. Required for 'LIMIT' and 'STOP_LIMIT' order types. Must be a positive number. For 'BUY' orders, 'limitPrice' represents the maximum price to pay; for 'SELL' orders, it represents the minimum price to accept.\n limitPrice?: number;\n // Stop price of the order. Required for 'STOP' and 'STOP_LIMIT' order types. Must be a positive number. For 'BUY' 'STOP_LIMIT' orders, 'stopPrice' must be less than or equal to 'limitPrice'. For 'SELL' 'STOP_LIMIT' orders, 'stopPrice' must be greater than or equal to 'limitPrice'.\n stopPrice?: number;\n // Stop loss object. Required for 'BRACKET' and 'OTO' order classes when setting a stop-loss order. For 'BUY' bracket orders, 'stopLoss.stopPrice' must be less than 'takeProfit.limitPrice'.\n stopLoss?: {\n // Must be a positive number. Price must be at a threshold to limit losses when the asset’s market price moves unfavourably beyond a specified point. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be ≥ basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n };\n // Take profit object. Required for 'BRACKET' and 'OTO' order classes when setting a take-profit order. For 'BUY' bracket orders, 'takeProfit.limitPrice' must be greater than 'stopLoss.stopPrice'.\n takeProfit?: {\n // Must be a positive number and ≥ base_price + 0.01, and is always greater than stopPrice. Price must be at a threshold to lock in profits when the asset’s market price moves favourably beyond a specified point.\n limitPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n };\n // Trail price for 'TRAILING_STOP' orders. Must be a positive number. Either 'trailPrice' or 'trailPercent' is required when 'type' is 'TRAILING_STOP'.\n trailPrice?: number;\n // Trail percent for 'TRAILING_STOP' orders. Must be a positive number. Either 'trailPrice' or 'trailPercent' is required when 'type' is 'TRAILING_STOP'.\n trailPercent?: number;\n // Whether the order is eligible for execution outside regular trading hours. Only valid for 'LIMIT' orders with 'timeInForce' set to 'DAY'. Defaults to false.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // The asset this order is for.\n asset: {\n symbol: string;\n name: string;\n type: AssetType;\n };\n // Strike price for option orders. Required when 'asset.type' is 'OPTION'. Must be a positive number.\n strikePrice?: number;\n // Expiration date for option orders. Required when 'asset.type' is 'OPTION'. Must be a valid date in the future.\n expirationDate?: Date;\n // Type of option contract ('CALL' or 'PUT'). Required when 'asset.type' is 'OPTION'.\n optionType?: OptionType;\n};\n\n";
15
15
  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. Price must be at a threshold to limit losses when the asset’s market price moves unfavourably beyond a specified point. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be ≥ basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n};\n\n";
16
16
  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, and is always greater than stopPrice. Price must be at a threshold to lock in profits when the asset’s market price moves favourably beyond a specified point.\n limitPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n};\n\n";
17
- 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};\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\n";
17
+ 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};\n\nenum AlertType {\n /// Indicates a successful operation or event.\n SUCCESS\n\n /// Represents a warning that requires attention.\n WARNING\n\n /// Signifies an error that needs to be addressed.\n ERROR\n\n /// Provides informational messages to the user.\n INFO\n}\n\n";
18
18
  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\n";
19
- 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 symbol: string;\n name: string;\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};\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";
20
- 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};\n\nexport enum EventImportance {\n LOW = \"LOW\",\n MEDIUM = \"MEDIUM\",\n HIGH = \"HIGH\"\n}\n\n";
19
+ 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 symbol: string;\n name: string;\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};\n\n";
20
+ 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};\n\nenum EventImportance {\n /// Low importance events with minimal impact.\n LOW\n\n /// Medium importance events with noticeable impact.\n MEDIUM\n\n /// High importance events with significant impact.\n HIGH\n}\n\n";
21
21
  readonly scheduledOptionOrder: "\nYour response should adhere to the following type definition for the \"ScheduledOptionOrder\" 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 ScheduledOptionOrder = {\n // Payload of the scheduled option order as a JSON object.\n payload: any;\n};\n\n";
22
22
  };
23
23
  export default typeStrings;
@@ -34,7 +34,7 @@ export declare class Action {
34
34
  */
35
35
  trade?: Trade;
36
36
  /**
37
- * The order associated with this action. GQL.EXCLUDE=['action', 'alpacaAccount'] TYPESTRING.INCLUDE=[\"qty\",\"notional\",\"side\",\"type\",\"orderClass\",\"timeInForce\",\"limitPrice\",\"stopPrice\",\"stopLoss\",\"takeProfit\",\"trailPrice\",\"trailPercent\",\"extendedHours\",\"status\",\"submittedAt\",\"strikePrice\",\"expirationDate\",\"optionType\"]
37
+ * The order associated with this action. GQL.EXCLUDE=['action', 'alpacaAccount'] TYPESTRING.INCLUDE=[\"qty\",\"notional\",\"side\",\"type\",\"orderClass\",\"timeInForce\",\"limitPrice\",\"stopPrice\",\"stopLoss\",\"takeProfit\",\"trailPrice\",\"trailPercent\",\"extendedHours\",\"status\",\"strikePrice\",\"expirationDate\",\"optionType\"]
38
38
  */
39
39
  order?: Order | null;
40
40
  }
@@ -81,7 +81,7 @@ __decorate([
81
81
  __decorate([
82
82
  TypeGraphQL.FieldResolver(_type => Order_1.Order, {
83
83
  nullable: true,
84
- description: "The order associated with this action. GQL.EXCLUDE=['action', 'alpacaAccount'] TYPESTRING.INCLUDE=[\"qty\",\"notional\",\"side\",\"type\",\"orderClass\",\"timeInForce\",\"limitPrice\",\"stopPrice\",\"stopLoss\",\"takeProfit\",\"trailPrice\",\"trailPercent\",\"extendedHours\",\"status\",\"submittedAt\",\"strikePrice\",\"expirationDate\",\"optionType\"]"
84
+ description: "The order associated with this action. GQL.EXCLUDE=['action', 'alpacaAccount'] TYPESTRING.INCLUDE=[\"qty\",\"notional\",\"side\",\"type\",\"orderClass\",\"timeInForce\",\"limitPrice\",\"stopPrice\",\"stopLoss\",\"takeProfit\",\"trailPrice\",\"trailPercent\",\"extendedHours\",\"status\",\"strikePrice\",\"expirationDate\",\"optionType\"]"
85
85
  }),
86
86
  __param(0, TypeGraphQL.Root()),
87
87
  __param(1, TypeGraphQL.Ctx()),
@@ -1 +1 @@
1
- {"version":3,"file":"ActionRelationsResolver.js","sourceRoot":"","sources":["../../../../../../src/generated/typegraphql-prisma/resolvers/relations/Action/ActionRelationsResolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAA4C;AAE5C,mDAAgD;AAChD,iDAA8C;AAC9C,iDAA8C;AAC9C,4DAAyD;AACzD,8CAAkI;AAG3H,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAK5B,AAAN,KAAK,CAAC,KAAK,CAAqB,MAAc,EAAqB,GAAQ,EAAsB,IAAwB;QACvH,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qCAA2B,EAAC,IAAI,CAAC,CAAC;QACrD,OAAO,IAAA,8BAAoB,EAAC,GAAG,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC;YACxD,KAAK,EAAE;gBACL,EAAE,EAAE,MAAM,CAAC,EAAE;aACd;SACF,CAAC,CAAC,KAAK,CAAC;YACP,GAAG,CAAC,MAAM,IAAI,IAAA,qDAA2C,EAAC,MAAM,CAAC,CAAC;SACnE,CAAC,CAAC;IACL,CAAC;IAMK,AAAN,KAAK,CAAC,KAAK,CAAqB,MAAc,EAAqB,GAAQ,EAAsB,IAAwB,EAAsB,IAAqB;QAClK,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qCAA2B,EAAC,IAAI,CAAC,CAAC;QACrD,OAAO,IAAA,8BAAoB,EAAC,GAAG,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC;YACxD,KAAK,EAAE;gBACL,EAAE,EAAE,MAAM,CAAC,EAAE;aACd;SACF,CAAC,CAAC,KAAK,CAAC;YACP,GAAG,IAAI;YACP,GAAG,CAAC,MAAM,IAAI,IAAA,qDAA2C,EAAC,MAAM,CAAC,CAAC;SACnE,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA/BY,0DAAuB;AAK5B;IAJL,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,aAAK,EAAE;QACzC,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,sEAAsE;KACpF,CAAC;IACW,WAAA,WAAW,CAAC,IAAI,EAAE,CAAA;IAAkB,WAAA,WAAW,CAAC,GAAG,EAAE,CAAA;IAAY,WAAA,WAAW,CAAC,IAAI,EAAE,CAAA;;qCAAxD,eAAM;;oDAS7C;AAMK;IAJL,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,aAAK,EAAE;QACzC,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,mWAAmW;KACjX,CAAC;IACW,WAAA,WAAW,CAAC,IAAI,EAAE,CAAA;IAAkB,WAAA,WAAW,CAAC,GAAG,EAAE,CAAA;IAAY,WAAA,WAAW,CAAC,IAAI,EAAE,CAAA;IAA4B,WAAA,WAAW,CAAC,IAAI,EAAE,CAAA;;qCAAtG,eAAM,kBAAuG,iCAAe;;oDAUnK;kCA9BU,uBAAuB;IADnC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,eAAM,CAAC;GACvB,uBAAuB,CA+BnC"}
1
+ {"version":3,"file":"ActionRelationsResolver.js","sourceRoot":"","sources":["../../../../../../src/generated/typegraphql-prisma/resolvers/relations/Action/ActionRelationsResolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0DAA4C;AAE5C,mDAAgD;AAChD,iDAA8C;AAC9C,iDAA8C;AAC9C,4DAAyD;AACzD,8CAAkI;AAG3H,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAK5B,AAAN,KAAK,CAAC,KAAK,CAAqB,MAAc,EAAqB,GAAQ,EAAsB,IAAwB;QACvH,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qCAA2B,EAAC,IAAI,CAAC,CAAC;QACrD,OAAO,IAAA,8BAAoB,EAAC,GAAG,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC;YACxD,KAAK,EAAE;gBACL,EAAE,EAAE,MAAM,CAAC,EAAE;aACd;SACF,CAAC,CAAC,KAAK,CAAC;YACP,GAAG,CAAC,MAAM,IAAI,IAAA,qDAA2C,EAAC,MAAM,CAAC,CAAC;SACnE,CAAC,CAAC;IACL,CAAC;IAMK,AAAN,KAAK,CAAC,KAAK,CAAqB,MAAc,EAAqB,GAAQ,EAAsB,IAAwB,EAAsB,IAAqB;QAClK,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,qCAA2B,EAAC,IAAI,CAAC,CAAC;QACrD,OAAO,IAAA,8BAAoB,EAAC,GAAG,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC;YACxD,KAAK,EAAE;gBACL,EAAE,EAAE,MAAM,CAAC,EAAE;aACd;SACF,CAAC,CAAC,KAAK,CAAC;YACP,GAAG,IAAI;YACP,GAAG,CAAC,MAAM,IAAI,IAAA,qDAA2C,EAAC,MAAM,CAAC,CAAC;SACnE,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA/BY,0DAAuB;AAK5B;IAJL,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,aAAK,EAAE;QACzC,QAAQ,EAAE,KAAK;QACf,WAAW,EAAE,sEAAsE;KACpF,CAAC;IACW,WAAA,WAAW,CAAC,IAAI,EAAE,CAAA;IAAkB,WAAA,WAAW,CAAC,GAAG,EAAE,CAAA;IAAY,WAAA,WAAW,CAAC,IAAI,EAAE,CAAA;;qCAAxD,eAAM;;oDAS7C;AAMK;IAJL,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,aAAK,EAAE;QACzC,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,mVAAmV;KACjW,CAAC;IACW,WAAA,WAAW,CAAC,IAAI,EAAE,CAAA;IAAkB,WAAA,WAAW,CAAC,GAAG,EAAE,CAAA;IAAY,WAAA,WAAW,CAAC,IAAI,EAAE,CAAA;IAA4B,WAAA,WAAW,CAAC,IAAI,EAAE,CAAA;;qCAAtG,eAAM,kBAAuG,iCAAe;;oDAUnK;kCA9BU,uBAAuB;IADnC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,eAAM,CAAC;GACvB,uBAAuB,CA+BnC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adaptic-backend",
3
- "version": "1.0.196",
3
+ "version": "1.0.197",
4
4
  "description": "Backend executable CRUD functions with dynamic variables construction, and type definitions for the Adaptic AI platform.",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",
@@ -1,2 +1,2 @@
1
- export declare const ActionTypeString = "\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 qty?: number;\n notional?: number;\n side: OrderSide;\n type: OrderType;\n orderClass: OrderClass;\n timeInForce: TimeInForce;\n limitPrice?: number;\n stopPrice?: number;\n stopLoss?: {\n // Must be a positive number. Price must be at a threshold to limit losses when the asset\u2019s market price moves unfavourably beyond a specified point. It must be \u2264 basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be \u2265 basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n };\n takeProfit?: {\n // Must be a positive number and \u2265 base_price + 0.01, and is always greater than stopPrice. Price must be at a threshold to lock in profits when the asset\u2019s market price moves favourably beyond a specified point.\n limitPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be \u2264 basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n };\n trailPrice?: number;\n trailPercent?: number;\n extendedHours?: boolean;\n status: OrderStatus;\n submittedAt?: Date;\n strikePrice?: number;\n expirationDate?: Date;\n optionType?: OptionType;\n };\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 CANCELED = \"CANCELED\"\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 HELD = \"HELD\",\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 OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n";
1
+ export declare const ActionTypeString = "\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 qty?: number;\n notional?: number;\n side: OrderSide;\n type: OrderType;\n orderClass: OrderClass;\n timeInForce: TimeInForce;\n limitPrice?: number;\n stopPrice?: number;\n stopLoss?: {\n // Must be a positive number. Price must be at a threshold to limit losses when the asset\u2019s market price moves unfavourably beyond a specified point. It must be \u2264 basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be \u2265 basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n };\n takeProfit?: {\n // Must be a positive number and \u2265 base_price + 0.01, and is always greater than stopPrice. Price must be at a threshold to lock in profits when the asset\u2019s market price moves favourably beyond a specified point.\n limitPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT. It must be \u2264 basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n };\n trailPrice?: number;\n trailPercent?: number;\n extendedHours?: boolean;\n status: OrderStatus;\n strikePrice?: number;\n expirationDate?: Date;\n optionType?: OptionType;\n };\n};\n\nenum OrderSide {\n /// Represents the buying side of a trade action.\n BUY\n\n /// Represents the selling side of a trade action.\n SELL\n}\n\nenum OrderType {\n /// Executes immediately at the best available current market price.\n MARKET\n\n /// Executes only at the specified limit price or better.\n LIMIT\n\n /// Becomes a market order once the stop price is triggered.\n STOP\n\n /// Becomes a limit order once the stop price is triggered.\n STOP_LIMIT\n\n /// Adjusts the stop price based on a specified trail amount or percentage.\n TRAILING_STOP\n}\n\nenum OrderClass {\n /// A single standalone order without additional conditions.\n SIMPLE\n\n /// A primary order with attached take-profit and stop-loss orders to automatically manage the trade.\n BRACKET\n\n /// OCO (One-Cancels-Other): A pair of orders where the execution of one cancels the other.\n OCO\n\n /// OSO (One Sends Other): A chain of orders where the execution of one order triggers the placement of another.\n OSO\n\n /// OTO (One-Triggers-Other): Similar to BRACKET, where the execution of one order triggers the placement of another.\n OTO\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nenum TimeInForce {\n /// The order is valid for the day and expires at market close.\n DAY\n\n /// The order is valid until canceled by the user.\n GTC\n\n /// The order is valid for the opening of the market.\n OPG\n\n /// The order is valid until the close of the market.\n CLS\n\n /// The order must be executed immediately or canceled.\n IOC\n\n /// The order must be executed immediately or canceled.\n FOK\n}\n\nenum OrderStatus {\n /// The order has been staged in Adaptic to be sent to Alpaca. This is the initial status.\n STAGED\n\n /// The order has been received by Alpaca, and routed to exchanges for execution. This is the usual initial state of an order after being received.\n NEW\n\n /// The order has been partially filled.\n PARTIALLY_FILLED\n\n /// The order has been filled, and no further updates will occur for the order.\n FILLED\n\n /// The order is done executing for the day, and will not receive further updates until the next trading day.\n DONE_FOR_DAY\n\n /// The order has been canceled, and no further updates will occur for the order. This can be either due to a cancel request by the user, or the order has been canceled by the exchanges due to its time-in-force.\n CANCELED\n\n /// The order has expired, and no further updates will occur for the order.\n EXPIRED\n\n /// The order is waiting to be triggered, usually for stop or stop-limit orders.\n HELD\n\n /// The order was replaced by another order, or was updated due to a market event such as corporate action.\n REPLACED\n\n /// The order is waiting to be canceled.\n PENDING_CANCEL\n\n /// The order is waiting to be replaced by another order. The order will reject cancel request while in this state.\n PENDING_REPLACE\n\n /// The order has been received by Alpaca, but hasn\u2019t yet been routed to the execution venue. This could be seen often outside of trading session hours.\n ACCEPTED\n\n /// The order has been received by Alpaca, and routed to the exchanges, but has not yet been accepted for execution. This state only occurs on rare occasions.\n PENDING_NEW\n\n /// The order has been received by exchanges, and is evaluated for pricing. This state only occurs on rare occasions.\n ACCEPTED_FOR_BIDDING\n\n /// The order has been stopped, and a trade is guaranteed for the order, usually at a stated price or better, but has not yet occurred. This state only occurs on rare occasions.\n STOPPED\n\n /// The order has been rejected, and no further updates will occur for the order. This state occurs on rare occasions and may occur based on various conditions decided by the exchanges.\n REJECTED\n\n /// The order has been suspended, and is not eligible for trading. This state only occurs on rare occasions.\n SUSPENDED\n\n /// The order has been completed for the day (either filled or done for day), but remaining settlement calculations are still pending. This state only occurs on rare occasions.\n CALCULATED\n}\n\n";
2
2
  //# sourceMappingURL=Action.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Action.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,siHA2H5B,CAAC"}
1
+ {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Action.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6jMAuK5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Action.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2H/B,CAAC"}
1
+ {"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Action.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuK/B,CAAC"}
@@ -40,85 +40,129 @@ export type Action = {
40
40
  trailPercent?: number;
41
41
  extendedHours?: boolean;
42
42
  status: OrderStatus;
43
- submittedAt?: Date;
44
43
  strikePrice?: number;
45
44
  expirationDate?: Date;
46
45
  optionType?: OptionType;
47
46
  };
48
47
  };
49
48
 
50
- export enum ActionType {
51
- BUY = "BUY",
52
- BUY_OPTION = "BUY_OPTION",
53
- EXERCISE_OPTION = "EXERCISE_OPTION",
54
- SELL = "SELL",
55
- CANCEL = "CANCEL",
56
- ADJUST = "ADJUST",
57
- HEDGE = "HEDGE"
58
- }
49
+ enum OrderSide {
50
+ /// Represents the buying side of a trade action.
51
+ BUY
59
52
 
60
- export enum ActionStatus {
61
- STAGED = "STAGED",
62
- EXECUTED = "EXECUTED",
63
- COMPLETED = "COMPLETED",
64
- CANCELED = "CANCELED"
53
+ /// Represents the selling side of a trade action.
54
+ SELL
65
55
  }
66
56
 
67
- export enum OrderSide {
68
- BUY = "BUY",
69
- SELL = "SELL"
70
- }
57
+ enum OrderType {
58
+ /// Executes immediately at the best available current market price.
59
+ MARKET
60
+
61
+ /// Executes only at the specified limit price or better.
62
+ LIMIT
63
+
64
+ /// Becomes a market order once the stop price is triggered.
65
+ STOP
71
66
 
72
- export enum OrderType {
73
- MARKET = "MARKET",
74
- LIMIT = "LIMIT",
75
- STOP = "STOP",
76
- STOP_LIMIT = "STOP_LIMIT",
77
- TRAILING_STOP = "TRAILING_STOP"
67
+ /// Becomes a limit order once the stop price is triggered.
68
+ STOP_LIMIT
69
+
70
+ /// Adjusts the stop price based on a specified trail amount or percentage.
71
+ TRAILING_STOP
78
72
  }
79
73
 
80
- export enum OrderClass {
81
- SIMPLE = "SIMPLE",
82
- BRACKET = "BRACKET",
83
- OCO = "OCO",
84
- OSO = "OSO",
85
- OTO = "OTO"
74
+ enum OrderClass {
75
+ /// A single standalone order without additional conditions.
76
+ SIMPLE
77
+
78
+ /// A primary order with attached take-profit and stop-loss orders to automatically manage the trade.
79
+ BRACKET
80
+
81
+ /// OCO (One-Cancels-Other): A pair of orders where the execution of one cancels the other.
82
+ OCO
83
+
84
+ /// OSO (One Sends Other): A chain of orders where the execution of one order triggers the placement of another.
85
+ OSO
86
+
87
+ /// OTO (One-Triggers-Other): Similar to BRACKET, where the execution of one order triggers the placement of another.
88
+ OTO
86
89
  }
87
90
 
88
91
  // Time in force enum (day, gtc, opg, cls, etc.).
89
- export enum TimeInForce {
90
- DAY = "DAY",
91
- GTC = "GTC",
92
- OPG = "OPG",
93
- CLS = "CLS",
94
- IOC = "IOC",
95
- FOK = "FOK"
96
- }
92
+ enum TimeInForce {
93
+ /// The order is valid for the day and expires at market close.
94
+ DAY
95
+
96
+ /// The order is valid until canceled by the user.
97
+ GTC
98
+
99
+ /// The order is valid for the opening of the market.
100
+ OPG
97
101
 
98
- export enum OrderStatus {
99
- STAGED = "STAGED",
100
- NEW = "NEW",
101
- PARTIALLY_FILLED = "PARTIALLY_FILLED",
102
- FILLED = "FILLED",
103
- DONE_FOR_DAY = "DONE_FOR_DAY",
104
- CANCELED = "CANCELED",
105
- EXPIRED = "EXPIRED",
106
- HELD = "HELD",
107
- REPLACED = "REPLACED",
108
- PENDING_CANCEL = "PENDING_CANCEL",
109
- PENDING_REPLACE = "PENDING_REPLACE",
110
- ACCEPTED = "ACCEPTED",
111
- PENDING_NEW = "PENDING_NEW",
112
- ACCEPTED_FOR_BIDDING = "ACCEPTED_FOR_BIDDING",
113
- STOPPED = "STOPPED",
114
- REJECTED = "REJECTED",
115
- SUSPENDED = "SUSPENDED",
116
- CALCULATED = "CALCULATED"
102
+ /// The order is valid until the close of the market.
103
+ CLS
104
+
105
+ /// The order must be executed immediately or canceled.
106
+ IOC
107
+
108
+ /// The order must be executed immediately or canceled.
109
+ FOK
117
110
  }
118
111
 
119
- export enum OptionType {
120
- CALL = "CALL",
121
- PUT = "PUT"
112
+ enum OrderStatus {
113
+ /// The order has been staged in Adaptic to be sent to Alpaca. This is the initial status.
114
+ STAGED
115
+
116
+ /// The order has been received by Alpaca, and routed to exchanges for execution. This is the usual initial state of an order after being received.
117
+ NEW
118
+
119
+ /// The order has been partially filled.
120
+ PARTIALLY_FILLED
121
+
122
+ /// The order has been filled, and no further updates will occur for the order.
123
+ FILLED
124
+
125
+ /// The order is done executing for the day, and will not receive further updates until the next trading day.
126
+ DONE_FOR_DAY
127
+
128
+ /// The order has been canceled, and no further updates will occur for the order. This can be either due to a cancel request by the user, or the order has been canceled by the exchanges due to its time-in-force.
129
+ CANCELED
130
+
131
+ /// The order has expired, and no further updates will occur for the order.
132
+ EXPIRED
133
+
134
+ /// The order is waiting to be triggered, usually for stop or stop-limit orders.
135
+ HELD
136
+
137
+ /// The order was replaced by another order, or was updated due to a market event such as corporate action.
138
+ REPLACED
139
+
140
+ /// The order is waiting to be canceled.
141
+ PENDING_CANCEL
142
+
143
+ /// The order is waiting to be replaced by another order. The order will reject cancel request while in this state.
144
+ PENDING_REPLACE
145
+
146
+ /// The order has been received by Alpaca, but hasn’t yet been routed to the execution venue. This could be seen often outside of trading session hours.
147
+ ACCEPTED
148
+
149
+ /// The order has been received by Alpaca, and routed to the exchanges, but has not yet been accepted for execution. This state only occurs on rare occasions.
150
+ PENDING_NEW
151
+
152
+ /// The order has been received by exchanges, and is evaluated for pricing. This state only occurs on rare occasions.
153
+ ACCEPTED_FOR_BIDDING
154
+
155
+ /// The order has been stopped, and a trade is guaranteed for the order, usually at a stated price or better, but has not yet occurred. This state only occurs on rare occasions.
156
+ STOPPED
157
+
158
+ /// The order has been rejected, and no further updates will occur for the order. This state occurs on rare occasions and may occur based on various conditions decided by the exchanges.
159
+ REJECTED
160
+
161
+ /// The order has been suspended, and is not eligible for trading. This state only occurs on rare occasions.
162
+ SUSPENDED
163
+
164
+ /// The order has been completed for the day (either filled or done for day), but remaining settlement calculations are still pending. This state only occurs on rare occasions.
165
+ CALCULATED
122
166
  }
123
167
 
124
168
  `;
@@ -1,2 +1,2 @@
1
- export declare const AlertTypeString = "\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};\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\n";
1
+ export declare const AlertTypeString = "\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};\n\nenum AlertType {\n /// Indicates a successful operation or event.\n SUCCESS\n\n /// Represents a warning that requires attention.\n WARNING\n\n /// Signifies an error that needs to be addressed.\n ERROR\n\n /// Provides informational messages to the user.\n INFO\n}\n\n";
2
2
  //# sourceMappingURL=Alert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Alert.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,2kBAqB3B,CAAC"}
1
+ {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Alert.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,quBA4B3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Alert.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAC"}
1
+ {"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../../../src/generated/typeStrings/Alert.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B9B,CAAC"}