@yojinhq/jintel-client 0.11.1 → 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 -509
- package/dist/queries.js.map +1 -1
- package/dist/types.d.ts +214 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -1
- package/package.json +48 -49
package/dist/queries.js
CHANGED
|
@@ -1,495 +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
|
-
earningsDate
|
|
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
|
-
export const
|
|
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
|
-
export const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}`;
|
|
137
|
-
export const
|
|
138
|
-
|
|
139
|
-
title
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}`;
|
|
156
|
-
export const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
author
|
|
173
|
-
|
|
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
|
-
date
|
|
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
|
-
export const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
close
|
|
329
|
-
volume
|
|
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
|
|
330
340
|
}`;
|
|
331
341
|
// ── Static Queries ─────────────────────────────────────────────────────────
|
|
332
|
-
export const SEARCH_ENTITIES = `
|
|
333
|
-
query SearchEntities($query: String!, $type: EntityType, $limit: Int) {
|
|
334
|
-
searchEntities(query: $query, type: $type, limit: $limit) {
|
|
335
|
-
id
|
|
336
|
-
name
|
|
337
|
-
type
|
|
338
|
-
tickers
|
|
339
|
-
domain
|
|
340
|
-
country
|
|
341
|
-
}
|
|
342
|
-
}`;
|
|
343
|
-
export const ENTITY = `
|
|
344
|
-
query Entity($id: ID!) {
|
|
345
|
-
entity(id: $id) {
|
|
346
|
-
id
|
|
347
|
-
name
|
|
348
|
-
type
|
|
349
|
-
tickers
|
|
350
|
-
domain
|
|
351
|
-
country
|
|
352
|
-
}
|
|
353
|
-
}`;
|
|
354
|
-
export const ENTITY_BY_TICKER = `
|
|
355
|
-
query EntityByTicker($ticker: String!) {
|
|
356
|
-
entityByTicker(ticker: $ticker) {
|
|
357
|
-
id
|
|
358
|
-
name
|
|
359
|
-
type
|
|
360
|
-
tickers
|
|
361
|
-
domain
|
|
362
|
-
country
|
|
363
|
-
}
|
|
364
|
-
}`;
|
|
365
|
-
export const QUOTES = `
|
|
366
|
-
query Quotes($tickers: [String!]!) {
|
|
367
|
-
quotes(tickers: $tickers) {
|
|
368
|
-
ticker
|
|
369
|
-
price
|
|
370
|
-
open
|
|
371
|
-
high
|
|
372
|
-
low
|
|
373
|
-
previousClose
|
|
374
|
-
change
|
|
375
|
-
changePercent
|
|
376
|
-
volume
|
|
377
|
-
marketCap
|
|
378
|
-
preMarketPrice
|
|
379
|
-
preMarketChange
|
|
380
|
-
preMarketChangePercent
|
|
381
|
-
postMarketPrice
|
|
382
|
-
postMarketChange
|
|
383
|
-
postMarketChangePercent
|
|
384
|
-
timestamp
|
|
385
|
-
source
|
|
386
|
-
}
|
|
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
|
+
}
|
|
387
397
|
}`;
|
|
388
398
|
/** @deprecated Use QUOTES instead */
|
|
389
399
|
export const BATCH_QUOTES = QUOTES;
|
|
390
|
-
export const SANCTIONS_SCREEN = `
|
|
391
|
-
query SanctionsScreen($name: String!, $country: String) {
|
|
392
|
-
sanctionsScreen(name: $name, country: $country) {
|
|
393
|
-
listName
|
|
394
|
-
matchedName
|
|
395
|
-
score
|
|
396
|
-
details
|
|
397
|
-
uid
|
|
398
|
-
sdnType
|
|
399
|
-
programs
|
|
400
|
-
}
|
|
401
|
-
}`;
|
|
402
|
-
export const GDP = `
|
|
403
|
-
query Gdp($country: String!, $type: GdpType) {
|
|
404
|
-
gdp(country: $country, type: $type) {
|
|
405
|
-
date
|
|
406
|
-
country
|
|
407
|
-
value
|
|
408
|
-
}
|
|
409
|
-
}`;
|
|
410
|
-
export const INFLATION = `
|
|
411
|
-
query Inflation($country: String!) {
|
|
412
|
-
inflation(country: $country) {
|
|
413
|
-
date
|
|
414
|
-
country
|
|
415
|
-
value
|
|
416
|
-
}
|
|
417
|
-
}`;
|
|
418
|
-
export const INTEREST_RATES = `
|
|
419
|
-
query InterestRates($country: String!) {
|
|
420
|
-
interestRates(country: $country) {
|
|
421
|
-
date
|
|
422
|
-
country
|
|
423
|
-
value
|
|
424
|
-
}
|
|
425
|
-
}`;
|
|
426
|
-
export const SP500_MULTIPLES = `
|
|
427
|
-
query SP500Multiples($series: SP500Series!) {
|
|
428
|
-
sp500Multiples(series: $series) {
|
|
429
|
-
date
|
|
430
|
-
name
|
|
431
|
-
value
|
|
432
|
-
}
|
|
433
|
-
}`;
|
|
434
|
-
export const PRICE_HISTORY = `
|
|
435
|
-
query PriceHistory($tickers: [String!]!, $range: String, $interval: String) {
|
|
436
|
-
priceHistory(tickers: $tickers, range: $range, interval: $interval) {
|
|
437
|
-
ticker
|
|
438
|
-
history {
|
|
439
|
-
date
|
|
440
|
-
open
|
|
441
|
-
high
|
|
442
|
-
low
|
|
443
|
-
close
|
|
444
|
-
volume
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
}`;
|
|
448
|
-
export const FAMA_FRENCH_FACTORS = `
|
|
449
|
-
query FamaFrenchFactors($series: FamaFrenchSeries!, $range: String) {
|
|
450
|
-
famaFrenchFactors(series: $series, range: $range) {
|
|
451
|
-
date
|
|
452
|
-
mktRf
|
|
453
|
-
smb
|
|
454
|
-
hml
|
|
455
|
-
rmw
|
|
456
|
-
cma
|
|
457
|
-
rf
|
|
458
|
-
}
|
|
459
|
-
}`;
|
|
460
|
-
export const SHORT_INTEREST = `
|
|
461
|
-
query ShortInterest($ticker: String!) {
|
|
462
|
-
shortInterest(ticker: $ticker) {
|
|
463
|
-
ticker
|
|
464
|
-
reportDate
|
|
465
|
-
shortInterest
|
|
466
|
-
change
|
|
467
|
-
daysToCover
|
|
468
|
-
source
|
|
469
|
-
}
|
|
470
|
-
}`;
|
|
471
|
-
export const CAMPAIGN_FINANCE = `
|
|
472
|
-
query CampaignFinance($name: String!, $cycle: Int) {
|
|
473
|
-
campaignFinance(name: $name, cycle: $cycle) {
|
|
474
|
-
id
|
|
475
|
-
name
|
|
476
|
-
type
|
|
477
|
-
party
|
|
478
|
-
state
|
|
479
|
-
totalRaised
|
|
480
|
-
totalSpent
|
|
481
|
-
cycle
|
|
482
|
-
}
|
|
483
|
-
}`;
|
|
484
|
-
export const MARKET_STATUS = `
|
|
485
|
-
query MarketStatus {
|
|
486
|
-
marketStatus {
|
|
487
|
-
isOpen
|
|
488
|
-
isTradingDay
|
|
489
|
-
session
|
|
490
|
-
holiday
|
|
491
|
-
date
|
|
492
|
-
}
|
|
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
|
+
}
|
|
493
503
|
}`;
|
|
494
504
|
// ── Dynamic Query Builder ──────────────────────────────────────────────────
|
|
495
505
|
const FIELD_BLOCK_MAP = {
|
|
@@ -511,7 +521,7 @@ const FIELD_BLOCK_MAP = {
|
|
|
511
521
|
const ARRAY_SUBGRAPH_FIELDS = new Set(['news', 'research', 'social', 'predictions', 'discussions']);
|
|
512
522
|
/** Filtered variants of array sub-graph field blocks. */
|
|
513
523
|
const FILTERED_FIELD_BLOCK_MAP = {
|
|
514
|
-
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 }`,
|
|
515
525
|
research: `research(filter: $filter) {\n title\n url\n publishedDate\n author\n text\n score\n }`,
|
|
516
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 }`,
|
|
517
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 }`,
|
|
@@ -537,17 +547,17 @@ export function buildEnrichQuery(fields, options) {
|
|
|
537
547
|
(options.since != null || options.until != null || options.limit != null || options.sort != null);
|
|
538
548
|
const extraVars = filterVarDecl(fields, hasFilter);
|
|
539
549
|
const blocks = buildBlocks(fields, hasFilter);
|
|
540
|
-
return `
|
|
541
|
-
query EnrichEntity($id: ID!${extraVars}) {
|
|
542
|
-
entity(id: $id) {
|
|
543
|
-
id
|
|
544
|
-
name
|
|
545
|
-
type
|
|
546
|
-
tickers
|
|
547
|
-
domain
|
|
548
|
-
country
|
|
549
|
-
${blocks}
|
|
550
|
-
}
|
|
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
|
+
}
|
|
551
561
|
}`;
|
|
552
562
|
}
|
|
553
563
|
export function buildBatchEnrichQuery(fields, options) {
|
|
@@ -555,17 +565,17 @@ export function buildBatchEnrichQuery(fields, options) {
|
|
|
555
565
|
(options.since != null || options.until != null || options.limit != null || options.sort != null);
|
|
556
566
|
const extraVars = filterVarDecl(fields, hasFilter);
|
|
557
567
|
const blocks = buildBlocks(fields, hasFilter);
|
|
558
|
-
return `
|
|
559
|
-
query BatchEnrich($tickers: [String!]!${extraVars}) {
|
|
560
|
-
entitiesByTickers(tickers: $tickers) {
|
|
561
|
-
id
|
|
562
|
-
name
|
|
563
|
-
type
|
|
564
|
-
tickers
|
|
565
|
-
domain
|
|
566
|
-
country
|
|
567
|
-
${blocks}
|
|
568
|
-
}
|
|
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
|
+
}
|
|
569
579
|
}`;
|
|
570
580
|
}
|
|
571
581
|
//# sourceMappingURL=queries.js.map
|