adaptic-backend 1.0.61 → 1.0.62
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 +59 -26
- package/generated/typeStrings/Account.cjs +363 -0
- package/generated/typeStrings/Account.d.ts +2 -0
- package/generated/typeStrings/Account.d.ts.map +1 -0
- package/generated/typeStrings/Account.js.map +1 -0
- package/generated/typeStrings/Action.cjs +337 -0
- package/generated/typeStrings/Action.d.ts +2 -0
- package/generated/typeStrings/Action.d.ts.map +1 -0
- package/generated/typeStrings/Action.js.map +1 -0
- package/generated/typeStrings/Alert.cjs +493 -0
- package/generated/typeStrings/Alert.d.ts +2 -0
- package/generated/typeStrings/Alert.d.ts.map +1 -0
- package/generated/typeStrings/Alert.js.map +1 -0
- package/generated/typeStrings/AlpacaAccount.cjs +575 -0
- package/generated/typeStrings/AlpacaAccount.d.ts +2 -0
- package/generated/typeStrings/AlpacaAccount.d.ts.map +1 -0
- package/generated/typeStrings/AlpacaAccount.js.map +1 -0
- package/generated/typeStrings/Asset.cjs +536 -0
- package/generated/typeStrings/Asset.d.ts +2 -0
- package/generated/typeStrings/Asset.d.ts.map +1 -0
- package/generated/typeStrings/Asset.js.map +1 -0
- package/generated/typeStrings/Authenticator.cjs +363 -0
- package/generated/typeStrings/Authenticator.d.ts +2 -0
- package/generated/typeStrings/Authenticator.d.ts.map +1 -0
- package/generated/typeStrings/Authenticator.js.map +1 -0
- package/generated/typeStrings/Customer.cjs +363 -0
- package/generated/typeStrings/Customer.d.ts +2 -0
- package/generated/typeStrings/Customer.d.ts.map +1 -0
- package/generated/typeStrings/Customer.js.map +1 -0
- package/generated/typeStrings/EconomicEvent.cjs +33 -0
- package/generated/typeStrings/EconomicEvent.d.ts +2 -0
- package/generated/typeStrings/EconomicEvent.d.ts.map +1 -0
- package/generated/typeStrings/EconomicEvent.js.map +1 -0
- package/generated/typeStrings/NewsArticle.cjs +361 -0
- package/generated/typeStrings/NewsArticle.d.ts +2 -0
- package/generated/typeStrings/NewsArticle.d.ts.map +1 -0
- package/generated/typeStrings/NewsArticle.js.map +1 -0
- package/generated/typeStrings/NewsArticleAssetSentiment.cjs +386 -0
- package/generated/typeStrings/NewsArticleAssetSentiment.d.ts +2 -0
- package/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -0
- package/generated/typeStrings/NewsArticleAssetSentiment.js.map +1 -0
- package/generated/typeStrings/Order.cjs +521 -0
- package/generated/typeStrings/Order.d.ts +2 -0
- package/generated/typeStrings/Order.d.ts.map +1 -0
- package/generated/typeStrings/Order.js.map +1 -0
- package/generated/typeStrings/Position.cjs +419 -0
- package/generated/typeStrings/Position.d.ts +2 -0
- package/generated/typeStrings/Position.d.ts.map +1 -0
- package/generated/typeStrings/Position.js.map +1 -0
- package/generated/typeStrings/Session.cjs +363 -0
- package/generated/typeStrings/Session.d.ts +2 -0
- package/generated/typeStrings/Session.d.ts.map +1 -0
- package/generated/typeStrings/Session.js.map +1 -0
- package/generated/typeStrings/Trade.cjs +521 -0
- package/generated/typeStrings/Trade.d.ts +2 -0
- package/generated/typeStrings/Trade.d.ts.map +1 -0
- package/generated/typeStrings/Trade.js.map +1 -0
- package/generated/typeStrings/User.cjs +493 -0
- package/generated/typeStrings/User.d.ts +2 -0
- package/generated/typeStrings/User.d.ts.map +1 -0
- package/generated/typeStrings/User.js.map +1 -0
- package/generated/typeStrings/VerificationToken.cjs +21 -0
- package/generated/typeStrings/VerificationToken.d.ts +2 -0
- package/generated/typeStrings/VerificationToken.d.ts.map +1 -0
- package/generated/typeStrings/VerificationToken.js.map +1 -0
- package/generated/typeStrings/enums.cjs +100 -0
- package/generated/typeStrings/enums.d.ts +85 -0
- package/generated/typeStrings/enums.d.ts.map +1 -0
- package/generated/typeStrings/enums.js.map +1 -0
- package/generated/typeStrings/index.cjs +39 -0
- package/generated/typeStrings/index.d.ts +20 -0
- package/generated/typeStrings/index.d.ts.map +1 -0
- package/generated/typeStrings/index.js.map +1 -0
- package/index.cjs +25 -0
- package/index.d.ts +1 -0
- package/package.json +1 -1
- package/server/generated/typeStrings/Account.d.ts +2 -0
- package/server/generated/typeStrings/Account.d.ts.map +1 -0
- package/server/generated/typeStrings/Account.js.map +1 -0
- package/server/generated/typeStrings/Account.mjs +360 -0
- package/server/generated/typeStrings/Action.d.ts +2 -0
- package/server/generated/typeStrings/Action.d.ts.map +1 -0
- package/server/generated/typeStrings/Action.js.map +1 -0
- package/server/generated/typeStrings/Action.mjs +334 -0
- package/server/generated/typeStrings/Alert.d.ts +2 -0
- package/server/generated/typeStrings/Alert.d.ts.map +1 -0
- package/server/generated/typeStrings/Alert.js.map +1 -0
- package/server/generated/typeStrings/Alert.mjs +490 -0
- package/server/generated/typeStrings/AlpacaAccount.d.ts +2 -0
- package/server/generated/typeStrings/AlpacaAccount.d.ts.map +1 -0
- package/server/generated/typeStrings/AlpacaAccount.js.map +1 -0
- package/server/generated/typeStrings/AlpacaAccount.mjs +572 -0
- package/server/generated/typeStrings/Asset.d.ts +2 -0
- package/server/generated/typeStrings/Asset.d.ts.map +1 -0
- package/server/generated/typeStrings/Asset.js.map +1 -0
- package/server/generated/typeStrings/Asset.mjs +533 -0
- package/server/generated/typeStrings/Authenticator.d.ts +2 -0
- package/server/generated/typeStrings/Authenticator.d.ts.map +1 -0
- package/server/generated/typeStrings/Authenticator.js.map +1 -0
- package/server/generated/typeStrings/Authenticator.mjs +360 -0
- package/server/generated/typeStrings/Customer.d.ts +2 -0
- package/server/generated/typeStrings/Customer.d.ts.map +1 -0
- package/server/generated/typeStrings/Customer.js.map +1 -0
- package/server/generated/typeStrings/Customer.mjs +360 -0
- package/server/generated/typeStrings/EconomicEvent.d.ts +2 -0
- package/server/generated/typeStrings/EconomicEvent.d.ts.map +1 -0
- package/server/generated/typeStrings/EconomicEvent.js.map +1 -0
- package/server/generated/typeStrings/EconomicEvent.mjs +30 -0
- package/server/generated/typeStrings/NewsArticle.d.ts +2 -0
- package/server/generated/typeStrings/NewsArticle.d.ts.map +1 -0
- package/server/generated/typeStrings/NewsArticle.js.map +1 -0
- package/server/generated/typeStrings/NewsArticle.mjs +358 -0
- package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts +2 -0
- package/server/generated/typeStrings/NewsArticleAssetSentiment.d.ts.map +1 -0
- package/server/generated/typeStrings/NewsArticleAssetSentiment.js.map +1 -0
- package/server/generated/typeStrings/NewsArticleAssetSentiment.mjs +383 -0
- package/server/generated/typeStrings/Order.d.ts +2 -0
- package/server/generated/typeStrings/Order.d.ts.map +1 -0
- package/server/generated/typeStrings/Order.js.map +1 -0
- package/server/generated/typeStrings/Order.mjs +518 -0
- package/server/generated/typeStrings/Position.d.ts +2 -0
- package/server/generated/typeStrings/Position.d.ts.map +1 -0
- package/server/generated/typeStrings/Position.js.map +1 -0
- package/server/generated/typeStrings/Position.mjs +416 -0
- package/server/generated/typeStrings/Session.d.ts +2 -0
- package/server/generated/typeStrings/Session.d.ts.map +1 -0
- package/server/generated/typeStrings/Session.js.map +1 -0
- package/server/generated/typeStrings/Session.mjs +360 -0
- package/server/generated/typeStrings/Trade.d.ts +2 -0
- package/server/generated/typeStrings/Trade.d.ts.map +1 -0
- package/server/generated/typeStrings/Trade.js.map +1 -0
- package/server/generated/typeStrings/Trade.mjs +518 -0
- package/server/generated/typeStrings/User.d.ts +2 -0
- package/server/generated/typeStrings/User.d.ts.map +1 -0
- package/server/generated/typeStrings/User.js.map +1 -0
- package/server/generated/typeStrings/User.mjs +490 -0
- package/server/generated/typeStrings/VerificationToken.d.ts +2 -0
- package/server/generated/typeStrings/VerificationToken.d.ts.map +1 -0
- package/server/generated/typeStrings/VerificationToken.js.map +1 -0
- package/server/generated/typeStrings/VerificationToken.mjs +18 -0
- package/server/generated/typeStrings/enums.d.ts +85 -0
- package/server/generated/typeStrings/enums.d.ts.map +1 -0
- package/server/generated/typeStrings/enums.js.map +1 -0
- package/server/generated/typeStrings/enums.mjs +97 -0
- package/server/generated/typeStrings/index.d.ts +20 -0
- package/server/generated/typeStrings/index.d.ts.map +1 -0
- package/server/generated/typeStrings/index.js.map +1 -0
- package/server/generated/typeStrings/index.mjs +36 -0
- package/server/index.d.ts +1 -0
- package/server/index.d.ts.map +1 -1
- package/server/index.js.map +1 -1
- package/server/index.mjs +1 -0
@@ -0,0 +1,536 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.AssetTypeString = void 0;
|
4
|
+
exports.AssetTypeString = `
|
5
|
+
Your 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).
|
6
|
+
|
7
|
+
Importantly, DO NOT include any annotations in your response (i.e. remove the ones we have provided for your reference below).
|
8
|
+
|
9
|
+
export interface Asset {
|
10
|
+
// Unique identifier for the asset.
|
11
|
+
id: string;
|
12
|
+
// Ticker symbol of the asset, must be unique.
|
13
|
+
symbol: string;
|
14
|
+
// Full name of the asset, must be unique.
|
15
|
+
name: string;
|
16
|
+
// Type of the asset, defined by AssetType enum.
|
17
|
+
type: AssetType;
|
18
|
+
// URL to the asset's logo image.
|
19
|
+
logoUrl?: string;
|
20
|
+
// Description of the asset.
|
21
|
+
description?: string;
|
22
|
+
// Central Index Key for the asset.
|
23
|
+
cik?: string;
|
24
|
+
// Stock exchange where the asset is listed.
|
25
|
+
exchange?: string;
|
26
|
+
// Currency in which the asset is traded.
|
27
|
+
currency?: string;
|
28
|
+
// Country where the asset is based.
|
29
|
+
country?: string;
|
30
|
+
// Sector classification of the asset.
|
31
|
+
sector?: string;
|
32
|
+
// Industry classification of the asset.
|
33
|
+
industry?: string;
|
34
|
+
// Physical address associated with the asset.
|
35
|
+
address?: string;
|
36
|
+
// Official website of the asset.
|
37
|
+
officialSite?: string;
|
38
|
+
// Fiscal year-end date of the asset.
|
39
|
+
fiscalYearEnd?: string;
|
40
|
+
// Date of the latest financial quarter.
|
41
|
+
latestQuarter?: string;
|
42
|
+
// Market capitalization of the asset.
|
43
|
+
marketCapitalization?: string;
|
44
|
+
// Earnings Before Interest, Taxes, Depreciation, and Amortization.
|
45
|
+
ebitda?: string;
|
46
|
+
// Price-to-Earnings ratio.
|
47
|
+
peRatio?: string;
|
48
|
+
// Price/Earnings to Growth ratio.
|
49
|
+
pegRatio?: string;
|
50
|
+
// Book value per share.
|
51
|
+
bookValue?: string;
|
52
|
+
// Dividend per share.
|
53
|
+
dividendPerShare?: string;
|
54
|
+
// Dividend yield percentage.
|
55
|
+
dividendYield?: string;
|
56
|
+
// Earnings per share.
|
57
|
+
eps?: string;
|
58
|
+
// Revenue per share over the trailing twelve months.
|
59
|
+
revenuePerShareTTM?: string;
|
60
|
+
// Profit margin percentage.
|
61
|
+
profitMargin?: string;
|
62
|
+
// Operating margin over the trailing twelve months.
|
63
|
+
operatingMarginTTM?: string;
|
64
|
+
// Return on assets over the trailing twelve months.
|
65
|
+
returnOnAssetsTTM?: string;
|
66
|
+
// Return on equity over the trailing twelve months.
|
67
|
+
returnOnEquityTTM?: string;
|
68
|
+
// Total revenue over the trailing twelve months.
|
69
|
+
revenueTTM?: string;
|
70
|
+
// Gross profit over the trailing twelve months.
|
71
|
+
grossProfitTTM?: string;
|
72
|
+
// Diluted earnings per share over the trailing twelve months.
|
73
|
+
dilutedEPSTTM?: string;
|
74
|
+
// Year-over-year growth in quarterly earnings.
|
75
|
+
quarterlyEarningsGrowthYOY?: string;
|
76
|
+
// Year-over-year growth in quarterly revenue.
|
77
|
+
quarterlyRevenueGrowthYOY?: string;
|
78
|
+
// Analyst target price for the asset.
|
79
|
+
analystTargetPrice?: string;
|
80
|
+
// Percentage of analysts rating the asset as Strong Buy.
|
81
|
+
analystRatingStrongBuy?: string;
|
82
|
+
// Percentage of analysts rating the asset as Buy.
|
83
|
+
analystRatingBuy?: string;
|
84
|
+
// Percentage of analysts rating the asset as Hold.
|
85
|
+
analystRatingHold?: string;
|
86
|
+
// Percentage of analysts rating the asset as Sell.
|
87
|
+
analystRatingSell?: string;
|
88
|
+
// Percentage of analysts rating the asset as Strong Sell.
|
89
|
+
analystRatingStrongSell?: string;
|
90
|
+
// Trailing Price-to-Earnings ratio.
|
91
|
+
trailingPE?: string;
|
92
|
+
// Forward Price-to-Earnings ratio.
|
93
|
+
forwardPE?: string;
|
94
|
+
// Price-to-Sales ratio over the trailing twelve months.
|
95
|
+
priceToSalesRatioTTM?: string;
|
96
|
+
// Price-to-Book ratio.
|
97
|
+
priceToBookRatio?: string;
|
98
|
+
// Enterprise Value to Revenue ratio.
|
99
|
+
evToRevenue?: string;
|
100
|
+
// Enterprise Value to EBITDA ratio.
|
101
|
+
evToEbitda?: string;
|
102
|
+
// Beta coefficient measuring volatility.
|
103
|
+
beta?: string;
|
104
|
+
// 52-week high price of the asset.
|
105
|
+
week52High?: string;
|
106
|
+
// 52-week low price of the asset.
|
107
|
+
week52Low?: string;
|
108
|
+
// 50-day moving average price.
|
109
|
+
day50MovingAverage?: string;
|
110
|
+
// 200-day moving average price.
|
111
|
+
day200MovingAverage?: string;
|
112
|
+
// Total number of shares outstanding.
|
113
|
+
sharesOutstanding?: string;
|
114
|
+
// Date when the next dividend is paid.
|
115
|
+
dividendDate?: string;
|
116
|
+
// Date when the asset goes ex-dividend.
|
117
|
+
exDividendDate?: string;
|
118
|
+
// Timestamp when the asset was created in the database.
|
119
|
+
createdAt: Date;
|
120
|
+
// Timestamp when the asset was last updated in the database.
|
121
|
+
updatedAt: Date;
|
122
|
+
// List of trades involving this asset.
|
123
|
+
trades: Trade[];
|
124
|
+
// List of orders involving this asset.
|
125
|
+
orders: Order[];
|
126
|
+
// List of positions involving this asset.
|
127
|
+
positions: Position[];
|
128
|
+
// List of news article sentiments related to this asset.
|
129
|
+
newsMentions: NewsArticleAssetSentiment[];
|
130
|
+
}
|
131
|
+
|
132
|
+
export enum AssetType {
|
133
|
+
STOCK = "STOCK",
|
134
|
+
ETF = "ETF",
|
135
|
+
MUTUAL_FUND = "MUTUAL_FUND",
|
136
|
+
CRYPTOCURRENCY = "CRYPTOCURRENCY",
|
137
|
+
INDEX = "INDEX",
|
138
|
+
COMMODITY = "COMMODITY",
|
139
|
+
CURRENCY = "CURRENCY",
|
140
|
+
OPTION = "OPTION",
|
141
|
+
FUTURE = "FUTURE",
|
142
|
+
BOND = "BOND",
|
143
|
+
WARRANT = "WARRANT",
|
144
|
+
ADR = "ADR",
|
145
|
+
GDR = "GDR",
|
146
|
+
UNIT = "UNIT",
|
147
|
+
RIGHT = "RIGHT",
|
148
|
+
REIT = "REIT",
|
149
|
+
STRUCTURED_PRODUCT = "STRUCTURED_PRODUCT",
|
150
|
+
SWAP = "SWAP",
|
151
|
+
SPOT = "SPOT",
|
152
|
+
FORWARD = "FORWARD",
|
153
|
+
OTHER = "OTHER"
|
154
|
+
}
|
155
|
+
|
156
|
+
export enum TradeStatus {
|
157
|
+
PENDING = "PENDING",
|
158
|
+
OPEN = "OPEN",
|
159
|
+
PARTIAL = "PARTIAL",
|
160
|
+
COMPLETED = "COMPLETED"
|
161
|
+
}
|
162
|
+
|
163
|
+
export enum AlpacaAccountType {
|
164
|
+
PAPER = "PAPER",
|
165
|
+
LIVE = "LIVE"
|
166
|
+
}
|
167
|
+
|
168
|
+
export enum UserRole {
|
169
|
+
OWNER = "OWNER",
|
170
|
+
ADMIN = "ADMIN",
|
171
|
+
USER = "USER"
|
172
|
+
}
|
173
|
+
|
174
|
+
// Simplified reference to Customer.
|
175
|
+
export interface Customer {
|
176
|
+
// Unique identifier for the customer.
|
177
|
+
id: number;
|
178
|
+
}
|
179
|
+
|
180
|
+
// Simplified reference to Account.
|
181
|
+
export interface Account {
|
182
|
+
// Unique identifier for the account.
|
183
|
+
id: string;
|
184
|
+
}
|
185
|
+
|
186
|
+
// Simplified reference to Session.
|
187
|
+
export interface Session {
|
188
|
+
// Unique identifier for the session.
|
189
|
+
id: string;
|
190
|
+
}
|
191
|
+
|
192
|
+
// Simplified reference to Authenticator.
|
193
|
+
export interface Authenticator {
|
194
|
+
// Unique identifier for the authenticator.
|
195
|
+
id: string;
|
196
|
+
}
|
197
|
+
|
198
|
+
export enum SubscriptionPlan {
|
199
|
+
FREE = "FREE",
|
200
|
+
PRO = "PRO",
|
201
|
+
BUSINESS = "BUSINESS"
|
202
|
+
}
|
203
|
+
|
204
|
+
export interface User {
|
205
|
+
// Unique identifier for the user.
|
206
|
+
id: string;
|
207
|
+
// The user's full name.
|
208
|
+
name?: string;
|
209
|
+
// The user's email address, must be unique.
|
210
|
+
email?: string;
|
211
|
+
// Timestamp when the user's email was verified.
|
212
|
+
emailVerified?: Date;
|
213
|
+
// URL to the user's profile image.
|
214
|
+
image?: string;
|
215
|
+
// Timestamp when the user account was created.
|
216
|
+
createdAt: Date;
|
217
|
+
// Timestamp when the user account was last updated.
|
218
|
+
updatedAt: Date;
|
219
|
+
// The role assigned to the user, determining permissions.
|
220
|
+
role: UserRole;
|
221
|
+
// A short biography or description of the user.
|
222
|
+
bio?: string;
|
223
|
+
// The user's job title or position.
|
224
|
+
jobTitle?: string;
|
225
|
+
// The type of Alpaca account the user currently holds.
|
226
|
+
currentAccount: AlpacaAccountType;
|
227
|
+
// Relation to the Customer model, if applicable.
|
228
|
+
customer?: Customer;
|
229
|
+
// Foreign key referencing the Customer.
|
230
|
+
customerId?: number;
|
231
|
+
// List of accounts associated with the user.
|
232
|
+
accounts: Account[];
|
233
|
+
// List of sessions associated with the user.
|
234
|
+
sessions: Session[];
|
235
|
+
// List of authenticators for the user.
|
236
|
+
authenticators: Authenticator[];
|
237
|
+
// The subscription plan the user is enrolled in.
|
238
|
+
plan?: SubscriptionPlan;
|
239
|
+
// List of Alpaca accounts linked to the user.
|
240
|
+
alpacaAccounts: AlpacaAccount[];
|
241
|
+
}
|
242
|
+
|
243
|
+
export enum OrderType {
|
244
|
+
MARKET = "MARKET",
|
245
|
+
LIMIT = "LIMIT",
|
246
|
+
STOP = "STOP",
|
247
|
+
STOP_LIMIT = "STOP_LIMIT"
|
248
|
+
}
|
249
|
+
|
250
|
+
export enum TradeAction {
|
251
|
+
BUY = "BUY",
|
252
|
+
GET_OPTION_CONTRACTS = "GET_OPTION_CONTRACTS",
|
253
|
+
EXERCISE_OPTION = "EXERCISE_OPTION",
|
254
|
+
SELL = "SELL",
|
255
|
+
CANCEL = "CANCEL",
|
256
|
+
ADJUST = "ADJUST",
|
257
|
+
HEDGE = "HEDGE"
|
258
|
+
}
|
259
|
+
|
260
|
+
export enum OrderStatus {
|
261
|
+
PENDING = "PENDING",
|
262
|
+
FILLED = "FILLED",
|
263
|
+
CANCELLED = "CANCELLED",
|
264
|
+
REJECTED = "REJECTED"
|
265
|
+
}
|
266
|
+
|
267
|
+
export interface Order {
|
268
|
+
// Unique identifier for the order.
|
269
|
+
id: string;
|
270
|
+
// Reference to the Alpaca account used for the order.
|
271
|
+
alpacaAccountId: string;
|
272
|
+
// Reference to the asset being ordered.
|
273
|
+
assetId: string;
|
274
|
+
// Type of order, defined by OrderType enum.
|
275
|
+
type: OrderType;
|
276
|
+
// Action of the order, defined by TradeAction enum.
|
277
|
+
action: TradeAction;
|
278
|
+
// Quantity of the asset to be ordered.
|
279
|
+
qty: number;
|
280
|
+
// Price at which the asset is to be bought or sold.
|
281
|
+
price: number;
|
282
|
+
// Current status of the order, defined by OrderStatus enum.
|
283
|
+
status: OrderStatus;
|
284
|
+
// Timestamp when the order was created.
|
285
|
+
createdAt: Date;
|
286
|
+
// Timestamp when the order was last updated.
|
287
|
+
updatedAt: Date;
|
288
|
+
// Relation to the AlpacaAccount model.
|
289
|
+
alpacaAccount: AlpacaAccount;
|
290
|
+
// Relation to the Asset model.
|
291
|
+
asset: Asset;
|
292
|
+
}
|
293
|
+
|
294
|
+
export interface Position {
|
295
|
+
// Unique identifier for the position.
|
296
|
+
id: string;
|
297
|
+
// Reference to the associated asset.
|
298
|
+
assetId: string;
|
299
|
+
// Relation to the Asset model.
|
300
|
+
asset: Asset;
|
301
|
+
// The average price at which the asset was acquired.
|
302
|
+
averageEntryPrice: number;
|
303
|
+
// Total quantity of the asset held.
|
304
|
+
qty: number;
|
305
|
+
// Quantity of the asset available for trading.
|
306
|
+
qtyAvailable: number;
|
307
|
+
// Current market value of the position.
|
308
|
+
marketValue: number;
|
309
|
+
// Total cost basis of the position.
|
310
|
+
costBasis: number;
|
311
|
+
// Unrealized profit or loss of the position.
|
312
|
+
unrealizedPL: number;
|
313
|
+
// Unrealized profit or loss as a percentage.
|
314
|
+
unrealizedPLPC: number;
|
315
|
+
// Unrealized intraday profit or loss.
|
316
|
+
unrealisedIntradayPL: number;
|
317
|
+
// Unrealized intraday profit or loss as a percentage.
|
318
|
+
unrealisedIntradayPLPC: number;
|
319
|
+
// Current price of the asset.
|
320
|
+
currentPrice: number;
|
321
|
+
// Last traded price of the asset.
|
322
|
+
lastTradePrice: number;
|
323
|
+
// Price change of the asset for the day.
|
324
|
+
changeToday: number;
|
325
|
+
// Indicates if the asset is marginable.
|
326
|
+
assetMarginable: boolean;
|
327
|
+
// Relation to the AlpacaAccount model, if applicable.
|
328
|
+
alpacaAccount?: AlpacaAccount;
|
329
|
+
// Foreign key referencing the AlpacaAccount.
|
330
|
+
alpacaAccountId: string;
|
331
|
+
}
|
332
|
+
|
333
|
+
export enum AlertType {
|
334
|
+
SUCCESS = "SUCCESS",
|
335
|
+
WARNING = "WARNING",
|
336
|
+
ERROR = "ERROR",
|
337
|
+
INFO = "INFO"
|
338
|
+
}
|
339
|
+
|
340
|
+
export interface Alert {
|
341
|
+
// Unique identifier for the alert.
|
342
|
+
id: string;
|
343
|
+
// Reference to the Alpaca account associated with the alert.
|
344
|
+
alpacaAccountId: string;
|
345
|
+
// Message content of the alert.
|
346
|
+
message: string;
|
347
|
+
// Type of the alert, defined by AlertType enum.
|
348
|
+
type: AlertType;
|
349
|
+
// Indicates whether the alert has been read by the user.
|
350
|
+
isRead: boolean;
|
351
|
+
// Timestamp when the alert was created.
|
352
|
+
createdAt: Date;
|
353
|
+
// Timestamp when the alert was last updated.
|
354
|
+
updatedAt: Date;
|
355
|
+
// Relation to the AlpacaAccount model.
|
356
|
+
alpacaAccount: AlpacaAccount;
|
357
|
+
}
|
358
|
+
|
359
|
+
export interface AlpacaAccount {
|
360
|
+
// Unique identifier for the Alpaca account.
|
361
|
+
id: string;
|
362
|
+
// The type of Alpaca account (PAPER or LIVE).
|
363
|
+
type: AlpacaAccountType;
|
364
|
+
// API key for authenticating requests to Alpaca.
|
365
|
+
APIKey: string;
|
366
|
+
// API secret for authenticating requests to Alpaca.
|
367
|
+
APISecret: string;
|
368
|
+
// JSON configuration settings for the Alpaca account.
|
369
|
+
configuration?: any;
|
370
|
+
// Indicates whether the market is currently open for trading.
|
371
|
+
marketOpen: boolean;
|
372
|
+
// Relation to the User model who owns this Alpaca account.
|
373
|
+
user: User;
|
374
|
+
// Foreign key referencing the User.
|
375
|
+
userId: string;
|
376
|
+
// Timestamp when the Alpaca account was created.
|
377
|
+
createdAt: Date;
|
378
|
+
// Timestamp when the Alpaca account was last updated.
|
379
|
+
updatedAt: Date;
|
380
|
+
// List of trades executed through this Alpaca account.
|
381
|
+
trades: Trade[];
|
382
|
+
// List of orders placed through this Alpaca account.
|
383
|
+
orders: Order[];
|
384
|
+
// List of positions held in this Alpaca account.
|
385
|
+
positions: Position[];
|
386
|
+
// List of alerts generated for this Alpaca account.
|
387
|
+
alerts: Alert[];
|
388
|
+
}
|
389
|
+
|
390
|
+
export enum TradeActionSide {
|
391
|
+
BUY = "BUY",
|
392
|
+
SELL = "SELL"
|
393
|
+
}
|
394
|
+
|
395
|
+
export enum TradeActionStatus {
|
396
|
+
STAGED = "STAGED",
|
397
|
+
EXECUTED = "EXECUTED",
|
398
|
+
COMPLETED = "COMPLETED"
|
399
|
+
}
|
400
|
+
|
401
|
+
export interface Action {
|
402
|
+
// Unique identifier for the action.
|
403
|
+
id: string;
|
404
|
+
// Reference to the trade this action is part of.
|
405
|
+
tradeId: string;
|
406
|
+
// Sequence number of the action within the trade.
|
407
|
+
sequence: number;
|
408
|
+
// Type of trade action, defined by TradeAction enum.
|
409
|
+
action: TradeAction;
|
410
|
+
// Type of hedge applied, if any.
|
411
|
+
hedgeType?: string;
|
412
|
+
// Price at which the hedge was executed.
|
413
|
+
hedgePrice?: number;
|
414
|
+
// Price at which the asset was bought.
|
415
|
+
buyPrice?: number;
|
416
|
+
// Price at which the asset was sold.
|
417
|
+
sellPrice?: number;
|
418
|
+
// Quantity of the asset involved in the action.
|
419
|
+
qty: number;
|
420
|
+
// Side of the trade action (BUY or SELL).
|
421
|
+
side: TradeActionSide;
|
422
|
+
// Type of order used in the action, defined by OrderType enum.
|
423
|
+
type: OrderType;
|
424
|
+
// Stop-loss price set for the action.
|
425
|
+
stopLoss?: number;
|
426
|
+
// Target price set for the action.
|
427
|
+
targetPrice?: number;
|
428
|
+
// Additional notes or comments about the action.
|
429
|
+
note: string;
|
430
|
+
// Timestamp when the action was executed.
|
431
|
+
executionTime?: Date;
|
432
|
+
// Current status of the trade action.
|
433
|
+
status: TradeActionStatus;
|
434
|
+
// Fees associated with the action.
|
435
|
+
fee?: number;
|
436
|
+
// Relation to the Trade model.
|
437
|
+
trade: Trade;
|
438
|
+
}
|
439
|
+
|
440
|
+
export interface Trade {
|
441
|
+
// Unique identifier for the trade.
|
442
|
+
id: string;
|
443
|
+
// Reference to the Alpaca account used for the trade.
|
444
|
+
alpacaAccountId: string;
|
445
|
+
// Reference to the asset being traded.
|
446
|
+
assetId: string;
|
447
|
+
// Quantity of the asset being traded.
|
448
|
+
qty: number;
|
449
|
+
// Price at which the asset was traded.
|
450
|
+
price: number;
|
451
|
+
// Total value of the trade (qty * price).
|
452
|
+
total: number;
|
453
|
+
// Signal that triggered the trade.
|
454
|
+
signal: string;
|
455
|
+
// Strategy used to execute the trade.
|
456
|
+
strategy: string;
|
457
|
+
// Analysis supporting the trade decision.
|
458
|
+
analysis: string;
|
459
|
+
// Confidence level in the trade decision.
|
460
|
+
confidence: number;
|
461
|
+
// Timestamp when the trade was executed.
|
462
|
+
timestamp: Date;
|
463
|
+
// Timestamp when the trade record was created.
|
464
|
+
createdAt: Date;
|
465
|
+
// Timestamp when the trade record was last updated.
|
466
|
+
updatedAt: Date;
|
467
|
+
// Current status of the trade.
|
468
|
+
status: TradeStatus;
|
469
|
+
// Relation to the AlpacaAccount model.
|
470
|
+
alpacaAccount: AlpacaAccount;
|
471
|
+
// Relation to the Asset model.
|
472
|
+
asset: Asset;
|
473
|
+
// List of actions associated with this trade.
|
474
|
+
actions: Action[];
|
475
|
+
}
|
476
|
+
|
477
|
+
export interface NewsArticle {
|
478
|
+
// Unique identifier for the news article.
|
479
|
+
id: string;
|
480
|
+
// Title of the news article.
|
481
|
+
title: string;
|
482
|
+
// Full content of the news article.
|
483
|
+
content?: string;
|
484
|
+
// Source of the news article (e.g., Bloomberg, Reuters).
|
485
|
+
source: string;
|
486
|
+
// Domain of the source website.
|
487
|
+
sourceDomain?: string;
|
488
|
+
// URL to the original news article, must be unique.
|
489
|
+
url: string;
|
490
|
+
// Sentiment analysis result of the article.
|
491
|
+
sentiment: string;
|
492
|
+
// List of authors who wrote the article.
|
493
|
+
authors: string[];
|
494
|
+
// Summary or abstract of the news article.
|
495
|
+
summary?: string;
|
496
|
+
// URL to the banner image of the article.
|
497
|
+
bannerImage?: string;
|
498
|
+
// Publication time of the article.
|
499
|
+
timePublished: string;
|
500
|
+
// Category or genre of the news article.
|
501
|
+
category?: string;
|
502
|
+
// Topics covered in the news article.
|
503
|
+
topics: string[];
|
504
|
+
// URL to the logo image of the news source.
|
505
|
+
logo?: string;
|
506
|
+
// Timestamp when the news article was added to the database.
|
507
|
+
createdAt: Date;
|
508
|
+
// Timestamp when the news article was last updated.
|
509
|
+
updatedAt: Date;
|
510
|
+
// List of asset sentiments associated with this news article.
|
511
|
+
assets: NewsArticleAssetSentiment[];
|
512
|
+
}
|
513
|
+
|
514
|
+
export interface NewsArticleAssetSentiment {
|
515
|
+
// Unique identifier for the sentiment record.
|
516
|
+
id: string;
|
517
|
+
// Reference to the associated asset.
|
518
|
+
assetId: string;
|
519
|
+
// Reference to the associated news article.
|
520
|
+
newsArticleId: string;
|
521
|
+
// URL of the news article, must be unique.
|
522
|
+
url: string;
|
523
|
+
// Relation to the NewsArticle model.
|
524
|
+
news: NewsArticle;
|
525
|
+
// Relation to the Asset model.
|
526
|
+
asset: Asset;
|
527
|
+
// Relevancy score indicating how relevant the news is to the asset.
|
528
|
+
relevancyScore?: string;
|
529
|
+
// Sentiment score derived from the news content.
|
530
|
+
sentimentScore?: string;
|
531
|
+
// Label indicating the overall sentiment (e.g., Positive, Negative, Neutral).
|
532
|
+
sentimentLabel?: string;
|
533
|
+
}
|
534
|
+
|
535
|
+
`;
|
536
|
+
//# sourceMappingURL=Asset.js.map
|
@@ -0,0 +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 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 // 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
|
+
//# sourceMappingURL=Asset.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Asset.d.ts","sourceRoot":"","sources":["../../../src/generated/typeStrings/Asset.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,sqgBAmhB3B,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Asset.js","sourceRoot":"","sources":["../../../src/generated/typeStrings/Asset.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmhB9B,CAAC"}
|