adaptic-backend 1.0.190 → 1.0.191

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 (55) hide show
  1. package/generated/typeStrings/Action.cjs +7 -7
  2. package/generated/typeStrings/Action.d.ts +1 -1
  3. package/generated/typeStrings/Action.d.ts.map +1 -1
  4. package/generated/typeStrings/Order.cjs +7 -7
  5. package/generated/typeStrings/Order.d.ts +1 -1
  6. package/generated/typeStrings/Order.d.ts.map +1 -1
  7. package/generated/typeStrings/StopLoss.cjs +7 -7
  8. package/generated/typeStrings/StopLoss.d.ts +1 -1
  9. package/generated/typeStrings/StopLoss.d.ts.map +1 -1
  10. package/generated/typeStrings/TakeProfit.cjs +6 -6
  11. package/generated/typeStrings/TakeProfit.d.ts +1 -1
  12. package/generated/typeStrings/TakeProfit.d.ts.map +1 -1
  13. package/generated/typeStrings/Trade.cjs +7 -7
  14. package/generated/typeStrings/Trade.d.ts +1 -1
  15. package/generated/typeStrings/Trade.d.ts.map +1 -1
  16. package/generated/typeStrings/index.d.ts +5 -5
  17. package/generated/typegraphql-prisma/models/Order.cjs +2 -2
  18. package/generated/typegraphql-prisma/models/Order.d.ts +3 -3
  19. package/generated/typegraphql-prisma/models/Order.js.map +1 -1
  20. package/generated/typegraphql-prisma/models/StopLoss.cjs +2 -2
  21. package/generated/typegraphql-prisma/models/StopLoss.d.ts +2 -2
  22. package/generated/typegraphql-prisma/models/StopLoss.js.map +1 -1
  23. package/generated/typegraphql-prisma/models/TakeProfit.cjs +2 -2
  24. package/generated/typegraphql-prisma/models/TakeProfit.d.ts +2 -2
  25. package/generated/typegraphql-prisma/models/TakeProfit.js.map +1 -1
  26. package/generated/typegraphql-prisma/resolvers/relations/Order/OrderRelationsResolver.cjs +1 -1
  27. package/generated/typegraphql-prisma/resolvers/relations/Order/OrderRelationsResolver.js.map +1 -1
  28. package/package.json +1 -1
  29. package/server/generated/typeStrings/Action.d.ts +1 -1
  30. package/server/generated/typeStrings/Action.d.ts.map +1 -1
  31. package/server/generated/typeStrings/Action.mjs +7 -7
  32. package/server/generated/typeStrings/Order.d.ts +1 -1
  33. package/server/generated/typeStrings/Order.d.ts.map +1 -1
  34. package/server/generated/typeStrings/Order.mjs +7 -7
  35. package/server/generated/typeStrings/StopLoss.d.ts +1 -1
  36. package/server/generated/typeStrings/StopLoss.d.ts.map +1 -1
  37. package/server/generated/typeStrings/StopLoss.mjs +7 -7
  38. package/server/generated/typeStrings/TakeProfit.d.ts +1 -1
  39. package/server/generated/typeStrings/TakeProfit.d.ts.map +1 -1
  40. package/server/generated/typeStrings/TakeProfit.mjs +6 -6
  41. package/server/generated/typeStrings/Trade.d.ts +1 -1
  42. package/server/generated/typeStrings/Trade.d.ts.map +1 -1
  43. package/server/generated/typeStrings/Trade.mjs +7 -7
  44. package/server/generated/typeStrings/index.d.ts +5 -5
  45. package/server/generated/typegraphql-prisma/models/Order.d.ts +3 -3
  46. package/server/generated/typegraphql-prisma/models/Order.js.map +1 -1
  47. package/server/generated/typegraphql-prisma/models/Order.mjs +5 -5
  48. package/server/generated/typegraphql-prisma/models/StopLoss.d.ts +2 -2
  49. package/server/generated/typegraphql-prisma/models/StopLoss.js.map +1 -1
  50. package/server/generated/typegraphql-prisma/models/StopLoss.mjs +4 -4
  51. package/server/generated/typegraphql-prisma/models/TakeProfit.d.ts +2 -2
  52. package/server/generated/typegraphql-prisma/models/TakeProfit.js.map +1 -1
  53. package/server/generated/typegraphql-prisma/models/TakeProfit.mjs +4 -4
  54. package/server/generated/typegraphql-prisma/resolvers/relations/Order/OrderRelationsResolver.js.map +1 -1
  55. package/server/generated/typegraphql-prisma/resolvers/relations/Order/OrderRelationsResolver.mjs +1 -1
