@yojinhq/jintel-client 0.11.0 → 0.12.0
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/dist/queries.d.ts +2 -2
- package/dist/queries.d.ts.map +1 -1
- package/dist/queries.js +519 -508
- package/dist/queries.js.map +1 -1
- package/dist/types.d.ts +232 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +18 -0
- package/dist/types.js.map +1 -1
- package/package.json +48 -49
package/dist/queries.js
CHANGED
|
@@ -1,494 +1,505 @@
|
|
|
1
1
|
// ── Field Fragments ────────────────────────────────────────────────────────
|
|
2
|
-
export const MARKET_QUOTE_FIELDS = `
|
|
3
|
-
quote {
|
|
4
|
-
ticker
|
|
5
|
-
price
|
|
6
|
-
open
|
|
7
|
-
high
|
|
8
|
-
low
|
|
9
|
-
previousClose
|
|
10
|
-
change
|
|
11
|
-
changePercent
|
|
12
|
-
volume
|
|
13
|
-
marketCap
|
|
14
|
-
preMarketPrice
|
|
15
|
-
preMarketChange
|
|
16
|
-
preMarketChangePercent
|
|
17
|
-
postMarketPrice
|
|
18
|
-
postMarketChange
|
|
19
|
-
postMarketChangePercent
|
|
20
|
-
timestamp
|
|
21
|
-
source
|
|
22
|
-
}`;
|
|
23
|
-
export const FUNDAMENTALS_FIELDS = `
|
|
24
|
-
fundamentals {
|
|
25
|
-
marketCap
|
|
26
|
-
revenue
|
|
27
|
-
netIncome
|
|
28
|
-
eps
|
|
29
|
-
peRatio
|
|
30
|
-
dividendYield
|
|
31
|
-
beta
|
|
32
|
-
fiftyTwoWeekHigh
|
|
33
|
-
fiftyTwoWeekLow
|
|
34
|
-
debtToEquity
|
|
35
|
-
sector
|
|
36
|
-
industry
|
|
37
|
-
exchange
|
|
38
|
-
currency
|
|
39
|
-
description
|
|
40
|
-
employees
|
|
41
|
-
website
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
id
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
score
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
2
|
+
export const MARKET_QUOTE_FIELDS = `
|
|
3
|
+
quote {
|
|
4
|
+
ticker
|
|
5
|
+
price
|
|
6
|
+
open
|
|
7
|
+
high
|
|
8
|
+
low
|
|
9
|
+
previousClose
|
|
10
|
+
change
|
|
11
|
+
changePercent
|
|
12
|
+
volume
|
|
13
|
+
marketCap
|
|
14
|
+
preMarketPrice
|
|
15
|
+
preMarketChange
|
|
16
|
+
preMarketChangePercent
|
|
17
|
+
postMarketPrice
|
|
18
|
+
postMarketChange
|
|
19
|
+
postMarketChangePercent
|
|
20
|
+
timestamp
|
|
21
|
+
source
|
|
22
|
+
}`;
|
|
23
|
+
export const FUNDAMENTALS_FIELDS = `
|
|
24
|
+
fundamentals {
|
|
25
|
+
marketCap
|
|
26
|
+
revenue
|
|
27
|
+
netIncome
|
|
28
|
+
eps
|
|
29
|
+
peRatio
|
|
30
|
+
dividendYield
|
|
31
|
+
beta
|
|
32
|
+
fiftyTwoWeekHigh
|
|
33
|
+
fiftyTwoWeekLow
|
|
34
|
+
debtToEquity
|
|
35
|
+
sector
|
|
36
|
+
industry
|
|
37
|
+
exchange
|
|
38
|
+
currency
|
|
39
|
+
description
|
|
40
|
+
employees
|
|
41
|
+
website
|
|
42
|
+
earningsDate
|
|
43
|
+
priceToBook
|
|
44
|
+
bookValue
|
|
45
|
+
earningsHistory {
|
|
46
|
+
period
|
|
47
|
+
epsActual
|
|
48
|
+
epsEstimate
|
|
49
|
+
epsDifference
|
|
50
|
+
surprisePercent
|
|
51
|
+
}
|
|
52
|
+
source
|
|
53
|
+
}`;
|
|
54
|
+
export const RISK_FIELDS = `
|
|
55
|
+
risk {
|
|
56
|
+
overallScore
|
|
57
|
+
signals {
|
|
58
|
+
type
|
|
59
|
+
severity
|
|
60
|
+
description
|
|
61
|
+
source
|
|
62
|
+
date
|
|
63
|
+
}
|
|
64
|
+
sanctionsHits
|
|
65
|
+
adverseMediaHits
|
|
66
|
+
regulatoryActions
|
|
67
|
+
}`;
|
|
68
|
+
export const SHORT_INTEREST_FIELDS = `
|
|
69
|
+
shortInterest {
|
|
70
|
+
ticker
|
|
71
|
+
reportDate
|
|
72
|
+
shortInterest
|
|
73
|
+
change
|
|
74
|
+
daysToCover
|
|
75
|
+
source
|
|
76
|
+
}`;
|
|
77
|
+
export const CAMPAIGN_FINANCE_FIELDS = `
|
|
78
|
+
campaignFinance {
|
|
79
|
+
id
|
|
80
|
+
name
|
|
81
|
+
type
|
|
82
|
+
party
|
|
83
|
+
state
|
|
84
|
+
totalRaised
|
|
85
|
+
totalSpent
|
|
86
|
+
cycle
|
|
87
|
+
}`;
|
|
88
|
+
export const REGULATORY_FIELDS = `
|
|
89
|
+
regulatory {
|
|
90
|
+
sanctions {
|
|
91
|
+
listName
|
|
92
|
+
matchedName
|
|
93
|
+
score
|
|
94
|
+
details
|
|
95
|
+
uid
|
|
96
|
+
sdnType
|
|
97
|
+
programs
|
|
98
|
+
}
|
|
99
|
+
filings {
|
|
100
|
+
type
|
|
101
|
+
date
|
|
102
|
+
url
|
|
103
|
+
description
|
|
104
|
+
}
|
|
105
|
+
campaignFinance {
|
|
106
|
+
id
|
|
107
|
+
name
|
|
108
|
+
type
|
|
109
|
+
party
|
|
110
|
+
state
|
|
111
|
+
totalRaised
|
|
112
|
+
totalSpent
|
|
113
|
+
cycle
|
|
114
|
+
}
|
|
115
|
+
}`;
|
|
116
|
+
export const TECHNICALS_FIELDS = `
|
|
117
|
+
technicals {
|
|
118
|
+
ticker
|
|
119
|
+
rsi
|
|
120
|
+
macd { macd signal histogram }
|
|
121
|
+
bollingerBands { upper middle lower }
|
|
122
|
+
ema
|
|
123
|
+
sma
|
|
124
|
+
atr
|
|
125
|
+
vwma
|
|
126
|
+
mfi
|
|
127
|
+
}`;
|
|
128
|
+
export const DERIVATIVES_FIELDS = `
|
|
129
|
+
derivatives {
|
|
130
|
+
futures { date expiration price }
|
|
131
|
+
options {
|
|
132
|
+
contractSymbol expiration strike optionType
|
|
133
|
+
openInterest volume lastTradePrice bid ask
|
|
134
|
+
impliedVolatility delta gamma theta vega
|
|
135
|
+
}
|
|
136
|
+
}`;
|
|
137
|
+
export const NEWS_FIELDS = `
|
|
138
|
+
news {
|
|
139
|
+
title
|
|
140
|
+
link
|
|
141
|
+
snippet
|
|
142
|
+
source
|
|
143
|
+
date
|
|
144
|
+
imageUrl
|
|
145
|
+
sentimentScore
|
|
146
|
+
}`;
|
|
147
|
+
export const RESEARCH_FIELDS = `
|
|
148
|
+
research {
|
|
149
|
+
title
|
|
150
|
+
url
|
|
151
|
+
publishedDate
|
|
152
|
+
author
|
|
153
|
+
text
|
|
154
|
+
score
|
|
155
|
+
}`;
|
|
156
|
+
export const SENTIMENT_FIELDS = `
|
|
157
|
+
sentiment {
|
|
158
|
+
ticker
|
|
159
|
+
name
|
|
160
|
+
rank
|
|
161
|
+
mentions
|
|
162
|
+
upvotes
|
|
163
|
+
rank24hAgo
|
|
164
|
+
mentions24hAgo
|
|
165
|
+
}`;
|
|
166
|
+
export const SOCIAL_FIELDS = `
|
|
167
|
+
social {
|
|
168
|
+
reddit {
|
|
169
|
+
id
|
|
170
|
+
title
|
|
171
|
+
subreddit
|
|
172
|
+
author
|
|
173
|
+
score
|
|
174
|
+
numComments
|
|
175
|
+
url
|
|
176
|
+
text
|
|
177
|
+
date
|
|
178
|
+
}
|
|
179
|
+
redditComments {
|
|
180
|
+
id
|
|
181
|
+
body
|
|
182
|
+
author
|
|
183
|
+
subreddit
|
|
184
|
+
score
|
|
185
|
+
date
|
|
186
|
+
parentId
|
|
187
|
+
postId
|
|
188
|
+
}
|
|
189
|
+
}`;
|
|
190
|
+
export const PREDICTIONS_FIELDS = `
|
|
191
|
+
predictions {
|
|
192
|
+
eventId
|
|
193
|
+
title
|
|
194
|
+
url
|
|
195
|
+
outcomes { name probability }
|
|
196
|
+
outcomesRemaining
|
|
197
|
+
priceMovement
|
|
198
|
+
volume24hr
|
|
199
|
+
volume1mo
|
|
200
|
+
liquidity
|
|
201
|
+
date
|
|
202
|
+
endDate
|
|
203
|
+
}`;
|
|
204
|
+
export const DISCUSSIONS_FIELDS = `
|
|
205
|
+
discussions {
|
|
206
|
+
objectId
|
|
207
|
+
title
|
|
208
|
+
url
|
|
209
|
+
hnUrl
|
|
210
|
+
author
|
|
211
|
+
date
|
|
212
|
+
points
|
|
213
|
+
numComments
|
|
214
|
+
topComments { author text points }
|
|
215
|
+
}`;
|
|
216
|
+
export const FINANCIALS_FIELDS = `
|
|
217
|
+
financials {
|
|
218
|
+
income {
|
|
219
|
+
periodEnding
|
|
220
|
+
periodType
|
|
221
|
+
totalRevenue
|
|
222
|
+
costOfRevenue
|
|
223
|
+
grossProfit
|
|
224
|
+
researchAndDevelopment
|
|
225
|
+
sellingGeneralAndAdmin
|
|
226
|
+
operatingExpense
|
|
227
|
+
operatingIncome
|
|
228
|
+
ebit
|
|
229
|
+
ebitda
|
|
230
|
+
netIncome
|
|
231
|
+
basicEps
|
|
232
|
+
dilutedEps
|
|
233
|
+
totalAssets
|
|
234
|
+
totalLiabilities
|
|
235
|
+
totalEquity
|
|
236
|
+
cashAndEquivalents
|
|
237
|
+
totalDebt
|
|
238
|
+
currentAssets
|
|
239
|
+
currentLiabilities
|
|
240
|
+
retainedEarnings
|
|
241
|
+
operatingCashFlow
|
|
242
|
+
investingCashFlow
|
|
243
|
+
financingCashFlow
|
|
244
|
+
freeCashFlow
|
|
245
|
+
capitalExpenditure
|
|
246
|
+
dividendsPaid
|
|
247
|
+
stockBasedCompensation
|
|
248
|
+
}
|
|
249
|
+
balanceSheet {
|
|
250
|
+
periodEnding
|
|
251
|
+
periodType
|
|
252
|
+
totalRevenue
|
|
253
|
+
costOfRevenue
|
|
254
|
+
grossProfit
|
|
255
|
+
researchAndDevelopment
|
|
256
|
+
sellingGeneralAndAdmin
|
|
257
|
+
operatingExpense
|
|
258
|
+
operatingIncome
|
|
259
|
+
ebit
|
|
260
|
+
ebitda
|
|
261
|
+
netIncome
|
|
262
|
+
basicEps
|
|
263
|
+
dilutedEps
|
|
264
|
+
totalAssets
|
|
265
|
+
totalLiabilities
|
|
266
|
+
totalEquity
|
|
267
|
+
cashAndEquivalents
|
|
268
|
+
totalDebt
|
|
269
|
+
currentAssets
|
|
270
|
+
currentLiabilities
|
|
271
|
+
retainedEarnings
|
|
272
|
+
operatingCashFlow
|
|
273
|
+
investingCashFlow
|
|
274
|
+
financingCashFlow
|
|
275
|
+
freeCashFlow
|
|
276
|
+
capitalExpenditure
|
|
277
|
+
dividendsPaid
|
|
278
|
+
stockBasedCompensation
|
|
279
|
+
}
|
|
280
|
+
cashFlow {
|
|
281
|
+
periodEnding
|
|
282
|
+
periodType
|
|
283
|
+
totalRevenue
|
|
284
|
+
costOfRevenue
|
|
285
|
+
grossProfit
|
|
286
|
+
researchAndDevelopment
|
|
287
|
+
sellingGeneralAndAdmin
|
|
288
|
+
operatingExpense
|
|
289
|
+
operatingIncome
|
|
290
|
+
ebit
|
|
291
|
+
ebitda
|
|
292
|
+
netIncome
|
|
293
|
+
basicEps
|
|
294
|
+
dilutedEps
|
|
295
|
+
totalAssets
|
|
296
|
+
totalLiabilities
|
|
297
|
+
totalEquity
|
|
298
|
+
cashAndEquivalents
|
|
299
|
+
totalDebt
|
|
300
|
+
currentAssets
|
|
301
|
+
currentLiabilities
|
|
302
|
+
retainedEarnings
|
|
303
|
+
operatingCashFlow
|
|
304
|
+
investingCashFlow
|
|
305
|
+
financingCashFlow
|
|
306
|
+
freeCashFlow
|
|
307
|
+
capitalExpenditure
|
|
308
|
+
dividendsPaid
|
|
309
|
+
stockBasedCompensation
|
|
310
|
+
}
|
|
311
|
+
}`;
|
|
312
|
+
export const EXECUTIVES_FIELDS = `
|
|
313
|
+
executives {
|
|
314
|
+
name
|
|
315
|
+
title
|
|
316
|
+
pay
|
|
317
|
+
yearBorn
|
|
318
|
+
age
|
|
319
|
+
exercisedValue
|
|
320
|
+
unexercisedValue
|
|
321
|
+
}`;
|
|
322
|
+
export const HISTORY_FIELDS = `
|
|
323
|
+
history {
|
|
324
|
+
date
|
|
325
|
+
open
|
|
326
|
+
high
|
|
327
|
+
low
|
|
328
|
+
close
|
|
329
|
+
volume
|
|
330
|
+
}`;
|
|
331
|
+
export const KEY_EVENTS_FIELDS = `
|
|
332
|
+
keyEvents {
|
|
333
|
+
date
|
|
334
|
+
type
|
|
335
|
+
description
|
|
336
|
+
priceChange
|
|
337
|
+
changePercent
|
|
338
|
+
close
|
|
339
|
+
volume
|
|
329
340
|
}`;
|
|
330
341
|
// ── Static Queries ─────────────────────────────────────────────────────────
|
|
331
|
-
export const SEARCH_ENTITIES = `
|
|
332
|
-
query SearchEntities($query: String!, $type: EntityType, $limit: Int) {
|
|
333
|
-
searchEntities(query: $query, type: $type, limit: $limit) {
|
|
334
|
-
id
|
|
335
|
-
name
|
|
336
|
-
type
|
|
337
|
-
tickers
|
|
338
|
-
domain
|
|
339
|
-
country
|
|
340
|
-
}
|
|
341
|
-
}`;
|
|
342
|
-
export const ENTITY = `
|
|
343
|
-
query Entity($id: ID!) {
|
|
344
|
-
entity(id: $id) {
|
|
345
|
-
id
|
|
346
|
-
name
|
|
347
|
-
type
|
|
348
|
-
tickers
|
|
349
|
-
domain
|
|
350
|
-
country
|
|
351
|
-
}
|
|
352
|
-
}`;
|
|
353
|
-
export const ENTITY_BY_TICKER = `
|
|
354
|
-
query EntityByTicker($ticker: String!) {
|
|
355
|
-
entityByTicker(ticker: $ticker) {
|
|
356
|
-
id
|
|
357
|
-
name
|
|
358
|
-
type
|
|
359
|
-
tickers
|
|
360
|
-
domain
|
|
361
|
-
country
|
|
362
|
-
}
|
|
363
|
-
}`;
|
|
364
|
-
export const QUOTES = `
|
|
365
|
-
query Quotes($tickers: [String!]!) {
|
|
366
|
-
quotes(tickers: $tickers) {
|
|
367
|
-
ticker
|
|
368
|
-
price
|
|
369
|
-
open
|
|
370
|
-
high
|
|
371
|
-
low
|
|
372
|
-
previousClose
|
|
373
|
-
change
|
|
374
|
-
changePercent
|
|
375
|
-
volume
|
|
376
|
-
marketCap
|
|
377
|
-
preMarketPrice
|
|
378
|
-
preMarketChange
|
|
379
|
-
preMarketChangePercent
|
|
380
|
-
postMarketPrice
|
|
381
|
-
postMarketChange
|
|
382
|
-
postMarketChangePercent
|
|
383
|
-
timestamp
|
|
384
|
-
source
|
|
385
|
-
}
|
|
342
|
+
export const SEARCH_ENTITIES = `
|
|
343
|
+
query SearchEntities($query: String!, $type: EntityType, $limit: Int) {
|
|
344
|
+
searchEntities(query: $query, type: $type, limit: $limit) {
|
|
345
|
+
id
|
|
346
|
+
name
|
|
347
|
+
type
|
|
348
|
+
tickers
|
|
349
|
+
domain
|
|
350
|
+
country
|
|
351
|
+
}
|
|
352
|
+
}`;
|
|
353
|
+
export const ENTITY = `
|
|
354
|
+
query Entity($id: ID!) {
|
|
355
|
+
entity(id: $id) {
|
|
356
|
+
id
|
|
357
|
+
name
|
|
358
|
+
type
|
|
359
|
+
tickers
|
|
360
|
+
domain
|
|
361
|
+
country
|
|
362
|
+
}
|
|
363
|
+
}`;
|
|
364
|
+
export const ENTITY_BY_TICKER = `
|
|
365
|
+
query EntityByTicker($ticker: String!) {
|
|
366
|
+
entityByTicker(ticker: $ticker) {
|
|
367
|
+
id
|
|
368
|
+
name
|
|
369
|
+
type
|
|
370
|
+
tickers
|
|
371
|
+
domain
|
|
372
|
+
country
|
|
373
|
+
}
|
|
374
|
+
}`;
|
|
375
|
+
export const QUOTES = `
|
|
376
|
+
query Quotes($tickers: [String!]!) {
|
|
377
|
+
quotes(tickers: $tickers) {
|
|
378
|
+
ticker
|
|
379
|
+
price
|
|
380
|
+
open
|
|
381
|
+
high
|
|
382
|
+
low
|
|
383
|
+
previousClose
|
|
384
|
+
change
|
|
385
|
+
changePercent
|
|
386
|
+
volume
|
|
387
|
+
marketCap
|
|
388
|
+
preMarketPrice
|
|
389
|
+
preMarketChange
|
|
390
|
+
preMarketChangePercent
|
|
391
|
+
postMarketPrice
|
|
392
|
+
postMarketChange
|
|
393
|
+
postMarketChangePercent
|
|
394
|
+
timestamp
|
|
395
|
+
source
|
|
396
|
+
}
|
|
386
397
|
}`;
|
|
387
398
|
/** @deprecated Use QUOTES instead */
|
|
388
399
|
export const BATCH_QUOTES = QUOTES;
|
|
389
|
-
export const SANCTIONS_SCREEN = `
|
|
390
|
-
query SanctionsScreen($name: String!, $country: String) {
|
|
391
|
-
sanctionsScreen(name: $name, country: $country) {
|
|
392
|
-
listName
|
|
393
|
-
matchedName
|
|
394
|
-
score
|
|
395
|
-
details
|
|
396
|
-
uid
|
|
397
|
-
sdnType
|
|
398
|
-
programs
|
|
399
|
-
}
|
|
400
|
-
}`;
|
|
401
|
-
export const GDP = `
|
|
402
|
-
query Gdp($country: String!, $type: GdpType) {
|
|
403
|
-
gdp(country: $country, type: $type) {
|
|
404
|
-
date
|
|
405
|
-
country
|
|
406
|
-
value
|
|
407
|
-
}
|
|
408
|
-
}`;
|
|
409
|
-
export const INFLATION = `
|
|
410
|
-
query Inflation($country: String!) {
|
|
411
|
-
inflation(country: $country) {
|
|
412
|
-
date
|
|
413
|
-
country
|
|
414
|
-
value
|
|
415
|
-
}
|
|
416
|
-
}`;
|
|
417
|
-
export const INTEREST_RATES = `
|
|
418
|
-
query InterestRates($country: String!) {
|
|
419
|
-
interestRates(country: $country) {
|
|
420
|
-
date
|
|
421
|
-
country
|
|
422
|
-
value
|
|
423
|
-
}
|
|
424
|
-
}`;
|
|
425
|
-
export const SP500_MULTIPLES = `
|
|
426
|
-
query SP500Multiples($series: SP500Series!) {
|
|
427
|
-
sp500Multiples(series: $series) {
|
|
428
|
-
date
|
|
429
|
-
name
|
|
430
|
-
value
|
|
431
|
-
}
|
|
432
|
-
}`;
|
|
433
|
-
export const PRICE_HISTORY = `
|
|
434
|
-
query PriceHistory($tickers: [String!]!, $range: String, $interval: String) {
|
|
435
|
-
priceHistory(tickers: $tickers, range: $range, interval: $interval) {
|
|
436
|
-
ticker
|
|
437
|
-
history {
|
|
438
|
-
date
|
|
439
|
-
open
|
|
440
|
-
high
|
|
441
|
-
low
|
|
442
|
-
close
|
|
443
|
-
volume
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
}`;
|
|
447
|
-
export const FAMA_FRENCH_FACTORS = `
|
|
448
|
-
query FamaFrenchFactors($series: FamaFrenchSeries!, $range: String) {
|
|
449
|
-
famaFrenchFactors(series: $series, range: $range) {
|
|
450
|
-
date
|
|
451
|
-
mktRf
|
|
452
|
-
smb
|
|
453
|
-
hml
|
|
454
|
-
rmw
|
|
455
|
-
cma
|
|
456
|
-
rf
|
|
457
|
-
}
|
|
458
|
-
}`;
|
|
459
|
-
export const SHORT_INTEREST = `
|
|
460
|
-
query ShortInterest($ticker: String!) {
|
|
461
|
-
shortInterest(ticker: $ticker) {
|
|
462
|
-
ticker
|
|
463
|
-
reportDate
|
|
464
|
-
shortInterest
|
|
465
|
-
change
|
|
466
|
-
daysToCover
|
|
467
|
-
source
|
|
468
|
-
}
|
|
469
|
-
}`;
|
|
470
|
-
export const CAMPAIGN_FINANCE = `
|
|
471
|
-
query CampaignFinance($name: String!, $cycle: Int) {
|
|
472
|
-
campaignFinance(name: $name, cycle: $cycle) {
|
|
473
|
-
id
|
|
474
|
-
name
|
|
475
|
-
type
|
|
476
|
-
party
|
|
477
|
-
state
|
|
478
|
-
totalRaised
|
|
479
|
-
totalSpent
|
|
480
|
-
cycle
|
|
481
|
-
}
|
|
482
|
-
}`;
|
|
483
|
-
export const MARKET_STATUS = `
|
|
484
|
-
query MarketStatus {
|
|
485
|
-
marketStatus {
|
|
486
|
-
isOpen
|
|
487
|
-
isTradingDay
|
|
488
|
-
session
|
|
489
|
-
holiday
|
|
490
|
-
date
|
|
491
|
-
}
|
|
400
|
+
export const SANCTIONS_SCREEN = `
|
|
401
|
+
query SanctionsScreen($name: String!, $country: String) {
|
|
402
|
+
sanctionsScreen(name: $name, country: $country) {
|
|
403
|
+
listName
|
|
404
|
+
matchedName
|
|
405
|
+
score
|
|
406
|
+
details
|
|
407
|
+
uid
|
|
408
|
+
sdnType
|
|
409
|
+
programs
|
|
410
|
+
}
|
|
411
|
+
}`;
|
|
412
|
+
export const GDP = `
|
|
413
|
+
query Gdp($country: String!, $type: GdpType) {
|
|
414
|
+
gdp(country: $country, type: $type) {
|
|
415
|
+
date
|
|
416
|
+
country
|
|
417
|
+
value
|
|
418
|
+
}
|
|
419
|
+
}`;
|
|
420
|
+
export const INFLATION = `
|
|
421
|
+
query Inflation($country: String!) {
|
|
422
|
+
inflation(country: $country) {
|
|
423
|
+
date
|
|
424
|
+
country
|
|
425
|
+
value
|
|
426
|
+
}
|
|
427
|
+
}`;
|
|
428
|
+
export const INTEREST_RATES = `
|
|
429
|
+
query InterestRates($country: String!) {
|
|
430
|
+
interestRates(country: $country) {
|
|
431
|
+
date
|
|
432
|
+
country
|
|
433
|
+
value
|
|
434
|
+
}
|
|
435
|
+
}`;
|
|
436
|
+
export const SP500_MULTIPLES = `
|
|
437
|
+
query SP500Multiples($series: SP500Series!) {
|
|
438
|
+
sp500Multiples(series: $series) {
|
|
439
|
+
date
|
|
440
|
+
name
|
|
441
|
+
value
|
|
442
|
+
}
|
|
443
|
+
}`;
|
|
444
|
+
export const PRICE_HISTORY = `
|
|
445
|
+
query PriceHistory($tickers: [String!]!, $range: String, $interval: String) {
|
|
446
|
+
priceHistory(tickers: $tickers, range: $range, interval: $interval) {
|
|
447
|
+
ticker
|
|
448
|
+
history {
|
|
449
|
+
date
|
|
450
|
+
open
|
|
451
|
+
high
|
|
452
|
+
low
|
|
453
|
+
close
|
|
454
|
+
volume
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}`;
|
|
458
|
+
export const FAMA_FRENCH_FACTORS = `
|
|
459
|
+
query FamaFrenchFactors($series: FamaFrenchSeries!, $range: String) {
|
|
460
|
+
famaFrenchFactors(series: $series, range: $range) {
|
|
461
|
+
date
|
|
462
|
+
mktRf
|
|
463
|
+
smb
|
|
464
|
+
hml
|
|
465
|
+
rmw
|
|
466
|
+
cma
|
|
467
|
+
rf
|
|
468
|
+
}
|
|
469
|
+
}`;
|
|
470
|
+
export const SHORT_INTEREST = `
|
|
471
|
+
query ShortInterest($ticker: String!) {
|
|
472
|
+
shortInterest(ticker: $ticker) {
|
|
473
|
+
ticker
|
|
474
|
+
reportDate
|
|
475
|
+
shortInterest
|
|
476
|
+
change
|
|
477
|
+
daysToCover
|
|
478
|
+
source
|
|
479
|
+
}
|
|
480
|
+
}`;
|
|
481
|
+
export const CAMPAIGN_FINANCE = `
|
|
482
|
+
query CampaignFinance($name: String!, $cycle: Int) {
|
|
483
|
+
campaignFinance(name: $name, cycle: $cycle) {
|
|
484
|
+
id
|
|
485
|
+
name
|
|
486
|
+
type
|
|
487
|
+
party
|
|
488
|
+
state
|
|
489
|
+
totalRaised
|
|
490
|
+
totalSpent
|
|
491
|
+
cycle
|
|
492
|
+
}
|
|
493
|
+
}`;
|
|
494
|
+
export const MARKET_STATUS = `
|
|
495
|
+
query MarketStatus {
|
|
496
|
+
marketStatus {
|
|
497
|
+
isOpen
|
|
498
|
+
isTradingDay
|
|
499
|
+
session
|
|
500
|
+
holiday
|
|
501
|
+
date
|
|
502
|
+
}
|
|
492
503
|
}`;
|
|
493
504
|
// ── Dynamic Query Builder ──────────────────────────────────────────────────
|
|
494
505
|
const FIELD_BLOCK_MAP = {
|
|
@@ -510,7 +521,7 @@ const FIELD_BLOCK_MAP = {
|
|
|
510
521
|
const ARRAY_SUBGRAPH_FIELDS = new Set(['news', 'research', 'social', 'predictions', 'discussions']);
|
|
511
522
|
/** Filtered variants of array sub-graph field blocks. */
|
|
512
523
|
const FILTERED_FIELD_BLOCK_MAP = {
|
|
513
|
-
news: `news(filter: $filter) {\n title\n link\n snippet\n source\n date\n imageUrl\n }`,
|
|
524
|
+
news: `news(filter: $filter) {\n title\n link\n snippet\n source\n date\n imageUrl\n sentimentScore\n }`,
|
|
514
525
|
research: `research(filter: $filter) {\n title\n url\n publishedDate\n author\n text\n score\n }`,
|
|
515
526
|
social: `social {\n reddit(filter: $filter) {\n id\n title\n subreddit\n author\n score\n numComments\n url\n text\n date\n }\n redditComments(filter: $filter) {\n id\n body\n author\n subreddit\n score\n date\n parentId\n postId\n }\n }`,
|
|
516
527
|
predictions: `predictions(filter: $filter) {\n eventId\n title\n url\n outcomes { name probability }\n outcomesRemaining\n priceMovement\n volume24hr\n volume1mo\n liquidity\n date\n endDate\n }`,
|
|
@@ -536,17 +547,17 @@ export function buildEnrichQuery(fields, options) {
|
|
|
536
547
|
(options.since != null || options.until != null || options.limit != null || options.sort != null);
|
|
537
548
|
const extraVars = filterVarDecl(fields, hasFilter);
|
|
538
549
|
const blocks = buildBlocks(fields, hasFilter);
|
|
539
|
-
return `
|
|
540
|
-
query EnrichEntity($id: ID!${extraVars}) {
|
|
541
|
-
entity(id: $id) {
|
|
542
|
-
id
|
|
543
|
-
name
|
|
544
|
-
type
|
|
545
|
-
tickers
|
|
546
|
-
domain
|
|
547
|
-
country
|
|
548
|
-
${blocks}
|
|
549
|
-
}
|
|
550
|
+
return `
|
|
551
|
+
query EnrichEntity($id: ID!${extraVars}) {
|
|
552
|
+
entity(id: $id) {
|
|
553
|
+
id
|
|
554
|
+
name
|
|
555
|
+
type
|
|
556
|
+
tickers
|
|
557
|
+
domain
|
|
558
|
+
country
|
|
559
|
+
${blocks}
|
|
560
|
+
}
|
|
550
561
|
}`;
|
|
551
562
|
}
|
|
552
563
|
export function buildBatchEnrichQuery(fields, options) {
|
|
@@ -554,17 +565,17 @@ export function buildBatchEnrichQuery(fields, options) {
|
|
|
554
565
|
(options.since != null || options.until != null || options.limit != null || options.sort != null);
|
|
555
566
|
const extraVars = filterVarDecl(fields, hasFilter);
|
|
556
567
|
const blocks = buildBlocks(fields, hasFilter);
|
|
557
|
-
return `
|
|
558
|
-
query BatchEnrich($tickers: [String!]!${extraVars}) {
|
|
559
|
-
entitiesByTickers(tickers: $tickers) {
|
|
560
|
-
id
|
|
561
|
-
name
|
|
562
|
-
type
|
|
563
|
-
tickers
|
|
564
|
-
domain
|
|
565
|
-
country
|
|
566
|
-
${blocks}
|
|
567
|
-
}
|
|
568
|
+
return `
|
|
569
|
+
query BatchEnrich($tickers: [String!]!${extraVars}) {
|
|
570
|
+
entitiesByTickers(tickers: $tickers) {
|
|
571
|
+
id
|
|
572
|
+
name
|
|
573
|
+
type
|
|
574
|
+
tickers
|
|
575
|
+
domain
|
|
576
|
+
country
|
|
577
|
+
${blocks}
|
|
578
|
+
}
|
|
568
579
|
}`;
|
|
569
580
|
}
|
|
570
581
|
//# sourceMappingURL=queries.js.map
|