adaptic-backend 1.0.63 → 1.0.64
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.
- package/README.md +1 -1
- package/generated/typeStrings/Account.cjs +2 -2
- package/generated/typeStrings/Account.d.ts +1 -1
- package/generated/typeStrings/Account.d.ts.map +1 -1
- package/generated/typeStrings/Action.cjs +2 -2
- package/generated/typeStrings/Action.d.ts +1 -1
- package/generated/typeStrings/Action.d.ts.map +1 -1
- package/generated/typeStrings/Alert.cjs +2 -2
- package/generated/typeStrings/Alert.d.ts +1 -1
- package/generated/typeStrings/Alert.d.ts.map +1 -1
- package/generated/typeStrings/AlpacaAccount.cjs +2 -2
- package/generated/typeStrings/AlpacaAccount.d.ts +1 -1
- package/generated/typeStrings/AlpacaAccount.d.ts.map +1 -1
- package/generated/typeStrings/Asset.cjs +2 -2
- package/generated/typeStrings/Asset.d.ts +1 -1
- package/generated/typeStrings/Asset.d.ts.map +1 -1
- package/generated/typeStrings/Authenticator.cjs +2 -2
- package/generated/typeStrings/Authenticator.d.ts +1 -1
- package/generated/typeStrings/Authenticator.d.ts.map +1 -1
- package/generated/typeStrings/Customer.cjs +2 -2
- package/generated/typeStrings/Customer.d.ts +1 -1
- package/generated/typeStrings/Customer.d.ts.map +1 -1
- package/generated/typeStrings/NewsArticle.cjs +2 -2
- package/generated/typeStrings/NewsArticle.d.ts +1 -1
- package/generated/typeStrings/NewsArticle.d.ts.map +1 -1
- package/generated/typeStrings/NewsArticleAssetSentiment.cjs +2 -2
- package/generated/typeStrings/NewsArticleAssetSentiment.d.ts +1 -1
- package/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/generated/typeStrings/Order.cjs +2 -2
- package/generated/typeStrings/Order.d.ts +1 -1
- package/generated/typeStrings/Order.d.ts.map +1 -1
- package/generated/typeStrings/Position.cjs +2 -2
- package/generated/typeStrings/Position.d.ts +1 -1
- package/generated/typeStrings/Position.d.ts.map +1 -1
- package/generated/typeStrings/Session.cjs +2 -2
- package/generated/typeStrings/Session.d.ts +1 -1
- package/generated/typeStrings/Session.d.ts.map +1 -1
- package/generated/typeStrings/Trade.cjs +3 -3
- package/generated/typeStrings/Trade.d.ts +1 -1
- package/generated/typeStrings/Trade.d.ts.map +1 -1
- package/generated/typeStrings/User.cjs +2 -2
- package/generated/typeStrings/User.d.ts +1 -1
- package/generated/typeStrings/User.d.ts.map +1 -1
- package/generated/typeStrings/enums.cjs +6 -6
- package/generated/typeStrings/enums.d.ts +1 -1
- package/generated/typeStrings/enums.d.ts.map +1 -1
- package/generated/typeStrings/enums.js.map +1 -1
- package/generated/typeStrings/index.d.ts +14 -14
- package/generated/typegraphql-prisma/enhance.cjs +5 -5
- package/generated/typegraphql-prisma/enhance.js.map +1 -1
- package/generated/typegraphql-prisma/enums/{OptionType.cjs → OptionContractType.cjs} +9 -9
- package/generated/typegraphql-prisma/enums/OptionContractType.d.ts +5 -0
- package/generated/typegraphql-prisma/enums/OptionContractType.d.ts.map +1 -0
- package/generated/typegraphql-prisma/enums/OptionContractType.js.map +1 -0
- package/generated/typegraphql-prisma/enums/index.cjs +3 -3
- package/generated/typegraphql-prisma/enums/index.d.ts +1 -1
- package/generated/typegraphql-prisma/enums/index.d.ts.map +1 -1
- package/generated/typegraphql-prisma/enums/index.js.map +1 -1
- package/generated/typegraphql-prisma/models/Trade.cjs +2 -2
- package/generated/typegraphql-prisma/models/Trade.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/{NestedEnumOptionTypeNullableFilter.cjs → EnumOptionContractTypeNullableFilter.cjs} +17 -16
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableFilter.d.ts +8 -0
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableFilter.d.ts.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableFilter.js.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/{NestedEnumOptionTypeNullableWithAggregatesFilter.cjs → EnumOptionContractTypeNullableWithAggregatesFilter.cjs} +23 -22
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableWithAggregatesFilter.d.ts +13 -0
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableWithAggregatesFilter.d.ts.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableWithAggregatesFilter.js.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/{EnumOptionTypeNullableFilter.cjs → NestedEnumOptionContractTypeNullableFilter.cjs} +16 -17
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableFilter.d.ts +7 -0
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableFilter.d.ts.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableFilter.js.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/{EnumOptionTypeNullableWithAggregatesFilter.cjs → NestedEnumOptionContractTypeNullableWithAggregatesFilter.cjs} +22 -23
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableWithAggregatesFilter.d.ts +12 -0
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableWithAggregatesFilter.d.ts.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableWithAggregatesFilter.js.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/{NullableEnumOptionTypeFieldUpdateOperationsInput.cjs → NullableEnumOptionContractTypeFieldUpdateOperationsInput.cjs} +10 -10
- package/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionContractTypeFieldUpdateOperationsInput.d.ts +4 -0
- package/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionContractTypeFieldUpdateOperationsInput.d.ts.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionContractTypeFieldUpdateOperationsInput.js.map +1 -0
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyAlpacaAccountInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyAlpacaAccountInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyAssetInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyAssetInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutActionsInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutActionsInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutAlpacaAccountInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutAlpacaAccountInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutAssetInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutAssetInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereWithAggregatesInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereWithAggregatesInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereWithAggregatesInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereWithAggregatesInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateManyMutationInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateManyMutationInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateManyMutationInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateManyMutationInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutActionsInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutActionsInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutActionsInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutActionsInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAlpacaAccountInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAlpacaAccountInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAlpacaAccountInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAlpacaAccountInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAssetInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAssetInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAssetInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAssetInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeWhereInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeWhereInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeWhereInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeWhereInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeWhereUniqueInput.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeWhereUniqueInput.d.ts +2 -2
- package/generated/typegraphql-prisma/resolvers/inputs/TradeWhereUniqueInput.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/TradeWhereUniqueInput.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/index.cjs +13 -13
- package/generated/typegraphql-prisma/resolvers/inputs/index.d.ts +5 -5
- package/generated/typegraphql-prisma/resolvers/inputs/index.d.ts.map +1 -1
- package/generated/typegraphql-prisma/resolvers/inputs/index.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/CreateManyTradeAndReturnOutputType.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/outputs/CreateManyTradeAndReturnOutputType.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/TradeGroupBy.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/outputs/TradeGroupBy.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/TradeMaxAggregate.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/outputs/TradeMaxAggregate.js.map +1 -1
- package/generated/typegraphql-prisma/resolvers/outputs/TradeMinAggregate.cjs +2 -2
- package/generated/typegraphql-prisma/resolvers/outputs/TradeMinAggregate.js.map +1 -1
- package/package.json +1 -1
- package/server/generated/typeStrings/Account.d.ts +1 -1
- package/server/generated/typeStrings/Account.d.ts.map +1 -1
- package/server/generated/typeStrings/Account.mjs +2 -2
- package/server/generated/typeStrings/Action.d.ts +1 -1
- package/server/generated/typeStrings/Action.d.ts.map +1 -1
- package/server/generated/typeStrings/Action.mjs +2 -2
- package/server/generated/typeStrings/Alert.d.ts +1 -1
- package/server/generated/typeStrings/Alert.d.ts.map +1 -1
- package/server/generated/typeStrings/Alert.mjs +2 -2
- package/server/generated/typeStrings/AlpacaAccount.d.ts +1 -1
- package/server/generated/typeStrings/AlpacaAccount.d.ts.map +1 -1
- package/server/generated/typeStrings/AlpacaAccount.mjs +2 -2
- package/server/generated/typeStrings/Asset.d.ts +1 -1
- package/server/generated/typeStrings/Asset.d.ts.map +1 -1
- package/server/generated/typeStrings/Asset.mjs +2 -2
- package/server/generated/typeStrings/Authenticator.d.ts +1 -1
- package/server/generated/typeStrings/Authenticator.d.ts.map +1 -1
- package/server/generated/typeStrings/Authenticator.mjs +2 -2
- package/server/generated/typeStrings/Customer.d.ts +1 -1
- package/server/generated/typeStrings/Customer.d.ts.map +1 -1
- package/server/generated/typeStrings/Customer.mjs +2 -2
- package/server/generated/typeStrings/NewsArticle.d.ts +1 -1
- package/server/generated/typeStrings/NewsArticle.d.ts.map +1 -1
- package/server/generated/typeStrings/NewsArticle.mjs +2 -2
- package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts +1 -1
- package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -1
- package/server/generated/typeStrings/NewsArticleAssetSentiment.mjs +2 -2
- package/server/generated/typeStrings/Order.d.ts +1 -1
- package/server/generated/typeStrings/Order.d.ts.map +1 -1
- package/server/generated/typeStrings/Order.mjs +2 -2
- package/server/generated/typeStrings/Position.d.ts +1 -1
- package/server/generated/typeStrings/Position.d.ts.map +1 -1
- package/server/generated/typeStrings/Position.mjs +2 -2
- package/server/generated/typeStrings/Session.d.ts +1 -1
- package/server/generated/typeStrings/Session.d.ts.map +1 -1
- package/server/generated/typeStrings/Session.mjs +2 -2
- package/server/generated/typeStrings/Trade.d.ts +1 -1
- package/server/generated/typeStrings/Trade.d.ts.map +1 -1
- package/server/generated/typeStrings/Trade.mjs +3 -3
- package/server/generated/typeStrings/User.d.ts +1 -1
- package/server/generated/typeStrings/User.d.ts.map +1 -1
- package/server/generated/typeStrings/User.mjs +2 -2
- package/server/generated/typeStrings/enums.d.ts +1 -1
- package/server/generated/typeStrings/enums.d.ts.map +1 -1
- package/server/generated/typeStrings/enums.js.map +1 -1
- package/server/generated/typeStrings/enums.mjs +5 -5
- package/server/generated/typeStrings/index.d.ts +14 -14
- package/server/generated/typegraphql-prisma/enhance.js.map +1 -1
- package/server/generated/typegraphql-prisma/enhance.mjs +5 -5
- package/server/generated/typegraphql-prisma/enums/OptionContractType.d.ts +5 -0
- package/server/generated/typegraphql-prisma/enums/OptionContractType.d.ts.map +1 -0
- package/server/generated/typegraphql-prisma/enums/OptionContractType.js.map +1 -0
- package/server/generated/typegraphql-prisma/enums/OptionContractType.mjs +11 -0
- package/server/generated/typegraphql-prisma/enums/index.d.ts +1 -1
- package/server/generated/typegraphql-prisma/enums/index.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/enums/index.js.map +1 -1
- package/server/generated/typegraphql-prisma/enums/index.mjs +1 -1
- package/server/generated/typegraphql-prisma/models/Trade.js.map +1 -1
- package/server/generated/typegraphql-prisma/models/Trade.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableFilter.d.ts +8 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableFilter.d.ts.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableFilter.js.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/{NestedEnumOptionTypeNullableFilter.mjs → EnumOptionContractTypeNullableFilter.mjs} +16 -15
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableWithAggregatesFilter.d.ts +13 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableWithAggregatesFilter.d.ts.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableWithAggregatesFilter.js.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionContractTypeNullableWithAggregatesFilter.mjs +70 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableFilter.d.ts +7 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableFilter.d.ts.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableFilter.js.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/{EnumOptionTypeNullableFilter.mjs → NestedEnumOptionContractTypeNullableFilter.mjs} +15 -16
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableWithAggregatesFilter.d.ts +12 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableWithAggregatesFilter.d.ts.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableWithAggregatesFilter.js.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionContractTypeNullableWithAggregatesFilter.mjs +69 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionContractTypeFieldUpdateOperationsInput.d.ts +4 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionContractTypeFieldUpdateOperationsInput.d.ts.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionContractTypeFieldUpdateOperationsInput.js.map +1 -0
- package/server/generated/typegraphql-prisma/resolvers/inputs/{NullableEnumOptionTypeFieldUpdateOperationsInput.mjs → NullableEnumOptionContractTypeFieldUpdateOperationsInput.mjs} +9 -9
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyAlpacaAccountInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyAlpacaAccountInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyAssetInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyAssetInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateManyInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutActionsInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutActionsInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutAlpacaAccountInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutAlpacaAccountInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutAssetInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeCreateWithoutAssetInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereWithAggregatesInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereWithAggregatesInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereWithAggregatesInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeScalarWhereWithAggregatesInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateManyMutationInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateManyMutationInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateManyMutationInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateManyMutationInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutActionsInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutActionsInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutActionsInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutActionsInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAlpacaAccountInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAlpacaAccountInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAlpacaAccountInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAlpacaAccountInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAssetInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAssetInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAssetInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeUpdateWithoutAssetInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeWhereInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeWhereInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeWhereInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeWhereInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeWhereUniqueInput.d.ts +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeWhereUniqueInput.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeWhereUniqueInput.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/TradeWhereUniqueInput.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/inputs/index.d.ts +5 -5
- package/server/generated/typegraphql-prisma/resolvers/inputs/index.d.ts.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/index.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/index.mjs +5 -5
- package/server/generated/typegraphql-prisma/resolvers/outputs/CreateManyTradeAndReturnOutputType.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/CreateManyTradeAndReturnOutputType.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/outputs/TradeGroupBy.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/TradeGroupBy.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/outputs/TradeMaxAggregate.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/TradeMaxAggregate.mjs +2 -2
- package/server/generated/typegraphql-prisma/resolvers/outputs/TradeMinAggregate.js.map +1 -1
- package/server/generated/typegraphql-prisma/resolvers/outputs/TradeMinAggregate.mjs +2 -2
- package/generated/typegraphql-prisma/enums/OptionType.d.ts +0 -5
- package/generated/typegraphql-prisma/enums/OptionType.d.ts.map +0 -1
- package/generated/typegraphql-prisma/enums/OptionType.js.map +0 -1
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableFilter.d.ts +0 -8
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableFilter.d.ts.map +0 -1
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableFilter.js.map +0 -1
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableWithAggregatesFilter.d.ts +0 -13
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableWithAggregatesFilter.d.ts.map +0 -1
- package/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableWithAggregatesFilter.js.map +0 -1
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableFilter.d.ts +0 -7
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableFilter.d.ts.map +0 -1
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableFilter.js.map +0 -1
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableWithAggregatesFilter.d.ts +0 -12
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableWithAggregatesFilter.d.ts.map +0 -1
- package/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableWithAggregatesFilter.js.map +0 -1
- package/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionTypeFieldUpdateOperationsInput.d.ts +0 -4
- package/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionTypeFieldUpdateOperationsInput.d.ts.map +0 -1
- package/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionTypeFieldUpdateOperationsInput.js.map +0 -1
- package/server/generated/typegraphql-prisma/enums/OptionType.d.ts +0 -5
- package/server/generated/typegraphql-prisma/enums/OptionType.d.ts.map +0 -1
- package/server/generated/typegraphql-prisma/enums/OptionType.js.map +0 -1
- package/server/generated/typegraphql-prisma/enums/OptionType.mjs +0 -11
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableFilter.d.ts +0 -8
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableFilter.d.ts.map +0 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableFilter.js.map +0 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableWithAggregatesFilter.d.ts +0 -13
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableWithAggregatesFilter.d.ts.map +0 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableWithAggregatesFilter.js.map +0 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/EnumOptionTypeNullableWithAggregatesFilter.mjs +0 -70
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableFilter.d.ts +0 -7
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableFilter.d.ts.map +0 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableFilter.js.map +0 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableWithAggregatesFilter.d.ts +0 -12
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableWithAggregatesFilter.d.ts.map +0 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableWithAggregatesFilter.js.map +0 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/NestedEnumOptionTypeNullableWithAggregatesFilter.mjs +0 -69
- package/server/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionTypeFieldUpdateOperationsInput.d.ts +0 -4
- package/server/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionTypeFieldUpdateOperationsInput.d.ts.map +0 -1
- package/server/generated/typegraphql-prisma/resolvers/inputs/NullableEnumOptionTypeFieldUpdateOperationsInput.js.map +0 -1
package/README.md
CHANGED
@@ -275,7 +275,7 @@ The following enums are available for use under the `enums` namespace :
|
|
275
275
|
| NewsArticleScalarFieldEnum |
|
276
276
|
| NullableJsonNullValueInput |
|
277
277
|
| NullsOrder |
|
278
|
-
|
|
278
|
+
| OptionContractType |
|
279
279
|
| OrderScalarFieldEnum |
|
280
280
|
| OrderStatus |
|
281
281
|
| OrderType |
|
@@ -130,7 +130,7 @@ export interface Asset {
|
|
130
130
|
id: string;
|
131
131
|
}
|
132
132
|
|
133
|
-
export enum
|
133
|
+
export enum OptionContractType {
|
134
134
|
CALL = "CALL",
|
135
135
|
PUT = "PUT"
|
136
136
|
}
|
@@ -175,7 +175,7 @@ export interface Trade {
|
|
175
175
|
// Relation to the Asset model.
|
176
176
|
asset: Asset;
|
177
177
|
// If the asset.type is OPTION, then provide type of contract (CALL or PUT).
|
178
|
-
optionType?:
|
178
|
+
optionType?: OptionContractType;
|
179
179
|
// List of actions associated with this trade.
|
180
180
|
actions: Action[];
|
181
181
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const AccountTypeString = "\nYour response should adhere to the following type definition for the \"Account\" type, and its nested object types (which include '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 interface Account {\n // Unique identifier for the account.\n id: string;\n // Reference to the user who owns this account.\n userId: string;\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 // Unique identifier provided by the external provider.\n providerAccountId: string;\n // Refresh token for the external account, if applicable.\n refresh_token?: string;\n // Access token for the external account, if applicable.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n // Timestamp when the account was created.\n createdAt: Date;\n // Timestamp when the account was last updated.\n updatedAt: Date;\n // Relation to the User model.\n user: User;\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 interface Customer {\n // Unique identifier for the customer.\n id: number;\n // Reference to the authenticated user associated with the customer.\n authUserId: string;\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // Unique Stripe customer ID for billing.\n stripeCustomerId?: string;\n // Unique Stripe subscription ID.\n stripeSubscriptionId?: string;\n // Stripe price ID associated with the customer's subscription.\n stripePriceId?: string;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // Timestamp when the customer was created.\n createdAt: Date;\n // Timestamp when the customer was last updated.\n updatedAt: Date;\n // List of users associated with the customer.\n users: User[];\n}\n\nexport interface Session {\n // Unique identifier for the session.\n id: string;\n // Token associated with the session for authentication.\n sessionToken: string;\n // Reference to the user who owns this session.\n userId: string;\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model.\n user: User;\n // Timestamp when the session was created.\n createdAt: Date;\n // Timestamp when the session was last updated.\n updatedAt: Date;\n}\n\nexport interface Authenticator {\n // Unique identifier for the authenticator.\n id: string;\n // Reference to the user who owns this authenticator.\n userId: string;\n // Unique credential ID for the authenticator.\n credentialID: string;\n // Public key associated with the authenticator.\n publicKey: string;\n // Counter for the number of authentication attempts.\n counter: number;\n // Relation to the User model.\n user: User;\n // Timestamp when the authenticator was created.\n createdAt: Date;\n // Timestamp when the authenticator was last updated.\n updatedAt: Date;\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\n// Simplified reference to Asset.\nexport interface Asset {\n// Unique identifier for the asset.\n id: string;\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n// Simplified reference to Action.\nexport interface Action {\n// Unique identifier for the action.\n id: string;\n}\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\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 // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\"\n}\n\nexport enum TradeAction {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum OrderStatus {\n PENDING = \"PENDING\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\"\n}\n\nexport interface Order {\n // Unique identifier for the order.\n id: string;\n // Reference to the Alpaca account used for the order.\n alpacaAccountId: string;\n // Reference to the asset being ordered.\n assetId: string;\n // Type of order, defined by OrderType enum.\n type: OrderType;\n // Action of the order, defined by TradeAction enum.\n action: TradeAction;\n // Quantity of the asset to be ordered.\n qty: number;\n // Price at which the asset is to be bought or sold.\n price: number;\n // Current status of the order, defined by OrderStatus enum.\n status: OrderStatus;\n // Timestamp when the order was created.\n createdAt: Date;\n // Timestamp when the order was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n}\n\nexport interface Position {\n // Unique identifier for the position.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Relation to the Asset model.\n asset: Asset;\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable.\n alpacaAccount?: AlpacaAccount;\n // Foreign key referencing the AlpacaAccount.\n alpacaAccountId: string;\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\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 // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\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, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\n";
|
1
|
+
export declare const AccountTypeString = "\nYour response should adhere to the following type definition for the \"Account\" type, and its nested object types (which include '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 interface Account {\n // Unique identifier for the account.\n id: string;\n // Reference to the user who owns this account.\n userId: string;\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 // Unique identifier provided by the external provider.\n providerAccountId: string;\n // Refresh token for the external account, if applicable.\n refresh_token?: string;\n // Access token for the external account, if applicable.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n // Timestamp when the account was created.\n createdAt: Date;\n // Timestamp when the account was last updated.\n updatedAt: Date;\n // Relation to the User model.\n user: User;\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 interface Customer {\n // Unique identifier for the customer.\n id: number;\n // Reference to the authenticated user associated with the customer.\n authUserId: string;\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // Unique Stripe customer ID for billing.\n stripeCustomerId?: string;\n // Unique Stripe subscription ID.\n stripeSubscriptionId?: string;\n // Stripe price ID associated with the customer's subscription.\n stripePriceId?: string;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // Timestamp when the customer was created.\n createdAt: Date;\n // Timestamp when the customer was last updated.\n updatedAt: Date;\n // List of users associated with the customer.\n users: User[];\n}\n\nexport interface Session {\n // Unique identifier for the session.\n id: string;\n // Token associated with the session for authentication.\n sessionToken: string;\n // Reference to the user who owns this session.\n userId: string;\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model.\n user: User;\n // Timestamp when the session was created.\n createdAt: Date;\n // Timestamp when the session was last updated.\n updatedAt: Date;\n}\n\nexport interface Authenticator {\n // Unique identifier for the authenticator.\n id: string;\n // Reference to the user who owns this authenticator.\n userId: string;\n // Unique credential ID for the authenticator.\n credentialID: string;\n // Public key associated with the authenticator.\n publicKey: string;\n // Counter for the number of authentication attempts.\n counter: number;\n // Relation to the User model.\n user: User;\n // Timestamp when the authenticator was created.\n createdAt: Date;\n // Timestamp when the authenticator was last updated.\n updatedAt: Date;\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\n// Simplified reference to Asset.\nexport interface Asset {\n// Unique identifier for the asset.\n id: string;\n}\n\nexport enum OptionContractType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\n// Simplified reference to Action.\nexport interface Action {\n// Unique identifier for the action.\n id: string;\n}\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\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 // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionContractType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\"\n}\n\nexport enum TradeAction {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum OrderStatus {\n PENDING = \"PENDING\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\"\n}\n\nexport interface Order {\n // Unique identifier for the order.\n id: string;\n // Reference to the Alpaca account used for the order.\n alpacaAccountId: string;\n // Reference to the asset being ordered.\n assetId: string;\n // Type of order, defined by OrderType enum.\n type: OrderType;\n // Action of the order, defined by TradeAction enum.\n action: TradeAction;\n // Quantity of the asset to be ordered.\n qty: number;\n // Price at which the asset is to be bought or sold.\n price: number;\n // Current status of the order, defined by OrderStatus enum.\n status: OrderStatus;\n // Timestamp when the order was created.\n createdAt: Date;\n // Timestamp when the order was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n}\n\nexport interface Position {\n // Unique identifier for the position.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Relation to the Asset model.\n asset: Asset;\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable.\n alpacaAccount?: AlpacaAccount;\n // Foreign key referencing the AlpacaAccount.\n alpacaAccountId: string;\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\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 // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\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, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\n";
|
2
2
|
//# sourceMappingURL=Account.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Account.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Account.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,
|
1
|
+
{"version":3,"file":"Account.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Account.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,q3VA6W7B,CAAC"}
|
@@ -296,7 +296,7 @@ export interface AlpacaAccount {
|
|
296
296
|
alerts: Alert[];
|
297
297
|
}
|
298
298
|
|
299
|
-
export enum
|
299
|
+
export enum OptionContractType {
|
300
300
|
CALL = "CALL",
|
301
301
|
PUT = "PUT"
|
302
302
|
}
|
@@ -335,7 +335,7 @@ export interface Trade {
|
|
335
335
|
// Relation to the Asset model.
|
336
336
|
asset: Asset;
|
337
337
|
// If the asset.type is OPTION, then provide type of contract (CALL or PUT).
|
338
|
-
optionType?:
|
338
|
+
optionType?: OptionContractType;
|
339
339
|
// List of actions associated with this trade.
|
340
340
|
actions: Action[];
|
341
341
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const ActionTypeString = "\nYour response should adhere to the following type definition for the \"Action\" type, and its nested object types (which include 'Trade' type), as well as any ENUMS used by it (which include 'TradeAction', 'TradeActionSide', 'OrderType', 'TradeActionStatus' enums).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport interface Action {\n // Unique identifier for the action.\n id: string;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by TradeAction enum.\n action: TradeAction;\n // Type of hedge applied, if any.\n hedgeType?: string;\n // Price at which the hedge was executed.\n hedgePrice?: number;\n // Price at which the asset was bought.\n buyPrice?: number;\n // Price at which the asset was sold.\n sellPrice?: number;\n // Quantity of the asset involved in the action.\n qty: number;\n // Side of the trade action (BUY or SELL).\n side: TradeActionSide;\n // Type of order used in the action, defined by OrderType enum.\n type: OrderType;\n // Stop-loss price set for the action.\n stopLoss?: number;\n // Target price set for the action.\n targetPrice?: number;\n // Additional notes or comments about the action.\n note: string;\n // Timestamp when the action was executed.\n executionTime?: Date;\n // Current status of the trade action.\n status: TradeActionStatus;\n // Fees associated with the action.\n fee?: number;\n // Relation to the Trade model.\n trade: Trade;\n}\n\nexport enum TradeAction {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum TradeActionSide {\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}\n\nexport enum TradeActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\n// Simplified reference to Customer.\nexport interface Customer {\n// Unique identifier for the customer.\n id: number;\n}\n\n// Simplified reference to Account.\nexport interface Account {\n// Unique identifier for the account.\n id: string;\n}\n\n// Simplified reference to Session.\nexport interface Session {\n// Unique identifier for the session.\n id: string;\n}\n\n// Simplified reference to Authenticator.\nexport interface Authenticator {\n// Unique identifier for the authenticator.\n id: string;\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\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, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum OrderStatus {\n PENDING = \"PENDING\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\"\n}\n\n// Simplified reference to Asset.\nexport interface Asset {\n// Unique identifier for the asset.\n id: string;\n}\n\nexport interface Order {\n // Unique identifier for the order.\n id: string;\n // Reference to the Alpaca account used for the order.\n alpacaAccountId: string;\n // Reference to the asset being ordered.\n assetId: string;\n // Type of order, defined by OrderType enum.\n type: OrderType;\n // Action of the order, defined by TradeAction enum.\n action: TradeAction;\n // Quantity of the asset to be ordered.\n qty: number;\n // Price at which the asset is to be bought or sold.\n price: number;\n // Current status of the order, defined by OrderStatus enum.\n status: OrderStatus;\n // Timestamp when the order was created.\n createdAt: Date;\n // Timestamp when the order was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n}\n\nexport interface Position {\n // Unique identifier for the position.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Relation to the Asset model.\n asset: Asset;\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable.\n alpacaAccount?: AlpacaAccount;\n // Foreign key referencing the AlpacaAccount.\n alpacaAccountId: string;\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\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 // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\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 // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\n";
|
1
|
+
export declare const ActionTypeString = "\nYour response should adhere to the following type definition for the \"Action\" type, and its nested object types (which include 'Trade' type), as well as any ENUMS used by it (which include 'TradeAction', 'TradeActionSide', 'OrderType', 'TradeActionStatus' enums).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport interface Action {\n // Unique identifier for the action.\n id: string;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by TradeAction enum.\n action: TradeAction;\n // Type of hedge applied, if any.\n hedgeType?: string;\n // Price at which the hedge was executed.\n hedgePrice?: number;\n // Price at which the asset was bought.\n buyPrice?: number;\n // Price at which the asset was sold.\n sellPrice?: number;\n // Quantity of the asset involved in the action.\n qty: number;\n // Side of the trade action (BUY or SELL).\n side: TradeActionSide;\n // Type of order used in the action, defined by OrderType enum.\n type: OrderType;\n // Stop-loss price set for the action.\n stopLoss?: number;\n // Target price set for the action.\n targetPrice?: number;\n // Additional notes or comments about the action.\n note: string;\n // Timestamp when the action was executed.\n executionTime?: Date;\n // Current status of the trade action.\n status: TradeActionStatus;\n // Fees associated with the action.\n fee?: number;\n // Relation to the Trade model.\n trade: Trade;\n}\n\nexport enum TradeAction {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum TradeActionSide {\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}\n\nexport enum TradeActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\n// Simplified reference to Customer.\nexport interface Customer {\n// Unique identifier for the customer.\n id: number;\n}\n\n// Simplified reference to Account.\nexport interface Account {\n// Unique identifier for the account.\n id: string;\n}\n\n// Simplified reference to Session.\nexport interface Session {\n// Unique identifier for the session.\n id: string;\n}\n\n// Simplified reference to Authenticator.\nexport interface Authenticator {\n// Unique identifier for the authenticator.\n id: string;\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\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, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum OrderStatus {\n PENDING = \"PENDING\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\"\n}\n\n// Simplified reference to Asset.\nexport interface Asset {\n// Unique identifier for the asset.\n id: string;\n}\n\nexport interface Order {\n // Unique identifier for the order.\n id: string;\n // Reference to the Alpaca account used for the order.\n alpacaAccountId: string;\n // Reference to the asset being ordered.\n assetId: string;\n // Type of order, defined by OrderType enum.\n type: OrderType;\n // Action of the order, defined by TradeAction enum.\n action: TradeAction;\n // Quantity of the asset to be ordered.\n qty: number;\n // Price at which the asset is to be bought or sold.\n price: number;\n // Current status of the order, defined by OrderStatus enum.\n status: OrderStatus;\n // Timestamp when the order was created.\n createdAt: Date;\n // Timestamp when the order was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n}\n\nexport interface Position {\n // Unique identifier for the position.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Relation to the Asset model.\n asset: Asset;\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable.\n alpacaAccount?: AlpacaAccount;\n // Foreign key referencing the AlpacaAccount.\n alpacaAccountId: string;\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\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 // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\nexport enum OptionContractType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\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 // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionContractType;\n // List of actions associated with this trade.\n actions: Action[];\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,
|
1
|
+
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Action.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,wzTAmV5B,CAAC"}
|
@@ -354,7 +354,7 @@ export interface Asset {
|
|
354
354
|
newsMentions: NewsArticleAssetSentiment[];
|
355
355
|
}
|
356
356
|
|
357
|
-
export enum
|
357
|
+
export enum OptionContractType {
|
358
358
|
CALL = "CALL",
|
359
359
|
PUT = "PUT"
|
360
360
|
}
|
@@ -460,7 +460,7 @@ export interface Trade {
|
|
460
460
|
// Relation to the Asset model.
|
461
461
|
asset: Asset;
|
462
462
|
// If the asset.type is OPTION, then provide type of contract (CALL or PUT).
|
463
|
-
optionType?:
|
463
|
+
optionType?: OptionContractType;
|
464
464
|
// List of actions associated with this trade.
|
465
465
|
actions: Action[];
|
466
466
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const AlertTypeString = "\nYour response should adhere to the following type definition for the \"Alert\" type, and its nested object types (which include 'AlpacaAccount' type), as well as any ENUMS used by it (which include 'AlertType' enum).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\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 // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport interface Customer {\n // Unique identifier for the customer.\n id: number;\n // Reference to the authenticated user associated with the customer.\n authUserId: string;\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // Unique Stripe customer ID for billing.\n stripeCustomerId?: string;\n // Unique Stripe subscription ID.\n stripeSubscriptionId?: string;\n // Stripe price ID associated with the customer's subscription.\n stripePriceId?: string;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // Timestamp when the customer was created.\n createdAt: Date;\n // Timestamp when the customer was last updated.\n updatedAt: Date;\n // List of users associated with the customer.\n users: User[];\n}\n\nexport interface Account {\n // Unique identifier for the account.\n id: string;\n // Reference to the user who owns this account.\n userId: string;\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 // Unique identifier provided by the external provider.\n providerAccountId: string;\n // Refresh token for the external account, if applicable.\n refresh_token?: string;\n // Access token for the external account, if applicable.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n // Timestamp when the account was created.\n createdAt: Date;\n // Timestamp when the account was last updated.\n updatedAt: Date;\n // Relation to the User model.\n user: User;\n}\n\nexport interface Session {\n // Unique identifier for the session.\n id: string;\n // Token associated with the session for authentication.\n sessionToken: string;\n // Reference to the user who owns this session.\n userId: string;\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model.\n user: User;\n // Timestamp when the session was created.\n createdAt: Date;\n // Timestamp when the session was last updated.\n updatedAt: Date;\n}\n\nexport interface Authenticator {\n // Unique identifier for the authenticator.\n id: string;\n // Reference to the user who owns this authenticator.\n userId: string;\n // Unique credential ID for the authenticator.\n credentialID: string;\n // Public key associated with the authenticator.\n publicKey: string;\n // Counter for the number of authentication attempts.\n counter: number;\n // Relation to the User model.\n user: User;\n // Timestamp when the authenticator was created.\n createdAt: Date;\n // Timestamp when the authenticator was last updated.\n updatedAt: Date;\n}\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\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, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\n// Simplified reference to Order.\nexport interface Order {\n// Unique identifier for the order.\n id: string;\n}\n\n// Simplified reference to Position.\nexport interface Position {\n// Unique identifier for the position.\n id: string;\n}\n\n// Simplified reference to NewsArticleAssetSentiment.\nexport interface NewsArticleAssetSentiment {\n// Unique identifier for the sentiment record.\n id: string;\n}\n\nexport interface Asset {\n // Unique identifier for the asset.\n id: string;\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image.\n logoUrl?: string;\n // Description of the asset.\n description?: string;\n // Central Index Key for the asset.\n cik?: string;\n // Stock exchange where the asset is listed.\n exchange?: string;\n // Currency in which the asset is traded.\n currency?: string;\n // Country where the asset is based.\n country?: string;\n // Sector classification of the asset.\n sector?: string;\n // Industry classification of the asset.\n industry?: string;\n // Physical address associated with the asset.\n address?: string;\n // Official website of the asset.\n officialSite?: string;\n // Fiscal year-end date of the asset.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter.\n latestQuarter?: string;\n // Market capitalization of the asset.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization.\n ebitda?: string;\n // Price-to-Earnings ratio.\n peRatio?: string;\n // Price/Earnings to Growth ratio.\n pegRatio?: string;\n // Book value per share.\n bookValue?: string;\n // Dividend per share.\n dividendPerShare?: string;\n // Dividend yield percentage.\n dividendYield?: string;\n // Earnings per share.\n eps?: string;\n // Revenue per share over the trailing twelve months.\n revenuePerShareTTM?: string;\n // Profit margin percentage.\n profitMargin?: string;\n // Operating margin over the trailing twelve months.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio.\n evToEbitda?: string;\n // Beta coefficient measuring volatility.\n beta?: string;\n // 52-week high price of the asset.\n week52High?: string;\n // 52-week low price of the asset.\n week52Low?: string;\n // 50-day moving average price.\n day50MovingAverage?: string;\n // 200-day moving average price.\n day200MovingAverage?: string;\n // Total number of shares outstanding.\n sharesOutstanding?: string;\n // Date when the next dividend is paid.\n dividendDate?: string;\n // Date when the asset goes ex-dividend.\n exDividendDate?: string;\n // Timestamp when the asset was created in the database.\n createdAt: Date;\n // Timestamp when the asset was last updated in the database.\n updatedAt: Date;\n // List of trades involving this asset.\n trades: Trade[];\n // List of orders involving this asset.\n orders: Order[];\n // List of positions involving this asset.\n positions: Position[];\n // List of news article sentiments related to this asset.\n newsMentions: NewsArticleAssetSentiment[];\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeAction {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum TradeActionSide {\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}\n\nexport enum TradeActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport interface Action {\n // Unique identifier for the action.\n id: string;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by TradeAction enum.\n action: TradeAction;\n // Type of hedge applied, if any.\n hedgeType?: string;\n // Price at which the hedge was executed.\n hedgePrice?: number;\n // Price at which the asset was bought.\n buyPrice?: number;\n // Price at which the asset was sold.\n sellPrice?: number;\n // Quantity of the asset involved in the action.\n qty: number;\n // Side of the trade action (BUY or SELL).\n side: TradeActionSide;\n // Type of order used in the action, defined by OrderType enum.\n type: OrderType;\n // Stop-loss price set for the action.\n stopLoss?: number;\n // Target price set for the action.\n targetPrice?: number;\n // Additional notes or comments about the action.\n note: string;\n // Timestamp when the action was executed.\n executionTime?: Date;\n // Current status of the trade action.\n status: TradeActionStatus;\n // Fees associated with the action.\n fee?: number;\n // Relation to the Trade model.\n trade: Trade;\n}\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\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 // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\n";
|
1
|
+
export declare const AlertTypeString = "\nYour response should adhere to the following type definition for the \"Alert\" type, and its nested object types (which include 'AlpacaAccount' type), as well as any ENUMS used by it (which include 'AlertType' enum).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\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 // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport interface Customer {\n // Unique identifier for the customer.\n id: number;\n // Reference to the authenticated user associated with the customer.\n authUserId: string;\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // Unique Stripe customer ID for billing.\n stripeCustomerId?: string;\n // Unique Stripe subscription ID.\n stripeSubscriptionId?: string;\n // Stripe price ID associated with the customer's subscription.\n stripePriceId?: string;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // Timestamp when the customer was created.\n createdAt: Date;\n // Timestamp when the customer was last updated.\n updatedAt: Date;\n // List of users associated with the customer.\n users: User[];\n}\n\nexport interface Account {\n // Unique identifier for the account.\n id: string;\n // Reference to the user who owns this account.\n userId: string;\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 // Unique identifier provided by the external provider.\n providerAccountId: string;\n // Refresh token for the external account, if applicable.\n refresh_token?: string;\n // Access token for the external account, if applicable.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n // Timestamp when the account was created.\n createdAt: Date;\n // Timestamp when the account was last updated.\n updatedAt: Date;\n // Relation to the User model.\n user: User;\n}\n\nexport interface Session {\n // Unique identifier for the session.\n id: string;\n // Token associated with the session for authentication.\n sessionToken: string;\n // Reference to the user who owns this session.\n userId: string;\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model.\n user: User;\n // Timestamp when the session was created.\n createdAt: Date;\n // Timestamp when the session was last updated.\n updatedAt: Date;\n}\n\nexport interface Authenticator {\n // Unique identifier for the authenticator.\n id: string;\n // Reference to the user who owns this authenticator.\n userId: string;\n // Unique credential ID for the authenticator.\n credentialID: string;\n // Public key associated with the authenticator.\n publicKey: string;\n // Counter for the number of authentication attempts.\n counter: number;\n // Relation to the User model.\n user: User;\n // Timestamp when the authenticator was created.\n createdAt: Date;\n // Timestamp when the authenticator was last updated.\n updatedAt: Date;\n}\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\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, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\n// Simplified reference to Order.\nexport interface Order {\n// Unique identifier for the order.\n id: string;\n}\n\n// Simplified reference to Position.\nexport interface Position {\n// Unique identifier for the position.\n id: string;\n}\n\n// Simplified reference to NewsArticleAssetSentiment.\nexport interface NewsArticleAssetSentiment {\n// Unique identifier for the sentiment record.\n id: string;\n}\n\nexport interface Asset {\n // Unique identifier for the asset.\n id: string;\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image.\n logoUrl?: string;\n // Description of the asset.\n description?: string;\n // Central Index Key for the asset.\n cik?: string;\n // Stock exchange where the asset is listed.\n exchange?: string;\n // Currency in which the asset is traded.\n currency?: string;\n // Country where the asset is based.\n country?: string;\n // Sector classification of the asset.\n sector?: string;\n // Industry classification of the asset.\n industry?: string;\n // Physical address associated with the asset.\n address?: string;\n // Official website of the asset.\n officialSite?: string;\n // Fiscal year-end date of the asset.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter.\n latestQuarter?: string;\n // Market capitalization of the asset.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization.\n ebitda?: string;\n // Price-to-Earnings ratio.\n peRatio?: string;\n // Price/Earnings to Growth ratio.\n pegRatio?: string;\n // Book value per share.\n bookValue?: string;\n // Dividend per share.\n dividendPerShare?: string;\n // Dividend yield percentage.\n dividendYield?: string;\n // Earnings per share.\n eps?: string;\n // Revenue per share over the trailing twelve months.\n revenuePerShareTTM?: string;\n // Profit margin percentage.\n profitMargin?: string;\n // Operating margin over the trailing twelve months.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio.\n evToEbitda?: string;\n // Beta coefficient measuring volatility.\n beta?: string;\n // 52-week high price of the asset.\n week52High?: string;\n // 52-week low price of the asset.\n week52Low?: string;\n // 50-day moving average price.\n day50MovingAverage?: string;\n // 200-day moving average price.\n day200MovingAverage?: string;\n // Total number of shares outstanding.\n sharesOutstanding?: string;\n // Date when the next dividend is paid.\n dividendDate?: string;\n // Date when the asset goes ex-dividend.\n exDividendDate?: string;\n // Timestamp when the asset was created in the database.\n createdAt: Date;\n // Timestamp when the asset was last updated in the database.\n updatedAt: Date;\n // List of trades involving this asset.\n trades: Trade[];\n // List of orders involving this asset.\n orders: Order[];\n // List of positions involving this asset.\n positions: Position[];\n // List of news article sentiments related to this asset.\n newsMentions: NewsArticleAssetSentiment[];\n}\n\nexport enum OptionContractType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeAction {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum TradeActionSide {\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}\n\nexport enum TradeActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport interface Action {\n // Unique identifier for the action.\n id: string;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by TradeAction enum.\n action: TradeAction;\n // Type of hedge applied, if any.\n hedgeType?: string;\n // Price at which the hedge was executed.\n hedgePrice?: number;\n // Price at which the asset was bought.\n buyPrice?: number;\n // Price at which the asset was sold.\n sellPrice?: number;\n // Quantity of the asset involved in the action.\n qty: number;\n // Side of the trade action (BUY or SELL).\n side: TradeActionSide;\n // Type of order used in the action, defined by OrderType enum.\n type: OrderType;\n // Stop-loss price set for the action.\n stopLoss?: number;\n // Target price set for the action.\n targetPrice?: number;\n // Additional notes or comments about the action.\n note: string;\n // Timestamp when the action was executed.\n executionTime?: Date;\n // Current status of the trade action.\n status: TradeActionStatus;\n // Fees associated with the action.\n fee?: number;\n // Relation to the Trade model.\n trade: Trade;\n}\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\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 // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionContractType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\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,
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Alert.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,uheA+e3B,CAAC"}
|
@@ -458,7 +458,7 @@ export interface Asset {
|
|
458
458
|
newsMentions: NewsArticleAssetSentiment[];
|
459
459
|
}
|
460
460
|
|
461
|
-
export enum
|
461
|
+
export enum OptionContractType {
|
462
462
|
CALL = "CALL",
|
463
463
|
PUT = "PUT"
|
464
464
|
}
|
@@ -547,7 +547,7 @@ export interface Trade {
|
|
547
547
|
// Relation to the Asset model.
|
548
548
|
asset: Asset;
|
549
549
|
// If the asset.type is OPTION, then provide type of contract (CALL or PUT).
|
550
|
-
optionType?:
|
550
|
+
optionType?: OptionContractType;
|
551
551
|
// List of actions associated with this trade.
|
552
552
|
actions: Action[];
|
553
553
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const AlpacaAccountTypeString = "\nYour response should adhere to the following type definition for the \"AlpacaAccount\" type, and its nested object types (which include 'User', 'Trade', 'Order', 'Position', 'Alert' types), as well as any ENUMS used by it (which include 'AlpacaAccountType' enum).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport interface Customer {\n // Unique identifier for the customer.\n id: number;\n // Reference to the authenticated user associated with the customer.\n authUserId: string;\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // Unique Stripe customer ID for billing.\n stripeCustomerId?: string;\n // Unique Stripe subscription ID.\n stripeSubscriptionId?: string;\n // Stripe price ID associated with the customer's subscription.\n stripePriceId?: string;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // Timestamp when the customer was created.\n createdAt: Date;\n // Timestamp when the customer was last updated.\n updatedAt: Date;\n // List of users associated with the customer.\n users: User[];\n}\n\nexport interface Account {\n // Unique identifier for the account.\n id: string;\n // Reference to the user who owns this account.\n userId: string;\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 // Unique identifier provided by the external provider.\n providerAccountId: string;\n // Refresh token for the external account, if applicable.\n refresh_token?: string;\n // Access token for the external account, if applicable.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n // Timestamp when the account was created.\n createdAt: Date;\n // Timestamp when the account was last updated.\n updatedAt: Date;\n // Relation to the User model.\n user: User;\n}\n\nexport interface Session {\n // Unique identifier for the session.\n id: string;\n // Token associated with the session for authentication.\n sessionToken: string;\n // Reference to the user who owns this session.\n userId: string;\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model.\n user: User;\n // Timestamp when the session was created.\n createdAt: Date;\n // Timestamp when the session was last updated.\n updatedAt: Date;\n}\n\nexport interface Authenticator {\n // Unique identifier for the authenticator.\n id: string;\n // Reference to the user who owns this authenticator.\n userId: string;\n // Unique credential ID for the authenticator.\n credentialID: string;\n // Public key associated with the authenticator.\n publicKey: string;\n // Counter for the number of authentication attempts.\n counter: number;\n // Relation to the User model.\n user: User;\n // Timestamp when the authenticator was created.\n createdAt: Date;\n // Timestamp when the authenticator was last updated.\n updatedAt: Date;\n}\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\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, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\"\n}\n\nexport enum TradeAction {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum OrderStatus {\n PENDING = \"PENDING\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\"\n}\n\nexport interface Order {\n // Unique identifier for the order.\n id: string;\n // Reference to the Alpaca account used for the order.\n alpacaAccountId: string;\n // Reference to the asset being ordered.\n assetId: string;\n // Type of order, defined by OrderType enum.\n type: OrderType;\n // Action of the order, defined by TradeAction enum.\n action: TradeAction;\n // Quantity of the asset to be ordered.\n qty: number;\n // Price at which the asset is to be bought or sold.\n price: number;\n // Current status of the order, defined by OrderStatus enum.\n status: OrderStatus;\n // Timestamp when the order was created.\n createdAt: Date;\n // Timestamp when the order was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n}\n\nexport interface Position {\n // Unique identifier for the position.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Relation to the Asset model.\n asset: Asset;\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable.\n alpacaAccount?: AlpacaAccount;\n // Foreign key referencing the AlpacaAccount.\n alpacaAccountId: string;\n}\n\n// Simplified reference to NewsArticle.\nexport interface NewsArticle {\n// Unique identifier for the news article.\n id: string;\n}\n\nexport interface NewsArticleAssetSentiment {\n // Unique identifier for the sentiment record.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Reference to the associated news article.\n newsArticleId: string;\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model.\n news: NewsArticle;\n // Relation to the Asset model.\n asset: Asset;\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 interface Asset {\n // Unique identifier for the asset.\n id: string;\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image.\n logoUrl?: string;\n // Description of the asset.\n description?: string;\n // Central Index Key for the asset.\n cik?: string;\n // Stock exchange where the asset is listed.\n exchange?: string;\n // Currency in which the asset is traded.\n currency?: string;\n // Country where the asset is based.\n country?: string;\n // Sector classification of the asset.\n sector?: string;\n // Industry classification of the asset.\n industry?: string;\n // Physical address associated with the asset.\n address?: string;\n // Official website of the asset.\n officialSite?: string;\n // Fiscal year-end date of the asset.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter.\n latestQuarter?: string;\n // Market capitalization of the asset.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization.\n ebitda?: string;\n // Price-to-Earnings ratio.\n peRatio?: string;\n // Price/Earnings to Growth ratio.\n pegRatio?: string;\n // Book value per share.\n bookValue?: string;\n // Dividend per share.\n dividendPerShare?: string;\n // Dividend yield percentage.\n dividendYield?: string;\n // Earnings per share.\n eps?: string;\n // Revenue per share over the trailing twelve months.\n revenuePerShareTTM?: string;\n // Profit margin percentage.\n profitMargin?: string;\n // Operating margin over the trailing twelve months.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio.\n evToEbitda?: string;\n // Beta coefficient measuring volatility.\n beta?: string;\n // 52-week high price of the asset.\n week52High?: string;\n // 52-week low price of the asset.\n week52Low?: string;\n // 50-day moving average price.\n day50MovingAverage?: string;\n // 200-day moving average price.\n day200MovingAverage?: string;\n // Total number of shares outstanding.\n sharesOutstanding?: string;\n // Date when the next dividend is paid.\n dividendDate?: string;\n // Date when the asset goes ex-dividend.\n exDividendDate?: string;\n // Timestamp when the asset was created in the database.\n createdAt: Date;\n // Timestamp when the asset was last updated in the database.\n updatedAt: Date;\n // List of trades involving this asset.\n trades: Trade[];\n // List of orders involving this asset.\n orders: Order[];\n // List of positions involving this asset.\n positions: Position[];\n // List of news article sentiments related to this asset.\n newsMentions: NewsArticleAssetSentiment[];\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeActionSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum TradeActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport interface Action {\n // Unique identifier for the action.\n id: string;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by TradeAction enum.\n action: TradeAction;\n // Type of hedge applied, if any.\n hedgeType?: string;\n // Price at which the hedge was executed.\n hedgePrice?: number;\n // Price at which the asset was bought.\n buyPrice?: number;\n // Price at which the asset was sold.\n sellPrice?: number;\n // Quantity of the asset involved in the action.\n qty: number;\n // Side of the trade action (BUY or SELL).\n side: TradeActionSide;\n // Type of order used in the action, defined by OrderType enum.\n type: OrderType;\n // Stop-loss price set for the action.\n stopLoss?: number;\n // Target price set for the action.\n targetPrice?: number;\n // Additional notes or comments about the action.\n note: string;\n // Timestamp when the action was executed.\n executionTime?: Date;\n // Current status of the trade action.\n status: TradeActionStatus;\n // Fees associated with the action.\n fee?: number;\n // Relation to the Trade model.\n trade: Trade;\n}\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\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 // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\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 // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\n";
|
1
|
+
export declare const AlpacaAccountTypeString = "\nYour response should adhere to the following type definition for the \"AlpacaAccount\" type, and its nested object types (which include 'User', 'Trade', 'Order', 'Position', 'Alert' types), as well as any ENUMS used by it (which include 'AlpacaAccountType' enum).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport interface Customer {\n // Unique identifier for the customer.\n id: number;\n // Reference to the authenticated user associated with the customer.\n authUserId: string;\n // Name of the customer.\n name?: string;\n // Subscription plan the customer is enrolled in.\n plan?: SubscriptionPlan;\n // Unique Stripe customer ID for billing.\n stripeCustomerId?: string;\n // Unique Stripe subscription ID.\n stripeSubscriptionId?: string;\n // Stripe price ID associated with the customer's subscription.\n stripePriceId?: string;\n // End date of the current billing period in Stripe.\n stripeCurrentPeriodEnd?: Date;\n // Timestamp when the customer was created.\n createdAt: Date;\n // Timestamp when the customer was last updated.\n updatedAt: Date;\n // List of users associated with the customer.\n users: User[];\n}\n\nexport interface Account {\n // Unique identifier for the account.\n id: string;\n // Reference to the user who owns this account.\n userId: string;\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 // Unique identifier provided by the external provider.\n providerAccountId: string;\n // Refresh token for the external account, if applicable.\n refresh_token?: string;\n // Access token for the external account, if applicable.\n access_token?: string;\n // Expiration time of the access token.\n expires_at?: number;\n // Type of the token (e.g., Bearer).\n token_type?: string;\n // Scope of access granted by the token.\n scope?: string;\n // ID token for authentication, if applicable.\n id_token?: string;\n // State of the session associated with the account.\n session_state?: string;\n // Timestamp when the account was created.\n createdAt: Date;\n // Timestamp when the account was last updated.\n updatedAt: Date;\n // Relation to the User model.\n user: User;\n}\n\nexport interface Session {\n // Unique identifier for the session.\n id: string;\n // Token associated with the session for authentication.\n sessionToken: string;\n // Reference to the user who owns this session.\n userId: string;\n // Expiration date and time of the session.\n expires: Date;\n // Relation to the User model.\n user: User;\n // Timestamp when the session was created.\n createdAt: Date;\n // Timestamp when the session was last updated.\n updatedAt: Date;\n}\n\nexport interface Authenticator {\n // Unique identifier for the authenticator.\n id: string;\n // Reference to the user who owns this authenticator.\n userId: string;\n // Unique credential ID for the authenticator.\n credentialID: string;\n // Public key associated with the authenticator.\n publicKey: string;\n // Counter for the number of authentication attempts.\n counter: number;\n // Relation to the User model.\n user: User;\n // Timestamp when the authenticator was created.\n createdAt: Date;\n // Timestamp when the authenticator was last updated.\n updatedAt: Date;\n}\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\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, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AssetType {\n STOCK = \"STOCK\",\n ETF = \"ETF\",\n MUTUAL_FUND = \"MUTUAL_FUND\",\n CRYPTOCURRENCY = \"CRYPTOCURRENCY\",\n INDEX = \"INDEX\",\n COMMODITY = \"COMMODITY\",\n CURRENCY = \"CURRENCY\",\n OPTION = \"OPTION\",\n FUTURE = \"FUTURE\",\n BOND = \"BOND\",\n WARRANT = \"WARRANT\",\n ADR = \"ADR\",\n GDR = \"GDR\",\n UNIT = \"UNIT\",\n RIGHT = \"RIGHT\",\n REIT = \"REIT\",\n STRUCTURED_PRODUCT = \"STRUCTURED_PRODUCT\",\n SWAP = \"SWAP\",\n SPOT = \"SPOT\",\n FORWARD = \"FORWARD\",\n OTHER = \"OTHER\"\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\"\n}\n\nexport enum TradeAction {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum OrderStatus {\n PENDING = \"PENDING\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\"\n}\n\nexport interface Order {\n // Unique identifier for the order.\n id: string;\n // Reference to the Alpaca account used for the order.\n alpacaAccountId: string;\n // Reference to the asset being ordered.\n assetId: string;\n // Type of order, defined by OrderType enum.\n type: OrderType;\n // Action of the order, defined by TradeAction enum.\n action: TradeAction;\n // Quantity of the asset to be ordered.\n qty: number;\n // Price at which the asset is to be bought or sold.\n price: number;\n // Current status of the order, defined by OrderStatus enum.\n status: OrderStatus;\n // Timestamp when the order was created.\n createdAt: Date;\n // Timestamp when the order was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n}\n\nexport interface Position {\n // Unique identifier for the position.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Relation to the Asset model.\n asset: Asset;\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable.\n alpacaAccount?: AlpacaAccount;\n // Foreign key referencing the AlpacaAccount.\n alpacaAccountId: string;\n}\n\n// Simplified reference to NewsArticle.\nexport interface NewsArticle {\n// Unique identifier for the news article.\n id: string;\n}\n\nexport interface NewsArticleAssetSentiment {\n // Unique identifier for the sentiment record.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Reference to the associated news article.\n newsArticleId: string;\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model.\n news: NewsArticle;\n // Relation to the Asset model.\n asset: Asset;\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 interface Asset {\n // Unique identifier for the asset.\n id: string;\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image.\n logoUrl?: string;\n // Description of the asset.\n description?: string;\n // Central Index Key for the asset.\n cik?: string;\n // Stock exchange where the asset is listed.\n exchange?: string;\n // Currency in which the asset is traded.\n currency?: string;\n // Country where the asset is based.\n country?: string;\n // Sector classification of the asset.\n sector?: string;\n // Industry classification of the asset.\n industry?: string;\n // Physical address associated with the asset.\n address?: string;\n // Official website of the asset.\n officialSite?: string;\n // Fiscal year-end date of the asset.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter.\n latestQuarter?: string;\n // Market capitalization of the asset.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization.\n ebitda?: string;\n // Price-to-Earnings ratio.\n peRatio?: string;\n // Price/Earnings to Growth ratio.\n pegRatio?: string;\n // Book value per share.\n bookValue?: string;\n // Dividend per share.\n dividendPerShare?: string;\n // Dividend yield percentage.\n dividendYield?: string;\n // Earnings per share.\n eps?: string;\n // Revenue per share over the trailing twelve months.\n revenuePerShareTTM?: string;\n // Profit margin percentage.\n profitMargin?: string;\n // Operating margin over the trailing twelve months.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio.\n evToEbitda?: string;\n // Beta coefficient measuring volatility.\n beta?: string;\n // 52-week high price of the asset.\n week52High?: string;\n // 52-week low price of the asset.\n week52Low?: string;\n // 50-day moving average price.\n day50MovingAverage?: string;\n // 200-day moving average price.\n day200MovingAverage?: string;\n // Total number of shares outstanding.\n sharesOutstanding?: string;\n // Date when the next dividend is paid.\n dividendDate?: string;\n // Date when the asset goes ex-dividend.\n exDividendDate?: string;\n // Timestamp when the asset was created in the database.\n createdAt: Date;\n // Timestamp when the asset was last updated in the database.\n updatedAt: Date;\n // List of trades involving this asset.\n trades: Trade[];\n // List of orders involving this asset.\n orders: Order[];\n // List of positions involving this asset.\n positions: Position[];\n // List of news article sentiments related to this asset.\n newsMentions: NewsArticleAssetSentiment[];\n}\n\nexport enum OptionContractType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeActionSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum TradeActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport interface Action {\n // Unique identifier for the action.\n id: string;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by TradeAction enum.\n action: TradeAction;\n // Type of hedge applied, if any.\n hedgeType?: string;\n // Price at which the hedge was executed.\n hedgePrice?: number;\n // Price at which the asset was bought.\n buyPrice?: number;\n // Price at which the asset was sold.\n sellPrice?: number;\n // Quantity of the asset involved in the action.\n qty: number;\n // Side of the trade action (BUY or SELL).\n side: TradeActionSide;\n // Type of order used in the action, defined by OrderType enum.\n type: OrderType;\n // Stop-loss price set for the action.\n stopLoss?: number;\n // Target price set for the action.\n targetPrice?: number;\n // Additional notes or comments about the action.\n note: string;\n // Timestamp when the action was executed.\n executionTime?: Date;\n // Current status of the trade action.\n status: TradeActionStatus;\n // Fees associated with the action.\n fee?: number;\n // Relation to the Trade model.\n trade: Trade;\n}\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\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 // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionContractType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\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 // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\n";
|
2
2
|
//# sourceMappingURL=AlpacaAccount.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AlpacaAccount.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/AlpacaAccount.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,
|
1
|
+
{"version":3,"file":"AlpacaAccount.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/AlpacaAccount.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,uwjBAikBnC,CAAC"}
|
@@ -387,7 +387,7 @@ export interface AlpacaAccount {
|
|
387
387
|
alerts: Alert[];
|
388
388
|
}
|
389
389
|
|
390
|
-
export enum
|
390
|
+
export enum OptionContractType {
|
391
391
|
CALL = "CALL",
|
392
392
|
PUT = "PUT"
|
393
393
|
}
|
@@ -476,7 +476,7 @@ export interface Trade {
|
|
476
476
|
// Relation to the Asset model.
|
477
477
|
asset: Asset;
|
478
478
|
// If the asset.type is OPTION, then provide type of contract (CALL or PUT).
|
479
|
-
optionType?:
|
479
|
+
optionType?: OptionContractType;
|
480
480
|
// List of actions associated with this trade.
|
481
481
|
actions: Action[];
|
482
482
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare const AssetTypeString = "\nYour response should adhere to the following type definition for the \"Asset\" type, and its nested object types (which include 'Trade', 'Order', 'Position', 'NewsArticleAssetSentiment' types), as well as any ENUMS used by it (which include 'AssetType' enum).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport interface Asset {\n // Unique identifier for the asset.\n id: string;\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image.\n logoUrl?: string;\n // Description of the asset.\n description?: string;\n // Central Index Key for the asset.\n cik?: string;\n // Stock exchange where the asset is listed.\n exchange?: string;\n // Currency in which the asset is traded.\n currency?: string;\n // Country where the asset is based.\n country?: string;\n // Sector classification of the asset.\n sector?: string;\n // Industry classification of the asset.\n industry?: string;\n // Physical address associated with the asset.\n address?: string;\n // Official website of the asset.\n officialSite?: string;\n // Fiscal year-end date of the asset.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter.\n latestQuarter?: string;\n // Market capitalization of the asset.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization.\n ebitda?: string;\n // Price-to-Earnings ratio.\n peRatio?: string;\n // Price/Earnings to Growth ratio.\n pegRatio?: string;\n // Book value per share.\n bookValue?: string;\n // Dividend per share.\n dividendPerShare?: string;\n // Dividend yield percentage.\n dividendYield?: string;\n // Earnings per share.\n eps?: string;\n // Revenue per share over the trailing twelve months.\n revenuePerShareTTM?: string;\n // Profit margin percentage.\n profitMargin?: string;\n // Operating margin over the trailing twelve months.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio.\n evToEbitda?: string;\n // Beta coefficient measuring volatility.\n beta?: string;\n // 52-week high price of the asset.\n week52High?: string;\n // 52-week low price of the asset.\n week52Low?: string;\n // 50-day moving average price.\n day50MovingAverage?: string;\n // 200-day moving average price.\n day200MovingAverage?: string;\n // Total number of shares outstanding.\n sharesOutstanding?: string;\n // Date when the next dividend is paid.\n dividendDate?: string;\n // Date when the asset goes ex-dividend.\n exDividendDate?: string;\n // Timestamp when the asset was created in the database.\n createdAt: Date;\n // Timestamp when the asset was last updated in the database.\n updatedAt: Date;\n // List of trades involving this asset.\n trades: Trade[];\n // List of orders involving this asset.\n orders: Order[];\n // List of positions involving this asset.\n positions: Position[];\n // List of news article sentiments related to this asset.\n newsMentions: NewsArticleAssetSentiment[];\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 TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\n// Simplified reference to Customer.\nexport interface Customer {\n// Unique identifier for the customer.\n id: number;\n}\n\n// Simplified reference to Account.\nexport interface Account {\n// Unique identifier for the account.\n id: string;\n}\n\n// Simplified reference to Session.\nexport interface Session {\n// Unique identifier for the session.\n id: string;\n}\n\n// Simplified reference to Authenticator.\nexport interface Authenticator {\n// Unique identifier for the authenticator.\n id: string;\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\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, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\"\n}\n\nexport enum TradeAction {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum OrderStatus {\n PENDING = \"PENDING\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\"\n}\n\nexport interface Order {\n // Unique identifier for the order.\n id: string;\n // Reference to the Alpaca account used for the order.\n alpacaAccountId: string;\n // Reference to the asset being ordered.\n assetId: string;\n // Type of order, defined by OrderType enum.\n type: OrderType;\n // Action of the order, defined by TradeAction enum.\n action: TradeAction;\n // Quantity of the asset to be ordered.\n qty: number;\n // Price at which the asset is to be bought or sold.\n price: number;\n // Current status of the order, defined by OrderStatus enum.\n status: OrderStatus;\n // Timestamp when the order was created.\n createdAt: Date;\n // Timestamp when the order was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n}\n\nexport interface Position {\n // Unique identifier for the position.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Relation to the Asset model.\n asset: Asset;\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable.\n alpacaAccount?: AlpacaAccount;\n // Foreign key referencing the AlpacaAccount.\n alpacaAccountId: string;\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\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 // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\nexport enum OptionType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeActionSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum TradeActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport interface Action {\n // Unique identifier for the action.\n id: string;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by TradeAction enum.\n action: TradeAction;\n // Type of hedge applied, if any.\n hedgeType?: string;\n // Price at which the hedge was executed.\n hedgePrice?: number;\n // Price at which the asset was bought.\n buyPrice?: number;\n // Price at which the asset was sold.\n sellPrice?: number;\n // Quantity of the asset involved in the action.\n qty: number;\n // Side of the trade action (BUY or SELL).\n side: TradeActionSide;\n // Type of order used in the action, defined by OrderType enum.\n type: OrderType;\n // Stop-loss price set for the action.\n stopLoss?: number;\n // Target price set for the action.\n targetPrice?: number;\n // Additional notes or comments about the action.\n note: string;\n // Timestamp when the action was executed.\n executionTime?: Date;\n // Current status of the trade action.\n status: TradeActionStatus;\n // Fees associated with the action.\n fee?: number;\n // Relation to the Trade model.\n trade: Trade;\n}\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\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 // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport interface NewsArticle {\n // Unique identifier for the news article.\n id: string;\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 // Timestamp when the news article was added to the database.\n createdAt: Date;\n // Timestamp when the news article was last updated.\n updatedAt: Date;\n // List of asset sentiments associated with this news article.\n assets: NewsArticleAssetSentiment[];\n}\n\nexport interface NewsArticleAssetSentiment {\n // Unique identifier for the sentiment record.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Reference to the associated news article.\n newsArticleId: string;\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model.\n news: NewsArticle;\n // Relation to the Asset model.\n asset: Asset;\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";
|
1
|
+
export declare const AssetTypeString = "\nYour response should adhere to the following type definition for the \"Asset\" type, and its nested object types (which include 'Trade', 'Order', 'Position', 'NewsArticleAssetSentiment' types), as well as any ENUMS used by it (which include 'AssetType' enum).\n\nImportantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).\n\nexport interface Asset {\n // Unique identifier for the asset.\n id: string;\n // Ticker symbol of the asset, must be unique.\n symbol: string;\n // Full name of the asset, must be unique.\n name: string;\n // Type of the asset, defined by AssetType enum.\n type: AssetType;\n // URL to the asset's logo image.\n logoUrl?: string;\n // Description of the asset.\n description?: string;\n // Central Index Key for the asset.\n cik?: string;\n // Stock exchange where the asset is listed.\n exchange?: string;\n // Currency in which the asset is traded.\n currency?: string;\n // Country where the asset is based.\n country?: string;\n // Sector classification of the asset.\n sector?: string;\n // Industry classification of the asset.\n industry?: string;\n // Physical address associated with the asset.\n address?: string;\n // Official website of the asset.\n officialSite?: string;\n // Fiscal year-end date of the asset.\n fiscalYearEnd?: string;\n // Date of the latest financial quarter.\n latestQuarter?: string;\n // Market capitalization of the asset.\n marketCapitalization?: string;\n // Earnings Before Interest, Taxes, Depreciation, and Amortization.\n ebitda?: string;\n // Price-to-Earnings ratio.\n peRatio?: string;\n // Price/Earnings to Growth ratio.\n pegRatio?: string;\n // Book value per share.\n bookValue?: string;\n // Dividend per share.\n dividendPerShare?: string;\n // Dividend yield percentage.\n dividendYield?: string;\n // Earnings per share.\n eps?: string;\n // Revenue per share over the trailing twelve months.\n revenuePerShareTTM?: string;\n // Profit margin percentage.\n profitMargin?: string;\n // Operating margin over the trailing twelve months.\n operatingMarginTTM?: string;\n // Return on assets over the trailing twelve months.\n returnOnAssetsTTM?: string;\n // Return on equity over the trailing twelve months.\n returnOnEquityTTM?: string;\n // Total revenue over the trailing twelve months.\n revenueTTM?: string;\n // Gross profit over the trailing twelve months.\n grossProfitTTM?: string;\n // Diluted earnings per share over the trailing twelve months.\n dilutedEPSTTM?: string;\n // Year-over-year growth in quarterly earnings.\n quarterlyEarningsGrowthYOY?: string;\n // Year-over-year growth in quarterly revenue.\n quarterlyRevenueGrowthYOY?: string;\n // Analyst target price for the asset.\n analystTargetPrice?: string;\n // Percentage of analysts rating the asset as Strong Buy.\n analystRatingStrongBuy?: string;\n // Percentage of analysts rating the asset as Buy.\n analystRatingBuy?: string;\n // Percentage of analysts rating the asset as Hold.\n analystRatingHold?: string;\n // Percentage of analysts rating the asset as Sell.\n analystRatingSell?: string;\n // Percentage of analysts rating the asset as Strong Sell.\n analystRatingStrongSell?: string;\n // Trailing Price-to-Earnings ratio.\n trailingPE?: string;\n // Forward Price-to-Earnings ratio.\n forwardPE?: string;\n // Price-to-Sales ratio over the trailing twelve months.\n priceToSalesRatioTTM?: string;\n // Price-to-Book ratio.\n priceToBookRatio?: string;\n // Enterprise Value to Revenue ratio.\n evToRevenue?: string;\n // Enterprise Value to EBITDA ratio.\n evToEbitda?: string;\n // Beta coefficient measuring volatility.\n beta?: string;\n // 52-week high price of the asset.\n week52High?: string;\n // 52-week low price of the asset.\n week52Low?: string;\n // 50-day moving average price.\n day50MovingAverage?: string;\n // 200-day moving average price.\n day200MovingAverage?: string;\n // Total number of shares outstanding.\n sharesOutstanding?: string;\n // Date when the next dividend is paid.\n dividendDate?: string;\n // Date when the asset goes ex-dividend.\n exDividendDate?: string;\n // Timestamp when the asset was created in the database.\n createdAt: Date;\n // Timestamp when the asset was last updated in the database.\n updatedAt: Date;\n // List of trades involving this asset.\n trades: Trade[];\n // List of orders involving this asset.\n orders: Order[];\n // List of positions involving this asset.\n positions: Position[];\n // List of news article sentiments related to this asset.\n newsMentions: NewsArticleAssetSentiment[];\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 TradeStatus {\n PENDING = \"PENDING\",\n OPEN = \"OPEN\",\n PARTIAL = \"PARTIAL\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport enum AlpacaAccountType {\n PAPER = \"PAPER\",\n LIVE = \"LIVE\"\n}\n\nexport enum UserRole {\n OWNER = \"OWNER\",\n ADMIN = \"ADMIN\",\n USER = \"USER\"\n}\n\n// Simplified reference to Customer.\nexport interface Customer {\n// Unique identifier for the customer.\n id: number;\n}\n\n// Simplified reference to Account.\nexport interface Account {\n// Unique identifier for the account.\n id: string;\n}\n\n// Simplified reference to Session.\nexport interface Session {\n// Unique identifier for the session.\n id: string;\n}\n\n// Simplified reference to Authenticator.\nexport interface Authenticator {\n// Unique identifier for the authenticator.\n id: string;\n}\n\nexport enum SubscriptionPlan {\n FREE = \"FREE\",\n PRO = \"PRO\",\n BUSINESS = \"BUSINESS\"\n}\n\nexport interface User {\n // Unique identifier for the user.\n id: string;\n // The user's full name.\n name?: string;\n // The user's email address, must be unique.\n email?: string;\n // Timestamp when the user's email was verified.\n emailVerified?: Date;\n // URL to the user's profile image.\n image?: string;\n // Timestamp when the user account was created.\n createdAt: Date;\n // Timestamp when the user account was last updated.\n updatedAt: Date;\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, if applicable.\n customer?: Customer;\n // Foreign key referencing the Customer.\n customerId?: number;\n // List of accounts associated with the user.\n accounts: Account[];\n // List of sessions associated with the user.\n sessions: Session[];\n // List of authenticators for the user.\n authenticators: Authenticator[];\n // The subscription plan the user is enrolled in.\n plan?: SubscriptionPlan;\n // List of Alpaca accounts linked to the user.\n alpacaAccounts: AlpacaAccount[];\n}\n\nexport enum OrderType {\n MARKET = \"MARKET\",\n LIMIT = \"LIMIT\",\n STOP = \"STOP\",\n STOP_LIMIT = \"STOP_LIMIT\"\n}\n\nexport enum TradeAction {\n BUY = \"BUY\",\n GET_OPTION_CONTRACTS = \"GET_OPTION_CONTRACTS\",\n EXERCISE_OPTION = \"EXERCISE_OPTION\",\n SELL = \"SELL\",\n CANCEL = \"CANCEL\",\n ADJUST = \"ADJUST\",\n HEDGE = \"HEDGE\"\n}\n\nexport enum OrderStatus {\n PENDING = \"PENDING\",\n FILLED = \"FILLED\",\n CANCELLED = \"CANCELLED\",\n REJECTED = \"REJECTED\"\n}\n\nexport interface Order {\n // Unique identifier for the order.\n id: string;\n // Reference to the Alpaca account used for the order.\n alpacaAccountId: string;\n // Reference to the asset being ordered.\n assetId: string;\n // Type of order, defined by OrderType enum.\n type: OrderType;\n // Action of the order, defined by TradeAction enum.\n action: TradeAction;\n // Quantity of the asset to be ordered.\n qty: number;\n // Price at which the asset is to be bought or sold.\n price: number;\n // Current status of the order, defined by OrderStatus enum.\n status: OrderStatus;\n // Timestamp when the order was created.\n createdAt: Date;\n // Timestamp when the order was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n}\n\nexport interface Position {\n // Unique identifier for the position.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Relation to the Asset model.\n asset: Asset;\n // The average price at which the asset was acquired.\n averageEntryPrice: number;\n // Total quantity of the asset held.\n qty: number;\n // Quantity of the asset available for trading.\n qtyAvailable: number;\n // Current market value of the position.\n marketValue: number;\n // Total cost basis of the position.\n costBasis: number;\n // Unrealized profit or loss of the position.\n unrealizedPL: number;\n // Unrealized profit or loss as a percentage.\n unrealizedPLPC: number;\n // Unrealized intraday profit or loss.\n unrealisedIntradayPL: number;\n // Unrealized intraday profit or loss as a percentage.\n unrealisedIntradayPLPC: number;\n // Current price of the asset.\n currentPrice: number;\n // Last traded price of the asset.\n lastTradePrice: number;\n // Price change of the asset for the day.\n changeToday: number;\n // Indicates if the asset is marginable.\n assetMarginable: boolean;\n // Relation to the AlpacaAccount model, if applicable.\n alpacaAccount?: AlpacaAccount;\n // Foreign key referencing the AlpacaAccount.\n alpacaAccountId: string;\n}\n\nexport enum AlertType {\n SUCCESS = \"SUCCESS\",\n WARNING = \"WARNING\",\n ERROR = \"ERROR\",\n INFO = \"INFO\"\n}\n\nexport interface Alert {\n // Unique identifier for the alert.\n id: string;\n // Reference to the Alpaca account associated with the alert.\n alpacaAccountId: string;\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 // Timestamp when the alert was created.\n createdAt: Date;\n // Timestamp when the alert was last updated.\n updatedAt: Date;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n}\n\nexport interface AlpacaAccount {\n // Unique identifier for the Alpaca account.\n id: string;\n // The type of Alpaca account (PAPER or LIVE).\n type: AlpacaAccountType;\n // API key for authenticating requests to Alpaca.\n APIKey: string;\n // API secret for authenticating requests to Alpaca.\n APISecret: string;\n // JSON configuration settings for the Alpaca account.\n configuration?: any;\n // Indicates whether the market is currently open for trading.\n marketOpen: boolean;\n // Relation to the User model who owns this Alpaca account.\n user: User;\n // Foreign key referencing the User.\n userId: string;\n // Timestamp when the Alpaca account was created.\n createdAt: Date;\n // Timestamp when the Alpaca account was last updated.\n updatedAt: Date;\n // List of trades executed through this Alpaca account.\n trades: Trade[];\n // List of orders placed through this Alpaca account.\n orders: Order[];\n // List of positions held in this Alpaca account.\n positions: Position[];\n // List of alerts generated for this Alpaca account.\n alerts: Alert[];\n}\n\nexport enum OptionContractType {\n CALL = \"CALL\",\n PUT = \"PUT\"\n}\n\nexport enum TradeActionSide {\n BUY = \"BUY\",\n SELL = \"SELL\"\n}\n\nexport enum TradeActionStatus {\n STAGED = \"STAGED\",\n EXECUTED = \"EXECUTED\",\n COMPLETED = \"COMPLETED\"\n}\n\nexport interface Action {\n // Unique identifier for the action.\n id: string;\n // Reference to the trade this action is part of.\n tradeId: string;\n // Sequence number of the action within the trade.\n sequence: number;\n // Type of trade action, defined by TradeAction enum.\n action: TradeAction;\n // Type of hedge applied, if any.\n hedgeType?: string;\n // Price at which the hedge was executed.\n hedgePrice?: number;\n // Price at which the asset was bought.\n buyPrice?: number;\n // Price at which the asset was sold.\n sellPrice?: number;\n // Quantity of the asset involved in the action.\n qty: number;\n // Side of the trade action (BUY or SELL).\n side: TradeActionSide;\n // Type of order used in the action, defined by OrderType enum.\n type: OrderType;\n // Stop-loss price set for the action.\n stopLoss?: number;\n // Target price set for the action.\n targetPrice?: number;\n // Additional notes or comments about the action.\n note: string;\n // Timestamp when the action was executed.\n executionTime?: Date;\n // Current status of the trade action.\n status: TradeActionStatus;\n // Fees associated with the action.\n fee?: number;\n // Relation to the Trade model.\n trade: Trade;\n}\n\nexport interface Trade {\n // Unique identifier for the trade.\n id: string;\n // Reference to the Alpaca account used for the trade.\n alpacaAccountId: string;\n // Reference to the asset being traded.\n assetId: string;\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 // Signal that triggered the trade.\n signal: string;\n // Strategy used to execute the trade.\n strategy: string;\n // Analysis supporting the trade decision.\n analysis: string;\n // Confidence level in the trade decision.\n confidence: number;\n // Timestamp when the trade was executed.\n timestamp: Date;\n // Timestamp when the trade record was created.\n createdAt: Date;\n // Timestamp when the trade record was last updated.\n updatedAt: Date;\n // Current status of the trade.\n status: TradeStatus;\n // Relation to the AlpacaAccount model.\n alpacaAccount: AlpacaAccount;\n // Relation to the Asset model.\n asset: Asset;\n // If the asset.type is OPTION, then provide type of contract (CALL or PUT).\n optionType?: OptionContractType;\n // List of actions associated with this trade.\n actions: Action[];\n}\n\nexport interface NewsArticle {\n // Unique identifier for the news article.\n id: string;\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 // Timestamp when the news article was added to the database.\n createdAt: Date;\n // Timestamp when the news article was last updated.\n updatedAt: Date;\n // List of asset sentiments associated with this news article.\n assets: NewsArticleAssetSentiment[];\n}\n\nexport interface NewsArticleAssetSentiment {\n // Unique identifier for the sentiment record.\n id: string;\n // Reference to the associated asset.\n assetId: string;\n // Reference to the associated news article.\n newsArticleId: string;\n // URL of the news article, must be unique.\n url: string;\n // Relation to the NewsArticle model.\n news: NewsArticle;\n // Relation to the Asset model.\n asset: Asset;\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";
|
2
2
|
//# sourceMappingURL=Asset.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Asset.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Asset.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,
|
1
|
+
{"version":3,"file":"Asset.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Asset.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,s2gBA0hB3B,CAAC"}
|
@@ -130,7 +130,7 @@ export interface Asset {
|
|
130
130
|
id: string;
|
131
131
|
}
|
132
132
|
|
133
|
-
export enum
|
133
|
+
export enum OptionContractType {
|
134
134
|
CALL = "CALL",
|
135
135
|
PUT = "PUT"
|
136
136
|
}
|
@@ -175,7 +175,7 @@ export interface Trade {
|
|
175
175
|
// Relation to the Asset model.
|
176
176
|
asset: Asset;
|
177
177
|
// If the asset.type is OPTION, then provide type of contract (CALL or PUT).
|
178
|
-
optionType?:
|
178
|
+
optionType?: OptionContractType;
|
179
179
|
// List of actions associated with this trade.
|
180
180
|
actions: Action[];
|
181
181
|
}
|