@@ -31,22 +31,22 @@ export type Action = {
31
31
  orderClass: OrderClass;
32
32
  // Time in force for the order (day, gtc, opg, cls, ioc, fok).
33
33
  timeInForce: TimeInForce;
34
- // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.
34
+ // Must be a positive number and required for LIMIT or STOP_LIMIT orders. It must be ≥ basePrice + 0.01, and should always be greater than stopPrice.
35
35
  limitPrice?: number;
36
- // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be ≤ basePrice - 0.01.
36
+ // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.
37
37
  stopPrice?: number;
38
38
  // Stop loss object required for bracket orders.
39
39
  stopLoss?: {
40
- // 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. For SELL orders: stopPrice ≤ market price (must be ≤ base_price - 0.01). For BUY orders: stopPrice ≥ market price (must be base_price + 0.01).
40
+ // 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.
41
41
  stopPrice?: number;
42
- // Must be a positive number and required if parent Order's type is STOP_LIMIT.
42
+ // 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.
43
43
  limitPrice?: number;
44
44
  };
45
- // Take profit object required for bracket orders.
45
+ // Take profit object required for bracket orders. For take_profit, must be ≥ base_price + 0.01.
46
46
  takeProfit?: {
47
- // Must be a positive number and ≥ base_price + 0.01.
47
+ // 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.
48
48
  limitPrice?: number;
49
- // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.
49
+ // 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.
50
50
  stopPrice?: number;
51
51
  };
52
52
  // Must be a positive number and required for TRAILING_STOP orders.
@@ -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 // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be \u2265 base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be \u2264 basePrice - 0.01.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\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. For SELL orders: stopPrice \u2264 market price (must be \u2264 base_price - 0.01). For BUY orders: stopPrice \u2265 market price (must be \u2265 base_price + 0.01).\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and \u2265 base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Total quantity of the order that was filled.\n filledQty?: number;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // Cancel requested at timestamp when the request to cancel an order was made.\n cancelRequestedAt?: Date;\n // CanceledAt timestamp when the order was canceled.\n canceledAt?: Date;\n // The asset this order is for.\n 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 // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\",\n 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 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";
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 // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. It must be \u2265 basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be \u2264 basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\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 // Take profit object required for bracket orders. For take_profit, must be \u2265 base_price + 0.01.\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 // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Total quantity of the order that was filled.\n filledQty?: number;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // Cancel requested at timestamp when the request to cancel an order was made.\n cancelRequestedAt?: Date;\n // CanceledAt timestamp when the order was canceled.\n canceledAt?: Date;\n // The asset this order is for.\n 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 // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum ActionType {\n BUY = \"BUY\",\n BUY_OPTION = \"BUY_OPTION\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum ActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\",\n 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 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";
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,m1LAyL5B,CAAC"}
1
+ {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Action.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,6pMAyL5B,CAAC"}
@@ -19,22 +19,22 @@ export type Order = {
19
19
  orderClass: OrderClass;
20
20
  // Time in force for the order (day, gtc, opg, cls, ioc, fok).
21
21
  timeInForce: TimeInForce;
22
- // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.
22
+ // Must be a positive number and required for LIMIT or STOP_LIMIT orders. It must be ≥ basePrice + 0.01, and should always be greater than stopPrice.
23
23
  limitPrice?: number;
24
- // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be ≤ basePrice - 0.01.
24
+ // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.
25
25
  stopPrice?: number;
26
26
  // Stop loss object required for bracket orders.
27
27
  stopLoss?: {
28
- // 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. For SELL orders: stopPrice ≤ market price (must be ≤ base_price - 0.01). For BUY orders: stopPrice ≥ market price (must be base_price + 0.01).
28
+ // 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.
29
29
  stopPrice?: number;
30
- // Must be a positive number and required if parent Order's type is STOP_LIMIT.
30
+ // 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.
31
31
  limitPrice?: number;
32
32
  };
33
- // Take profit object required for bracket orders.
33
+ // Take profit object required for bracket orders. For take_profit, must be ≥ base_price + 0.01.
34
34
  takeProfit?: {
35
- // Must be a positive number and ≥ base_price + 0.01.
35
+ // 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.
36
36
  limitPrice?: number;
37
- // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.
37
+ // 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.
38
38
  stopPrice?: number;
39
39
  };
40
40
  // Must be a positive number and required for TRAILING_STOP orders.
@@ -1,2 +1,2 @@
1
- export declare const OrderTypeString = "\nYour response should adhere to the following type definition for the \"Order\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Order = {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be \u2265 base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be \u2264 basePrice - 0.01.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\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. For SELL orders: stopPrice \u2264 market price (must be \u2264 base_price - 0.01). For BUY orders: stopPrice \u2265 market price (must be \u2265 base_price + 0.01).\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and \u2265 base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Total quantity of the order that was filled.\n filledQty?: number;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // Cancel requested at timestamp when the request to cancel an order was made.\n cancelRequestedAt?: Date;\n // CanceledAt timestamp when the order was canceled.\n canceledAt?: Date;\n // The asset this order is for.\n 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 // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n 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";
1
+ export declare const OrderTypeString = "\nYour response should adhere to the following type definition for the \"Order\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Order = {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. It must be \u2265 basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be \u2264 basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\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 // Take profit object required for bracket orders. For take_profit, must be \u2265 base_price + 0.01.\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 // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Total quantity of the order that was filled.\n filledQty?: number;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // Cancel requested at timestamp when the request to cancel an order was made.\n cancelRequestedAt?: Date;\n // CanceledAt timestamp when the order was canceled.\n canceledAt?: Date;\n // The asset this order is for.\n 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 // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n 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";
2
2
  //# sourceMappingURL=Order.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Order.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,g9JA2J3B,CAAC"}
1
+ {"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Order.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,0xKA2J3B,CAAC"}
@@ -7,9 +7,9 @@ Your response should adhere to the following type definition for the "StopLoss"
7
7
  Importantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).
8
8
 
9
9
  export type StopLoss = {
10
- // 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. For SELL orders: stopPrice ≤ market price (must be ≤ base_price - 0.01). For BUY orders: stopPrice ≥ market price (must be base_price + 0.01).
10
+ // 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.
11
11
  stopPrice?: number;
12
- // Must be a positive number and required if parent Order's type is STOP_LIMIT.
12
+ // 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.
13
13
  limitPrice?: number;
14
14
  // An order that is associated with this stop loss.
15
15
  Order: {
@@ -25,15 +25,15 @@ export type StopLoss = {
25
25
  orderClass: OrderClass;
26
26
  // Time in force for the order (day, gtc, opg, cls, ioc, fok).
27
27
  timeInForce: TimeInForce;
28
- // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.
28
+ // Must be a positive number and required for LIMIT or STOP_LIMIT orders. It must be ≥ basePrice + 0.01, and should always be greater than stopPrice.
29
29
  limitPrice?: number;
30
- // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be ≤ basePrice - 0.01.
30
+ // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.
31
31
  stopPrice?: number;
32
- // Take profit object required for bracket orders.
32
+ // Take profit object required for bracket orders. For take_profit, must be ≥ base_price + 0.01.
33
33
  takeProfit?: {
34
- // Must be a positive number and ≥ base_price + 0.01.
34
+ // 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.
35
35
  limitPrice?: number;
36
- // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.
36
+ // 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.
37
37
  stopPrice?: number;
38
38
  };
39
39
  // Must be a positive number and required for TRAILING_STOP orders.
@@ -1,2 +1,2 @@
1
- export declare const StopLossTypeString = "\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\u2019s market price moves unfavourably beyond a specified point. For SELL orders: stopPrice \u2264 market price (must be \u2264 base_price - 0.01). For BUY orders: stopPrice \u2265 market price (must be \u2265 base_price + 0.01).\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n // An order that is associated with this stop loss.\n Order: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be \u2265 base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be \u2264 basePrice - 0.01.\n stopPrice?: number;\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and \u2265 base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Total quantity of the order that was filled.\n filledQty?: number;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // Cancel requested at timestamp when the request to cancel an order was made.\n cancelRequestedAt?: Date;\n // CanceledAt timestamp when the order was canceled.\n canceledAt?: Date;\n // The asset this order is for.\n 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 // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n 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";
1
+ export declare const StopLossTypeString = "\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\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 // An order that is associated with this stop loss.\n Order: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. It must be \u2265 basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be \u2264 basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Take profit object required for bracket orders. For take_profit, must be \u2265 base_price + 0.01.\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 // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Total quantity of the order that was filled.\n filledQty?: number;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // Cancel requested at timestamp when the request to cancel an order was made.\n cancelRequestedAt?: Date;\n // CanceledAt timestamp when the order was canceled.\n canceledAt?: Date;\n // The asset this order is for.\n 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 // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n 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";
2
2
  //# sourceMappingURL=StopLoss.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StopLoss.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/StopLoss.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,qkKA2J9B,CAAC"}
1
+ {"version":3,"file":"StopLoss.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/StopLoss.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,+4KA2J9B,CAAC"}
@@ -7,9 +7,9 @@ Your response should adhere to the following type definition for the "TakeProfit
7
7
  Importantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).
8
8
 
9
9
  export type TakeProfit = {
10
- // Must be a positive number and ≥ base_price + 0.01.
10
+ // 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.
11
11
  limitPrice?: number;
12
- // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.
12
+ // 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.
13
13
  stopPrice?: number;
14
14
  // An order that is associated with this take profit.
15
15
  Order: {
@@ -25,15 +25,15 @@ export type TakeProfit = {
25
25
  orderClass: OrderClass;
26
26
  // Time in force for the order (day, gtc, opg, cls, ioc, fok).
27
27
  timeInForce: TimeInForce;
28
- // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.
28
+ // Must be a positive number and required for LIMIT or STOP_LIMIT orders. It must be ≥ basePrice + 0.01, and should always be greater than stopPrice.
29
29
  limitPrice?: number;
30
- // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be ≤ basePrice - 0.01.
30
+ // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.
31
31
  stopPrice?: number;
32
32
  // Stop loss object required for bracket orders.
33
33
  stopLoss?: {
34
- // 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. For SELL orders: stopPrice ≤ market price (must be ≤ base_price - 0.01). For BUY orders: stopPrice ≥ market price (must be base_price + 0.01).
34
+ // 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.
35
35
  stopPrice?: number;
36
- // Must be a positive number and required if parent Order's type is STOP_LIMIT.
36
+ // 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.
37
37
  limitPrice?: number;
38
38
  };
39
39
  // Must be a positive number and required for TRAILING_STOP orders.
@@ -1,2 +1,2 @@
1
- export declare const TakeProfitTypeString = "\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 \u2265 base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n // An order that is associated with this take profit.\n Order: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be \u2265 base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be \u2264 basePrice - 0.01.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\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. For SELL orders: stopPrice \u2264 market price (must be \u2264 base_price - 0.01). For BUY orders: stopPrice \u2265 market price (must be \u2265 base_price + 0.01).\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Total quantity of the order that was filled.\n filledQty?: number;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // Cancel requested at timestamp when the request to cancel an order was made.\n cancelRequestedAt?: Date;\n // CanceledAt timestamp when the order was canceled.\n canceledAt?: Date;\n // The asset this order is for.\n 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 // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n 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";
1
+ export declare const TakeProfitTypeString = "\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 \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 // An order that is associated with this take profit.\n Order: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. It must be \u2265 basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be \u2264 basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\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 // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Total quantity of the order that was filled.\n filledQty?: number;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // Cancel requested at timestamp when the request to cancel an order was made.\n cancelRequestedAt?: Date;\n // CanceledAt timestamp when the order was canceled.\n canceledAt?: Date;\n // The asset this order is for.\n 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 // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n};\nexport enum OrderSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\",\n TRAILING_STOP = \"TRAILING_STOP\"\n}\n\nexport enum OrderClass {\n SIMPLE = \"SIMPLE\",\n BRACKET = \"BRACKET\",\n OCO = \"OCO\",\n OSO = \"OSO\",\n OTO = \"OTO\"\n}\n\n// Time in force enum (day, gtc, opg, cls, etc.).\nexport enum TimeInForce {\n DAY = \"DAY\",\n GTC = \"GTC\",\n OPG = \"OPG\",\n CLS = \"CLS\",\n IOC = \"IOC\",\n FOK = \"FOK\"\n}\n\nexport enum OrderStatus {\n STAGED = \"STAGED\",\n NEW = \"NEW\",\n PARTIALLY_FILLED = \"PARTIALLY_FILLED\",\n FILLED = \"FILLED\",\n DONE_FOR_DAY = \"DONE_FOR_DAY\",\n CANCELED = \"CANCELED\",\n EXPIRED = \"EXPIRED\",\n 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";
2
2
  //# sourceMappingURL=TakeProfit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TakeProfit.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/TakeProfit.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,ukKA2JhC,CAAC"}
1
+ {"version":3,"file":"TakeProfit.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/TakeProfit.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,81KA2JhC,CAAC"}
@@ -60,22 +60,22 @@ export type Trade = {
60
60
  orderClass: OrderClass;
61
61
  // Time in force for the order (day, gtc, opg, cls, ioc, fok).
62
62
  timeInForce: TimeInForce;
63
- // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be ≥ base_price + 0.01.
63
+ // Must be a positive number and required for LIMIT or STOP_LIMIT orders. It must be ≥ basePrice + 0.01, and should always be greater than stopPrice.
64
64
  limitPrice?: number;
65
- // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be ≤ basePrice - 0.01.
65
+ // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be ≤ basePrice - 0.01, and should always be less than limitPrice.
66
66
  stopPrice?: number;
67
67
  // Stop loss object required for bracket orders.
68
68
  stopLoss?: {
69
- // 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. For SELL orders: stopPrice ≤ market price (must be ≤ base_price - 0.01). For BUY orders: stopPrice ≥ market price (must be base_price + 0.01).
69
+ // 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.
70
70
  stopPrice?: number;
71
- // Must be a positive number and required if parent Order's type is STOP_LIMIT.
71
+ // 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.
72
72
  limitPrice?: number;
73
73
  };
74
- // Take profit object required for bracket orders.
74
+ // Take profit object required for bracket orders. For take_profit, must be ≥ base_price + 0.01.
75
75
  takeProfit?: {
76
- // Must be a positive number and ≥ base_price + 0.01.
76
+ // 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.
77
77
  limitPrice?: number;
78
- // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.
78
+ // 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.
79
79
  stopPrice?: number;
80
80
  };
81
81
  // Must be a positive number and required for TRAILING_STOP orders.
@@ -1,2 +1,2 @@
1
- export declare const TradeTypeString = "\nYour response should adhere to the following type definition for the \"Trade\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Trade = {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model.\n asset: {\n // Ticker symbol of the asset\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 // List of actions associated with this trade.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action.\n order?: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. For take_profit, must be \u2265 base_price + 0.01.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be \u2264 basePrice - 0.01.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\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. For SELL orders: stopPrice \u2264 market price (must be \u2264 base_price - 0.01). For BUY orders: stopPrice \u2265 market price (must be \u2265 base_price + 0.01).\n stopPrice?: number;\n // Must be a positive number and required if parent Order's type is STOP_LIMIT.\n limitPrice?: number;\n };\n // Take profit object required for bracket orders.\n takeProfit?: {\n // Must be a positive number and \u2265 base_price + 0.01.\n limitPrice?: number;\n // Typically not used in standard take profit orders. If used, must comply with Alpaca's specific requirements.\n stopPrice?: number;\n };\n // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Total quantity of the order that was filled.\n filledQty?: number;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // Cancel requested at timestamp when the request to cancel an order was made.\n cancelRequestedAt?: Date;\n // CanceledAt timestamp when the order was canceled.\n canceledAt?: Date;\n // The asset this order is for.\n 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 // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n }[];\n};\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\",\n 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\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\n";
1
+ export declare const TradeTypeString = "\nYour response should adhere to the following type definition for the \"Trade\" type.\n\nImportantly, DO NOT include any annotations in your response (i.e., remove the ones we have provided for your reference below).\n\nexport type Trade = {\n // Quantity of the asset being traded.\n qty: number;\n // Price at which the asset was traded.\n price: number;\n // Total value of the trade (qty * price).\n total: number;\n // Option Type (CALL or PUT) if the asset is an option.\n optionType?: OptionType;\n // Signal that triggered the trade.\n signal: TradeSignal;\n // Strategy used to execute the trade.\n strategy: TradeStrategy;\n // summary of the trade decision (this should be a short description of the trade).\n summary: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the Asset model.\n asset: {\n // Ticker symbol of the asset\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 // List of actions associated with this trade.\n actions: {\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by ActionType enum.\n type: ActionType;\n // Additional notes or comments about the action.\n note: string;\n // Current status of the trade action.\n status: ActionStatus;\n // Fees associated with the action.\n fee?: number;\n // The order associated with this action.\n order?: {\n // Quantity of the asset to be ordered.\n qty?: number;\n // Notional value of the order. Optional, used if qty is not provided. But importantly, either qty or notional must be provided.\n notional?: number;\n // Side of the order (BUY or SELL).\n side: OrderSide;\n // Type of order (market, limit, stop, stop_limit, trailing_stop).\n type: OrderType;\n // Order class for advanced order types (simple, bracket, oco, oso).\n orderClass: OrderClass;\n // Time in force for the order (day, gtc, opg, cls, ioc, fok).\n timeInForce: TimeInForce;\n // Must be a positive number and required for LIMIT or STOP_LIMIT orders. It must be \u2265 basePrice + 0.01, and should always be greater than stopPrice.\n limitPrice?: number;\n // Must be a positive number and required for STOP or STOP_LIMIT orders. It must be \u2264 basePrice - 0.01, and should always be less than limitPrice.\n stopPrice?: number;\n // Stop loss object required for bracket orders.\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 // Take profit object required for bracket orders. For take_profit, must be \u2265 base_price + 0.01.\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 // Must be a positive number and required for TRAILING_STOP orders.\n trailPrice?: number;\n // Must be a positive number representing the percentage and required for TRAILING_STOP orders.\n trailPercent?: number;\n // Whether the order is eligible for extended hours.\n extendedHours?: boolean;\n // Current status of the order.\n status: OrderStatus;\n // Timestamp when the order was submitted.\n submittedAt?: Date;\n // Timestamp when the order was filled.\n filledAt?: Date;\n // Total quantity of the order that was filled.\n filledQty?: number;\n // Average price at which the order was filled.\n filledAvgPrice?: number;\n // Cancel requested at timestamp when the request to cancel an order was made.\n cancelRequestedAt?: Date;\n // CanceledAt timestamp when the order was canceled.\n canceledAt?: Date;\n // The asset this order is for.\n 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 // Fee associated with the order.\n fee?: number;\n // Strike price for option orders.\n strikePrice?: number;\n // Expiration date for option orders.\n expirationDate?: Date;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n };\n }[];\n};\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeSignal {\n GOLDEN_CROSS = \"GOLDEN_CROSS\",\n MOVING_AVERAGE_CROSSOVER = \"MOVING_AVERAGE_CROSSOVER\",\n RSI_OVERBOUGHT = \"RSI_OVERBOUGHT\",\n RSI_OVERSOLD = \"RSI_OVERSOLD\",\n MACD_CROSSOVER = \"MACD_CROSSOVER\",\n BOLLINGER_BANDS_BREAKOUT = \"BOLLINGER_BANDS_BREAKOUT\",\n TREND_REVERSAL = \"TREND_REVERSAL\",\n VOLATILITY_SPIKE = \"VOLATILITY_SPIKE\",\n PRICE_ACTION = \"PRICE_ACTION\",\n IMPLIED_VOLATILITY_SURGE = \"IMPLIED_VOLATILITY_SURGE\",\n BREAKOUT_ABOVE_RESISTANCE = \"BREAKOUT_ABOVE_RESISTANCE\",\n BREAKDOWN_BELOW_SUPPORT = \"BREAKDOWN_BELOW_SUPPORT\",\n SUPPORT_LEVEL_HOLD = \"SUPPORT_LEVEL_HOLD\",\n RESISTANCE_LEVEL_HOLD = \"RESISTANCE_LEVEL_HOLD\",\n FIBONACCI_RETRACEMENT = \"FIBONACCI_RETRACEMENT\",\n ELLIOTT_WAVE = \"ELLIOTT_WAVE\",\n PARABOLIC_SAR = \"PARABOLIC_SAR\",\n ADX_TREND_STRENGTH = \"ADX_TREND_STRENGTH\",\n CCI_OVERBOUGHT = \"CCI_OVERBOUGHT\",\n CCI_OVERSOLD = \"CCI_OVERSOLD\",\n STOCHASTIC_OVERSOLD = \"STOCHASTIC_OVERSOLD\",\n STOCHASTIC_OVERBOUGHT = \"STOCHASTIC_OVERBOUGHT\",\n DIVERGENCE_SIGNAL = \"DIVERGENCE_SIGNAL\",\n GANN_FAN = \"GANN_FAN\",\n DONCHIAN_CHANNEL_BREAKOUT = \"DONCHIAN_CHANNEL_BREAKOUT\",\n PIVOT_POINT = \"PIVOT_POINT\",\n KELTNER_CHANNEL_BREAK = \"KELTNER_CHANNEL_BREAK\",\n HEIKIN_ASHI_CROSSOVER = \"HEIKIN_ASHI_CROSSOVER\",\n VOLUME_SURGE = \"VOLUME_SURGE\",\n ORDER_BOOK_IMBALANCE = \"ORDER_BOOK_IMBALANCE\",\n TIME_SERIES_ANOMALY = \"TIME_SERIES_ANOMALY\",\n MEAN_REVERSION_LEVEL = \"MEAN_REVERSION_LEVEL\",\n PAIR_TRADING_SIGNAL = \"PAIR_TRADING_SIGNAL\",\n SENTIMENT_SCORE_THRESHOLD = \"SENTIMENT_SCORE_THRESHOLD\",\n NEWS_SENTIMENT_CHANGE = \"NEWS_SENTIMENT_CHANGE\",\n ORDER_FLOW_IMPACT = \"ORDER_FLOW_IMPACT\",\n LIQUIDITY_DRIVEN_MOVE = \"LIQUIDITY_DRIVEN_MOVE\",\n MACHINE_LEARNING_PREDICTION = \"MACHINE_LEARNING_PREDICTION\",\n SENTIMENT_ANALYSIS_TRIGGER = \"SENTIMENT_ANALYSIS_TRIGGER\",\n NO_SIGNAL = \"NO_SIGNAL\"\n}\n\nexport enum TradeStrategy {\n TECHNICAL_ANALYSIS = \"TECHNICAL_ANALYSIS\",\n TREND_FOLLOWING = \"TREND_FOLLOWING\",\n MEAN_REVERSION = \"MEAN_REVERSION\",\n OPTIONS_STRATEGY = \"OPTIONS_STRATEGY\",\n MOMENTUM_STRATEGY = \"MOMENTUM_STRATEGY\",\n ARBITRAGE = \"ARBITRAGE\",\n STATISTICAL_ARBITRAGE = \"STATISTICAL_ARBITRAGE\",\n MARKET_MAKING = \"MARKET_MAKING\",\n NEWS_BASED_STRATEGY = \"NEWS_BASED_STRATEGY\",\n SENTIMENT_ANALYSIS = \"SENTIMENT_ANALYSIS\",\n LIQUIDITY_PROVISION = \"LIQUIDITY_PROVISION\",\n SCALPING = \"SCALPING\",\n VOLATILITY_TRADING = \"VOLATILITY_TRADING\",\n EVENT_DRIVEN = \"EVENT_DRIVEN\",\n BREAKOUT_STRATEGY = \"BREAKOUT_STRATEGY\",\n ORDER_FLOW_TRADING = \"ORDER_FLOW_TRADING\",\n PAIR_TRADING = \"PAIR_TRADING\",\n SECTOR_ROTATION = \"SECTOR_ROTATION\",\n HIGH_FREQUENCY_TRADING = \"HIGH_FREQUENCY_TRADING\",\n MACHINE_VISION_ANALYSIS = \"MACHINE_VISION_ANALYSIS\",\n NO_STRATEGY = \"NO_STRATEGY\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\",\n 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\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\n";
2
2
  //# sourceMappingURL=Trade.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Trade.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Trade.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,i6TAkS3B,CAAC"}
1
+ {"version":3,"file":"Trade.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Trade.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,2uUAkS3B,CAAC"}