finance-sentiment 1.0.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/LICENSE +21 -0
- package/README.md +263 -0
- package/dist/index.cjs +344 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +532 -0
- package/dist/index.d.ts +532 -0
- package/dist/index.js +312 -0
- package/dist/index.js.map +1 -0
- package/package.json +67 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
var StockSentimentError = class extends Error {
|
|
3
|
+
constructor(message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = "StockSentimentError";
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
var ApiError = class extends StockSentimentError {
|
|
9
|
+
status;
|
|
10
|
+
detail;
|
|
11
|
+
constructor(status, detail) {
|
|
12
|
+
super(`${status}: ${detail}`);
|
|
13
|
+
this.name = "ApiError";
|
|
14
|
+
this.status = status;
|
|
15
|
+
this.detail = detail;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var HttpClient = class {
|
|
19
|
+
baseUrl;
|
|
20
|
+
apiKey;
|
|
21
|
+
timeout;
|
|
22
|
+
constructor(baseUrl, apiKey, timeout) {
|
|
23
|
+
this.baseUrl = baseUrl.replace(/\/+$/, "");
|
|
24
|
+
this.apiKey = apiKey;
|
|
25
|
+
this.timeout = timeout;
|
|
26
|
+
}
|
|
27
|
+
async get(path, params) {
|
|
28
|
+
const url = new URL(`${this.baseUrl}${path}`);
|
|
29
|
+
if (params) {
|
|
30
|
+
for (const [key, value] of Object.entries(params)) {
|
|
31
|
+
if (value !== void 0) {
|
|
32
|
+
url.searchParams.set(key, String(value));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const response = await fetch(url.toString(), {
|
|
37
|
+
method: "GET",
|
|
38
|
+
headers: {
|
|
39
|
+
"X-API-Key": this.apiKey,
|
|
40
|
+
"Accept": "application/json"
|
|
41
|
+
},
|
|
42
|
+
signal: AbortSignal.timeout(this.timeout)
|
|
43
|
+
});
|
|
44
|
+
if (!response.ok) {
|
|
45
|
+
let detail;
|
|
46
|
+
try {
|
|
47
|
+
const body = await response.json();
|
|
48
|
+
detail = body.detail ?? JSON.stringify(body);
|
|
49
|
+
} catch {
|
|
50
|
+
detail = response.statusText || `HTTP ${response.status}`;
|
|
51
|
+
}
|
|
52
|
+
throw new ApiError(response.status, detail);
|
|
53
|
+
}
|
|
54
|
+
return response.json();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var PlatformNamespace = class {
|
|
58
|
+
http;
|
|
59
|
+
prefix;
|
|
60
|
+
constructor(http, prefix) {
|
|
61
|
+
this.http = http;
|
|
62
|
+
this.prefix = prefix;
|
|
63
|
+
}
|
|
64
|
+
request(path, params) {
|
|
65
|
+
return this.http.get(`${this.prefix}${path}`, params);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
var RedditNamespace = class extends PlatformNamespace {
|
|
69
|
+
/** @internal */
|
|
70
|
+
constructor(http) {
|
|
71
|
+
super(http, "/reddit/stocks/v1");
|
|
72
|
+
}
|
|
73
|
+
/** Get trending stocks on Reddit. */
|
|
74
|
+
async trending(options = {}) {
|
|
75
|
+
return this.request("/trending", {
|
|
76
|
+
days: options.days,
|
|
77
|
+
limit: options.limit,
|
|
78
|
+
offset: options.offset,
|
|
79
|
+
type: options.type
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/** Get trending sectors on Reddit. */
|
|
83
|
+
async trendingSectors(options = {}) {
|
|
84
|
+
return this.request("/trending/sectors", {
|
|
85
|
+
days: options.days,
|
|
86
|
+
limit: options.limit,
|
|
87
|
+
offset: options.offset
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/** Get trending countries on Reddit. */
|
|
91
|
+
async trendingCountries(options = {}) {
|
|
92
|
+
return this.request("/trending/countries", {
|
|
93
|
+
days: options.days,
|
|
94
|
+
limit: options.limit,
|
|
95
|
+
offset: options.offset
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/** Get sentiment for a specific stock ticker. */
|
|
99
|
+
async stock(ticker, options = {}) {
|
|
100
|
+
return this.request(`/stock/${encodeURIComponent(ticker)}`, {
|
|
101
|
+
days: options.days
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/** Get AI-generated explanation for a stock's trend. */
|
|
105
|
+
async explain(ticker) {
|
|
106
|
+
return this.request(`/stock/${encodeURIComponent(ticker)}/explain`);
|
|
107
|
+
}
|
|
108
|
+
/** Search for stocks by name or ticker. */
|
|
109
|
+
async search(query) {
|
|
110
|
+
return this.request("/search", { q: query });
|
|
111
|
+
}
|
|
112
|
+
/** Compare multiple stocks side-by-side. */
|
|
113
|
+
async compare(tickers, options = {}) {
|
|
114
|
+
return this.request("/compare", {
|
|
115
|
+
tickers: tickers.join(","),
|
|
116
|
+
days: options.days
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
var NewsNamespace = class extends PlatformNamespace {
|
|
121
|
+
/** @internal */
|
|
122
|
+
constructor(http) {
|
|
123
|
+
super(http, "/news/stocks/v1");
|
|
124
|
+
}
|
|
125
|
+
/** Get trending stocks from news. */
|
|
126
|
+
async trending(options = {}) {
|
|
127
|
+
return this.request("/trending", {
|
|
128
|
+
days: options.days,
|
|
129
|
+
limit: options.limit,
|
|
130
|
+
offset: options.offset,
|
|
131
|
+
type: options.type,
|
|
132
|
+
source: options.source
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
/** Get trending sectors from news. */
|
|
136
|
+
async trendingSectors(options = {}) {
|
|
137
|
+
return this.request("/trending/sectors", {
|
|
138
|
+
days: options.days,
|
|
139
|
+
limit: options.limit,
|
|
140
|
+
offset: options.offset,
|
|
141
|
+
source: options.source
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/** Get trending countries from news. */
|
|
145
|
+
async trendingCountries(options = {}) {
|
|
146
|
+
return this.request("/trending/countries", {
|
|
147
|
+
days: options.days,
|
|
148
|
+
limit: options.limit,
|
|
149
|
+
offset: options.offset,
|
|
150
|
+
source: options.source
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/** Get sentiment for a specific stock ticker from news. */
|
|
154
|
+
async stock(ticker, options = {}) {
|
|
155
|
+
return this.request(`/stock/${encodeURIComponent(ticker)}`, {
|
|
156
|
+
days: options.days
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/** Get AI-generated explanation for a stock's news trend. */
|
|
160
|
+
async explain(ticker) {
|
|
161
|
+
return this.request(`/stock/${encodeURIComponent(ticker)}/explain`);
|
|
162
|
+
}
|
|
163
|
+
/** Search for stocks by name or ticker in news. */
|
|
164
|
+
async search(query) {
|
|
165
|
+
return this.request("/search", { q: query });
|
|
166
|
+
}
|
|
167
|
+
/** Compare multiple stocks side-by-side using news sentiment. */
|
|
168
|
+
async compare(tickers, options = {}) {
|
|
169
|
+
return this.request("/compare", {
|
|
170
|
+
tickers: tickers.join(","),
|
|
171
|
+
days: options.days
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/** Get news data statistics. */
|
|
175
|
+
async stats() {
|
|
176
|
+
return this.request("/stats");
|
|
177
|
+
}
|
|
178
|
+
/** Get public news service health (no auth required on server side). */
|
|
179
|
+
async health() {
|
|
180
|
+
return this.request("/health");
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
var XNamespace = class extends PlatformNamespace {
|
|
184
|
+
/** @internal */
|
|
185
|
+
constructor(http) {
|
|
186
|
+
super(http, "/x/stocks/v1");
|
|
187
|
+
}
|
|
188
|
+
/** Get trending stocks on X/Twitter. */
|
|
189
|
+
async trending(options = {}) {
|
|
190
|
+
return this.request("/trending", {
|
|
191
|
+
days: options.days,
|
|
192
|
+
limit: options.limit,
|
|
193
|
+
offset: options.offset,
|
|
194
|
+
type: options.type
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
/** Get trending sectors on X/Twitter. */
|
|
198
|
+
async trendingSectors(options = {}) {
|
|
199
|
+
return this.request("/trending/sectors", {
|
|
200
|
+
days: options.days,
|
|
201
|
+
limit: options.limit,
|
|
202
|
+
offset: options.offset
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/** Get trending countries on X/Twitter. */
|
|
206
|
+
async trendingCountries(options = {}) {
|
|
207
|
+
return this.request("/trending/countries", {
|
|
208
|
+
days: options.days,
|
|
209
|
+
limit: options.limit,
|
|
210
|
+
offset: options.offset
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
/** Get X/Twitter sentiment for a specific stock ticker. */
|
|
214
|
+
async stock(ticker, options = {}) {
|
|
215
|
+
return this.request(`/stock/${encodeURIComponent(ticker)}`, {
|
|
216
|
+
days: options.days
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
/** Search for stocks by name or ticker on X/Twitter. */
|
|
220
|
+
async search(query) {
|
|
221
|
+
return this.request("/search", { q: query });
|
|
222
|
+
}
|
|
223
|
+
/** Compare multiple stocks side-by-side on X/Twitter. */
|
|
224
|
+
async compare(tickers, options = {}) {
|
|
225
|
+
return this.request("/compare", {
|
|
226
|
+
tickers: tickers.join(","),
|
|
227
|
+
days: options.days
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
var PolymarketNamespace = class extends PlatformNamespace {
|
|
232
|
+
/** @internal */
|
|
233
|
+
constructor(http) {
|
|
234
|
+
super(http, "/polymarket/stocks/v1");
|
|
235
|
+
}
|
|
236
|
+
/** Get trending stocks on Polymarket. */
|
|
237
|
+
async trending(options = {}) {
|
|
238
|
+
return this.request("/trending", {
|
|
239
|
+
days: options.days,
|
|
240
|
+
limit: options.limit,
|
|
241
|
+
offset: options.offset,
|
|
242
|
+
type: options.type
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
/** Get trending sectors on Polymarket. */
|
|
246
|
+
async trendingSectors(options = {}) {
|
|
247
|
+
return this.request("/trending/sectors", {
|
|
248
|
+
days: options.days,
|
|
249
|
+
limit: options.limit,
|
|
250
|
+
offset: options.offset
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
/** Get trending countries on Polymarket. */
|
|
254
|
+
async trendingCountries(options = {}) {
|
|
255
|
+
return this.request("/trending/countries", {
|
|
256
|
+
days: options.days,
|
|
257
|
+
limit: options.limit,
|
|
258
|
+
offset: options.offset
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/** Get Polymarket sentiment for a specific stock ticker. */
|
|
262
|
+
async stock(ticker, options = {}) {
|
|
263
|
+
return this.request(`/stock/${encodeURIComponent(ticker)}`, {
|
|
264
|
+
days: options.days
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/** Search for stocks by name or ticker on Polymarket. */
|
|
268
|
+
async search(query) {
|
|
269
|
+
return this.request("/search", { q: query });
|
|
270
|
+
}
|
|
271
|
+
/** Compare multiple stocks side-by-side on Polymarket. */
|
|
272
|
+
async compare(tickers, options = {}) {
|
|
273
|
+
return this.request("/compare", {
|
|
274
|
+
tickers: tickers.join(","),
|
|
275
|
+
days: options.days
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
var AdanosClient = class {
|
|
280
|
+
news;
|
|
281
|
+
reddit;
|
|
282
|
+
x;
|
|
283
|
+
polymarket;
|
|
284
|
+
/**
|
|
285
|
+
* Create a new Finance Sentiment API client.
|
|
286
|
+
*
|
|
287
|
+
* @param options.apiKey - Your API key (`adanos_api_key_here`).
|
|
288
|
+
* @param options.baseUrl - API base URL. Default: `https://api.adanos.org`.
|
|
289
|
+
* @param options.timeout - Request timeout in ms. Default: 30000.
|
|
290
|
+
*/
|
|
291
|
+
constructor(options) {
|
|
292
|
+
const baseUrl = options.baseUrl ?? "https://api.adanos.org";
|
|
293
|
+
const timeout = options.timeout ?? 3e4;
|
|
294
|
+
const http = new HttpClient(baseUrl, options.apiKey, timeout);
|
|
295
|
+
this.news = new NewsNamespace(http);
|
|
296
|
+
this.reddit = new RedditNamespace(http);
|
|
297
|
+
this.x = new XNamespace(http);
|
|
298
|
+
this.polymarket = new PolymarketNamespace(http);
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
var StockSentimentClient = AdanosClient;
|
|
302
|
+
export {
|
|
303
|
+
AdanosClient,
|
|
304
|
+
ApiError,
|
|
305
|
+
NewsNamespace,
|
|
306
|
+
PolymarketNamespace,
|
|
307
|
+
RedditNamespace,
|
|
308
|
+
StockSentimentClient,
|
|
309
|
+
StockSentimentError,
|
|
310
|
+
XNamespace
|
|
311
|
+
};
|
|
312
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Adanos Finance Sentiment API — TypeScript SDK\n *\n * Analyze stock sentiment across News, Reddit, X/Twitter, and Polymarket.\n *\n * @example\n * ```ts\n * import { AdanosClient } from 'finance-sentiment';\n *\n * const client = new AdanosClient({ apiKey: 'adanos_api_key_here' });\n * const trending = await client.reddit.trending({ days: 7 });\n * ```\n */\n\n// ── Errors ──────────────────────────────────────────────────────────\n\nexport class StockSentimentError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'StockSentimentError';\n }\n}\n\nexport class ApiError extends StockSentimentError {\n status: number;\n detail: string;\n\n constructor(status: number, detail: string) {\n super(`${status}: ${detail}`);\n this.name = 'ApiError';\n this.status = status;\n this.detail = detail;\n }\n}\n\n// ── Option types ────────────────────────────────────────────────────\n\nexport interface ClientOptions {\n apiKey: string;\n baseUrl?: string;\n /** Request timeout in milliseconds. Default: 30000 */\n timeout?: number;\n}\n\nexport interface TrendingOptions {\n /** Time period in days (1-90). Free tier limited to 30. */\n days?: number;\n /** Max results (1-100). Default: 20. */\n limit?: number;\n /** Pagination offset. Default: 0. */\n offset?: number;\n /** Filter by \"stock\", \"etf\", \"all\", or undefined for all. */\n type?: string;\n}\n\nexport interface TrendingGroupOptions {\n days?: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface StockOptions {\n /** Time period in days (1-90). Default: 7. */\n days?: number;\n}\n\n/** Alias — compare accepts the same options as a single-stock lookup. */\nexport type CompareOptions = StockOptions;\n\nexport interface NewsSourceOptions {\n /** Optional strict source filter (canonical source id or known alias). */\n source?: string;\n}\n\nexport interface NewsTrendingOptions extends TrendingOptions, NewsSourceOptions {}\nexport interface NewsTrendingGroupOptions extends TrendingGroupOptions, NewsSourceOptions {}\nexport type NewsStockOptions = StockOptions;\nexport type NewsCompareOptions = CompareOptions;\n\n// ── Response types (snake_case — matches API JSON exactly) ──────────\n\n// Reddit response types\n\nexport interface TrendingStock {\n ticker: string;\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_posts: number;\n subreddit_count: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n total_upvotes: number;\n company_name?: string | null;\n trend_history?: number[];\n}\n\nexport interface StockSentiment {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n total_mentions?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n total_upvotes?: number | null;\n unique_posts?: number | null;\n subreddit_count?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n period_days?: number | null;\n top_subreddits?: SubredditCount[] | null;\n daily_trend?: DailyTrendItem[] | null;\n top_mentions?: TopMention[] | null;\n}\n\nexport interface SubredditCount {\n subreddit: string;\n count: number;\n}\n\nexport interface DailyTrendItem {\n date: string;\n mentions: number;\n sentiment?: number | null;\n buzz_score?: number | null;\n}\n\nexport interface TopMention {\n text_snippet: string;\n sentiment_score: number;\n sentiment_label: string;\n upvotes: number;\n subreddit: string;\n created_utc: string;\n}\n\nexport interface StockExplanationResponse {\n ticker: string;\n company_name?: string | null;\n explanation: string;\n cached: boolean;\n generated_at: string;\n model?: string | null;\n}\n\nexport interface SchedulerStatus {\n running: boolean;\n last_scrape?: string | null;\n scrape_count?: number;\n error_count?: number;\n success_rate?: number | null;\n note?: string | null;\n}\n\nexport interface HealthResponse {\n status: string;\n service?: string | null;\n version?: string | null;\n total_mentions?: number;\n tickers_tracked?: number;\n scheduler?: SchedulerStatus | null;\n error?: string | null;\n}\n\nexport interface StatsResponse {\n total_mentions: number;\n unique_tickers: number;\n tickers: string[];\n supported_tickers: number;\n}\n\nexport interface SearchResponse {\n query: string;\n count: number;\n results: SearchResultItem[];\n}\n\nexport interface SearchResultItem {\n ticker: string;\n name: string;\n type?: string | null;\n exchange?: string | null;\n sector?: string | null;\n country?: string | null;\n aliases?: string[] | null;\n mention_count?: number | null;\n}\n\nexport interface CompareResponse {\n period_days: number;\n stocks: CompareStockItem[];\n}\n\nexport interface CompareStockItem {\n ticker: string;\n company_name?: string | null;\n buzz_score: number;\n mentions: number;\n sentiment?: number | null;\n upvotes: number;\n}\n\ninterface TrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_tickers: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n total_upvotes: number;\n top_tickers: string[];\n}\n\nexport interface TrendingSector extends TrendingGroupBase {\n sector: string;\n subreddit_count: number;\n}\n\nexport interface TrendingCountry extends TrendingGroupBase {\n country: string;\n subreddit_count: number;\n}\n\n// News response types\n\nexport interface NewsTrendingStock {\n ticker: string;\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n source_count: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n company_name?: string | null;\n trend_history?: number[];\n}\n\nexport interface NewsSourceCount {\n source: string;\n count: number;\n}\n\nexport interface NewsTopMention {\n text_snippet: string;\n sentiment_score: number;\n sentiment_label: string;\n source: string;\n created_utc: string;\n}\n\nexport interface NewsStockSentiment {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n total_mentions?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n source_count?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n period_days?: number | null;\n top_sources?: NewsSourceCount[] | null;\n daily_trend?: DailyTrendItem[] | null;\n top_mentions?: NewsTopMention[] | null;\n}\n\ninterface NewsTrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_tickers: number;\n source_count: number;\n sentiment_score: number;\n bullish_pct: number;\n bearish_pct: number;\n top_tickers: string[];\n}\n\nexport interface NewsTrendingSector extends NewsTrendingGroupBase {\n sector: string;\n}\n\nexport interface NewsTrendingCountry extends NewsTrendingGroupBase {\n country: string;\n}\n\nexport interface NewsCompareStockItem {\n ticker: string;\n company_name?: string | null;\n buzz_score: number;\n mentions: number;\n source_count: number;\n sentiment?: number | null;\n}\n\nexport interface NewsCompareResponse {\n period_days: number;\n stocks: NewsCompareStockItem[];\n}\n\n// X/Twitter response types\n\nexport interface XTrendingStock {\n ticker: string;\n buzz_score: number;\n trend: string;\n mentions: number;\n company_name?: string | null;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes?: number | null;\n unique_tweets?: number | null;\n is_validated: boolean;\n trend_history?: number[];\n}\n\nexport interface XStockDetail {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n total_mentions?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n total_upvotes?: number | null;\n unique_tweets?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n period_days?: number | null;\n daily_trend?: XDailyTrendItem[] | null;\n top_tweets?: XTopTweet[] | null;\n is_validated: boolean;\n}\n\nexport interface XDailyTrendItem {\n date: string;\n mentions: number;\n sentiment?: number | null;\n avg_rank?: number | null;\n buzz_score?: number | null;\n}\n\nexport interface XTopTweet {\n text_snippet: string;\n sentiment_score?: number | null;\n sentiment_label?: string | null;\n likes: number;\n retweets: number;\n views?: number | null;\n author?: string | null;\n created_at?: string | null;\n}\n\ninterface XTrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n mentions: number;\n unique_tickers: number;\n unique_authors: number;\n sentiment_score?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_upvotes?: number | null;\n top_tickers: string[];\n}\n\nexport interface XTrendingSector extends XTrendingGroupBase {\n sector: string;\n}\n\nexport interface XTrendingCountry extends XTrendingGroupBase {\n country: string;\n}\n\n// Polymarket response types\n\nexport interface PolymarketTrendingStock {\n ticker: string;\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n trade_count: number;\n market_count: number;\n unique_traders?: number | null;\n bullish_pct: number;\n bearish_pct: number;\n total_liquidity: number;\n company_name?: string | null;\n sentiment_score?: number | null;\n trend_history?: number[];\n}\n\nexport interface PolymarketDailyTrendItem {\n date: string;\n trade_count: number;\n sentiment?: number | null;\n buzz_score?: number | null;\n}\n\nexport interface PolymarketTopMention {\n condition_id: string;\n question: string;\n market_type: string;\n trade_count?: number | null;\n sentiment_score?: number | null;\n yes_price?: number | null;\n no_price?: number | null;\n liquidity: number;\n volume_24h: number;\n end_date?: string | null;\n active: boolean;\n}\n\nexport interface PolymarketStockDetail {\n ticker: string;\n found: boolean;\n company_name?: string | null;\n buzz_score?: number | null;\n trend?: 'rising' | 'falling' | 'stable' | null;\n period_days?: number | null;\n trade_count?: number | null;\n market_count?: number | null;\n unique_traders?: number | null;\n sentiment_score?: number | null;\n positive_count?: number | null;\n negative_count?: number | null;\n neutral_count?: number | null;\n bullish_pct?: number | null;\n bearish_pct?: number | null;\n total_liquidity?: number | null;\n daily_trend?: PolymarketDailyTrendItem[] | null;\n top_mentions?: PolymarketTopMention[] | null;\n}\n\ninterface PolymarketTrendingGroupBase {\n buzz_score: number;\n trend: 'rising' | 'falling' | 'stable';\n trade_count: number;\n market_count: number;\n unique_tickers: number;\n unique_traders?: number | null;\n sentiment_score?: number | null;\n bullish_pct: number;\n bearish_pct: number;\n total_liquidity: number;\n top_tickers: string[];\n}\n\nexport interface PolymarketTrendingSector extends PolymarketTrendingGroupBase {\n sector: string;\n}\n\nexport interface PolymarketTrendingCountry extends PolymarketTrendingGroupBase {\n country: string;\n}\n\nexport interface PolymarketCompareStockItem {\n ticker: string;\n company_name?: string | null;\n buzz_score: number;\n trade_count: number;\n market_count: number;\n unique_traders?: number | null;\n sentiment?: number | null;\n total_liquidity: number;\n}\n\nexport interface PolymarketCompareResponse {\n period_days: number;\n stocks: PolymarketCompareStockItem[];\n}\n\nexport interface PolymarketSearchResultItem {\n ticker: string;\n name: string;\n type?: string | null;\n exchange?: string | null;\n sector?: string | null;\n country?: string | null;\n aliases: string[];\n trade_count: number;\n}\n\nexport interface PolymarketSearchResponse {\n query: string;\n count: number;\n results: PolymarketSearchResultItem[];\n}\n\n// ── Internal HTTP client ────────────────────────────────────────────\n\ntype QueryParams = Record<string, string | number | undefined>;\n\nclass HttpClient {\n private baseUrl: string;\n private apiKey: string;\n private timeout: number;\n\n constructor(baseUrl: string, apiKey: string, timeout: number) {\n this.baseUrl = baseUrl.replace(/\\/+$/, '');\n this.apiKey = apiKey;\n this.timeout = timeout;\n }\n\n async get<T>(path: string, params?: QueryParams): Promise<T> {\n const url = new URL(`${this.baseUrl}${path}`);\n\n if (params) {\n for (const [key, value] of Object.entries(params)) {\n if (value !== undefined) {\n url.searchParams.set(key, String(value));\n }\n }\n }\n\n const response = await fetch(url.toString(), {\n method: 'GET',\n headers: {\n 'X-API-Key': this.apiKey,\n 'Accept': 'application/json',\n },\n signal: AbortSignal.timeout(this.timeout),\n });\n\n if (!response.ok) {\n let detail: string;\n try {\n const body = await response.json();\n detail = body.detail ?? JSON.stringify(body);\n } catch {\n detail = response.statusText || `HTTP ${response.status}`;\n }\n throw new ApiError(response.status, detail);\n }\n\n return response.json() as Promise<T>;\n }\n}\n\n// ── Platform namespaces ─────────────────────────────────────────────\n\nclass PlatformNamespace {\n protected http: HttpClient;\n protected prefix: string;\n\n constructor(http: HttpClient, prefix: string) {\n this.http = http;\n this.prefix = prefix;\n }\n\n protected request<T>(path: string, params?: QueryParams): Promise<T> {\n return this.http.get<T>(`${this.prefix}${path}`, params);\n }\n}\n\nexport class RedditNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/reddit/stocks/v1');\n }\n\n /** Get trending stocks on Reddit. */\n async trending(options: TrendingOptions = {}): Promise<TrendingStock[]> {\n return this.request('/trending', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n });\n }\n\n /** Get trending sectors on Reddit. */\n async trendingSectors(options: TrendingGroupOptions = {}): Promise<TrendingSector[]> {\n return this.request('/trending/sectors', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get trending countries on Reddit. */\n async trendingCountries(options: TrendingGroupOptions = {}): Promise<TrendingCountry[]> {\n return this.request('/trending/countries', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get sentiment for a specific stock ticker. */\n async stock(ticker: string, options: StockOptions = {}): Promise<StockSentiment> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n days: options.days,\n });\n }\n\n /** Get AI-generated explanation for a stock's trend. */\n async explain(ticker: string): Promise<StockExplanationResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/explain`);\n }\n\n /** Search for stocks by name or ticker. */\n async search(query: string): Promise<SearchResponse> {\n return this.request('/search', { q: query });\n }\n\n /** Compare multiple stocks side-by-side. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<CompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n days: options.days,\n });\n }\n}\n\nexport class NewsNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/news/stocks/v1');\n }\n\n /** Get trending stocks from news. */\n async trending(options: NewsTrendingOptions = {}): Promise<NewsTrendingStock[]> {\n return this.request('/trending', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n source: options.source,\n });\n }\n\n /** Get trending sectors from news. */\n async trendingSectors(options: NewsTrendingGroupOptions = {}): Promise<NewsTrendingSector[]> {\n return this.request('/trending/sectors', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n source: options.source,\n });\n }\n\n /** Get trending countries from news. */\n async trendingCountries(options: NewsTrendingGroupOptions = {}): Promise<NewsTrendingCountry[]> {\n return this.request('/trending/countries', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n source: options.source,\n });\n }\n\n /** Get sentiment for a specific stock ticker from news. */\n async stock(ticker: string, options: StockOptions = {}): Promise<NewsStockSentiment> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n days: options.days,\n });\n }\n\n /** Get AI-generated explanation for a stock's news trend. */\n async explain(ticker: string): Promise<StockExplanationResponse> {\n return this.request(`/stock/${encodeURIComponent(ticker)}/explain`);\n }\n\n /** Search for stocks by name or ticker in news. */\n async search(query: string): Promise<SearchResponse> {\n return this.request('/search', { q: query });\n }\n\n /** Compare multiple stocks side-by-side using news sentiment. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<NewsCompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n days: options.days,\n });\n }\n\n /** Get news data statistics. */\n async stats(): Promise<StatsResponse> {\n return this.request('/stats');\n }\n\n /** Get public news service health (no auth required on server side). */\n async health(): Promise<HealthResponse> {\n return this.request('/health');\n }\n}\n\nexport class XNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/x/stocks/v1');\n }\n\n /** Get trending stocks on X/Twitter. */\n async trending(options: TrendingOptions = {}): Promise<XTrendingStock[]> {\n return this.request('/trending', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n });\n }\n\n /** Get trending sectors on X/Twitter. */\n async trendingSectors(options: TrendingGroupOptions = {}): Promise<XTrendingSector[]> {\n return this.request('/trending/sectors', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get trending countries on X/Twitter. */\n async trendingCountries(options: TrendingGroupOptions = {}): Promise<XTrendingCountry[]> {\n return this.request('/trending/countries', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get X/Twitter sentiment for a specific stock ticker. */\n async stock(ticker: string, options: StockOptions = {}): Promise<XStockDetail> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n days: options.days,\n });\n }\n\n /** Search for stocks by name or ticker on X/Twitter. */\n async search(query: string): Promise<SearchResponse> {\n return this.request('/search', { q: query });\n }\n\n /** Compare multiple stocks side-by-side on X/Twitter. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<CompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n days: options.days,\n });\n }\n}\n\nexport class PolymarketNamespace extends PlatformNamespace {\n /** @internal */\n constructor(http: HttpClient) {\n super(http, '/polymarket/stocks/v1');\n }\n\n /** Get trending stocks on Polymarket. */\n async trending(options: TrendingOptions = {}): Promise<PolymarketTrendingStock[]> {\n return this.request('/trending', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n type: options.type,\n });\n }\n\n /** Get trending sectors on Polymarket. */\n async trendingSectors(options: TrendingGroupOptions = {}): Promise<PolymarketTrendingSector[]> {\n return this.request('/trending/sectors', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get trending countries on Polymarket. */\n async trendingCountries(options: TrendingGroupOptions = {}): Promise<PolymarketTrendingCountry[]> {\n return this.request('/trending/countries', {\n days: options.days,\n limit: options.limit,\n offset: options.offset,\n });\n }\n\n /** Get Polymarket sentiment for a specific stock ticker. */\n async stock(ticker: string, options: StockOptions = {}): Promise<PolymarketStockDetail> {\n return this.request(`/stock/${encodeURIComponent(ticker)}`, {\n days: options.days,\n });\n }\n\n /** Search for stocks by name or ticker on Polymarket. */\n async search(query: string): Promise<PolymarketSearchResponse> {\n return this.request('/search', { q: query });\n }\n\n /** Compare multiple stocks side-by-side on Polymarket. */\n async compare(tickers: string[], options: CompareOptions = {}): Promise<PolymarketCompareResponse> {\n return this.request('/compare', {\n tickers: tickers.join(','),\n days: options.days,\n });\n }\n}\n\n// ── Client ──────────────────────────────────────────────────────────\n\nexport class AdanosClient {\n readonly news: NewsNamespace;\n readonly reddit: RedditNamespace;\n readonly x: XNamespace;\n readonly polymarket: PolymarketNamespace;\n\n /**\n * Create a new Finance Sentiment API client.\n *\n * @param options.apiKey - Your API key (`adanos_api_key_here`).\n * @param options.baseUrl - API base URL. Default: `https://api.adanos.org`.\n * @param options.timeout - Request timeout in ms. Default: 30000.\n */\n constructor(options: ClientOptions) {\n const baseUrl = options.baseUrl ?? 'https://api.adanos.org';\n const timeout = options.timeout ?? 30_000;\n const http = new HttpClient(baseUrl, options.apiKey, timeout);\n\n this.news = new NewsNamespace(http);\n this.reddit = new RedditNamespace(http);\n this.x = new XNamespace(http);\n this.polymarket = new PolymarketNamespace(http);\n }\n}\n\nexport const StockSentimentClient = AdanosClient;\n"],"mappings":";AAgBO,IAAM,sBAAN,cAAkC,MAAM;AAAA,EAC7C,YAAY,SAAiB;AAC3B,UAAM,OAAO;AACb,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,WAAN,cAAuB,oBAAoB;AAAA,EAChD;AAAA,EACA;AAAA,EAEA,YAAY,QAAgB,QAAgB;AAC1C,UAAM,GAAG,MAAM,KAAK,MAAM,EAAE;AAC5B,SAAK,OAAO;AACZ,SAAK,SAAS;AACd,SAAK,SAAS;AAAA,EAChB;AACF;AA0dA,IAAM,aAAN,MAAiB;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EAER,YAAY,SAAiB,QAAgB,SAAiB;AAC5D,SAAK,UAAU,QAAQ,QAAQ,QAAQ,EAAE;AACzC,SAAK,SAAS;AACd,SAAK,UAAU;AAAA,EACjB;AAAA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IAAM,eAAN,MAAmB;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAST,YAAY,SAAwB;AAClC,UAAM,UAAU,QAAQ,WAAW;AACnC,UAAM,UAAU,QAAQ,WAAW;AACnC,UAAM,OAAO,IAAI,WAAW,SAAS,QAAQ,QAAQ,OAAO;AAE5D,SAAK,OAAO,IAAI,cAAc,IAAI;AAClC,SAAK,SAAS,IAAI,gBAAgB,IAAI;AACtC,SAAK,IAAI,IAAI,WAAW,IAAI;AAC5B,SAAK,aAAa,IAAI,oBAAoB,IAAI;AAAA,EAChD;AACF;AAEO,IAAM,uBAAuB;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "finance-sentiment",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "TypeScript SDK for the Adanos Finance Sentiment API",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./dist/index.d.cts",
|
|
17
|
+
"default": "./dist/index.cjs"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsup",
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"test:watch": "vitest",
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"prepublishOnly": "npm run typecheck && npm run test && npm run build"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"adanos",
|
|
36
|
+
"finance",
|
|
37
|
+
"sentiment",
|
|
38
|
+
"stocks",
|
|
39
|
+
"trading",
|
|
40
|
+
"reddit",
|
|
41
|
+
"x",
|
|
42
|
+
"twitter",
|
|
43
|
+
"polymarket",
|
|
44
|
+
"typescript",
|
|
45
|
+
"sdk",
|
|
46
|
+
"api"
|
|
47
|
+
],
|
|
48
|
+
"author": "Alexander Schneider",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"homepage": "https://adanos.org",
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/adanos-software/adanos-ts-sdk/issues"
|
|
53
|
+
},
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "https://github.com/adanos-software/adanos-ts-sdk"
|
|
57
|
+
},
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public",
|
|
60
|
+
"provenance": true
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"tsup": "^8.0.0",
|
|
64
|
+
"typescript": "^5.4.0",
|
|
65
|
+
"vitest": "^3.0.0"
|
|
66
|
+
}
|
|
67
|
+
}
|