@surf-ai/sdk 0.1.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.
@@ -0,0 +1,3382 @@
1
+ import { ClassValue } from 'clsx';
2
+ import * as React from 'react';
3
+ import * as _tanstack_react_query from '@tanstack/react-query';
4
+ import * as _tanstack_query_core from '@tanstack/query-core';
5
+
6
+ declare function cn(...inputs: ClassValue[]): string;
7
+
8
+ type ToasterToast = {
9
+ id: string;
10
+ title?: React.ReactNode;
11
+ description?: React.ReactNode;
12
+ action?: React.ReactNode;
13
+ variant?: "default" | "destructive";
14
+ };
15
+ declare function toast(props: Omit<ToasterToast, "id">): {
16
+ id: string;
17
+ dismiss: () => void;
18
+ update: (p: Partial<ToasterToast>) => void;
19
+ };
20
+ declare function useToast(): {
21
+ toast: typeof toast;
22
+ dismiss: (toastId?: string) => void;
23
+ toasts: ToasterToast[];
24
+ };
25
+
26
+ interface ResponseMeta {
27
+ cached?: boolean;
28
+ credits_used?: number;
29
+ total?: number;
30
+ limit?: number;
31
+ offset?: number;
32
+ }
33
+ interface CursorMeta {
34
+ cached?: boolean;
35
+ credits_used?: number;
36
+ has_more?: boolean;
37
+ next_cursor?: string;
38
+ limit?: number;
39
+ }
40
+ interface ApiResponse<T> {
41
+ data: T[];
42
+ meta?: ResponseMeta;
43
+ }
44
+ interface ApiObjectResponse<T> {
45
+ data: T;
46
+ meta?: ResponseMeta;
47
+ }
48
+ interface ApiCursorResponse<T> {
49
+ data: T[];
50
+ meta?: CursorMeta;
51
+ }
52
+ interface ExchangeDepthItem {
53
+ /** Total ask-side depth in base currency units */
54
+ ask_depth: unknown;
55
+ asks: ExchangeDepthItemAsksItem[];
56
+ /** Total bid-side depth in base currency units */
57
+ bid_depth: unknown;
58
+ bids: ExchangeDepthItemBidsItem[];
59
+ /** Exchange identifier */
60
+ exchange: string;
61
+ /** (best_bid + best_ask) / 2 */
62
+ mid_price: unknown;
63
+ /** Trading pair like BTC/USDT */
64
+ pair: string;
65
+ /** Best ask - best bid */
66
+ spread: unknown;
67
+ /** Spread as percent of mid price */
68
+ spread_pct: unknown;
69
+ }
70
+ interface ExchangeDepthItemAsksItem {
71
+ /** Amount at this level */
72
+ amount: number;
73
+ /** Price level */
74
+ price: number;
75
+ }
76
+ interface ExchangeDepthItemBidsItem {
77
+ /** Amount at this level */
78
+ amount: number;
79
+ /** Price level */
80
+ price: number;
81
+ }
82
+ interface ExchangeDepthParams {
83
+ /** Trading pair (e.g. BTC/USDT) */
84
+ pair?: string;
85
+ /** Market type: spot for spot trading, swap for perpetual contracts — @default 'spot' */
86
+ type?: 'spot' | 'swap';
87
+ /** Number of price levels (1-100) — @default '20' */
88
+ limit?: number;
89
+ /** Exchange identifier — @default 'binance' */
90
+ exchange?: 'binance' | 'okx' | 'bybit' | 'bitget' | 'coinbase' | 'kraken' | 'gate' | 'mexc' | 'upbit' | 'bitstamp' | 'deribit' | 'bitmex' | 'bithumb';
91
+ }
92
+ interface ExchangeFundingHistoryItem {
93
+ /** Exchange identifier */
94
+ exchange: string;
95
+ /** Funding rate at this settlement */
96
+ funding_rate: unknown;
97
+ /** Perpetual contract pair like BTC/USDT */
98
+ pair: string;
99
+ /** Unix timestamp in seconds */
100
+ timestamp: unknown;
101
+ }
102
+ interface ExchangeFundingHistoryParams {
103
+ /** Trading pair (e.g. BTC/USDT) */
104
+ pair?: string;
105
+ /** Start of time range. Accepts Unix seconds or date string (YYYY-MM-DD, ISO8601). Not all exchanges support historical queries; some only return recent data regardless of this value. */
106
+ from?: string;
107
+ /** Max number of records. For longer history, paginate using the last returned timestamp as the next from value. — @default '100' */
108
+ limit?: number;
109
+ /** Exchange identifier — @default 'binance' */
110
+ exchange?: 'binance' | 'okx' | 'bybit' | 'bitget' | 'gate' | 'htx' | 'mexc' | 'bitfinex' | 'bitmex';
111
+ }
112
+ interface ExchangeKlinesItem {
113
+ candles: ExchangeKlinesItemCandlesItem[];
114
+ /** Number of candles */
115
+ count: number;
116
+ /** Exchange identifier */
117
+ exchange: string;
118
+ /** Candle interval */
119
+ interval: string;
120
+ /** Trading pair */
121
+ pair: string;
122
+ /** Last candle datetime */
123
+ period_end: unknown;
124
+ /** Highest price in period */
125
+ period_high: unknown;
126
+ /** Lowest price in period */
127
+ period_low: unknown;
128
+ /** First candle datetime */
129
+ period_start: unknown;
130
+ /** Total volume in period */
131
+ period_volume: unknown;
132
+ }
133
+ interface ExchangeKlinesItemCandlesItem {
134
+ /** Closing price */
135
+ close: number;
136
+ /** Highest price during the interval */
137
+ high: number;
138
+ /** Lowest price during the interval */
139
+ low: number;
140
+ /** Opening price */
141
+ open: number;
142
+ /** Candle open time in Unix seconds */
143
+ timestamp: unknown;
144
+ /** Trading volume in base currency units */
145
+ volume: number;
146
+ }
147
+ interface ExchangeKlinesParams {
148
+ /** Trading pair (e.g. BTC/USDT) */
149
+ pair?: string;
150
+ /** Market type: spot for spot trading, swap for perpetual contracts — @default 'spot' */
151
+ type?: 'spot' | 'swap';
152
+ /** Candle interval — @default '1h' */
153
+ interval?: '1m' | '3m' | '5m' | '15m' | '30m' | '1h' | '2h' | '4h' | '6h' | '8h' | '12h' | '1d' | '3d' | '1w' | '1M';
154
+ /** Start of time range. Accepts Unix seconds or date string (YYYY-MM-DD, ISO8601) */
155
+ from?: string;
156
+ /** Max number of candles to return. Exchange may cap lower (e.g. 200-1000). For longer ranges, paginate using the last returned timestamp as the next from value. — @default '100' */
157
+ limit?: number;
158
+ /** Exchange identifier — @default 'binance' */
159
+ exchange?: 'binance' | 'okx' | 'bybit' | 'bitget' | 'coinbase' | 'kraken' | 'gate' | 'htx' | 'kucoin' | 'mexc' | 'upbit' | 'bitfinex' | 'bitstamp' | 'deribit' | 'bitmex' | 'bithumb';
160
+ }
161
+ interface ExchangeLongShortRatioItem {
162
+ /** Exchange identifier */
163
+ exchange: string;
164
+ /** Ratio of longs to shorts (e.g. 1.5 means 60% long / 40% short). To get percentages: long% = ratio/(ratio+1)*100, short% = 100/(ratio+1) */
165
+ long_short_ratio: unknown;
166
+ /** Perpetual contract pair like BTC/USDT */
167
+ pair: string;
168
+ /** Unix timestamp in seconds */
169
+ timestamp: unknown;
170
+ }
171
+ interface ExchangeLongShortRatioParams {
172
+ /** Trading pair (e.g. BTC/USDT) */
173
+ pair?: string;
174
+ /** Data interval — @default '1h' */
175
+ interval?: '1h' | '4h' | '1d';
176
+ /** Start of time range. Accepts Unix seconds or date string (YYYY-MM-DD, ISO8601). Not all exchanges support historical queries; some only return recent data regardless of this value. */
177
+ from?: string;
178
+ /** Max number of records. For longer history, paginate using the last returned timestamp as the next from value. — @default '50' */
179
+ limit?: number;
180
+ /** Exchange identifier — @default 'binance' */
181
+ exchange?: 'binance' | 'okx' | 'bybit' | 'bitget';
182
+ }
183
+ interface ExchangeMarketsItem {
184
+ /** Whether the market is active */
185
+ active: unknown;
186
+ /** Base currency */
187
+ base: unknown;
188
+ /** Exchange identifier */
189
+ exchange: string;
190
+ /** Default maker fee rate */
191
+ maker_fee: unknown;
192
+ /** Trading pair like BTC/USDT */
193
+ pair: string;
194
+ /** Quote currency */
195
+ quote: unknown;
196
+ /** Default taker fee rate */
197
+ taker_fee: unknown;
198
+ /** Market type: spot, swap, future, option */
199
+ type: unknown;
200
+ }
201
+ interface ExchangeMarketsParams {
202
+ /** Exchange identifier. When omitted, searches across all supported exchanges. */
203
+ exchange?: 'binance' | 'okx' | 'bybit' | 'bitget' | 'coinbase' | 'kraken' | 'gate' | 'htx' | 'kucoin' | 'mexc' | 'upbit' | 'bitfinex' | 'bitstamp' | 'deribit' | 'bitmex' | 'bithumb';
204
+ /** Filter: spot, swap, future, option */
205
+ type?: 'spot' | 'swap' | 'future' | 'option';
206
+ /** Filter by base currency */
207
+ base?: string;
208
+ /** Filter by quote currency */
209
+ quote?: string;
210
+ /** Fuzzy search in pair/base/quote */
211
+ search?: string;
212
+ /** Max results — @default '100' */
213
+ limit?: number;
214
+ }
215
+ interface ExchangePerpData {
216
+ /** Exchange identifier */
217
+ exchange: string;
218
+ funding: ExchangePerpDataFunding;
219
+ open_interest: ExchangePerpDataOpenInterest;
220
+ /** Perpetual contract pair like BTC/USDT */
221
+ pair: string;
222
+ }
223
+ interface ExchangePerpDataFunding {
224
+ /** Exchange identifier */
225
+ exchange: string;
226
+ /** Current funding rate (0.0001 = 0.01%) */
227
+ funding_rate: unknown;
228
+ /** Index price derived from the weighted average of spot prices across multiple exchanges */
229
+ index_price: unknown;
230
+ /** Funding interval like 8h */
231
+ interval: unknown;
232
+ /** Mark price calculated by the exchange from the index price and funding rate, used as the reference for liquidations */
233
+ mark_price: unknown;
234
+ /** Next settlement time ISO8601 */
235
+ next_funding: unknown;
236
+ /** Perpetual contract pair like BTC/USDT */
237
+ pair: string;
238
+ }
239
+ interface ExchangePerpDataOpenInterest {
240
+ /** Exchange identifier */
241
+ exchange: string;
242
+ /** Open interest in contracts */
243
+ open_interest_amount: unknown;
244
+ /** Open interest in USD */
245
+ open_interest_usd: unknown;
246
+ /** Trading pair like BTC/USDT */
247
+ pair: string;
248
+ /** Unix timestamp in seconds */
249
+ timestamp: unknown;
250
+ }
251
+ interface ExchangePerpParams {
252
+ /** Trading pair (e.g. BTC/USDT). The swap suffix ':USDT' is added automatically. */
253
+ pair?: string;
254
+ /** Comma-separated fields to include: 'funding' (current funding rate), 'oi' (open interest). Defaults to all fields. — @default 'funding' */
255
+ fields?: string;
256
+ /** Exchange identifier — @default 'binance' */
257
+ exchange?: 'binance' | 'okx' | 'bybit' | 'bitget' | 'htx' | 'bitfinex' | 'bitmex';
258
+ }
259
+ interface ExchangePriceItem {
260
+ /** Best ask price */
261
+ ask: unknown;
262
+ /** Best bid price */
263
+ bid: unknown;
264
+ /** Price change percentage in 24h */
265
+ change_24h_pct: unknown;
266
+ /** Exchange identifier like binance, okx */
267
+ exchange: string;
268
+ /** 24h high price */
269
+ high_24h: unknown;
270
+ /** Last traded price */
271
+ last: unknown;
272
+ /** 24h low price */
273
+ low_24h: unknown;
274
+ /** Trading pair like BTC/USDT */
275
+ pair: string;
276
+ /** Unix timestamp in seconds */
277
+ timestamp: unknown;
278
+ /** 24h trading volume in base currency units */
279
+ volume_24h_base: unknown;
280
+ }
281
+ interface ExchangePriceParams {
282
+ /** Trading pair (e.g. BTC/USDT) */
283
+ pair?: string;
284
+ /** Market type: spot for spot trading, swap for perpetual contracts — @default 'spot' */
285
+ type?: 'spot' | 'swap';
286
+ /** Exchange identifier — @default 'binance' */
287
+ exchange?: 'binance' | 'okx' | 'bybit' | 'bitget' | 'coinbase' | 'kraken' | 'gate' | 'htx' | 'kucoin' | 'mexc' | 'upbit' | 'bitfinex' | 'bitstamp' | 'deribit' | 'bitmex' | 'bithumb';
288
+ }
289
+ interface FundDetailData {
290
+ /** Fund description */
291
+ description?: string;
292
+ /** Surf fund UUID — pass as 'id' parameter to /fund/detail or /fund/portfolio for exact lookup */
293
+ id: string;
294
+ /** Fund logo URL */
295
+ image?: string;
296
+ /** Total number of unique invested projects (a project with multiple funding rounds counts once) */
297
+ invested_projects_count: number;
298
+ /** Fund jurisdiction */
299
+ jurisdiction?: string;
300
+ links: FundDetailDataLinksItem[];
301
+ members: FundDetailDataMembersItem[];
302
+ /** Fund name */
303
+ name: string;
304
+ recent_researches: FundDetailDataRecentResearchesItem[];
305
+ /** Fund tier ranking (lower is better) */
306
+ tier: number;
307
+ /** Fund type like `VC` or `Accelerator` */
308
+ type?: string;
309
+ x_accounts: FundDetailDataXAccountsItem[];
310
+ }
311
+ interface FundDetailDataLinksItem {
312
+ /** Link type like `web`, `twitter`, or `linkedin` */
313
+ type: string;
314
+ /** Link URL */
315
+ value: string;
316
+ }
317
+ interface FundDetailDataMembersItem {
318
+ /** Avatar URL */
319
+ avatar?: string;
320
+ /** Member name */
321
+ name: string;
322
+ roles: unknown;
323
+ }
324
+ interface FundDetailDataRecentResearchesItem {
325
+ /** Research ID */
326
+ id: string;
327
+ /** Publication date (Unix seconds) */
328
+ published_at: number;
329
+ /** Research title */
330
+ title: string;
331
+ /** Research URL */
332
+ url: string;
333
+ }
334
+ interface FundDetailDataXAccountsItem {
335
+ /** Display name */
336
+ display_name?: string;
337
+ /** Follower count */
338
+ followers_count: number;
339
+ /** X (Twitter) handle without the @ prefix */
340
+ handle: string;
341
+ /** Numeric X (Twitter) user ID */
342
+ id: string;
343
+ /** Profile image URL */
344
+ profile_image?: string;
345
+ }
346
+ interface FundDetailParams {
347
+ /** Surf fund UUID. PREFERRED — always use this when available from a previous response (e.g. id from /search/fund). Takes priority over q. */
348
+ id?: string;
349
+ /** Fuzzy fund name search. Only use when 'id' is not available. May return unexpected results for ambiguous names. */
350
+ q?: string;
351
+ }
352
+ interface FundPortfolioItem {
353
+ /** Investment date (Unix seconds) */
354
+ invested_at?: number;
355
+ /** Whether this fund was the lead investor */
356
+ is_lead: boolean;
357
+ /** Surf project UUID — pass as 'id' parameter to /project/detail, /project/events, or /project/defi/metrics for exact lookup. Prefer over 'q' (fuzzy name search). */
358
+ project_id: string;
359
+ /** Project logo URL */
360
+ project_logo?: string;
361
+ /** Project name */
362
+ project_name: string;
363
+ /** Project slug */
364
+ project_slug?: string;
365
+ /** Most recent funding round amount in USD */
366
+ recent_raise?: number;
367
+ /** Total amount raised by the project in USD */
368
+ total_raise?: number;
369
+ }
370
+ interface FundPortfolioParams {
371
+ /** Surf fund UUID. PREFERRED — always use this when available from a previous response (e.g. id from /search/fund). Takes priority over q. */
372
+ id?: string;
373
+ /** Fuzzy fund name search. Only use when 'id' is not available. May return unexpected results for ambiguous names. */
374
+ q?: string;
375
+ /** Results per page — @default '20' */
376
+ limit?: number;
377
+ /** Pagination offset — @default '0' */
378
+ offset?: number;
379
+ /** Filter by lead investor status. Omit or leave empty for all investments. */
380
+ is_lead?: 'true' | 'false' | '';
381
+ /** Only include investments at or after this Unix timestamp (seconds) */
382
+ invested_after?: number;
383
+ /** Only include investments before this Unix timestamp (seconds) */
384
+ invested_before?: number;
385
+ /** Field to sort results by — @default 'invested_at' */
386
+ sort_by?: 'invested_at' | 'recent_raise' | 'total_raise';
387
+ /** Sort order — @default 'desc' */
388
+ order?: 'asc' | 'desc';
389
+ }
390
+ interface FundRankingItem {
391
+ /** Surf fund UUID — pass as 'id' parameter to /fund/detail or /fund/portfolio for exact lookup */
392
+ id: string;
393
+ /** Fund logo URL */
394
+ image?: string;
395
+ /** Total number of unique invested projects (a project with multiple funding rounds counts once) */
396
+ invested_projects_count: number;
397
+ /** Fund name */
398
+ name: string;
399
+ /** Fund tier ranking (lower is better) */
400
+ tier: number;
401
+ top_projects: FundRankingItemTopProjectsItem[];
402
+ /** Fund type */
403
+ type?: string;
404
+ }
405
+ interface FundRankingItemTopProjectsItem {
406
+ /** Investment date (Unix seconds) */
407
+ invested_at?: number;
408
+ /** Whether this fund was the lead investor */
409
+ is_lead: boolean;
410
+ /** Surf project UUID — pass as 'id' parameter to /project/detail, /project/events, or /project/defi/metrics for exact lookup. Prefer over 'q' (fuzzy name search). */
411
+ project_id: string;
412
+ /** Project logo URL */
413
+ project_logo?: string;
414
+ /** Project name */
415
+ project_name: string;
416
+ /** Project slug */
417
+ project_slug?: string;
418
+ /** Most recent funding round amount in USD */
419
+ recent_raise?: number;
420
+ /** Total amount raised by the project in USD */
421
+ total_raise?: number;
422
+ }
423
+ interface FundRankingParams {
424
+ /** Ranking metric. Can be `tier` (lower is better) or `portfolio_count` (number of invested projects). */
425
+ metric?: 'tier' | 'portfolio_count';
426
+ /** Results per page — @default '20' */
427
+ limit?: number;
428
+ /** Pagination offset — @default '0' */
429
+ offset?: number;
430
+ }
431
+ interface MarketEtfItem {
432
+ etfs?: MarketEtfItemEtfsItem[];
433
+ /** Daily net flow in USD (positive=inflow, negative=outflow) */
434
+ flow_usd: number;
435
+ /** Token price in USD at close of day */
436
+ price_usd: number;
437
+ /** Unix timestamp in seconds (midnight UTC for the trading day) */
438
+ timestamp: number;
439
+ }
440
+ interface MarketEtfItemEtfsItem {
441
+ /** Daily net flow in USD for this ticker */
442
+ flow_usd: number;
443
+ /** ETF ticker symbol like `IBIT`, `GBTC`, or `ETHA` */
444
+ ticker: string;
445
+ }
446
+ interface MarketEtfParams {
447
+ /** Token symbol. Can be `BTC` or `ETH`. */
448
+ symbol?: 'BTC' | 'ETH';
449
+ /** Field to sort results by — @default 'timestamp' */
450
+ sort_by?: 'flow_usd' | 'timestamp';
451
+ /** Sort order — @default 'desc' */
452
+ order?: 'asc' | 'desc';
453
+ /** Start of time range. Accepts Unix seconds or date string (YYYY-MM-DD) */
454
+ from?: string;
455
+ /** End of time range. Accepts Unix seconds or date string (YYYY-MM-DD) */
456
+ to?: string;
457
+ }
458
+ interface MarketFearGreedItem {
459
+ /** Human-readable classification (Extreme Fear, Fear, Neutral, Greed, Extreme Greed) */
460
+ classification: string;
461
+ /** BTC price in USD at this point in time */
462
+ price: number;
463
+ /** Unix timestamp in seconds for this data point */
464
+ timestamp: number;
465
+ /** Fear and Greed Index score from 0 (extreme fear) to 100 (extreme greed) */
466
+ value: number;
467
+ }
468
+ interface MarketFearGreedParams {
469
+ /** Start of time range. Accepts Unix seconds or date string (YYYY-MM-DD) */
470
+ from?: string;
471
+ /** End of time range. Accepts Unix seconds or date string (YYYY-MM-DD) */
472
+ to?: string;
473
+ }
474
+ interface MarketFuturesItem {
475
+ /** Current funding rate as a decimal (`0.0001` = 0.01%) */
476
+ funding_rate: number;
477
+ /** Ratio of long to short positions */
478
+ long_short_ratio: number;
479
+ /** Total open interest in USD */
480
+ open_interest: number;
481
+ /** Trading symbol like `BTC` or `ETH` */
482
+ symbol: string;
483
+ /** Unix timestamp (seconds) of last update */
484
+ updated_at: number;
485
+ /** 24-hour trading volume in USD */
486
+ volume_24h: number;
487
+ /** 24-hour volume change in USD (positive=increase, negative=decrease) */
488
+ volume_change_24h: number;
489
+ }
490
+ interface MarketFuturesParams {
491
+ /** Field to sort results by — @default 'volume_24h' */
492
+ sort_by?: 'open_interest' | 'funding_rate' | 'volume_24h' | 'long_short_ratio';
493
+ /** Sort order — @default 'desc' */
494
+ order?: 'asc' | 'desc';
495
+ }
496
+ interface MarketLiquidationChartItem {
497
+ /** Long-side aggregated liquidation volume (USD) */
498
+ long_liquidation_usd: number;
499
+ /** Short-side aggregated liquidation volume (USD) */
500
+ short_liquidation_usd: number;
501
+ /** Unix timestamp in seconds */
502
+ timestamp: number;
503
+ }
504
+ interface MarketLiquidationChartParams {
505
+ /** Token ticker symbol like `BTC` or `ETH` */
506
+ symbol?: string;
507
+ /** Candlestick interval. Can be `1m`, `3m`, `5m`, `15m`, `30m`, `1h`, `4h`, `6h`, `8h`, `12h`, `1d`, or `1w`. — @default '1h' */
508
+ interval?: '1m' | '3m' | '5m' | '15m' | '30m' | '1h' | '4h' | '6h' | '8h' | '12h' | '1d' | '1w';
509
+ /** Exchange name. Can be `Binance`, `OKX`, `Bybit`, `Bitget`, `Hyperliquid`, `Gate`, `HTX`, `Bitmex`, `Bitfinex`, `CoinEx`, `Aster`, or `Lighter`. — @default 'Binance' */
510
+ exchange?: 'Binance' | 'OKX' | 'Bybit' | 'Bitget' | 'Hyperliquid' | 'Gate' | 'HTX' | 'Bitmex' | 'Bitfinex' | 'CoinEx' | 'Aster' | 'Lighter';
511
+ /** Results per page — @default '500' */
512
+ limit?: number;
513
+ /** Start of time range. Accepts Unix seconds (`1704067200`) or date string (`2024-01-01`) */
514
+ from?: string;
515
+ /** End of time range. Accepts Unix seconds (`1706745600`) or date string (`2024-02-01`) */
516
+ to?: string;
517
+ }
518
+ interface MarketLiquidationExchangeListItem {
519
+ /** Exchange name like `Binance` or `OKX`. `All` = aggregate across all exchanges */
520
+ exchange: string;
521
+ /** Total liquidation volume (USD) */
522
+ liquidation_usd: number;
523
+ /** Long-side liquidation volume (USD) */
524
+ long_liquidation_usd: number;
525
+ /** Short-side liquidation volume (USD) */
526
+ short_liquidation_usd: number;
527
+ }
528
+ interface MarketLiquidationExchangeListParams {
529
+ /** Token ticker symbol like `BTC` or `ETH` — @default 'BTC' */
530
+ symbol?: string;
531
+ /** Aggregation time range. Can be `1h`, `4h`, `12h`, or `24h`. — @default '24h' */
532
+ time_range?: '1h' | '4h' | '12h' | '24h';
533
+ /** Field to sort results by — @default 'liquidation_usd' */
534
+ sort_by?: 'liquidation_usd' | 'long_liquidation_usd' | 'short_liquidation_usd';
535
+ /** Sort order — @default 'desc' */
536
+ order?: 'asc' | 'desc';
537
+ }
538
+ interface MarketLiquidationOrderItem {
539
+ /** Base token symbol like `BTC` */
540
+ base_asset: string;
541
+ /** Exchange name like `Binance` or `OKX` */
542
+ exchange: string;
543
+ /** Liquidation execution price (USD) */
544
+ price: number;
545
+ /** Liquidation side: `long` or `short` */
546
+ side: string;
547
+ /** Full trading pair like `BTCUSDT` */
548
+ symbol: string;
549
+ /** Unix timestamp in seconds */
550
+ timestamp: number;
551
+ /** Liquidated position size (USD) */
552
+ usd_value: number;
553
+ }
554
+ interface MarketLiquidationOrderParams {
555
+ /** Exchange name. Can be `Binance`, `OKX`, `Bybit`, `Bitget`, `Hyperliquid`, `Gate`, `HTX`, `Bitmex`, `Bitfinex`, `CoinEx`, `Aster`, or `Lighter`. — @default 'Binance' */
556
+ exchange?: 'Binance' | 'OKX' | 'Bybit' | 'Bitget' | 'Hyperliquid' | 'Gate' | 'HTX' | 'Bitmex' | 'Bitfinex' | 'CoinEx' | 'Aster' | 'Lighter';
557
+ /** Token ticker symbol like `BTC` or `ETH` — @default 'BTC' */
558
+ symbol?: string;
559
+ /** Minimum liquidation amount in USD — @default '10000' */
560
+ min_amount?: string;
561
+ /** Filter by liquidation side. Omit to return both. */
562
+ side?: 'long' | 'short';
563
+ /** Field to sort results by — @default 'timestamp' */
564
+ sort_by?: 'usd_value' | 'timestamp' | 'price';
565
+ /** Sort order — @default 'desc' */
566
+ order?: 'asc' | 'desc';
567
+ /** Start of time range. Accepts Unix seconds (`1704067200`) or date string (`2024-01-01`) */
568
+ from?: string;
569
+ /** End of time range. Accepts Unix seconds (`1706745600`) or date string (`2024-02-01`) */
570
+ to?: string;
571
+ }
572
+ interface MarketOnchainIndicatorItem {
573
+ /** Metric name like `nupl`, `sopr`, or `price` */
574
+ metric?: string;
575
+ /** Token symbol this data point belongs to */
576
+ symbol?: string;
577
+ /** Unix timestamp in seconds for this data point */
578
+ timestamp: number;
579
+ /** Metric value at this timestamp */
580
+ value: number;
581
+ }
582
+ interface MarketOnchainIndicatorParams {
583
+ /** Token ticker symbol. Can be `BTC` or `ETH`. */
584
+ symbol?: 'BTC' | 'ETH';
585
+ /** On-chain metric name. Can be `nupl`, `sopr`, `mvrv`, `puell-multiple`, `nvm`, `nvt`, `nvt-golden-cross`, or `exchange-flows/{inflow,outflow,netflow,reserve}`. */
586
+ metric?: 'nupl' | 'sopr' | 'mvrv' | 'puell-multiple' | 'nvm' | 'nvt' | 'nvt-golden-cross' | 'exchange-flows/inflow' | 'exchange-flows/outflow' | 'exchange-flows/netflow' | 'exchange-flows/reserve';
587
+ /** Aggregation granularity. — @default 'day' */
588
+ granularity?: 'day';
589
+ /** Start of time range. Accepts Unix seconds or date string (YYYY-MM-DD). Defaults to 90 days ago when omitted. Maximum range is 365 days. */
590
+ from?: string;
591
+ /** End of time range. Accepts Unix seconds or date string (YYYY-MM-DD). Defaults to today when omitted. Maximum range is 365 days. */
592
+ to?: string;
593
+ /** Exchange filter (only applies to exchange-flow metrics). Can be `all_exchange`, `spot_exchange`, `derivative_exchange`, `binance`, `bybit`, `kraken`, or `okx`. — @default 'all_exchange' */
594
+ exchange?: 'all_exchange' | 'spot_exchange' | 'derivative_exchange' | 'binance' | 'bybit' | 'kraken' | 'okx';
595
+ }
596
+ interface MarketOptionsItem {
597
+ /** Options exchange name */
598
+ exchange: string;
599
+ /** Max pain price for the nearest expiry in USD. Only available for individual exchanges (Deribit, OKX, Binance, Bybit), not present on the `All` aggregate row. */
600
+ max_pain_price?: number;
601
+ /** Total options open interest in USD */
602
+ open_interest: number;
603
+ /** Put/call open interest ratio (put OI / call OI). Values above 1 indicate bearish sentiment. Only available for individual exchanges (Deribit, OKX, Binance, Bybit), not present on the `All` aggregate row. */
604
+ put_call_ratio?: number;
605
+ /** Underlying token symbol like `BTC` or `ETH` */
606
+ symbol: string;
607
+ /** Unix timestamp (seconds) of last update */
608
+ updated_at: number;
609
+ /** 24-hour options trading volume in USD */
610
+ volume_24h: number;
611
+ }
612
+ interface MarketOptionsParams {
613
+ /** Token symbol. Can be `BTC`, `ETH`, `SOL`, `XRP`, `BNB`, `DOGE`, `ADA`, or `AVAX`. */
614
+ symbol?: 'BTC' | 'ETH' | 'SOL' | 'XRP' | 'BNB' | 'DOGE' | 'ADA' | 'AVAX';
615
+ /** Field to sort results by — @default 'volume_24h' */
616
+ sort_by?: 'open_interest' | 'volume_24h';
617
+ /** Sort order — @default 'desc' */
618
+ order?: 'asc' | 'desc';
619
+ }
620
+ interface MarketPriceItem {
621
+ /** Metric name like `nupl`, `sopr`, or `price` */
622
+ metric?: string;
623
+ /** Token symbol this data point belongs to */
624
+ symbol?: string;
625
+ /** Unix timestamp in seconds for this data point */
626
+ timestamp: number;
627
+ /** Metric value at this timestamp */
628
+ value: number;
629
+ }
630
+ interface MarketPriceParams {
631
+ /** Single token ticker symbol like `BTC`, `ETH`, or `SOL` (multi-symbol not supported) */
632
+ symbol?: string;
633
+ /** Predefined time range for historical data. Ignored when `from`/`to` are set. Can be `1d`, `7d`, `14d`, `30d`, `90d`, `180d`, `365d`, or `max`. — @default '30d' */
634
+ time_range?: '1d' | '7d' | '14d' | '30d' | '90d' | '180d' | '365d' | 'max';
635
+ /** Start of custom date range (Unix timestamp or YYYY-MM-DD). Must be used together with `to`. Overrides `time_range` when set. */
636
+ from?: string;
637
+ /** End of custom date range (Unix timestamp or YYYY-MM-DD). Must be used together with `from`. Overrides `time_range` when set. */
638
+ to?: string;
639
+ /** Quote currency like `usd`, `eur`, or `btc` — @default 'usd' */
640
+ currency?: string;
641
+ }
642
+ interface MarketPriceIndicatorItem {
643
+ /** Time interval used to compute the indicator like `1h`, `4h`, or `1d` */
644
+ interval: string;
645
+ /** Indicator name like `rsi`, `macd`, or `bbands` */
646
+ name: string;
647
+ /** Token symbol this indicator is computed for */
648
+ symbol: string;
649
+ /** Candle open timestamp in Unix seconds (present in time-series responses) */
650
+ timestamp?: number;
651
+ /** Unix timestamp in seconds when the indicator was last computed */
652
+ updated_at?: number;
653
+ /** Primary indicator value */
654
+ value: number;
655
+ values?: MarketPriceIndicatorItemValues;
656
+ }
657
+ interface MarketPriceIndicatorItemValues {
658
+ /** Bollinger lower band */
659
+ bbands_lower?: number;
660
+ /** Bollinger middle band (SMA) */
661
+ bbands_middle?: number;
662
+ /** Bollinger upper band */
663
+ bbands_upper?: number;
664
+ /** Average Directional Index value */
665
+ dmi_adx?: number;
666
+ /** Negative Directional Indicator (-DI) */
667
+ dmi_mdi?: number;
668
+ /** Positive Directional Indicator (+DI) */
669
+ dmi_pdi?: number;
670
+ /** Ichimoku baseline (Kijun-sen) */
671
+ ichimoku_base?: number;
672
+ /** Ichimoku conversion line (Tenkan-sen) */
673
+ ichimoku_conversion?: number;
674
+ /** Ichimoku current span A */
675
+ ichimoku_current_span_a?: number;
676
+ /** Ichimoku current span B */
677
+ ichimoku_current_span_b?: number;
678
+ /** Ichimoku lagging span A */
679
+ ichimoku_lagging_span_a?: number;
680
+ /** Ichimoku lagging span B */
681
+ ichimoku_lagging_span_b?: number;
682
+ /** Ichimoku leading span A (Senkou A) */
683
+ ichimoku_span_a?: number;
684
+ /** Ichimoku leading span B (Senkou B) */
685
+ ichimoku_span_b?: number;
686
+ /** MACD histogram (MACD minus signal) */
687
+ macd_hist?: number;
688
+ /** MACD signal line */
689
+ macd_signal?: number;
690
+ /** MACD line value */
691
+ macd_value?: number;
692
+ /** Stochastic %D (slow line) */
693
+ stoch_d?: number;
694
+ /** Stochastic %K (fast line) */
695
+ stoch_k?: number;
696
+ /** Supertrend direction: `buy` (price above supertrend, bullish) or `sell` (price below supertrend, bearish) */
697
+ supertrend_advice?: string;
698
+ /** Supertrend line value */
699
+ supertrend_value?: number;
700
+ }
701
+ interface MarketPriceIndicatorParams {
702
+ /** Technical indicator name. Can be `rsi`, `macd`, `ema`, `sma`, `bbands`, `stoch`, `adx`, `atr`, `cci`, `obv`, `vwap`, `dmi`, `ichimoku`, or `supertrend`. */
703
+ indicator?: 'rsi' | 'macd' | 'ema' | 'sma' | 'bbands' | 'stoch' | 'adx' | 'atr' | 'cci' | 'obv' | 'vwap' | 'dmi' | 'ichimoku' | 'supertrend';
704
+ /** Trading pair as `BTC/USDT` or bare symbol like `BTC` */
705
+ symbol?: string;
706
+ /** Candlestick interval. Can be `1m`, `5m`, `15m`, `30m`, `1h`, `2h`, `4h`, `12h`, `1d`, or `1w`. — @default '1d' */
707
+ interval?: '1m' | '5m' | '15m' | '30m' | '1h' | '2h' | '4h' | '12h' | '1d' | '1w';
708
+ /** Exchange for price data. Can be `binance`, `bybit`, `coinbase`, or `kraken`. — @default 'binance' */
709
+ exchange?: 'binance' | 'bybit' | 'coinbase' | 'kraken';
710
+ /** Start of time range. When set, returns time-series instead of latest value. Accepts Unix seconds (`1704067200`) or date string (`2024-01-01`) */
711
+ from?: string;
712
+ /** End of time range. Defaults to now when from is set. Accepts Unix seconds (`1706745600`) or date string (`2024-02-01`) */
713
+ to?: string;
714
+ /** Indicator-specific options as comma-separated key:value pairs. Available options by indicator: `period` — lookback period for rsi (default 14), sma (default 20), ema (default 20), bbands (default 20), adx (default 14), atr (default 14), cci (default 20), dmi (default 14), stoch (default 14), supertrend (default 10). `stddev` — standard deviation for bbands (default 2). `multiplier` — multiplier for supertrend (default 3). `fast_period` — MACD fast EMA (default 12). `slow_period` — MACD slow EMA (default 26). `signal_period` — MACD signal smoothing (default 9). Examples: `period:7`, `period:200`, `fast_period:8,slow_period:21,signal_period:5`, `period:10,stddev:1.5`. */
715
+ options?: string;
716
+ }
717
+ interface MarketRankingItem {
718
+ /** All-time high price in USD */
719
+ ath?: number;
720
+ /** All-time low price in USD */
721
+ atl?: number;
722
+ /** Price change percentage over the last 24 hours */
723
+ change_24h_pct: number;
724
+ /** Circulating token supply */
725
+ circulating_supply?: number;
726
+ /** Fully diluted valuation in USD */
727
+ fdv?: number;
728
+ /** Highest price in the last 24 hours in USD */
729
+ high_24h: number;
730
+ /** Token logo image URL */
731
+ image?: string;
732
+ /** Lowest price in the last 24 hours in USD */
733
+ low_24h: number;
734
+ /** Total market capitalization in USD */
735
+ market_cap_usd: number;
736
+ /** Maximum token supply (e.g. 21M for BTC). Not available for all tokens. */
737
+ max_supply?: number;
738
+ /** Full token name */
739
+ name: string;
740
+ /** Current price in USD */
741
+ price_usd: number;
742
+ /** Rank position in the list (1 = highest) */
743
+ rank: number;
744
+ /** Token ticker symbol like `BTC` or `ETH` */
745
+ symbol: string;
746
+ /** Total token supply */
747
+ total_supply?: number;
748
+ /** 24-hour trading volume in USD */
749
+ volume_24h_usd: number;
750
+ }
751
+ interface MarketRankingParams {
752
+ /** Field to sort by. `market_cap` sorts by total market capitalisation, `change_24h` sorts by 24-hour price change percentage (fetches top 250 by market cap then sorts client-side), `volume_24h` sorts by 24-hour trading volume. — @default 'market_cap' */
753
+ sort_by?: 'market_cap' | 'change_24h' | 'volume_24h';
754
+ /** Sort order: `desc` (default, highest first) or `asc` (lowest first). — @default 'desc' */
755
+ order?: 'asc' | 'desc';
756
+ /** Optional token category filter. When provided, results are limited to coins in that category. Supported values: MEME, AI, AI_AGENTS, L1, L2, DEFI, GAMING, STABLECOIN, RWA, DEPIN, SOL_ECO, BASE_ECO, LST. */
757
+ category?: 'MEME' | 'AI' | 'AI_AGENTS' | 'L1' | 'L2' | 'DEFI' | 'GAMING' | 'STABLECOIN' | 'RWA' | 'DEPIN' | 'SOL_ECO' | 'BASE_ECO' | 'LST';
758
+ /** Results per page — @default '20' */
759
+ limit?: number;
760
+ /** Pagination offset — @default '0' */
761
+ offset?: number;
762
+ }
763
+ interface NewsDetailData {
764
+ /** Full article body text */
765
+ content: string;
766
+ /** Article ID */
767
+ id: string;
768
+ /** Surf project UUID */
769
+ project_id?: string;
770
+ /** Primary crypto project referenced in the article */
771
+ project_name?: string;
772
+ /** Unix timestamp in seconds when the article was published */
773
+ published_at: number;
774
+ /** Publisher name */
775
+ source?: string;
776
+ /** Short summary of the article */
777
+ summary?: string;
778
+ /** Article headline */
779
+ title: string;
780
+ /** Direct URL to the original article */
781
+ url?: string;
782
+ }
783
+ interface NewsDetailParams {
784
+ /** Article ID (returned as id in feed/search results) */
785
+ id?: string;
786
+ }
787
+ interface NewsFeedItem {
788
+ highlights?: NewsFeedItemHighlights;
789
+ /** Article ID. Use with the detail endpoint to fetch full content. */
790
+ id: string;
791
+ /** Surf project UUID — pass as 'id' parameter to /project/detail, /project/events, or /project/defi/metrics for exact lookup */
792
+ project_id?: string;
793
+ /** Primary crypto project referenced in the article */
794
+ project_name?: string;
795
+ /** Unix timestamp in seconds when the article was published */
796
+ published_at: number;
797
+ /** Publisher name (e.g. COINDESK, COINTELEGRAPH) */
798
+ source?: string;
799
+ /** Short summary of the article */
800
+ summary?: string;
801
+ /** Article headline */
802
+ title: string;
803
+ /** Direct URL to the original article */
804
+ url?: string;
805
+ }
806
+ interface NewsFeedItemHighlights {
807
+ [key: string]: unknown;
808
+ }
809
+ interface NewsFeedParams {
810
+ /** Filter by news source */
811
+ source?: 'coindesk' | 'cointelegraph' | 'theblock' | 'decrypt' | 'dlnews' | 'blockbeats' | 'bitcoincom' | 'coinpedia' | 'ambcrypto' | 'cryptodaily' | 'cryptopotato' | 'phemex' | 'panews' | 'odaily' | 'tradingview' | 'chaincatcher' | 'techflow';
812
+ /** Comma-separated project names to filter by */
813
+ project?: string;
814
+ /** Filter articles published on or after this time. Accepts Unix seconds or date string (2024-01-01) */
815
+ from?: string;
816
+ /** Filter articles published on or before this time. Accepts Unix seconds or date string (2024-02-01) */
817
+ to?: string;
818
+ /** Sort order: recency (newest first) or trending (hot right now) — @default 'recency' */
819
+ sort_by?: 'recency' | 'trending';
820
+ /** Results per page (max 50) — @default '20' */
821
+ limit?: number;
822
+ /** Pagination offset — @default '0' */
823
+ offset?: number;
824
+ }
825
+ interface OnchainBridgeRankingItem {
826
+ /** Bridge protocol name */
827
+ project: string;
828
+ /** Total number of bridge transfers */
829
+ tx_count: number;
830
+ /** Total USD volume in the time range */
831
+ volume_usd: number;
832
+ }
833
+ interface OnchainBridgeRankingParams {
834
+ /** Aggregation window — @default '30d' */
835
+ time_range?: '7d' | '30d' | '90d' | '180d' | '1y' | 'all';
836
+ /** Results per page — @default '20' */
837
+ limit?: number;
838
+ /** Pagination offset — @default '0' */
839
+ offset?: number;
840
+ }
841
+ interface OnchainGasPriceData {
842
+ /** Canonical chain name */
843
+ chain: string;
844
+ /** Gas price in wei */
845
+ gas_price: string;
846
+ /** Gas price in Gwei */
847
+ gas_price_gwei: number;
848
+ }
849
+ interface OnchainGasPriceParams {
850
+ /** Chain. Can be `ethereum`, `polygon`, `bsc`, `arbitrum`, `optimism`, `base`, `avalanche`, `fantom`, `linea`, or `cyber`. */
851
+ chain?: 'ethereum' | 'polygon' | 'bsc' | 'arbitrum' | 'optimism' | 'base' | 'avalanche' | 'fantom' | 'linea' | 'cyber';
852
+ }
853
+ interface OnchainStructuredQueryItem {
854
+ [key: string]: unknown;
855
+ }
856
+ interface OnchainStructuredQueryParams {
857
+ fields?: unknown;
858
+ filters?: OnchainStructuredQueryParamsFiltersItem[];
859
+ /** Max rows to return. Default 20, max 10000 */
860
+ limit?: number;
861
+ /** Rows to skip for pagination. Default 0 */
862
+ offset?: number;
863
+ sort?: OnchainStructuredQueryParamsSortItem[];
864
+ /** Fully-qualified table name like `agent.my_table` */
865
+ source: string;
866
+ }
867
+ interface OnchainStructuredQueryParamsFiltersItem {
868
+ /** Column name to filter on like `block_number` or `from_address` */
869
+ field: string;
870
+ /** Comparison operator: eq, neq, gt, gte, lt, lte, like, in, not_in. For `in`/`not_in`, value must be a JSON array */
871
+ op: string;
872
+ /** <any> */
873
+ value: unknown;
874
+ }
875
+ interface OnchainStructuredQueryParamsSortItem {
876
+ /** Column name to sort by like `gas`, `block_number`, or `amount_usd` */
877
+ field: string;
878
+ /** Sort direction: asc (default) or desc */
879
+ order?: string;
880
+ }
881
+ interface OnchainSchemaItem {
882
+ columns: OnchainSchemaItemColumnsItem[];
883
+ /** Database name (always `agent`) */
884
+ database: string;
885
+ /** Table name */
886
+ table: string;
887
+ }
888
+ interface OnchainSchemaItemColumnsItem {
889
+ /** Column comment or description */
890
+ comment?: string;
891
+ /** Column name */
892
+ name: string;
893
+ /** Column data type like `UInt64`, `String`, or `DateTime` */
894
+ type: string;
895
+ }
896
+ interface OnchainSqlItem {
897
+ [key: string]: unknown;
898
+ }
899
+ interface OnchainSqlParams {
900
+ /** Maximum number of rows to return — @default '1000' */
901
+ max_rows?: number;
902
+ /** SQL query to execute against the blockchain data warehouse */
903
+ sql: string;
904
+ }
905
+ interface OnchainTxItem {
906
+ accessList: OnchainTxItemAccesslistItem[];
907
+ blobVersionedHashes?: unknown;
908
+ /** Block hash, null if pending */
909
+ blockHash: unknown;
910
+ /** Block number (hex), null if pending */
911
+ blockNumber: unknown;
912
+ /** Chain ID (hex) */
913
+ chainId?: string;
914
+ /** Sender address (0x-prefixed) */
915
+ from: string;
916
+ /** Gas limit (hex) */
917
+ gas: string;
918
+ /** Gas price in wei (hex). Present in all types; for EIP-1559 this is the effective gas price */
919
+ gasPrice?: string;
920
+ /** Transaction hash (0x-prefixed) */
921
+ hash: string;
922
+ /** Call data (hex) */
923
+ input: string;
924
+ /** Max fee per blob gas in wei (hex). EIP-4844 only */
925
+ maxFeePerBlobGas?: string;
926
+ /** Max fee per gas in wei (hex). EIP-1559/EIP-4844 only */
927
+ maxFeePerGas?: string;
928
+ /** Max priority fee per gas in wei (hex). EIP-1559/EIP-4844 only */
929
+ maxPriorityFeePerGas?: string;
930
+ /** Sender nonce (hex) */
931
+ nonce: string;
932
+ /** Signature R (hex) */
933
+ r: string;
934
+ /** Signature S (hex) */
935
+ s: string;
936
+ /** Recipient address, null for contract creation */
937
+ to: unknown;
938
+ /** Index in block (hex), null if pending */
939
+ transactionIndex: unknown;
940
+ /** Transaction type: 0x0=legacy, 0x1=EIP-2930, 0x2=EIP-1559, 0x3=EIP-4844 */
941
+ type: string;
942
+ /** Signature V (hex). Legacy: recovery ID (0x1b/0x1c); EIP-2930+: parity (0x0/0x1) */
943
+ v: string;
944
+ /** ETH value in wei (hex) */
945
+ value: string;
946
+ /** Signature Y parity (hex). Present in EIP-2930+ transactions */
947
+ yParity?: string;
948
+ }
949
+ interface OnchainTxItemAccesslistItem {
950
+ /** Account address (0x-prefixed) */
951
+ address: string;
952
+ storageKeys: unknown;
953
+ }
954
+ interface OnchainTxParams {
955
+ /** Transaction hash (0x-prefixed hex) */
956
+ hash?: string;
957
+ /** Chain. Can be `ethereum`, `polygon`, `bsc`, `arbitrum`, `optimism`, `base`, `avalanche`, `fantom`, `linea`, or `cyber`. */
958
+ chain?: 'ethereum' | 'polygon' | 'bsc' | 'arbitrum' | 'optimism' | 'base' | 'avalanche' | 'fantom' | 'linea' | 'cyber';
959
+ }
960
+ interface OnchainYieldRankingItem {
961
+ /** Total APY (base + reward) */
962
+ apy: number;
963
+ /** Base APY from pool fees or interest */
964
+ apy_base: number;
965
+ /** Reward token APY */
966
+ apy_reward: number;
967
+ /** Pool or vault contract address */
968
+ pool_address: string;
969
+ /** Protocol name */
970
+ project: string;
971
+ /** Token symbol */
972
+ symbol: string;
973
+ /** Underlying token address */
974
+ token_address: string;
975
+ /** Pool TVL in USD */
976
+ tvl_usd: number;
977
+ /** Protocol version */
978
+ version: string;
979
+ }
980
+ interface OnchainYieldRankingParams {
981
+ /** Filter by protocol name like `lido`, `aave`, or `uniswap` */
982
+ project?: string;
983
+ /** Ranking metric: `apy` or `tvl_usd`. When sorted by `apy`, only pools with TVL >= $100k are included — @default 'apy' */
984
+ sort_by?: 'apy' | 'tvl_usd';
985
+ /** Sort direction — @default 'desc' */
986
+ order?: 'asc' | 'desc';
987
+ /** Results per page — @default '20' */
988
+ limit?: number;
989
+ /** Pagination offset — @default '0' */
990
+ offset?: number;
991
+ }
992
+ interface PredictionMarketCategoryMetricsItem {
993
+ /** Top-level category */
994
+ category: string;
995
+ /** Notional trading volume in USD */
996
+ notional_volume_usd: number;
997
+ /** Open interest in USD */
998
+ open_interest_usd: number;
999
+ /** Prediction market platform: Kalshi or Polymarket */
1000
+ source: string;
1001
+ /** Subcategory within the category */
1002
+ subcategory: string;
1003
+ /** Unix timestamp in seconds (midnight UTC for the trading day) */
1004
+ timestamp: number;
1005
+ }
1006
+ interface PredictionMarketCategoryMetricsParams {
1007
+ /** Filter by prediction market platform: `Kalshi` or `Polymarket` */
1008
+ source?: 'Kalshi' | 'Polymarket';
1009
+ /** Filter by top-level category */
1010
+ category?: 'crypto' | 'culture' | 'economics' | 'financials' | 'politics' | 'stem' | 'sports';
1011
+ /** Predefined time range: `7d`, `30d`, `90d`, `180d`, `1y`, or `all` — @default '30d' */
1012
+ time_range?: '7d' | '30d' | '90d' | '180d' | '1y' | 'all';
1013
+ /** Results per page — @default '20' */
1014
+ limit?: number;
1015
+ /** Pagination offset — @default '0' */
1016
+ offset?: number;
1017
+ }
1018
+ interface KalshiEventsItem {
1019
+ /** Event subtitle */
1020
+ event_subtitle?: string;
1021
+ /** Unique event ticker identifier */
1022
+ event_ticker: string;
1023
+ /** Event title */
1024
+ event_title: string;
1025
+ /** Number of markets in this event */
1026
+ market_count: number;
1027
+ markets: KalshiEventsItemMarketsItem[];
1028
+ }
1029
+ interface KalshiEventsItemMarketsItem {
1030
+ /** Surf curated market category */
1031
+ category?: string;
1032
+ /** Market close time (Unix seconds) */
1033
+ close_time?: number;
1034
+ /** Market end time (Unix seconds) */
1035
+ end_time?: number;
1036
+ /** Parent event ticker */
1037
+ event_ticker: string;
1038
+ /** Event title */
1039
+ event_title?: string;
1040
+ /** Previous day open interest from daily report */
1041
+ last_day_open_interest: number;
1042
+ /** Unique market ticker identifier */
1043
+ market_ticker: string;
1044
+ /** Last day notional trading volume in USD (each contract = $1) */
1045
+ notional_volume_usd: number;
1046
+ /** Open interest (contracts) */
1047
+ open_interest: number;
1048
+ /** Payout type */
1049
+ payout_type: string;
1050
+ /** Market result if resolved */
1051
+ result?: string;
1052
+ /** Market start time (Unix seconds) */
1053
+ start_time?: number;
1054
+ /** Market status */
1055
+ status: string;
1056
+ /** Surf curated market subcategory */
1057
+ subcategory?: string;
1058
+ /** Market title */
1059
+ title: string;
1060
+ /** Total trading volume (contracts) */
1061
+ total_volume: number;
1062
+ }
1063
+ interface KalshiEventsParams {
1064
+ /** Event ticker identifier */
1065
+ event_ticker?: string;
1066
+ /** Results per page — @default '20' */
1067
+ limit?: number;
1068
+ /** Pagination offset — @default '0' */
1069
+ offset?: number;
1070
+ }
1071
+ interface KalshiMarketsItem {
1072
+ /** Surf curated market category */
1073
+ category?: string;
1074
+ /** Market close time (Unix seconds) */
1075
+ close_time?: number;
1076
+ /** Market end time (Unix seconds) */
1077
+ end_time?: number;
1078
+ /** Parent event ticker */
1079
+ event_ticker: string;
1080
+ /** Event title */
1081
+ event_title?: string;
1082
+ /** Previous day open interest from daily report */
1083
+ last_day_open_interest: number;
1084
+ /** Unique market ticker identifier */
1085
+ market_ticker: string;
1086
+ /** Last day notional trading volume in USD (each contract = $1) */
1087
+ notional_volume_usd: number;
1088
+ /** Open interest (contracts) */
1089
+ open_interest: number;
1090
+ /** Payout type */
1091
+ payout_type: string;
1092
+ /** Market result if resolved */
1093
+ result?: string;
1094
+ /** Market start time (Unix seconds) */
1095
+ start_time?: number;
1096
+ /** Market status */
1097
+ status: string;
1098
+ /** Surf curated market subcategory */
1099
+ subcategory?: string;
1100
+ /** Market title */
1101
+ title: string;
1102
+ /** Total trading volume (contracts) */
1103
+ total_volume: number;
1104
+ }
1105
+ interface KalshiMarketsParams {
1106
+ /** Market ticker identifier */
1107
+ market_ticker?: string;
1108
+ /** Results per page — @default '20' */
1109
+ limit?: number;
1110
+ /** Pagination offset — @default '0' */
1111
+ offset?: number;
1112
+ }
1113
+ interface KalshiOpenInterestItem {
1114
+ /** Open interest on this date (contracts) */
1115
+ open_interest: number;
1116
+ /** Unix timestamp in seconds (midnight UTC for the trading day) */
1117
+ timestamp: number;
1118
+ }
1119
+ interface KalshiOpenInterestParams {
1120
+ /** Market ticker identifier */
1121
+ ticker?: string;
1122
+ /** Predefined time range: `7d`, `30d`, `90d`, `180d`, or `1y` — @default '30d' */
1123
+ time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
1124
+ }
1125
+ interface KalshiPricesItem {
1126
+ /** Highest price as probability (0-1) */
1127
+ high: number;
1128
+ /** Lowest price as probability (0-1) */
1129
+ low: number;
1130
+ /** Opening price as probability (0-1). Present for daily interval only. */
1131
+ open?: number;
1132
+ side_a: KalshiPricesItemSideA;
1133
+ side_b: KalshiPricesItemSideB;
1134
+ /** Unix timestamp in seconds (midnight UTC for daily, hour start for hourly, trade time for latest) */
1135
+ timestamp: number;
1136
+ }
1137
+ interface KalshiPricesItemSideA {
1138
+ /** Outcome label: `Yes` or `No` */
1139
+ label: string;
1140
+ /** Price as probability (0-1) */
1141
+ price: number;
1142
+ }
1143
+ interface KalshiPricesItemSideB {
1144
+ /** Outcome label: `Yes` or `No` */
1145
+ label: string;
1146
+ /** Price as probability (0-1) */
1147
+ price: number;
1148
+ }
1149
+ interface KalshiPricesParams {
1150
+ /** Market ticker identifier */
1151
+ ticker?: string;
1152
+ /** Predefined time range: `7d`, `30d`, `90d`, `180d`, or `1y`. Ignored when `interval=latest`. — @default '30d' */
1153
+ time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
1154
+ /** Data interval: `1h` for hourly, `1d` for daily OHLC, `latest` for real-time price from trades — @default '1d' */
1155
+ interval?: '1h' | '1d' | 'latest';
1156
+ }
1157
+ interface KalshiRankingItem {
1158
+ /** Surf curated market category */
1159
+ category?: string;
1160
+ /** Market close time (Unix seconds) */
1161
+ close_time?: number;
1162
+ /** Market end time (Unix seconds) */
1163
+ end_time?: number;
1164
+ /** Parent event ticker */
1165
+ event_ticker: string;
1166
+ /** Event title */
1167
+ event_title?: string;
1168
+ /** Previous day open interest from daily report */
1169
+ last_day_open_interest: number;
1170
+ /** Unique market ticker identifier */
1171
+ market_ticker: string;
1172
+ /** Last day notional trading volume in USD (each contract = $1) */
1173
+ notional_volume_usd: number;
1174
+ /** Open interest (contracts) */
1175
+ open_interest: number;
1176
+ /** Payout type */
1177
+ payout_type: string;
1178
+ /** Market result if resolved */
1179
+ result?: string;
1180
+ /** Market start time (Unix seconds) */
1181
+ start_time?: number;
1182
+ /** Market status */
1183
+ status: string;
1184
+ /** Surf curated market subcategory */
1185
+ subcategory?: string;
1186
+ /** Market title */
1187
+ title: string;
1188
+ /** Total trading volume (contracts) */
1189
+ total_volume: number;
1190
+ }
1191
+ interface KalshiRankingParams {
1192
+ /** Field to sort results by — @default 'notional_volume_usd' */
1193
+ sort_by?: 'notional_volume_usd' | 'open_interest';
1194
+ /** Sort order — @default 'desc' */
1195
+ order?: 'asc' | 'desc';
1196
+ /** Market status filter: `active`, `closed`, `determined`, `disputed`, `finalized`, `inactive`, or `initialized` — @default 'active' */
1197
+ status?: 'active' | 'closed' | 'determined' | 'disputed' | 'finalized' | 'inactive' | 'initialized';
1198
+ /** Filter by category */
1199
+ category?: 'crypto' | 'culture' | 'economics' | 'financials' | 'politics' | 'stem' | 'sports' | 'unknown';
1200
+ /** Results per page — @default '20' */
1201
+ limit?: number;
1202
+ /** Pagination offset — @default '0' */
1203
+ offset?: number;
1204
+ }
1205
+ interface KalshiTradesItem {
1206
+ /** Unique market ticker identifier */
1207
+ market_ticker: string;
1208
+ /** No outcome price as probability (0-1) */
1209
+ no_price: number;
1210
+ /** Notional volume in USD (each contract = $1) */
1211
+ notional_volume_usd: number;
1212
+ /** Taker side: `yes` or `no` */
1213
+ taker_side: string;
1214
+ /** Unix timestamp in seconds */
1215
+ timestamp: number;
1216
+ /** Unique trade identifier */
1217
+ trade_id: string;
1218
+ /** Yes outcome price as probability (0-1) */
1219
+ yes_price: number;
1220
+ }
1221
+ interface KalshiTradesParams {
1222
+ /** Market ticker identifier */
1223
+ ticker?: string;
1224
+ /** Filter by taker side: `yes` or `no` */
1225
+ taker_side?: 'yes' | 'no';
1226
+ /** Minimum notional volume in USD (each contract = $1) */
1227
+ min_amount?: number;
1228
+ /** Start of time range. Accepts Unix seconds (`1704067200`) or date string (`2024-01-01`) */
1229
+ from?: string;
1230
+ /** End of time range. Accepts Unix seconds (`1706745600`) or date string (`2024-02-01`) */
1231
+ to?: string;
1232
+ /** Field to sort results by — @default 'timestamp' */
1233
+ sort_by?: 'timestamp' | 'notional_volume_usd';
1234
+ /** Sort order — @default 'desc' */
1235
+ order?: 'asc' | 'desc';
1236
+ /** Results per page — @default '50' */
1237
+ limit?: number;
1238
+ /** Pagination offset — @default '0' */
1239
+ offset?: number;
1240
+ }
1241
+ interface KalshiVolumesItem {
1242
+ /** Notional volume in USD (each contract counted as $1) */
1243
+ notional_volume_usd: number;
1244
+ /** Unix timestamp in seconds (midnight UTC for the trading day) */
1245
+ timestamp: number;
1246
+ }
1247
+ interface KalshiVolumesParams {
1248
+ /** Market ticker identifier */
1249
+ ticker?: string;
1250
+ /** Predefined time range: `7d`, `30d`, `90d`, `180d`, or `1y` — @default '30d' */
1251
+ time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
1252
+ }
1253
+ interface PolymarketActivityItem {
1254
+ /** Market condition identifier */
1255
+ condition_id: string;
1256
+ /** Outcome label */
1257
+ outcome: string;
1258
+ /** Trade price (0-1) */
1259
+ price: number;
1260
+ /** Trade side */
1261
+ side: string;
1262
+ /** Trade size in shares */
1263
+ size: number;
1264
+ /** Activity Unix timestamp in seconds */
1265
+ timestamp: number;
1266
+ /** Market title */
1267
+ title: string;
1268
+ /** Transaction hash */
1269
+ transaction_hash: string;
1270
+ /** Activity type such as `buy`, `sell`, or `redeem` */
1271
+ type: string;
1272
+ /** Trade size in USDC */
1273
+ usdc_size: number;
1274
+ }
1275
+ interface PolymarketActivityParams {
1276
+ /** Polymarket proxy wallet address */
1277
+ address?: string;
1278
+ /** Results per page — @default '50' */
1279
+ limit?: number;
1280
+ /** Pagination offset — @default '0' */
1281
+ offset?: number;
1282
+ }
1283
+ interface PolymarketEventsItem {
1284
+ /** Surf curated event category */
1285
+ category?: string;
1286
+ /** Event description */
1287
+ description?: string;
1288
+ /** Event end time (Unix seconds) */
1289
+ end_time?: number;
1290
+ /** Event identifier slug */
1291
+ event_slug: string;
1292
+ /** Event image URL */
1293
+ image?: string;
1294
+ /** Number of markets in this event */
1295
+ market_count: number;
1296
+ markets: PolymarketEventsItemMarketsItem[];
1297
+ /** Resolution source URL */
1298
+ settlement_sources?: string;
1299
+ /** Event start time (Unix seconds) */
1300
+ start_time?: number;
1301
+ /** Event status: `open` if any market is open, `closed` if all markets are closed */
1302
+ status: string;
1303
+ /** Surf curated event subcategory */
1304
+ subcategory?: string;
1305
+ tags?: unknown;
1306
+ /** Event title */
1307
+ title: string;
1308
+ /** Total event volume across all markets (USD) */
1309
+ volume_total: number;
1310
+ }
1311
+ interface PolymarketEventsItemMarketsItem {
1312
+ /** Surf curated market category */
1313
+ category?: string;
1314
+ /** Market close time (Unix seconds) */
1315
+ close_time?: number;
1316
+ /** Resolution time (Unix seconds) */
1317
+ completed_time?: number;
1318
+ /** Unique condition identifier */
1319
+ condition_id: string;
1320
+ /** Market description */
1321
+ description?: string;
1322
+ /** Market end time (Unix seconds) */
1323
+ end_time?: number;
1324
+ /** Event identifier slug */
1325
+ event_slug?: string;
1326
+ /** Game start time for sports markets (Unix seconds) */
1327
+ game_start_time?: number;
1328
+ /** Market image URL */
1329
+ image?: string;
1330
+ /** Market identifier slug */
1331
+ market_slug: string;
1332
+ /** Negative risk market identifier */
1333
+ negative_risk_id?: string;
1334
+ /** Link to Polymarket page */
1335
+ polymarket_link?: string;
1336
+ /** URL to resolution data source */
1337
+ resolution_source?: string;
1338
+ side_a?: PolymarketEventsItemMarketsItemSideA;
1339
+ side_b?: PolymarketEventsItemMarketsItemSideB;
1340
+ /** Market start time (Unix seconds) */
1341
+ start_time?: number;
1342
+ /** Market status: `open` or `closed` */
1343
+ status: string;
1344
+ /** Surf curated market subcategory */
1345
+ subcategory?: string;
1346
+ tags?: unknown;
1347
+ /** Market title */
1348
+ title: string;
1349
+ /** Trading volume in the past month (USD) */
1350
+ volume_1_month: number;
1351
+ /** Trading volume in the past week (USD) */
1352
+ volume_1_week: number;
1353
+ /** Trading volume in the past year (USD) */
1354
+ volume_1_year: number;
1355
+ /** Total trading volume (USD) */
1356
+ volume_total: number;
1357
+ /** Winning outcome label, if resolved */
1358
+ winning_side?: string;
1359
+ }
1360
+ interface PolymarketEventsItemMarketsItemSideA {
1361
+ /** Token identifier for this outcome */
1362
+ id: string;
1363
+ /** Outcome label */
1364
+ label: string;
1365
+ }
1366
+ interface PolymarketEventsItemMarketsItemSideB {
1367
+ /** Token identifier for this outcome */
1368
+ id: string;
1369
+ /** Outcome label */
1370
+ label: string;
1371
+ }
1372
+ interface PolymarketEventsParams {
1373
+ /** Event slug identifier */
1374
+ event_slug?: string;
1375
+ /** Results per page — @default '20' */
1376
+ limit?: number;
1377
+ /** Pagination offset — @default '0' */
1378
+ offset?: number;
1379
+ }
1380
+ interface PolymarketMarketsItem {
1381
+ /** Surf curated market category */
1382
+ category?: string;
1383
+ /** Market close time (Unix seconds) */
1384
+ close_time?: number;
1385
+ /** Resolution time (Unix seconds) */
1386
+ completed_time?: number;
1387
+ /** Unique condition identifier */
1388
+ condition_id: string;
1389
+ /** Market description */
1390
+ description?: string;
1391
+ /** Market end time (Unix seconds) */
1392
+ end_time?: number;
1393
+ /** Event identifier slug */
1394
+ event_slug?: string;
1395
+ /** Game start time for sports markets (Unix seconds) */
1396
+ game_start_time?: number;
1397
+ /** Market image URL */
1398
+ image?: string;
1399
+ /** Market identifier slug */
1400
+ market_slug: string;
1401
+ /** Negative risk market identifier */
1402
+ negative_risk_id?: string;
1403
+ /** Link to Polymarket page */
1404
+ polymarket_link?: string;
1405
+ /** URL to resolution data source */
1406
+ resolution_source?: string;
1407
+ side_a?: PolymarketMarketsItemSideA;
1408
+ side_b?: PolymarketMarketsItemSideB;
1409
+ /** Market start time (Unix seconds) */
1410
+ start_time?: number;
1411
+ /** Market status: `open` or `closed` */
1412
+ status: string;
1413
+ /** Surf curated market subcategory */
1414
+ subcategory?: string;
1415
+ tags?: unknown;
1416
+ /** Market title */
1417
+ title: string;
1418
+ /** Trading volume in the past month (USD) */
1419
+ volume_1_month: number;
1420
+ /** Trading volume in the past week (USD) */
1421
+ volume_1_week: number;
1422
+ /** Trading volume in the past year (USD) */
1423
+ volume_1_year: number;
1424
+ /** Total trading volume (USD) */
1425
+ volume_total: number;
1426
+ /** Winning outcome label, if resolved */
1427
+ winning_side?: string;
1428
+ }
1429
+ interface PolymarketMarketsItemSideA {
1430
+ /** Token identifier for this outcome */
1431
+ id: string;
1432
+ /** Outcome label */
1433
+ label: string;
1434
+ }
1435
+ interface PolymarketMarketsItemSideB {
1436
+ /** Token identifier for this outcome */
1437
+ id: string;
1438
+ /** Outcome label */
1439
+ label: string;
1440
+ }
1441
+ interface PolymarketMarketsParams {
1442
+ /** Market slug identifier */
1443
+ market_slug?: string;
1444
+ /** Results per page — @default '20' */
1445
+ limit?: number;
1446
+ /** Pagination offset — @default '0' */
1447
+ offset?: number;
1448
+ }
1449
+ interface PolymarketOpenInterestItem {
1450
+ /** Daily net change in USD */
1451
+ daily_net_change_usd: number;
1452
+ /** Open interest in USD */
1453
+ open_interest_usd: number;
1454
+ /** Unix timestamp in seconds (midnight UTC) */
1455
+ timestamp: number;
1456
+ }
1457
+ interface PolymarketOpenInterestParams {
1458
+ /** Market condition identifier */
1459
+ condition_id?: string;
1460
+ /** Predefined time range — @default '30d' */
1461
+ time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
1462
+ }
1463
+ interface PolymarketPositionsItem {
1464
+ /** Average entry price (0-1) */
1465
+ avg_price: number;
1466
+ /** Unrealized profit and loss in USD */
1467
+ cash_pnl: number;
1468
+ /** Market condition identifier */
1469
+ condition_id: string;
1470
+ /** Current market price (0-1) */
1471
+ cur_price: number;
1472
+ /** Current position value in USD */
1473
+ current_value: number;
1474
+ /** Outcome label */
1475
+ outcome_label: string;
1476
+ /** Market question */
1477
+ question: string;
1478
+ /** Realized profit and loss in USD */
1479
+ realized_pnl: number;
1480
+ /** Whether the position is redeemable */
1481
+ redeemable: boolean;
1482
+ /** Position size in shares */
1483
+ size: number;
1484
+ }
1485
+ interface PolymarketPositionsParams {
1486
+ /** Polymarket proxy wallet address */
1487
+ address?: string;
1488
+ /** Results per page — @default '50' */
1489
+ limit?: number;
1490
+ /** Pagination offset — @default '0' */
1491
+ offset?: number;
1492
+ }
1493
+ interface PolymarketPricesItem {
1494
+ side_a?: PolymarketPricesItemSideA;
1495
+ side_b?: PolymarketPricesItemSideB;
1496
+ /** Interval start Unix timestamp in seconds */
1497
+ timestamp: number;
1498
+ }
1499
+ interface PolymarketPricesItemSideA {
1500
+ /** Outcome label such as `Yes` or `No` */
1501
+ label: string;
1502
+ /** Average price over the interval (0-1) */
1503
+ price: number;
1504
+ /** Outcome token identifier */
1505
+ token_id: string;
1506
+ }
1507
+ interface PolymarketPricesItemSideB {
1508
+ /** Outcome label such as `Yes` or `No` */
1509
+ label: string;
1510
+ /** Average price over the interval (0-1) */
1511
+ price: number;
1512
+ /** Outcome token identifier */
1513
+ token_id: string;
1514
+ }
1515
+ interface PolymarketPricesParams {
1516
+ /** Market condition identifier */
1517
+ condition_id?: string;
1518
+ /** Predefined time range. Ignored when `interval` is `latest`. — @default '30d' */
1519
+ time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
1520
+ /** Aggregation interval: `1h` (hourly), `1d` (daily), or `latest` (most recent snapshot) — @default '1d' */
1521
+ interval?: '1h' | '1d' | 'latest';
1522
+ }
1523
+ interface PolymarketRankingItem {
1524
+ /** Surf curated market category */
1525
+ category?: string;
1526
+ /** Unique condition identifier */
1527
+ condition_id: string;
1528
+ /** Market end time (Unix seconds) */
1529
+ end_time?: number;
1530
+ /** Notional trading volume (USD) */
1531
+ notional_volume_usd: number;
1532
+ /** Current open interest (USD) */
1533
+ open_interest_usd: number;
1534
+ /** Link to Polymarket page */
1535
+ polymarket_link?: string;
1536
+ /** Market question text */
1537
+ question: string;
1538
+ /** Market status */
1539
+ status: string;
1540
+ /** Surf curated market subcategory */
1541
+ subcategory?: string;
1542
+ tags?: unknown;
1543
+ }
1544
+ interface PolymarketRankingParams {
1545
+ /** Sort by last day's `notional_volume_usd` or `open_interest` — @default 'notional_volume_usd' */
1546
+ sort_by?: 'notional_volume_usd' | 'open_interest';
1547
+ /** Sort order — @default 'desc' */
1548
+ order?: 'asc' | 'desc';
1549
+ /** Market status filter: `active`, `finalized`, `ended`, `initialized`, or `closed` — @default 'active' */
1550
+ status?: 'active' | 'finalized' | 'ended' | 'initialized' | 'closed';
1551
+ /** Filter by Surf-curated category */
1552
+ category?: 'crypto' | 'culture' | 'early_polymarket_trades' | 'economics' | 'financials' | 'politics' | 'stem' | 'sports' | 'unknown';
1553
+ /** Filter markets ending within this window from now: `24h`, `3d`, `7d`, `14d`, or `30d` */
1554
+ end_before?: '24h' | '3d' | '7d' | '14d' | '30d';
1555
+ /** Results per page — @default '20' */
1556
+ limit?: number;
1557
+ /** Pagination offset — @default '0' */
1558
+ offset?: number;
1559
+ }
1560
+ interface PolymarketTradesItem {
1561
+ /** Trade amount in USD */
1562
+ amount_usd: number;
1563
+ /** Block number */
1564
+ block_number: number;
1565
+ /** Trade Unix timestamp in seconds */
1566
+ block_time: number;
1567
+ /** Market condition identifier */
1568
+ condition_id: string;
1569
+ /** Event log index */
1570
+ evt_index: number;
1571
+ /** Exchange contract address */
1572
+ exchange_address: string;
1573
+ /** Fee amount in USD */
1574
+ fee_usd: number;
1575
+ /** Maker wallet address */
1576
+ maker_address: string;
1577
+ /** Whether this is a negative risk trade */
1578
+ neg_risk: boolean;
1579
+ /** Outcome label such as `Yes` or `No` */
1580
+ outcome_label: string;
1581
+ /** Outcome token identifier */
1582
+ outcome_token_id: string;
1583
+ /** Trade price (0-1) */
1584
+ price: number;
1585
+ /** Market question text */
1586
+ question: string;
1587
+ /** Number of shares traded */
1588
+ shares: number;
1589
+ /** Taker wallet address */
1590
+ taker_address: string;
1591
+ /** Transaction hash */
1592
+ tx_hash: string;
1593
+ }
1594
+ interface PolymarketTradesParams {
1595
+ /** Market condition identifier */
1596
+ condition_id?: string;
1597
+ /** Wallet address — returns trades where the address is maker or taker */
1598
+ address?: string;
1599
+ /** Filter by outcome label: `Yes` or `No` */
1600
+ outcome_label?: 'Yes' | 'No';
1601
+ /** Minimum trade amount in USD */
1602
+ min_amount?: number;
1603
+ /** Start of time range. Accepts Unix seconds (`1704067200`) or date string (`2024-01-01`) */
1604
+ from?: string;
1605
+ /** End of time range. Accepts Unix seconds (`1706745600`) or date string (`2024-02-01`) */
1606
+ to?: string;
1607
+ /** Field to sort results by — @default 'timestamp' */
1608
+ sort_by?: 'timestamp' | 'notional_volume_usd';
1609
+ /** Results per page — @default '50' */
1610
+ limit?: number;
1611
+ /** Pagination offset — @default '0' */
1612
+ offset?: number;
1613
+ }
1614
+ interface PolymarketVolumesItem {
1615
+ /** Notional trading volume in USD */
1616
+ notional_volume_usd: number;
1617
+ /** Interval start Unix timestamp in seconds */
1618
+ timestamp: number;
1619
+ /** Number of trades */
1620
+ trade_count: number;
1621
+ }
1622
+ interface PolymarketVolumesParams {
1623
+ /** Market condition identifier */
1624
+ condition_id?: string;
1625
+ /** Predefined time range — @default '30d' */
1626
+ time_range?: '7d' | '30d' | '90d' | '180d' | '1y';
1627
+ /** Aggregation interval: `1h` (hourly) or `1d` (daily) — @default '1d' */
1628
+ interval?: '1h' | '1d';
1629
+ }
1630
+ interface ProjectDefiMetricsItem {
1631
+ /** Unix timestamp in seconds for this data point */
1632
+ timestamp: number;
1633
+ /** Metric value at this timestamp */
1634
+ value: number;
1635
+ }
1636
+ interface ProjectDefiMetricsParams {
1637
+ /** Surf project UUID. PREFERRED — always use this when available from a previous response (e.g. project_id from /fund/portfolio or id from /search/project). Takes priority over q. */
1638
+ id?: string;
1639
+ /** Fuzzy entity name search. Only use when 'id' is not available. May return unexpected results for ambiguous names. */
1640
+ q?: string;
1641
+ /** Metric to query. Can be `volume`, `fees` (or `fee` alias), `revenue`, `tvl`, or `users`. */
1642
+ metric?: 'volume' | 'fee' | 'fees' | 'revenue' | 'tvl' | 'users';
1643
+ /** Start of time range. Accepts Unix seconds (`1704067200`) or date string (`2024-01-01`) */
1644
+ from?: string;
1645
+ /** End of time range. Accepts Unix seconds (`1706745600`) or date string (`2024-02-01`) */
1646
+ to?: string;
1647
+ /** Filter by chain. Can be `ethereum`, `polygon`, `bsc`, `arbitrum`, `optimism`, `base`, `avalanche`, `fantom`, or `solana`. */
1648
+ chain?: 'ethereum' | 'polygon' | 'bsc' | 'arbitrum' | 'optimism' | 'base' | 'avalanche' | 'fantom' | 'solana';
1649
+ /** Results per page — @default '20' */
1650
+ limit?: number;
1651
+ /** Pagination offset — @default '0' */
1652
+ offset?: number;
1653
+ }
1654
+ interface ProjectDefiRankingItem {
1655
+ fees?: number;
1656
+ /** Project logo image URL */
1657
+ logo_url?: string;
1658
+ name: string;
1659
+ revenue?: number;
1660
+ symbol?: string;
1661
+ tvl?: number;
1662
+ users?: number;
1663
+ volume?: number;
1664
+ }
1665
+ interface ProjectDefiRankingParams {
1666
+ /** Ranking metric. Can be `tvl`, `revenue`, `fees`, `volume`, or `users`. */
1667
+ metric?: 'tvl' | 'revenue' | 'fees' | 'volume' | 'users';
1668
+ /** Results per page — @default '20' */
1669
+ limit?: number;
1670
+ /** Pagination offset — @default '0' */
1671
+ offset?: number;
1672
+ }
1673
+ interface ProjectDetailData {
1674
+ contracts?: ProjectDetailDataContracts;
1675
+ funding?: ProjectDetailDataFunding;
1676
+ overview?: ProjectDetailDataOverview;
1677
+ social?: ProjectDetailDataSocial;
1678
+ team?: ProjectDetailDataTeam;
1679
+ tge_status?: ProjectDetailDataTgeStatus;
1680
+ token_info?: ProjectDetailDataTokenInfo;
1681
+ tokenomics?: ProjectDetailDataTokenomics;
1682
+ }
1683
+ interface ProjectDetailDataContracts {
1684
+ contracts?: ProjectDetailDataContractsContractsItem[];
1685
+ }
1686
+ interface ProjectDetailDataFunding {
1687
+ rounds?: ProjectDetailDataFundingRoundsItem[];
1688
+ /** Total capital raised across all rounds in USD */
1689
+ total_raise?: number;
1690
+ }
1691
+ interface ProjectDetailDataOverview {
1692
+ chains?: unknown;
1693
+ /** Short description of the project */
1694
+ description?: string;
1695
+ exchanges?: unknown;
1696
+ /** Surf project UUID — pass as 'id' parameter to /project/detail, /project/events, or /project/defi/metrics for exact lookup. Prefer over 'q' (fuzzy name search). */
1697
+ id: string;
1698
+ /** Project logo image URL */
1699
+ logo_url?: string;
1700
+ /** Project name */
1701
+ name: string;
1702
+ /** URL-friendly project slug */
1703
+ slug?: string;
1704
+ tags?: unknown;
1705
+ /** TGE status: pre, upcoming, or post */
1706
+ tge_status?: string;
1707
+ /** Primary token ticker symbol */
1708
+ token_symbol?: string;
1709
+ /** Project official website URL */
1710
+ website?: string;
1711
+ /** Number of X (Twitter) followers */
1712
+ x_followers: number;
1713
+ /** X (Twitter) handle without the @ prefix */
1714
+ x_handle?: string;
1715
+ }
1716
+ interface ProjectDetailDataSocial {
1717
+ discord?: ProjectDetailDataSocialDiscord;
1718
+ github?: ProjectDetailDataSocialGithub;
1719
+ telegram?: ProjectDetailDataSocialTelegram;
1720
+ twitter?: ProjectDetailDataSocialTwitter;
1721
+ }
1722
+ interface ProjectDetailDataTeam {
1723
+ members?: ProjectDetailDataTeamMembersItem[];
1724
+ }
1725
+ interface ProjectDetailDataTgeStatus {
1726
+ /** TGE status: `pre`, `upcoming`, or `post`. Omitted when unknown. */
1727
+ current_status?: string;
1728
+ exchanges?: unknown;
1729
+ /** Unix timestamp of the last TGE event */
1730
+ last_event_time?: number;
1731
+ }
1732
+ interface ProjectDetailDataTokenInfo {
1733
+ /** All-time high price in USD */
1734
+ all_time_high?: number;
1735
+ /** All-time low price in USD */
1736
+ all_time_low?: number;
1737
+ /** Circulating token supply */
1738
+ circulating_supply?: number;
1739
+ /** Fully diluted valuation in USD */
1740
+ fdv?: number;
1741
+ /** 24-hour high price in USD */
1742
+ high_24h?: number;
1743
+ /** Token logo image URL */
1744
+ image?: string;
1745
+ /** 24-hour low price in USD */
1746
+ low_24h?: number;
1747
+ /** Market capitalization in USD */
1748
+ market_cap_usd?: number;
1749
+ /** Full token name */
1750
+ name: string;
1751
+ /** 24-hour price change percentage */
1752
+ price_change_24h?: number;
1753
+ /** 30-day price change percentage */
1754
+ price_change_30d?: number;
1755
+ /** 7-day price change percentage */
1756
+ price_change_7d?: number;
1757
+ /** Current price in USD */
1758
+ price_usd?: number;
1759
+ /** Token ticker symbol */
1760
+ symbol: string;
1761
+ /** Total token supply */
1762
+ total_supply?: number;
1763
+ /** 24-hour trading volume in USD */
1764
+ volume_24h?: number;
1765
+ }
1766
+ interface ProjectDetailDataTokenomics {
1767
+ /** Number of tokens currently in public circulation */
1768
+ circulating_supply?: number;
1769
+ /** Fully diluted valuation in USD */
1770
+ fdv?: number;
1771
+ /** Total market capitalization in USD */
1772
+ market_cap_usd?: number;
1773
+ /** Total token supply */
1774
+ total_supply?: number;
1775
+ }
1776
+ interface ProjectDetailDataContractsContractsItem {
1777
+ /** Contract address on the specified chain */
1778
+ address: string;
1779
+ /** Chain name like `ethereum`, `bsc`, or `solana` */
1780
+ chain: string;
1781
+ /** Human-readable label for this contract like `Token` or `Staking` */
1782
+ label?: string;
1783
+ }
1784
+ interface ProjectDetailDataFundingRoundsItem {
1785
+ /** Amount raised in USD */
1786
+ amount?: number;
1787
+ /** Date when the round closed in ISO 8601 format */
1788
+ date?: string;
1789
+ investors?: ProjectDetailDataFundingRoundsItemInvestorsItem[];
1790
+ /** Funding round name like `Seed`, `Series A`, or `Private` */
1791
+ round_name: string;
1792
+ /** Project valuation at round close in USD */
1793
+ valuation?: number;
1794
+ }
1795
+ interface ProjectDetailDataSocialDiscord {
1796
+ /** Number of followers on this platform */
1797
+ followers_count?: number;
1798
+ /** Username or handle on the social platform */
1799
+ handle?: string;
1800
+ /** Profile URL on the social platform */
1801
+ url?: string;
1802
+ }
1803
+ interface ProjectDetailDataSocialGithub {
1804
+ /** Number of followers on this platform */
1805
+ followers_count?: number;
1806
+ /** Username or handle on the social platform */
1807
+ handle?: string;
1808
+ /** Profile URL on the social platform */
1809
+ url?: string;
1810
+ }
1811
+ interface ProjectDetailDataSocialTelegram {
1812
+ /** Number of followers on this platform */
1813
+ followers_count?: number;
1814
+ /** Username or handle on the social platform */
1815
+ handle?: string;
1816
+ /** Profile URL on the social platform */
1817
+ url?: string;
1818
+ }
1819
+ interface ProjectDetailDataSocialTwitter {
1820
+ /** Number of followers on this platform */
1821
+ followers_count?: number;
1822
+ /** Username or handle on the social platform */
1823
+ handle?: string;
1824
+ /** Profile URL on the social platform */
1825
+ url?: string;
1826
+ }
1827
+ interface ProjectDetailDataTeamMembersItem {
1828
+ /** Team member profile image URL */
1829
+ image?: string;
1830
+ /** Team member's full name */
1831
+ name: string;
1832
+ /** Team member's role or title */
1833
+ role?: string;
1834
+ social_links?: ProjectDetailDataTeamMembersItemSocialLinks;
1835
+ }
1836
+ interface ProjectDetailDataFundingRoundsItemInvestorsItem {
1837
+ /** Whether this investor led the round */
1838
+ is_lead: boolean;
1839
+ /** Investor logo URL */
1840
+ logo?: string;
1841
+ /** Investor name */
1842
+ name: string;
1843
+ /** Investor type (FUND or PERSON) */
1844
+ type?: string;
1845
+ }
1846
+ interface ProjectDetailDataTeamMembersItemSocialLinks {
1847
+ [key: string]: unknown;
1848
+ }
1849
+ interface ProjectDetailParams {
1850
+ /** Surf project UUID. PREFERRED — always use this when available from a previous response (e.g. project_id from /fund/portfolio or id from /search/project). Takes priority over q. */
1851
+ id?: string;
1852
+ /** Fuzzy entity name search. Only use when 'id' is not available. May return unexpected results for ambiguous names. */
1853
+ q?: string;
1854
+ /** Comma-separated sub-resources to include. Can be `overview`, `token_info`, `tokenomics`, `funding`, `team`, `contracts`, `social`, or `tge_status`. — @default 'overview' */
1855
+ fields?: string;
1856
+ }
1857
+ interface SearchAirdropItem {
1858
+ /** Token ticker symbol */
1859
+ coin_symbol?: string;
1860
+ /** X/Twitter follower count (0 if unknown) */
1861
+ followers_count: number;
1862
+ /** Last status change as Unix seconds */
1863
+ last_status_update: number;
1864
+ /** Project logo image URL */
1865
+ logo_url?: string;
1866
+ /** Surf project UUID if linked */
1867
+ project_id?: string;
1868
+ /** Project/coin name */
1869
+ project_name: string;
1870
+ /** Expected reward date as Unix seconds (0 if unknown) */
1871
+ reward_date: number;
1872
+ /** Reward type: airdrop, points, whitelist, nft, role, ambassador */
1873
+ reward_type?: string;
1874
+ /** Airdrop lifecycle stage: `POTENTIAL` (speculated, tasks open), `CONFIRMED` (announced, tasks open), `SNAPSHOT` (eligibility snapshot taken), `VERIFICATION` (claim window open), `REWARD_AVAILABLE` (ready to claim), `DISTRIBUTED` (sent, historical) */
1875
+ status: string;
1876
+ task_summary?: SearchAirdropItemTaskSummary;
1877
+ tasks?: SearchAirdropItemTasksItem[];
1878
+ /** Total project fundraise in USD (0 if unknown) */
1879
+ total_raise: number;
1880
+ /** CryptoRank social score (0 if unknown) */
1881
+ xscore: number;
1882
+ }
1883
+ interface SearchAirdropItemTaskSummary {
1884
+ /** Number of currently open tasks */
1885
+ open: number;
1886
+ /** Total number of tasks */
1887
+ total: number;
1888
+ types: unknown;
1889
+ }
1890
+ interface SearchAirdropItemTasksItem {
1891
+ blockchains?: unknown;
1892
+ /** Task close date as Unix seconds (0 if unknown) */
1893
+ close_date: number;
1894
+ /** Participation cost in USD (0 = free) */
1895
+ cost: number;
1896
+ /** Public participation URL */
1897
+ external_link?: string;
1898
+ /** Whether task is exclusive */
1899
+ is_exclusive: boolean;
1900
+ /** Task open date as Unix seconds (0 if unknown) */
1901
+ open_date: number;
1902
+ /** Task status: OPEN, CLOSED, UPCOMING */
1903
+ status: string;
1904
+ /** Estimated time in minutes */
1905
+ time_minutes: number;
1906
+ /** Task title */
1907
+ title: string;
1908
+ /** Task type: social, testnet, mainnet, staking, trading, etc. */
1909
+ type: string;
1910
+ }
1911
+ interface SearchAirdropParams {
1912
+ /** Search keyword for coin name */
1913
+ q?: string;
1914
+ /** Comma-separated lifecycle phases. `active` = tasks open, can participate (POTENTIAL + CONFIRMED). `claimable` = eligible, can claim (SNAPSHOT + VERIFICATION + REWARD_AVAILABLE). `completed` = done (DISTRIBUTED). Defaults to `active,claimable` to show actionable airdrops. — @default 'active' */
1915
+ phase?: string;
1916
+ /** Filter by reward type */
1917
+ reward_type?: 'airdrop' | 'points' | 'whitelist' | 'nft' | 'role' | 'ambassador';
1918
+ /** Filter activities containing tasks of this type */
1919
+ task_type?: 'social' | 'bounty-platforms' | 'testnet' | 'mainnet' | 'role' | 'form' | 'liquidity' | 'mint-nft' | 'game' | 'trading' | 'staking' | 'depin' | 'node' | 'ambassador' | 'hold' | 'check-wallet' | 'mint-domain' | 'predictions' | 'deploy';
1920
+ /** Only return activities with currently OPEN tasks — @default 'false' */
1921
+ has_open?: boolean;
1922
+ /** Field to sort results by — @default 'last_status_update' */
1923
+ sort_by?: 'total_raise' | 'xscore' | 'last_status_update';
1924
+ /** Sort order — @default 'desc' */
1925
+ order?: 'asc' | 'desc';
1926
+ /** Results per page — @default '20' */
1927
+ limit?: number;
1928
+ /** Pagination offset — @default '0' */
1929
+ offset?: number;
1930
+ /** Include full task list per activity — @default 'false' */
1931
+ include_tasks?: boolean;
1932
+ }
1933
+ interface SearchEventsItem {
1934
+ /** Event date in ISO 8601 format */
1935
+ date?: string;
1936
+ /** Detailed event description */
1937
+ description?: string;
1938
+ /** Project logo image URL */
1939
+ logo_url?: string;
1940
+ /** Short event title */
1941
+ title: string;
1942
+ /** Event type — one of: launch, upgrade, partnership, news, airdrop, listing, twitter */
1943
+ type: string;
1944
+ }
1945
+ interface SearchEventsParams {
1946
+ /** Surf project UUID. PREFERRED — always use this when available from a previous response (e.g. project_id from /fund/portfolio or id from /search/project). Takes priority over q. */
1947
+ id?: string;
1948
+ /** Fuzzy entity name search. Only use when 'id' is not available. May return unexpected results for ambiguous names. */
1949
+ q?: string;
1950
+ /** Filter by event type. Can be `launch`, `upgrade`, `partnership`, `news`, `airdrop`, `listing`, or `twitter`. */
1951
+ type?: 'launch' | 'upgrade' | 'partnership' | 'news' | 'airdrop' | 'listing' | 'twitter';
1952
+ /** Results per page — @default '20' */
1953
+ limit?: number;
1954
+ /** Pagination offset — @default '0' */
1955
+ offset?: number;
1956
+ }
1957
+ interface SearchFundItem {
1958
+ /** Surf fund UUID — pass as 'id' parameter to /fund/detail or /fund/portfolio for exact lookup */
1959
+ id: string;
1960
+ /** Fund logo URL */
1961
+ image?: string;
1962
+ /** Total number of unique invested projects (a project with multiple funding rounds counts once) */
1963
+ invested_projects_count: number;
1964
+ /** Fund name */
1965
+ name: string;
1966
+ /** Fund tier ranking (lower is better) */
1967
+ tier: number;
1968
+ top_projects: SearchFundItemTopProjectsItem[];
1969
+ /** Fund type */
1970
+ type?: string;
1971
+ }
1972
+ interface SearchFundItemTopProjectsItem {
1973
+ /** Investment date (Unix seconds) */
1974
+ invested_at?: number;
1975
+ /** Whether this fund was the lead investor */
1976
+ is_lead: boolean;
1977
+ /** Surf project UUID — pass as 'id' parameter to /project/detail, /project/events, or /project/defi/metrics for exact lookup. Prefer over 'q' (fuzzy name search). */
1978
+ project_id: string;
1979
+ /** Project logo URL */
1980
+ project_logo?: string;
1981
+ /** Project name */
1982
+ project_name: string;
1983
+ /** Project slug */
1984
+ project_slug?: string;
1985
+ /** Most recent funding round amount in USD */
1986
+ recent_raise?: number;
1987
+ /** Total amount raised by the project in USD */
1988
+ total_raise?: number;
1989
+ }
1990
+ interface SearchFundParams {
1991
+ /** Search keyword — fund name like `a16z`, `paradigm`, or `coinbase ventures` */
1992
+ q?: string;
1993
+ /** Results per page — @default '20' */
1994
+ limit?: number;
1995
+ /** Pagination offset — @default '0' */
1996
+ offset?: number;
1997
+ }
1998
+ interface SearchKalshiItem {
1999
+ /** Event subtitle */
2000
+ event_subtitle?: string;
2001
+ /** Unique event ticker identifier */
2002
+ event_ticker: string;
2003
+ /** Event title */
2004
+ event_title: string;
2005
+ /** Number of markets in this event */
2006
+ market_count: number;
2007
+ markets: SearchKalshiItemMarketsItem[];
2008
+ }
2009
+ interface SearchKalshiItemMarketsItem {
2010
+ /** Surf curated market category */
2011
+ category?: string;
2012
+ /** Market close time (Unix seconds) */
2013
+ close_time?: number;
2014
+ /** Market end time (Unix seconds) */
2015
+ end_time?: number;
2016
+ /** Parent event ticker */
2017
+ event_ticker: string;
2018
+ /** Event title */
2019
+ event_title?: string;
2020
+ /** Previous day open interest from daily report */
2021
+ last_day_open_interest: number;
2022
+ /** Unique market ticker identifier */
2023
+ market_ticker: string;
2024
+ /** Last day notional trading volume in USD (each contract = $1) */
2025
+ notional_volume_usd: number;
2026
+ /** Open interest (contracts) */
2027
+ open_interest: number;
2028
+ /** Payout type */
2029
+ payout_type: string;
2030
+ /** Market result if resolved */
2031
+ result?: string;
2032
+ /** Market start time (Unix seconds) */
2033
+ start_time?: number;
2034
+ /** Market status */
2035
+ status: string;
2036
+ /** Surf curated market subcategory */
2037
+ subcategory?: string;
2038
+ /** Market title */
2039
+ title: string;
2040
+ /** Total trading volume (contracts) */
2041
+ total_volume: number;
2042
+ }
2043
+ interface SearchKalshiParams {
2044
+ /** Search keyword matching event title, subtitle, or market title */
2045
+ q?: string;
2046
+ /** Filter by category */
2047
+ category?: 'crypto' | 'culture' | 'economics' | 'financials' | 'politics' | 'stem' | 'sports' | 'unknown';
2048
+ /** Market status filter: `active`, `closed`, `determined`, `disputed`, `finalized`, `inactive`, or `initialized` */
2049
+ status?: 'active' | 'closed' | 'determined' | 'disputed' | 'finalized' | 'inactive' | 'initialized';
2050
+ /** Results per page — @default '20' */
2051
+ limit?: number;
2052
+ /** Pagination offset — @default '0' */
2053
+ offset?: number;
2054
+ }
2055
+ interface SearchNewsItem {
2056
+ highlights?: SearchNewsItemHighlights;
2057
+ /** Article ID. Use with the detail endpoint to fetch full content. */
2058
+ id: string;
2059
+ /** Surf project UUID — pass as 'id' parameter to /project/detail, /project/events, or /project/defi/metrics for exact lookup */
2060
+ project_id?: string;
2061
+ /** Primary crypto project referenced in the article */
2062
+ project_name?: string;
2063
+ /** Unix timestamp in seconds when the article was published */
2064
+ published_at: number;
2065
+ /** Publisher name (e.g. COINDESK, COINTELEGRAPH) */
2066
+ source?: string;
2067
+ /** Short summary of the article */
2068
+ summary?: string;
2069
+ /** Article headline */
2070
+ title: string;
2071
+ /** Direct URL to the original article */
2072
+ url?: string;
2073
+ }
2074
+ interface SearchNewsItemHighlights {
2075
+ [key: string]: unknown;
2076
+ }
2077
+ interface SearchNewsParams {
2078
+ /** Search keyword or phrase */
2079
+ q?: string;
2080
+ }
2081
+ interface SearchPolymarketItem {
2082
+ /** Surf curated event category */
2083
+ category?: string;
2084
+ /** Event description */
2085
+ description?: string;
2086
+ /** Event end time (Unix seconds) */
2087
+ end_time?: number;
2088
+ /** Event identifier slug */
2089
+ event_slug: string;
2090
+ /** Event image URL */
2091
+ image?: string;
2092
+ /** Number of markets in this event */
2093
+ market_count: number;
2094
+ markets: SearchPolymarketItemMarketsItem[];
2095
+ /** Resolution source URL */
2096
+ settlement_sources?: string;
2097
+ /** Event start time (Unix seconds) */
2098
+ start_time?: number;
2099
+ /** Event status: `open` if any market is open, `closed` if all markets are closed */
2100
+ status: string;
2101
+ /** Surf curated event subcategory */
2102
+ subcategory?: string;
2103
+ tags?: unknown;
2104
+ /** Event title */
2105
+ title: string;
2106
+ /** Total event volume across all markets (USD) */
2107
+ volume_total: number;
2108
+ }
2109
+ interface SearchPolymarketItemMarketsItem {
2110
+ /** Surf curated market category */
2111
+ category?: string;
2112
+ /** Market close time (Unix seconds) */
2113
+ close_time?: number;
2114
+ /** Resolution time (Unix seconds) */
2115
+ completed_time?: number;
2116
+ /** Unique condition identifier */
2117
+ condition_id: string;
2118
+ /** Market description */
2119
+ description?: string;
2120
+ /** Market end time (Unix seconds) */
2121
+ end_time?: number;
2122
+ /** Event identifier slug */
2123
+ event_slug?: string;
2124
+ /** Game start time for sports markets (Unix seconds) */
2125
+ game_start_time?: number;
2126
+ /** Market image URL */
2127
+ image?: string;
2128
+ /** Market identifier slug */
2129
+ market_slug: string;
2130
+ /** Negative risk market identifier */
2131
+ negative_risk_id?: string;
2132
+ /** Link to Polymarket page */
2133
+ polymarket_link?: string;
2134
+ /** URL to resolution data source */
2135
+ resolution_source?: string;
2136
+ side_a?: SearchPolymarketItemMarketsItemSideA;
2137
+ side_b?: SearchPolymarketItemMarketsItemSideB;
2138
+ /** Market start time (Unix seconds) */
2139
+ start_time?: number;
2140
+ /** Market status: `open` or `closed` */
2141
+ status: string;
2142
+ /** Surf curated market subcategory */
2143
+ subcategory?: string;
2144
+ tags?: unknown;
2145
+ /** Market title */
2146
+ title: string;
2147
+ /** Trading volume in the past month (USD) */
2148
+ volume_1_month: number;
2149
+ /** Trading volume in the past week (USD) */
2150
+ volume_1_week: number;
2151
+ /** Trading volume in the past year (USD) */
2152
+ volume_1_year: number;
2153
+ /** Total trading volume (USD) */
2154
+ volume_total: number;
2155
+ /** Winning outcome label, if resolved */
2156
+ winning_side?: string;
2157
+ }
2158
+ interface SearchPolymarketItemMarketsItemSideA {
2159
+ /** Token identifier for this outcome */
2160
+ id: string;
2161
+ /** Outcome label */
2162
+ label: string;
2163
+ }
2164
+ interface SearchPolymarketItemMarketsItemSideB {
2165
+ /** Token identifier for this outcome */
2166
+ id: string;
2167
+ /** Outcome label */
2168
+ label: string;
2169
+ }
2170
+ interface SearchPolymarketParams {
2171
+ /** Search keyword matching market question, event title, or description */
2172
+ q?: string;
2173
+ /** Comma-separated tag labels to filter by (matches any). Commonly used tags: `Crypto`, `Politics`, `Sports`, `Science`, `Pop Culture` */
2174
+ tags?: string;
2175
+ /** Filter by Surf-curated category */
2176
+ category?: 'crypto' | 'culture' | 'early_polymarket_trades' | 'economics' | 'financials' | 'politics' | 'stem' | 'sports' | 'unknown';
2177
+ /** Market status filter: `active`, `finalized`, `ended`, `initialized`, or `closed` — @default 'active' */
2178
+ status?: 'active' | 'finalized' | 'ended' | 'initialized' | 'closed';
2179
+ /** Results per page — @default '20' */
2180
+ limit?: number;
2181
+ /** Pagination offset — @default '0' */
2182
+ offset?: number;
2183
+ }
2184
+ interface SearchProjectItem {
2185
+ chains?: unknown;
2186
+ /** Short description of the project */
2187
+ description?: string;
2188
+ /** Surf project UUID — pass as 'id' parameter to /project/detail, /project/events, or /project/defi/metrics for exact lookup. Prefer over 'q' (fuzzy name search). */
2189
+ id: string;
2190
+ /** Project logo image URL */
2191
+ logo_url?: string;
2192
+ /** Project name */
2193
+ name: string;
2194
+ /** Project slug for URL construction */
2195
+ slug?: string;
2196
+ /** Primary token symbol like `BTC` or `ETH` */
2197
+ symbol?: string;
2198
+ tags?: unknown;
2199
+ tokens?: SearchProjectItemTokensItem[];
2200
+ }
2201
+ interface SearchProjectItemTokensItem {
2202
+ /** Token identifier */
2203
+ id: string;
2204
+ /** Token logo image URL */
2205
+ image?: string;
2206
+ /** Token name */
2207
+ name: string;
2208
+ /** Token symbol */
2209
+ symbol: string;
2210
+ }
2211
+ interface SearchProjectParams {
2212
+ /** Search keyword — project name or ticker like `uniswap`, `bitcoin`, or `ETH` */
2213
+ q?: string;
2214
+ /** Results per page — @default '20' */
2215
+ limit?: number;
2216
+ /** Pagination offset — @default '0' */
2217
+ offset?: number;
2218
+ }
2219
+ interface SearchSocialPeopleItem {
2220
+ /** Profile picture URL */
2221
+ avatar?: string;
2222
+ /** Profile biography text */
2223
+ bio?: string;
2224
+ /** Number of followers */
2225
+ followers_count: number;
2226
+ /** Number of accounts this user follows */
2227
+ following_count: number;
2228
+ /** X/Twitter handle without the @ prefix */
2229
+ handle: string;
2230
+ /** Display name on X/Twitter */
2231
+ name: string;
2232
+ /** Numeric X/Twitter user ID as a string */
2233
+ user_id: string;
2234
+ }
2235
+ interface SearchSocialPeopleParams {
2236
+ /** Search keyword or `@handle` for exact handle lookup. Use a keyword like `vitalik` for fuzzy matching across names and bios, or `@VitalikButerin` to find a specific account by handle */
2237
+ q?: string;
2238
+ /** Results per page — @default '20' */
2239
+ limit?: number;
2240
+ /** Opaque cursor token from a previous response's next_cursor field for fetching the next page */
2241
+ cursor?: string;
2242
+ }
2243
+ interface SearchSocialPostsItem {
2244
+ author: SearchSocialPostsItemAuthor;
2245
+ /** Unix timestamp (seconds) when the tweet was posted */
2246
+ created_at: number;
2247
+ media?: SearchSocialPostsItemMediaItem[];
2248
+ stats: SearchSocialPostsItemStats;
2249
+ /** Full text content of the tweet */
2250
+ text: string;
2251
+ /** Numeric tweet ID as a string (e.g. '1234567890123456789') */
2252
+ tweet_id: string;
2253
+ /** Permanent link to the tweet on X/Twitter */
2254
+ url: string;
2255
+ }
2256
+ interface SearchSocialPostsItemAuthor {
2257
+ /** Profile picture URL */
2258
+ avatar?: string;
2259
+ /** X/Twitter handle without the @ prefix (e.g. 'cz_binance') */
2260
+ handle: string;
2261
+ /** Display name on X/Twitter */
2262
+ name: string;
2263
+ /** Numeric X/Twitter user ID as a string */
2264
+ user_id: string;
2265
+ }
2266
+ interface SearchSocialPostsItemMediaItem {
2267
+ /** Media type: photo, video, or animated_gif */
2268
+ type: string;
2269
+ /** Direct URL to the media asset */
2270
+ url: string;
2271
+ }
2272
+ interface SearchSocialPostsItemStats {
2273
+ /** Number of likes (hearts) */
2274
+ likes: number;
2275
+ /** Number of replies */
2276
+ replies: number;
2277
+ /** Number of retweets/reposts */
2278
+ reposts: number;
2279
+ /** Total view count */
2280
+ views: number;
2281
+ }
2282
+ interface SearchSocialPostsParams {
2283
+ /** Search keyword or `from:handle` syntax like `ethereum` or `from:cz_binance` */
2284
+ q?: string;
2285
+ /** Results per page — @default '20' */
2286
+ limit?: number;
2287
+ /** Opaque cursor token from a previous response's next_cursor field for fetching the next page */
2288
+ cursor?: string;
2289
+ }
2290
+ interface SearchWalletItem {
2291
+ /** Primary wallet address for this entity */
2292
+ address?: string;
2293
+ addresses?: SearchWalletItemAddressesItem[];
2294
+ /** Chain of the primary address */
2295
+ chain?: string;
2296
+ /** Name of the associated entity like `Binance` or `Aave` */
2297
+ entity_name?: string;
2298
+ /** Type of entity like `exchange`, `fund`, or `whale` */
2299
+ entity_type?: string;
2300
+ /** Human-readable label for the wallet entity */
2301
+ label?: string;
2302
+ /** Total number of wallet addresses associated with this entity */
2303
+ num_addresses?: number;
2304
+ /** Associated X (Twitter) handle */
2305
+ twitter?: string;
2306
+ }
2307
+ interface SearchWalletItemAddressesItem {
2308
+ /** Wallet address */
2309
+ address: string;
2310
+ /** Chain name like ethereum, arbitrum_one */
2311
+ chain: string;
2312
+ }
2313
+ interface SearchWalletParams {
2314
+ /** Search keyword like `binance`, `vitalik.eth`, or `0xd8dA...` */
2315
+ q?: string;
2316
+ /** Results per page — @default '20' */
2317
+ limit?: number;
2318
+ /** Pagination offset — @default '0' */
2319
+ offset?: number;
2320
+ }
2321
+ interface SearchWebItem {
2322
+ /** Relevant content snippet from the page */
2323
+ content: string;
2324
+ /** Short description or meta description of the page */
2325
+ description: string;
2326
+ /** Page title from the search result */
2327
+ title: string;
2328
+ /** Full URL of the search result page */
2329
+ url: string;
2330
+ }
2331
+ interface SearchWebParams {
2332
+ /** Search query like `bitcoin price prediction 2026` */
2333
+ q?: string;
2334
+ /** Results per page — @default '20' */
2335
+ limit?: number;
2336
+ /** Pagination offset — @default '0' */
2337
+ offset?: number;
2338
+ /** Comma-separated domain filter like `coindesk.com` or `cointelegraph.com` */
2339
+ site?: string;
2340
+ }
2341
+ interface SocialDetailData {
2342
+ follower_geo?: SocialDetailDataFollowerGeo;
2343
+ /** Surf project UUID — pass as 'id' parameter to /project/detail, /project/events, or /project/defi/metrics. Omitted for direct x_id lookups. */
2344
+ project_id?: string;
2345
+ /** Project name (omitted for direct x_id lookups) */
2346
+ project_name?: string;
2347
+ sentiment?: SocialDetailDataSentiment;
2348
+ smart_followers?: SocialDetailDataSmartFollowers;
2349
+ /** Numeric X (Twitter) account ID */
2350
+ twitter_id: string;
2351
+ }
2352
+ interface SocialDetailDataFollowerGeo {
2353
+ locations: SocialDetailDataFollowerGeoLocationsItem[];
2354
+ /** Total number of followers across all locations */
2355
+ total_follower_count: number;
2356
+ }
2357
+ interface SocialDetailDataSentiment {
2358
+ /** Sentiment score from -1 (very negative) to 1 (very positive) */
2359
+ score: unknown;
2360
+ /** Time range for the sentiment analysis like 7d or 30d */
2361
+ time_range: string;
2362
+ }
2363
+ interface SocialDetailDataSmartFollowers {
2364
+ /** Total number of smart followers */
2365
+ count: number;
2366
+ followers: SocialDetailDataSmartFollowersFollowersItem[];
2367
+ }
2368
+ interface SocialDetailDataFollowerGeoLocationsItem {
2369
+ /** Number of followers in this location */
2370
+ follower_count: number;
2371
+ /** Geographic location name like a country or region */
2372
+ location: string;
2373
+ /** Percentage of total followers in this location (0-100) */
2374
+ percentage: number;
2375
+ }
2376
+ interface SocialDetailDataSmartFollowersFollowersItem {
2377
+ /** Profile image URL */
2378
+ avatar: string;
2379
+ /** Human-readable description of the follower's role */
2380
+ description?: string;
2381
+ /** Number of followers this account has */
2382
+ followers_count: number;
2383
+ /** X (Twitter) handle without the @ prefix */
2384
+ handle: string;
2385
+ /** Display name of the follower */
2386
+ name: string;
2387
+ /** Rank position among smart followers (1 = highest) */
2388
+ rank: number;
2389
+ /** Smart follower influence score */
2390
+ score: number;
2391
+ /** Smart follower category tag like VC, KOL, or Developer */
2392
+ tag: string;
2393
+ /** Numeric X (Twitter) user ID */
2394
+ twitter_id: string;
2395
+ }
2396
+ interface SocialDetailParams {
2397
+ /** Numeric X (Twitter) account ID (takes priority over `q`) */
2398
+ x_id?: string;
2399
+ /** Entity name to resolve like `uniswap`, `ethereum`, or `aave` */
2400
+ q?: string;
2401
+ /** Comma-separated sub-resources to include. Can be `sentiment`, `follower_geo`, or `smart_followers`. — @default 'sentiment' */
2402
+ fields?: string;
2403
+ /** Timeframe for sentiment data. Can be `24h`, `48h`, `7d`, `30d`, `3m`, `6m`, or `1y`. — @default '7d' */
2404
+ time_range?: '24h' | '48h' | '7d' | '30d' | '3m' | '6m' | '1y';
2405
+ /** Max geo locations to return — @default '20' */
2406
+ geo_limit?: number;
2407
+ }
2408
+ interface SocialMindshareItem {
2409
+ /** Unix timestamp in seconds */
2410
+ timestamp: number;
2411
+ /** Mindshare view count at this timestamp */
2412
+ value: number;
2413
+ }
2414
+ interface SocialMindshareParams {
2415
+ /** Entity name to resolve like `uniswap`, `ethereum`, or `aave` */
2416
+ q?: string;
2417
+ /** Time aggregation interval. Can be `5m`, `1h`, `1d`, or `7d`. */
2418
+ interval?: '5m' | '1h' | '1d' | '7d';
2419
+ /** Start timestamp. Accepts Unix seconds (1704067200) or date string (2024-01-01) */
2420
+ from?: string;
2421
+ /** End timestamp. Accepts Unix seconds (1706745600) or date string (2024-02-01) */
2422
+ to?: string;
2423
+ }
2424
+ interface SocialRankingItem {
2425
+ project?: SocialRankingItemProject;
2426
+ /** Rank position in the mindshare leaderboard */
2427
+ rank: number;
2428
+ /** Sentiment polarity: positive or negative */
2429
+ sentiment?: string;
2430
+ /** Weighted sentiment score from -1 (very negative) to 1 (very positive) */
2431
+ sentiment_score?: number;
2432
+ tags?: unknown;
2433
+ token?: SocialRankingItemToken;
2434
+ /** Deprecated: no longer populated. */
2435
+ trending_short_reason?: string;
2436
+ /** Deprecated: no longer populated. */
2437
+ trending_summary?: string;
2438
+ twitter?: SocialRankingItemTwitter;
2439
+ }
2440
+ interface SocialRankingItemProject {
2441
+ /** Surf project UUID — pass as 'id' parameter to /project/detail, /project/events, or /project/defi/metrics for exact lookup */
2442
+ id: string;
2443
+ /** Project name */
2444
+ name: string;
2445
+ /** URL-friendly project slug */
2446
+ slug?: string;
2447
+ }
2448
+ interface SocialRankingItemToken {
2449
+ /** Surf token UUID */
2450
+ id?: string;
2451
+ /** Token image URL */
2452
+ image?: string;
2453
+ /** Token name */
2454
+ name: string;
2455
+ /** Token ticker symbol */
2456
+ symbol?: string;
2457
+ }
2458
+ interface SocialRankingItemTwitter {
2459
+ /** Profile image URL */
2460
+ avatar_url?: string;
2461
+ /** X (Twitter) display name */
2462
+ display_name: string;
2463
+ /** Numeric X (Twitter) user ID */
2464
+ twitter_id: string;
2465
+ /** X (Twitter) handle without the @ prefix */
2466
+ x_handle: string;
2467
+ }
2468
+ interface SocialRankingParams {
2469
+ /** Pagination offset — @default '0' */
2470
+ offset?: number;
2471
+ /** Results per page — @default '20' */
2472
+ limit?: number;
2473
+ /** Filter by project category. `l1` = Layer 1, `l2` = Layer 2/scaling, `dex` = DEX/AMM, `derivatives` = perps/options, `cex` = centralized exchange, `gamefi` = gaming, `nft` = NFT collections, `oracle` = oracle, `prediction` = prediction market, `rwa` = real-world assets, `yield` = yield/asset management, `data` = data/analytics, `devtool` = developer tooling, `compliance` = compliance/regtech, `meme` = meme/token launchpad. */
2474
+ tag?: 'l1' | 'l2' | 'dex' | 'derivatives' | 'cex' | 'gamefi' | 'nft' | 'oracle' | 'prediction' | 'rwa' | 'yield' | 'data' | 'devtool' | 'compliance' | 'meme' | '';
2475
+ /** Mindshare ranking timeframe window — @default '7d' */
2476
+ time_range?: '24h' | '48h' | '7d' | '30d';
2477
+ /** Filter by sentiment polarity. Only projects with sufficient tweet data are classified. */
2478
+ sentiment?: 'positive' | 'negative' | '';
2479
+ }
2480
+ interface SocialSmartFollowersHistoryItem {
2481
+ /** Number of smart followers on this date */
2482
+ count: number;
2483
+ /** Date in YYYY-MM-DD format */
2484
+ date: string;
2485
+ }
2486
+ interface SocialSmartFollowersHistoryParams {
2487
+ /** Numeric X (Twitter) account ID (takes priority over `q`) */
2488
+ x_id?: string;
2489
+ /** Project name to resolve (e.g. `uniswap`, `ethereum`). Must be a project with a linked X account — personal handles like `VitalikButerin` return 404. Use `x_id` for individual accounts. */
2490
+ q?: string;
2491
+ /** Max data points to return (upstream typically provides ~36 daily points) — @default '36' */
2492
+ limit?: number;
2493
+ }
2494
+ interface SocialTweetRepliesItem {
2495
+ author: SocialTweetRepliesItemAuthor;
2496
+ /** Unix timestamp (seconds) when the tweet was posted */
2497
+ created_at: number;
2498
+ media?: SocialTweetRepliesItemMediaItem[];
2499
+ stats: SocialTweetRepliesItemStats;
2500
+ /** Full text content of the tweet */
2501
+ text: string;
2502
+ /** Numeric tweet ID as a string (e.g. '1234567890123456789') */
2503
+ tweet_id: string;
2504
+ /** Permanent link to the tweet on X/Twitter */
2505
+ url: string;
2506
+ }
2507
+ interface SocialTweetRepliesItemAuthor {
2508
+ /** Profile picture URL */
2509
+ avatar?: string;
2510
+ /** X/Twitter handle without the @ prefix (e.g. 'cz_binance') */
2511
+ handle: string;
2512
+ /** Display name on X/Twitter */
2513
+ name: string;
2514
+ /** Numeric X/Twitter user ID as a string */
2515
+ user_id: string;
2516
+ }
2517
+ interface SocialTweetRepliesItemMediaItem {
2518
+ /** Media type: photo, video, or animated_gif */
2519
+ type: string;
2520
+ /** Direct URL to the media asset */
2521
+ url: string;
2522
+ }
2523
+ interface SocialTweetRepliesItemStats {
2524
+ /** Number of likes (hearts) */
2525
+ likes: number;
2526
+ /** Number of replies */
2527
+ replies: number;
2528
+ /** Number of retweets/reposts */
2529
+ reposts: number;
2530
+ /** Total view count */
2531
+ views: number;
2532
+ }
2533
+ interface SocialTweetRepliesParams {
2534
+ /** Tweet ID to get replies for */
2535
+ tweet_id?: string;
2536
+ /** Max results to return — @default '20' */
2537
+ limit?: number;
2538
+ /** Opaque cursor token from a previous response's next_cursor field for fetching the next page */
2539
+ cursor?: string;
2540
+ }
2541
+ interface SocialTweetsItem {
2542
+ author: SocialTweetsItemAuthor;
2543
+ /** Unix timestamp (seconds) when the tweet was posted */
2544
+ created_at: number;
2545
+ media?: SocialTweetsItemMediaItem[];
2546
+ stats: SocialTweetsItemStats;
2547
+ /** Full text content of the tweet */
2548
+ text: string;
2549
+ /** Numeric tweet ID as a string (e.g. '1234567890123456789') */
2550
+ tweet_id: string;
2551
+ /** Permanent link to the tweet on X/Twitter */
2552
+ url: string;
2553
+ }
2554
+ interface SocialTweetsItemAuthor {
2555
+ /** Profile picture URL */
2556
+ avatar?: string;
2557
+ /** X/Twitter handle without the @ prefix (e.g. 'cz_binance') */
2558
+ handle: string;
2559
+ /** Display name on X/Twitter */
2560
+ name: string;
2561
+ /** Numeric X/Twitter user ID as a string */
2562
+ user_id: string;
2563
+ }
2564
+ interface SocialTweetsItemMediaItem {
2565
+ /** Media type: photo, video, or animated_gif */
2566
+ type: string;
2567
+ /** Direct URL to the media asset */
2568
+ url: string;
2569
+ }
2570
+ interface SocialTweetsItemStats {
2571
+ /** Number of likes (hearts) */
2572
+ likes: number;
2573
+ /** Number of replies */
2574
+ replies: number;
2575
+ /** Number of retweets/reposts */
2576
+ reposts: number;
2577
+ /** Total view count */
2578
+ views: number;
2579
+ }
2580
+ interface SocialTweetsParams {
2581
+ /** Comma-separated numeric post ID strings, max 100 */
2582
+ ids?: string;
2583
+ }
2584
+ interface SocialUserData {
2585
+ /** Profile picture URL */
2586
+ avatar?: string;
2587
+ /** Profile biography text */
2588
+ bio?: string;
2589
+ /** Number of followers */
2590
+ followers_count: number;
2591
+ /** Number of accounts this user follows */
2592
+ following_count: number;
2593
+ /** X/Twitter handle without the @ prefix */
2594
+ handle: string;
2595
+ /** Display name on X/Twitter */
2596
+ name: string;
2597
+ /** Numeric X/Twitter user ID as a string */
2598
+ user_id: string;
2599
+ }
2600
+ interface SocialUserParams {
2601
+ /** X (Twitter) username without @ like `cz_binance` or `vitalikbuterin` */
2602
+ handle?: string;
2603
+ }
2604
+ interface SocialUserFollowersItem {
2605
+ /** Profile picture URL */
2606
+ avatar?: string;
2607
+ /** Profile biography text */
2608
+ bio?: string;
2609
+ /** Number of followers */
2610
+ followers_count: number;
2611
+ /** Number of accounts this user follows */
2612
+ following_count: number;
2613
+ /** X/Twitter handle without the @ prefix */
2614
+ handle: string;
2615
+ /** Display name on X/Twitter */
2616
+ name: string;
2617
+ /** Numeric X/Twitter user ID as a string */
2618
+ user_id: string;
2619
+ }
2620
+ interface SocialUserFollowersParams {
2621
+ /** X (Twitter) username without @ like `vitalikbuterin` or `cz_binance` */
2622
+ handle?: string;
2623
+ /** Max results to return — @default '20' */
2624
+ limit?: number;
2625
+ /** Opaque cursor token from a previous response's next_cursor field for fetching the next page */
2626
+ cursor?: string;
2627
+ }
2628
+ interface SocialUserFollowingItem {
2629
+ /** Profile picture URL */
2630
+ avatar?: string;
2631
+ /** Profile biography text */
2632
+ bio?: string;
2633
+ /** Number of followers */
2634
+ followers_count: number;
2635
+ /** Number of accounts this user follows */
2636
+ following_count: number;
2637
+ /** X/Twitter handle without the @ prefix */
2638
+ handle: string;
2639
+ /** Display name on X/Twitter */
2640
+ name: string;
2641
+ /** Numeric X/Twitter user ID as a string */
2642
+ user_id: string;
2643
+ }
2644
+ interface SocialUserFollowingParams {
2645
+ /** X (Twitter) username without @ like `vitalikbuterin` or `cz_binance` */
2646
+ handle?: string;
2647
+ /** Max results to return — @default '20' */
2648
+ limit?: number;
2649
+ /** Opaque cursor token from a previous response's next_cursor field for fetching the next page */
2650
+ cursor?: string;
2651
+ }
2652
+ interface SocialUserPostsItem {
2653
+ author: SocialUserPostsItemAuthor;
2654
+ /** Unix timestamp (seconds) when the tweet was posted */
2655
+ created_at: number;
2656
+ media?: SocialUserPostsItemMediaItem[];
2657
+ stats: SocialUserPostsItemStats;
2658
+ /** Full text content of the tweet */
2659
+ text: string;
2660
+ /** Numeric tweet ID as a string (e.g. '1234567890123456789') */
2661
+ tweet_id: string;
2662
+ /** Permanent link to the tweet on X/Twitter */
2663
+ url: string;
2664
+ }
2665
+ interface SocialUserPostsItemAuthor {
2666
+ /** Profile picture URL */
2667
+ avatar?: string;
2668
+ /** X/Twitter handle without the @ prefix (e.g. 'cz_binance') */
2669
+ handle: string;
2670
+ /** Display name on X/Twitter */
2671
+ name: string;
2672
+ /** Numeric X/Twitter user ID as a string */
2673
+ user_id: string;
2674
+ }
2675
+ interface SocialUserPostsItemMediaItem {
2676
+ /** Media type: photo, video, or animated_gif */
2677
+ type: string;
2678
+ /** Direct URL to the media asset */
2679
+ url: string;
2680
+ }
2681
+ interface SocialUserPostsItemStats {
2682
+ /** Number of likes (hearts) */
2683
+ likes: number;
2684
+ /** Number of replies */
2685
+ replies: number;
2686
+ /** Number of retweets/reposts */
2687
+ reposts: number;
2688
+ /** Total view count */
2689
+ views: number;
2690
+ }
2691
+ interface SocialUserPostsParams {
2692
+ /** X (Twitter) username without @ like `vitalikbuterin` or `cz_binance` */
2693
+ handle?: string;
2694
+ /** Results per page — @default '20' */
2695
+ limit?: number;
2696
+ /** Opaque cursor token from a previous response's next_cursor field for fetching the next page */
2697
+ cursor?: string;
2698
+ /** Filter tweets: `all` returns everything, `original` excludes retweets — @default 'all' */
2699
+ filter?: 'all' | 'original';
2700
+ }
2701
+ interface SocialUserRepliesItem {
2702
+ author: SocialUserRepliesItemAuthor;
2703
+ /** Unix timestamp (seconds) when the tweet was posted */
2704
+ created_at: number;
2705
+ media?: SocialUserRepliesItemMediaItem[];
2706
+ stats: SocialUserRepliesItemStats;
2707
+ /** Full text content of the tweet */
2708
+ text: string;
2709
+ /** Numeric tweet ID as a string (e.g. '1234567890123456789') */
2710
+ tweet_id: string;
2711
+ /** Permanent link to the tweet on X/Twitter */
2712
+ url: string;
2713
+ }
2714
+ interface SocialUserRepliesItemAuthor {
2715
+ /** Profile picture URL */
2716
+ avatar?: string;
2717
+ /** X/Twitter handle without the @ prefix (e.g. 'cz_binance') */
2718
+ handle: string;
2719
+ /** Display name on X/Twitter */
2720
+ name: string;
2721
+ /** Numeric X/Twitter user ID as a string */
2722
+ user_id: string;
2723
+ }
2724
+ interface SocialUserRepliesItemMediaItem {
2725
+ /** Media type: photo, video, or animated_gif */
2726
+ type: string;
2727
+ /** Direct URL to the media asset */
2728
+ url: string;
2729
+ }
2730
+ interface SocialUserRepliesItemStats {
2731
+ /** Number of likes (hearts) */
2732
+ likes: number;
2733
+ /** Number of replies */
2734
+ replies: number;
2735
+ /** Number of retweets/reposts */
2736
+ reposts: number;
2737
+ /** Total view count */
2738
+ views: number;
2739
+ }
2740
+ interface SocialUserRepliesParams {
2741
+ /** X (Twitter) username without @ like `vitalikbuterin` or `cz_binance` */
2742
+ handle?: string;
2743
+ /** Max results to return — @default '20' */
2744
+ limit?: number;
2745
+ /** Opaque cursor token from a previous response's next_cursor field for fetching the next page */
2746
+ cursor?: string;
2747
+ }
2748
+ interface TokenDexTradesItem {
2749
+ /** Trade value in USD at execution time */
2750
+ amount_usd: number;
2751
+ /** Unix timestamp in seconds when the trade was executed */
2752
+ block_time: number;
2753
+ /** DEX project name like `uniswap`, `sushiswap`, or `curve` */
2754
+ project: string;
2755
+ /** Wallet address that initiated the swap */
2756
+ taker: string;
2757
+ /** Contract address of the token bought */
2758
+ token_bought_address?: string;
2759
+ /** Amount of tokens bought (decimal-adjusted) */
2760
+ token_bought_amount: number;
2761
+ /** Symbol of the token bought in this trade */
2762
+ token_bought_symbol: string;
2763
+ /** Trading pair symbol like `WETH-USDC` */
2764
+ token_pair: string;
2765
+ /** Contract address of the token sold */
2766
+ token_sold_address?: string;
2767
+ /** Amount of tokens sold (decimal-adjusted) */
2768
+ token_sold_amount: number;
2769
+ /** Symbol of the token sold in this trade */
2770
+ token_sold_symbol: string;
2771
+ /** Transaction hash */
2772
+ tx_hash: string;
2773
+ /** DEX version like `v2` or `v3` */
2774
+ version: string;
2775
+ }
2776
+ interface TokenDexTradesParams {
2777
+ /** Token contract address (0x-prefixed hex) */
2778
+ address?: string;
2779
+ /** Chain. Can be `ethereum` or `base`. — @default 'ethereum' */
2780
+ chain?: 'ethereum' | 'base';
2781
+ /** Results per page — @default '20' */
2782
+ limit?: number;
2783
+ /** Pagination offset — @default '0' */
2784
+ offset?: number;
2785
+ }
2786
+ interface TokenHoldersItem {
2787
+ /** Wallet address of the token holder */
2788
+ address: string;
2789
+ /** Token balance (decimal-adjusted, human-readable) */
2790
+ balance: string;
2791
+ /** Name of the associated entity like `Binance` or `Aave` */
2792
+ entity_name?: string;
2793
+ /** Type of entity like `exchange`, `fund`, or `whale` */
2794
+ entity_type?: string;
2795
+ /** Share of total supply held as a percentage (5.2 means 5.2%) */
2796
+ percentage?: number;
2797
+ }
2798
+ interface TokenHoldersParams {
2799
+ /** Token contract address (0x-prefixed hex or Solana base58) */
2800
+ address?: string;
2801
+ /** Chain. Can be `ethereum`, `polygon`, `bsc`, `solana`, `avalanche`, `arbitrum`, `optimism`, or `base`. */
2802
+ chain?: 'ethereum' | 'polygon' | 'bsc' | 'solana' | 'avalanche' | 'arbitrum' | 'optimism' | 'base';
2803
+ /** Results per page — @default '20' */
2804
+ limit?: number;
2805
+ /** Pagination offset (accepted for API consistency but currently ignored) — @default '0' */
2806
+ offset?: number;
2807
+ }
2808
+ interface TokenTokenomicsItem {
2809
+ allocations?: TokenTokenomicsItemAllocationsItem[];
2810
+ /** Unix timestamp in seconds */
2811
+ timestamp: number;
2812
+ /** Cumulative total tokens unlocked up to this timestamp (decimal-adjusted) */
2813
+ unlock_amount: number;
2814
+ }
2815
+ interface TokenTokenomicsItemAllocationsItem {
2816
+ /** Decimal-adjusted allocation amount */
2817
+ amount: number;
2818
+ /** Allocation name */
2819
+ name: string;
2820
+ }
2821
+ interface TokenTokenomicsParams {
2822
+ /** Surf project UUID. PREFERRED — always use this when available from a previous response. Takes priority over symbol. */
2823
+ id?: string;
2824
+ /** Token symbol like `ARB`, `OP`, or `APT` */
2825
+ symbol?: string;
2826
+ /** Start of time range. Accepts Unix seconds (`1704067200`) or date string (`2024-01-01`) */
2827
+ from?: string;
2828
+ /** End of time range. Accepts Unix seconds (`1735689600`) or date string (`2025-01-01`) */
2829
+ to?: string;
2830
+ }
2831
+ interface TokenTransfersItem {
2832
+ /** Transfer amount (decimal-adjusted, human-readable) */
2833
+ amount: string;
2834
+ /** Transfer value in USD at the time of the transaction. Not available for all transfers. */
2835
+ amount_usd?: number;
2836
+ /** Block number in which this transfer was included */
2837
+ block_number: number;
2838
+ /** Sender wallet address */
2839
+ from_address: string;
2840
+ /** Token symbol like ETH, USDC, or WETH */
2841
+ symbol?: string;
2842
+ /** Unix timestamp in seconds when the transfer occurred */
2843
+ timestamp: number;
2844
+ /** Recipient wallet address */
2845
+ to_address: string;
2846
+ /** Transaction hash */
2847
+ tx_hash: string;
2848
+ }
2849
+ interface TokenTransfersParams {
2850
+ /** Token contract address (0x-prefixed hex or Solana base58) */
2851
+ address?: string;
2852
+ /** Chain. Can be `ethereum`, `base`, `solana`, or `tron`. */
2853
+ chain?: 'ethereum' | 'base' | 'solana' | 'tron';
2854
+ /** Start of date range. Accepts Unix seconds or YYYY-MM-DD. Defaults to 30 days ago. */
2855
+ from?: string;
2856
+ /** End of date range. Accepts Unix seconds or YYYY-MM-DD. Defaults to today. */
2857
+ to?: string;
2858
+ /** Results per page — @default '20' */
2859
+ limit?: number;
2860
+ /** Pagination offset — @default '0' */
2861
+ offset?: number;
2862
+ }
2863
+ interface WalletDetailData {
2864
+ active_chains?: WalletDetailDataActiveChainsItem[];
2865
+ approvals?: WalletDetailDataApprovalsItem[];
2866
+ errors?: WalletDetailDataErrorsItem[];
2867
+ evm_balance?: WalletDetailDataEvmBalance;
2868
+ evm_tokens?: WalletDetailDataEvmTokensItem[];
2869
+ labels?: WalletDetailDataLabels;
2870
+ nft?: WalletDetailDataNftItem[];
2871
+ sol_balance?: WalletDetailDataSolBalance;
2872
+ sol_tokens?: WalletDetailDataSolTokensItem[];
2873
+ }
2874
+ interface WalletDetailDataActiveChainsItem {
2875
+ /** Canonical chain name like `ethereum` or `polygon` */
2876
+ chain: string;
2877
+ /** EVM chain ID like `1` for Ethereum or `137` for Polygon */
2878
+ chain_id?: number;
2879
+ /** Total USD value of assets on this chain */
2880
+ usd_value: number;
2881
+ }
2882
+ interface WalletDetailDataApprovalsItem {
2883
+ /** Current token balance */
2884
+ balance: number;
2885
+ /** Canonical chain name */
2886
+ chain: string;
2887
+ /** Full token name */
2888
+ name?: string;
2889
+ spenders: WalletDetailDataApprovalsItemSpendersItem[];
2890
+ /** Token ticker symbol */
2891
+ symbol: string;
2892
+ /** Token contract address */
2893
+ token_address: string;
2894
+ }
2895
+ interface WalletDetailDataErrorsItem {
2896
+ /** Field name that failed to load like `evm_balance`, `sol_balance`, `evm_tokens`, `sol_tokens`, `labels`, `nft`, `active_chains`, or `approvals` */
2897
+ field: string;
2898
+ /** Error message describing why the field could not be loaded */
2899
+ message: string;
2900
+ }
2901
+ interface WalletDetailDataEvmBalance {
2902
+ /** Wallet address */
2903
+ address: string;
2904
+ chain_balances?: WalletDetailDataEvmBalanceChainBalancesItem[];
2905
+ /** Total portfolio value in USD (EVM only) */
2906
+ total_usd: number;
2907
+ }
2908
+ interface WalletDetailDataEvmTokensItem {
2909
+ /** Decimal-adjusted token balance as a string */
2910
+ balance: string;
2911
+ /** Chain name like ethereum, polygon (EVM only) */
2912
+ chain?: string;
2913
+ /** Whether the token is verified (EVM only) */
2914
+ is_verified: boolean;
2915
+ /** Token logo image URL */
2916
+ logo_url?: string;
2917
+ /** Full token name */
2918
+ name?: string;
2919
+ /** Current USD price per token (EVM only) */
2920
+ price: number;
2921
+ /** Token ticker symbol */
2922
+ symbol: string;
2923
+ /** Token contract address (EVM only) */
2924
+ token_address: string;
2925
+ /** Total USD value (balance * price) (EVM only) */
2926
+ usd_value: number;
2927
+ }
2928
+ interface WalletDetailDataLabels {
2929
+ /** Wallet address */
2930
+ address: string;
2931
+ /** Name of the associated entity like `Binance` or `Aave` */
2932
+ entity_name?: string;
2933
+ /** Type of entity like `exchange`, `fund`, or `whale` */
2934
+ entity_type?: string;
2935
+ labels: WalletDetailDataLabelsLabelsItem[];
2936
+ }
2937
+ interface WalletDetailDataNftItem {
2938
+ /** Canonical chain name like `ethereum` or `polygon` */
2939
+ chain?: string;
2940
+ /** NFT collection name */
2941
+ collection_name?: string;
2942
+ /** NFT contract address */
2943
+ contract_address: string;
2944
+ /** NFT image or thumbnail URL */
2945
+ image_url?: string;
2946
+ /** NFT item name or title */
2947
+ name?: string;
2948
+ /** NFT token ID within the collection */
2949
+ token_id: string;
2950
+ /** Latest trading price in USD */
2951
+ usd_price?: number;
2952
+ }
2953
+ interface WalletDetailDataSolBalance {
2954
+ /** Wallet address */
2955
+ address: string;
2956
+ /** Decimal-adjusted native SOL balance as a string (Solana only) */
2957
+ sol_balance: string;
2958
+ }
2959
+ interface WalletDetailDataSolTokensItem {
2960
+ /** Decimal-adjusted token balance as a string */
2961
+ balance: string;
2962
+ /** Token decimal places (Solana only) */
2963
+ decimals: number;
2964
+ /** Full token name */
2965
+ name?: string;
2966
+ /** Token ticker symbol */
2967
+ symbol: string;
2968
+ /** SPL token mint address (Solana only) */
2969
+ token_address: string;
2970
+ }
2971
+ interface WalletDetailDataApprovalsItemSpendersItem {
2972
+ /** Approved token amount (use -1 for unlimited) */
2973
+ allowance: number;
2974
+ /** Address of the approved spender contract */
2975
+ spender_address: string;
2976
+ /** Human-readable name of the spender, absent for unrecognized contracts */
2977
+ spender_name?: string;
2978
+ }
2979
+ interface WalletDetailDataEvmBalanceChainBalancesItem {
2980
+ /** Canonical chain name like `ethereum` or `polygon` */
2981
+ chain: string;
2982
+ /** EVM chain ID like `1` for Ethereum or `137` for Polygon */
2983
+ chain_id?: number;
2984
+ /** Total USD value of assets on this chain */
2985
+ usd_value: number;
2986
+ }
2987
+ interface WalletDetailDataLabelsLabelsItem {
2988
+ /** Confidence score 0.0-1.0 */
2989
+ confidence?: number;
2990
+ /** Human-readable label for this address like `Binance Hot Wallet` */
2991
+ label: string;
2992
+ }
2993
+ interface WalletDetailParams {
2994
+ /** Wallet address (0x hex for EVM, base58 for Solana) */
2995
+ address?: string;
2996
+ /** Chain filter for `tokens`, `nft`, and `approvals`. When omitted, inferred from address format: 0x addresses query all EVM chains, base58 addresses query Solana. */
2997
+ chain?: 'ethereum' | 'polygon' | 'bsc' | 'avalanche' | 'arbitrum' | 'optimism' | 'fantom' | 'base' | 'solana';
2998
+ /** Comma-separated sub-resources to include. Valid: `balance`, `tokens`, `labels`, `nft`, `approvals`. The `active_chains` field is always returned. `approvals` is opt-in (not in default) as it triggers additional upstream calls. — @default 'balance' */
2999
+ fields?: string;
3000
+ }
3001
+ interface WalletHistoryItem {
3002
+ /** Sender wallet address */
3003
+ from_address: string;
3004
+ /** Unix timestamp in seconds when the transaction was confirmed */
3005
+ timestamp: number;
3006
+ /** Recipient wallet address */
3007
+ to_address: string;
3008
+ /** Transaction hash */
3009
+ tx_hash: string;
3010
+ /** Transaction type: `send`, `receive`, `swap`, `approve`, etc. */
3011
+ tx_type?: string;
3012
+ /** Decimal-adjusted transaction value in native token as a string */
3013
+ value: string;
3014
+ }
3015
+ interface WalletHistoryParams {
3016
+ /** Wallet address — must be a raw 0x-prefixed hex address, not an ENS name */
3017
+ address?: string;
3018
+ /** Chain filter. Can be `ethereum`, `polygon`, `bsc`, `avalanche`, `arbitrum`, `optimism`, `fantom`, or `base`. — @default 'ethereum' */
3019
+ chain?: 'ethereum' | 'polygon' | 'bsc' | 'avalanche' | 'arbitrum' | 'optimism' | 'fantom' | 'base';
3020
+ /** Results per page — @default '20' */
3021
+ limit?: number;
3022
+ /** Pagination offset — @default '0' */
3023
+ offset?: number;
3024
+ /** Field to sort results by — @default 'timestamp' */
3025
+ sort_by?: 'timestamp' | 'value';
3026
+ /** Sort order — @default 'desc' */
3027
+ order?: 'asc' | 'desc';
3028
+ }
3029
+ interface WalletLabelsBatchItem {
3030
+ /** Wallet address */
3031
+ address: string;
3032
+ /** Name of the associated entity like `Binance` or `Aave` */
3033
+ entity_name?: string;
3034
+ /** Type of entity like `exchange`, `fund`, or `whale` */
3035
+ entity_type?: string;
3036
+ labels: WalletLabelsBatchItemLabelsItem[];
3037
+ }
3038
+ interface WalletLabelsBatchItemLabelsItem {
3039
+ /** Confidence score 0.0-1.0 */
3040
+ confidence?: number;
3041
+ /** Human-readable label for this address like `Binance Hot Wallet` */
3042
+ label: string;
3043
+ }
3044
+ interface WalletLabelsBatchParams {
3045
+ /** Comma-separated wallet addresses to look up, max 100 */
3046
+ addresses?: string;
3047
+ }
3048
+ interface WalletNetWorthItem {
3049
+ /** Unix timestamp in seconds */
3050
+ timestamp: number;
3051
+ /** Total portfolio value in USD at this point in time */
3052
+ usd_value: number;
3053
+ }
3054
+ interface WalletNetWorthParams {
3055
+ /** Wallet address (0x hex, base58, or ENS name like `vitalik.eth`) */
3056
+ address?: string;
3057
+ }
3058
+ interface WalletProtocolsItem {
3059
+ /** Canonical chain name where the protocol operates */
3060
+ chain: string;
3061
+ /** Protocol logo image URL */
3062
+ logo_url?: string;
3063
+ positions: WalletProtocolsItemPositionsItem[];
3064
+ /** Human-readable protocol name */
3065
+ protocol_name: string;
3066
+ /** Protocol website URL */
3067
+ site_url?: string;
3068
+ /** Total USD value across all positions in this protocol */
3069
+ total_usd: number;
3070
+ }
3071
+ interface WalletProtocolsItemPositionsItem {
3072
+ /** Total USD value of this position */
3073
+ balance_usd: number;
3074
+ borrow_tokens?: WalletProtocolsItemPositionsItemBorrowTokensItem[];
3075
+ lp_tokens?: WalletProtocolsItemPositionsItemLpTokensItem[];
3076
+ /** Position name or type like `Lending` or `Staking` */
3077
+ name: string;
3078
+ reward_tokens?: WalletProtocolsItemPositionsItemRewardTokensItem[];
3079
+ supply_tokens?: WalletProtocolsItemPositionsItemSupplyTokensItem[];
3080
+ }
3081
+ interface WalletProtocolsItemPositionsItemBorrowTokensItem {
3082
+ /** Token amount held in this position */
3083
+ amount: number;
3084
+ /** Canonical chain name like `ethereum` or `polygon` */
3085
+ chain: string;
3086
+ /** Full token name */
3087
+ name?: string;
3088
+ /** Current token price in USD */
3089
+ price: number;
3090
+ /** Token ticker symbol */
3091
+ symbol: string;
3092
+ /** Token contract address */
3093
+ token_address?: string;
3094
+ }
3095
+ interface WalletProtocolsItemPositionsItemLpTokensItem {
3096
+ /** Token amount held in this position */
3097
+ amount: number;
3098
+ /** Canonical chain name like `ethereum` or `polygon` */
3099
+ chain: string;
3100
+ /** Full token name */
3101
+ name?: string;
3102
+ /** Current token price in USD */
3103
+ price: number;
3104
+ /** Token ticker symbol */
3105
+ symbol: string;
3106
+ /** Token contract address */
3107
+ token_address?: string;
3108
+ }
3109
+ interface WalletProtocolsItemPositionsItemRewardTokensItem {
3110
+ /** Token amount held in this position */
3111
+ amount: number;
3112
+ /** Canonical chain name like `ethereum` or `polygon` */
3113
+ chain: string;
3114
+ /** Full token name */
3115
+ name?: string;
3116
+ /** Current token price in USD */
3117
+ price: number;
3118
+ /** Token ticker symbol */
3119
+ symbol: string;
3120
+ /** Token contract address */
3121
+ token_address?: string;
3122
+ }
3123
+ interface WalletProtocolsItemPositionsItemSupplyTokensItem {
3124
+ /** Token amount held in this position */
3125
+ amount: number;
3126
+ /** Canonical chain name like `ethereum` or `polygon` */
3127
+ chain: string;
3128
+ /** Full token name */
3129
+ name?: string;
3130
+ /** Current token price in USD */
3131
+ price: number;
3132
+ /** Token ticker symbol */
3133
+ symbol: string;
3134
+ /** Token contract address */
3135
+ token_address?: string;
3136
+ }
3137
+ interface WalletProtocolsParams {
3138
+ /** Wallet address — must be a raw 0x-prefixed hex address, not an ENS name */
3139
+ address?: string;
3140
+ /** Results per page — @default '20' */
3141
+ limit?: number;
3142
+ /** Pagination offset — @default '0' */
3143
+ offset?: number;
3144
+ }
3145
+ interface WalletTransfersItem {
3146
+ /** Transfer activity type (Solana only, e.g. ACTIVITY_SPL_TRANSFER) */
3147
+ activity_type?: string;
3148
+ /** Decimal-adjusted transfer amount as a string */
3149
+ amount: string;
3150
+ /** Transfer value in USD at the time of the transaction */
3151
+ amount_usd?: number;
3152
+ /** Transfer direction relative to the queried wallet: `in` or `out` */
3153
+ flow?: string;
3154
+ /** Sender wallet address */
3155
+ from_address: string;
3156
+ /** Unix timestamp in seconds when the transfer occurred */
3157
+ timestamp: number;
3158
+ /** Recipient wallet address */
3159
+ to_address: string;
3160
+ /** Token contract address (EVM) or SPL mint address (Solana) */
3161
+ token_address?: string;
3162
+ /** Token ticker symbol (available for EVM chains from on-chain data) */
3163
+ token_symbol?: string;
3164
+ /** Transaction hash (EVM) or transaction signature (Solana) */
3165
+ tx_hash: string;
3166
+ }
3167
+ interface WalletTransfersParams {
3168
+ /** Wallet address — must be a raw address (0x-prefixed hex for EVM, base58 for Solana). ENS names like `vitalik.eth` are not supported; resolve to a 0x address first. */
3169
+ address?: string;
3170
+ /** Chain. Can be `ethereum`, `base`, or `solana`. — @default 'ethereum' */
3171
+ chain?: 'ethereum' | 'base' | 'solana';
3172
+ /** Filter by transfer direction relative to the queried wallet. `in` for incoming, `out` for outgoing. Omit for both directions. */
3173
+ flow?: 'in' | 'out';
3174
+ /** Filter by token contract address. Use `0x0000000000000000000000000000000000000000` for native token transfers. Omit for all tokens. */
3175
+ token?: string;
3176
+ /** Results per page — @default '20' */
3177
+ limit?: number;
3178
+ /** Pagination offset — @default '0' */
3179
+ offset?: number;
3180
+ }
3181
+ interface WebFetchData {
3182
+ /** Full page content converted to clean markdown text */
3183
+ content: string;
3184
+ /** Page title extracted from the HTML */
3185
+ title?: string;
3186
+ /** The URL that was fetched */
3187
+ url: string;
3188
+ }
3189
+ interface WebFetchParams {
3190
+ /** URL to fetch and parse */
3191
+ url?: string;
3192
+ /** CSS selector to extract specific content */
3193
+ target_selector?: string;
3194
+ /** CSS selector to remove unwanted elements */
3195
+ remove_selector?: string;
3196
+ /** CSS selector to wait for before extracting */
3197
+ wait_for_selector?: string;
3198
+ /** Request timeout in milliseconds — @default '30000' */
3199
+ timeout?: number;
3200
+ }
3201
+
3202
+ /** Get order book bid/ask levels with computed stats: spread, spread percentage, mid-price, and total bid/ask depth. Use `limit` to control the number of price levels (1–100, default 20). Set `type=swap` to query perpetual contract order books instead of spot. */
3203
+ declare function useExchangeDepth(params?: ExchangeDepthParams): _tanstack_react_query.UseQueryResult<ApiResponse<ExchangeDepthItem>, Error>;
3204
+ /** Get historical funding rate records for a perpetual contract. Use `from` to set the start time and `limit` to control result count. For longer history, paginate by using the last returned timestamp as the next `from` value. Note: not all exchanges support historical queries via `from`; some only return recent data regardless. For the latest funding rate snapshot, see `/exchange/perp?fields=funding`. */
3205
+ declare function useExchangeFundingHistory(params?: ExchangeFundingHistoryParams): _tanstack_react_query.UseQueryResult<ApiResponse<ExchangeFundingHistoryItem>, Error>;
3206
+ /** Get OHLCV candlestick data with period summary stats (high, low, total volume). Supports 15 intervals from `1m` to `1M`. Use `from` to set the start time and `limit` to control how many candles to return. For longer ranges, paginate by using the last returned candle's timestamp as the next `from` value. Exchange-side limits vary (200–1000 per request). Set `type=swap` to query perpetual contract candles instead of spot. */
3207
+ declare function useExchangeKlines(params?: ExchangeKlinesParams): _tanstack_react_query.UseQueryResult<ApiResponse<ExchangeKlinesItem>, Error>;
3208
+ /** Get historical long/short ratio for a perpetual contract — ratio value, long account percentage, and short account percentage. Use `interval` (`1h`, `4h`, `1d`) for granularity, `from` for start time, and `limit` for result count. For longer history, paginate by using the last returned timestamp as the next `from` value. Note: not all exchanges support historical queries via `from`; some only return recent data regardless. Just pass the base pair (e.g. `pair=BTC/USDT`). For aggregated cross-exchange long/short ratio, see `/market/futures`. */
3209
+ declare function useExchangeLongShortRatio(params?: ExchangeLongShortRatioParams): _tanstack_react_query.UseQueryResult<ApiResponse<ExchangeLongShortRatioItem>, Error>;
3210
+ /** List trading pairs available on an exchange. Filter by `type` (`spot`, `swap`, `future`, `option`) or free-text `search`. Returns pair name, base/quote currencies, market type, active status, and default fee rates. Use the returned `pair` values as the `pair` parameter in other exchange endpoints. */
3211
+ declare function useExchangeMarkets(params?: ExchangeMarketsParams): _tanstack_react_query.UseQueryResult<ApiResponse<ExchangeMarketsItem>, Error>;
3212
+ /** Get a combined snapshot of perpetual contract data for a pair. Use `fields` to select which sub-resources to fetch: `funding` (current funding rate, next settlement, mark/index price) and/or `oi` (open interest in contracts and USD). Just pass the base pair (e.g. `pair=BTC/USDT`). The `:USDT` swap suffix is added automatically. */
3213
+ declare function useExchangePerp(params?: ExchangePerpParams): _tanstack_react_query.UseQueryResult<ApiObjectResponse<ExchangePerpData>, Error>;
3214
+ /** Get the real-time ticker for a trading pair — last price, bid/ask, 24h high/low, 24h volume, and 24h price change. Set `type=swap` to query perpetual contract prices instead of spot. For historical price trends, use `/market/price`. */
3215
+ declare function useExchangePrice(params?: ExchangePriceParams): _tanstack_react_query.UseQueryResult<ApiResponse<ExchangePriceItem>, Error>;
3216
+
3217
+ /** Get a fund's **profile metadata**: X accounts, team members, recent research, and invested project count. This does NOT return the list of investments — use `/fund/portfolio` for that. Lookup by UUID (`id`) or name (`q`). Returns 404 if not found. */
3218
+ declare function useFundDetail(params?: FundDetailParams): _tanstack_react_query.UseQueryResult<ApiObjectResponse<FundDetailData>, Error>;
3219
+ /** List investment rounds for a fund's portfolio, sorted by date (newest first). A project may appear multiple times if the fund participated in multiple rounds. Each entry includes project name, logo, date, raise amount, and lead investor status. Lookup by UUID (`id`) or name (`q`). */
3220
+ declare function useInfiniteFundPortfolio(params?: Omit<FundPortfolioParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<FundPortfolioItem>, unknown>, Error>;
3221
+ /** List top-ranked funds by metric. Available metrics: `tier` (lower is better), `portfolio_count` (number of invested projects). */
3222
+ declare function useInfiniteFundRanking(params?: Omit<FundRankingParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<FundRankingItem>, unknown>, Error>;
3223
+
3224
+ /** Get Kalshi events with nested markets, optionally filtered by `event_ticker`. Each event includes market count and a list of markets. Data refresh: ~30 minutes */
3225
+ declare function useInfiniteKalshiEvents(params?: Omit<KalshiEventsParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<KalshiEventsItem>, unknown>, Error>;
3226
+ /** Get Kalshi markets, optionally filtered by `market_ticker`. Each market includes price, volume, and status. Data refresh: ~30 minutes */
3227
+ declare function useInfiniteKalshiMarkets(params?: Omit<KalshiMarketsParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<KalshiMarketsItem>, unknown>, Error>;
3228
+ /** Get daily open interest history for a Kalshi market filtered by `time_range`. Data refresh: ~30 minutes */
3229
+ declare function useKalshiOpenInterest(params?: KalshiOpenInterestParams): _tanstack_react_query.UseQueryResult<ApiResponse<KalshiOpenInterestItem>, Error>;
3230
+ /** Get price history for a Kalshi market. Use `interval=1d` for daily OHLC from market reports (~30 min delay), or `interval=latest` for real-time price from trades. Data refresh: ~30 minutes (daily), real-time (latest) */
3231
+ declare function useKalshiPrices(params?: KalshiPricesParams): _tanstack_react_query.UseQueryResult<ApiResponse<KalshiPricesItem>, Error>;
3232
+ /** Get top-ranked Kalshi markets by last day's `notional_volume_usd` or `open_interest`. Filter by `status`. Data refresh: ~30 minutes */
3233
+ declare function useInfiniteKalshiRanking(params?: Omit<KalshiRankingParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<KalshiRankingItem>, unknown>, Error>;
3234
+ /** Get individual trade records for a Kalshi market. Filter by `taker_side`, `min_contracts`, and date range. Sort by `timestamp` or `num_contracts`. Data refresh: real-time */
3235
+ declare function useInfiniteKalshiTrades(params?: Omit<KalshiTradesParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<KalshiTradesItem>, unknown>, Error>;
3236
+ /** Get daily trading volume history for a Kalshi market filtered by `time_range`. Data refresh: ~30 minutes */
3237
+ declare function useKalshiVolumes(params?: KalshiVolumesParams): _tanstack_react_query.UseQueryResult<ApiResponse<KalshiVolumesItem>, Error>;
3238
+
3239
+ /** Get daily ETF flow history for US spot ETFs — net flow (USD), token price, and per-ticker breakdown. Sorted by date descending. `symbol`: `BTC` or `ETH`. */
3240
+ declare function useMarketEtf(params?: MarketEtfParams): _tanstack_react_query.UseQueryResult<ApiResponse<MarketEtfItem>, Error>;
3241
+ /** Get Bitcoin Fear & Greed Index history — index value (0-100), classification label, and BTC price at each data point. Sorted newest-first. Use `from`/`to` to filter by date range. */
3242
+ declare function useMarketFearGreed(params?: MarketFearGreedParams): _tanstack_react_query.UseQueryResult<ApiResponse<MarketFearGreedItem>, Error>;
3243
+ /** Get futures market data across all tracked tokens — open interest, funding rate, long/short ratio, and 24h volume. Sort by `sort_by` (default: volume_24h). */
3244
+ declare function useMarketFutures(params?: MarketFuturesParams): _tanstack_react_query.UseQueryResult<ApiResponse<MarketFuturesItem>, Error>;
3245
+ /** Get OHLC-style aggregated liquidation data for a token on a specific exchange. Filter by `symbol`, `exchange`, and `interval`. Useful for charting liquidation volume over time. */
3246
+ declare function useMarketLiquidationChart(params?: MarketLiquidationChartParams): _tanstack_react_query.UseQueryResult<ApiResponse<MarketLiquidationChartItem>, Error>;
3247
+ /** Get liquidation breakdown by exchange — total, long, and short volumes in USD. Filter by `symbol` and `time_range` (`1h`, `4h`, `12h`, `24h`). */
3248
+ declare function useMarketLiquidationExchangeList(params?: MarketLiquidationExchangeListParams): _tanstack_react_query.UseQueryResult<ApiResponse<MarketLiquidationExchangeListItem>, Error>;
3249
+ /** Get individual large liquidation orders above a USD threshold (`min_amount`, default 10000). Filter by `exchange` and `symbol`. For aggregate totals and long/short breakdown by exchange, use `/market/liquidation/exchange-list`. For historical liquidation charts, use `/market/liquidation/chart`. */
3250
+ declare function useMarketLiquidationOrder(params?: MarketLiquidationOrderParams): _tanstack_react_query.UseQueryResult<ApiResponse<MarketLiquidationOrderItem>, Error>;
3251
+ /** Get on-chain indicator time-series for BTC or ETH. Metrics: `nupl`, `sopr`, `mvrv`, `puell-multiple`, `nvm`, `nvt`, `nvt-golden-cross`, `exchange-flows` (inflow/outflow/netflow/reserve). */
3252
+ declare function useMarketOnchainIndicator(params?: MarketOnchainIndicatorParams): _tanstack_react_query.UseQueryResult<ApiResponse<MarketOnchainIndicatorItem>, Error>;
3253
+ /** Get options market data — open interest, volume, put/call ratio, and max pain price for a `symbol`. */
3254
+ declare function useMarketOptions(params?: MarketOptionsParams): _tanstack_react_query.UseQueryResult<ApiResponse<MarketOptionsItem>, Error>;
3255
+ /** Get historical price data points for a token. Use `time_range` for predefined windows (`1d`, `7d`, `14d`, `30d`, `90d`, `180d`, `365d`, `max`) or `from`/`to` for a custom date range (Unix timestamp or YYYY-MM-DD). Granularity is automatic: 5-min for 1d, hourly for 7-90d, daily for 180d+. */
3256
+ declare function useMarketPrice(params?: MarketPriceParams): _tanstack_react_query.UseQueryResult<ApiResponse<MarketPriceItem>, Error>;
3257
+ /** Get a technical indicator for a trading pair on a given exchange and interval. Set `from`/`to` for time-series mode, omit for latest value. Use `options` for indicator-specific tuning (e.g. `period:7`, `fast_period:8,slow_period:21,signal_period:5`, `period:10,stddev:1.5`). Indicators: `rsi`, `macd`, `ema`, `sma`, `bbands`, `stoch`, `adx`, `atr`, `cci`, `obv`, `vwap`, `dmi`, `ichimoku`, `supertrend`. */
3258
+ declare function useMarketPriceIndicator(params?: MarketPriceIndicatorParams): _tanstack_react_query.UseQueryResult<ApiResponse<MarketPriceIndicatorItem>, Error>;
3259
+ /** List tokens ranked by metric. Available metrics: `market_cap`, `top_gainers`, `top_losers`, `volume`. Note: `top_gainers` and `top_losers` rank by 24h price change within the top 250 coins by market cap. For circulating supply, FDV, ATH/ATL, use `/project/detail?fields=token_info`. */
3260
+ declare function useInfiniteMarketRanking(params?: Omit<MarketRankingParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<MarketRankingItem>, unknown>, Error>;
3261
+
3262
+ /** Returns the full content of a single news article by its ID (returned as `id` in feed and search results). */
3263
+ declare function useNewsDetail(params?: NewsDetailParams): _tanstack_react_query.UseQueryResult<ApiObjectResponse<NewsDetailData>, Error>;
3264
+ /** Browse crypto news from major sources. Filter by `source` (enum), `project`, and time range (`from`/`to`). Sort by `recency` (default) or `trending`. Use the detail endpoint with article `id` for full content. */
3265
+ declare function useInfiniteNewsFeed(params?: Omit<NewsFeedParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<NewsFeedItem>, unknown>, Error>;
3266
+
3267
+ /** List bridge protocols ranked by total USD volume over a time range. */
3268
+ declare function useInfiniteOnchainBridgeRanking(params?: Omit<OnchainBridgeRankingParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<OnchainBridgeRankingItem>, unknown>, Error>;
3269
+ /** Get the current gas price for an EVM chain via `eth_gasPrice` JSON-RPC. Returns gas price in both wei (raw) and Gwei (human-readable). **Supported chains:** `ethereum`, `polygon`, `bsc`, `arbitrum`, `optimism`, `base`, `avalanche`, `fantom`, `linea`, `cyber`. */
3270
+ declare function useOnchainGasPrice(params?: OnchainGasPriceParams): _tanstack_react_query.UseQueryResult<ApiObjectResponse<OnchainGasPriceData>, Error>;
3271
+ /** Execute a structured JSON query on blockchain data. No raw SQL needed — specify source, fields, filters, sort, and pagination. All tables live in the **agent** database. Use `GET /v1/onchain/schema` to discover available tables and their columns. - Source format: `agent.<table_name>` like `agent.ethereum_transactions` or `agent.ethereum_dex_trades` - Max 10,000 rows (default 20), 30s timeout. - **Always filter on block_date** — it is the partition key. Without it, queries scan billions of rows and will timeout. - **Data refresh:** ~24 hours. */
3272
+ declare function useOnchainStructuredQuery(params: OnchainStructuredQueryParams): _tanstack_react_query.UseQueryResult<ApiResponse<OnchainStructuredQueryItem>, Error>;
3273
+ /** Get table metadata — database, table, column names, types, and comments for all available on-chain databases. */
3274
+ declare function useOnchainSchema(): _tanstack_react_query.UseQueryResult<ApiResponse<OnchainSchemaItem>, Error>;
3275
+ /** Execute a raw SQL SELECT query against blockchain data. All tables live in the **agent** database. Use `GET /v1/onchain/schema` to discover available tables and their columns before writing queries. */
3276
+ declare function useOnchainSql(params: OnchainSqlParams): _tanstack_react_query.UseQueryResult<ApiResponse<OnchainSqlItem>, Error>;
3277
+ /** Get transaction details by hash. All numeric fields are hex-encoded — use parseInt(hex, 16) to convert. **Supported chains:** `ethereum`, `polygon`, `bsc`, `arbitrum`, `optimism`, `base`, `avalanche`, `fantom`, `linea`, `cyber`. Returns 404 if the transaction is not found. */
3278
+ declare function useOnchainTx(params?: OnchainTxParams): _tanstack_react_query.UseQueryResult<ApiResponse<OnchainTxItem>, Error>;
3279
+ /** List DeFi yield pools ranked by APY or TVL. Returns the latest snapshot. Filter by protocol. */
3280
+ declare function useInfiniteOnchainYieldRanking(params?: Omit<OnchainYieldRankingParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<OnchainYieldRankingItem>, unknown>, Error>;
3281
+
3282
+ /** Get trade and redemption activity for a Polymarket wallet. Data refresh: ~30 minutes */
3283
+ declare function useInfinitePolymarketActivity(params?: Omit<PolymarketActivityParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<PolymarketActivityItem>, unknown>, Error>;
3284
+ /** Get Polymarket events with nested markets, optionally filtered by `event_slug`. Each event includes aggregated status, volume, and a list of markets with `side_a`/`side_b` outcomes. Data refresh: ~30 minutes */
3285
+ declare function useInfinitePolymarketEvents(params?: Omit<PolymarketEventsParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<PolymarketEventsItem>, unknown>, Error>;
3286
+ /** Get Polymarket markets, optionally filtered by `market_slug`. Each market includes `side_a` and `side_b` outcomes. Current prices are available via `/polymarket/prices` using the `condition_id`. Data refresh: ~30 minutes */
3287
+ declare function useInfinitePolymarketMarkets(params?: Omit<PolymarketMarketsParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<PolymarketMarketsItem>, unknown>, Error>;
3288
+ /** Get daily open interest history for a Polymarket market. Data refresh: ~30 minutes */
3289
+ declare function usePolymarketOpenInterest(params?: PolymarketOpenInterestParams): _tanstack_react_query.UseQueryResult<ApiResponse<PolymarketOpenInterestItem>, Error>;
3290
+ /** Get wallet positions on Polymarket markets. Data refresh: ~30 minutes */
3291
+ declare function useInfinitePolymarketPositions(params?: Omit<PolymarketPositionsParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<PolymarketPositionsItem>, unknown>, Error>;
3292
+ /** Get aggregated price history for a Polymarket market. Use `interval=latest` for the most recent price snapshot. Data refresh: ~30 minutes */
3293
+ declare function usePolymarketPrices(params?: PolymarketPricesParams): _tanstack_react_query.UseQueryResult<ApiResponse<PolymarketPricesItem>, Error>;
3294
+ /** Get top-ranked Polymarket markets by `volume_24h`, `volume_7d`, `open_interest`, or `trade_count`. Filter by `status` and `end_before`. Data refresh: ~30 minutes */
3295
+ declare function useInfinitePolymarketRanking(params?: Omit<PolymarketRankingParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<PolymarketRankingItem>, unknown>, Error>;
3296
+ /** Get paginated trade records for a Polymarket market or wallet. Filter by `condition_id` (market) or `address` (wallet), plus `outcome_label`, `min_amount`, and date range. At least one of `condition_id` or `address` is required. Sort by `newest`, `oldest`, or `largest`. Data refresh: ~30 minutes */
3297
+ declare function useInfinitePolymarketTrades(params?: Omit<PolymarketTradesParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<PolymarketTradesItem>, unknown>, Error>;
3298
+ /** Get trading volume and trade count history for a Polymarket market. Data refresh: ~30 minutes */
3299
+ declare function usePolymarketVolumes(params?: PolymarketVolumesParams): _tanstack_react_query.UseQueryResult<ApiResponse<PolymarketVolumesItem>, Error>;
3300
+
3301
+ /** Get daily notional volume and open interest aggregated by category across Kalshi and Polymarket. Filter by `source` or `category`. Data refresh: daily */
3302
+ declare function useInfinitePredictionMarketCategoryMetrics(params?: Omit<PredictionMarketCategoryMetricsParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<PredictionMarketCategoryMetricsItem>, unknown>, Error>;
3303
+
3304
+ /** Get time-series DeFi metrics for a project. Available metrics: `volume`, `fee`, `fees`, `revenue`, `tvl`, `users`. Lookup by UUID (`id`) or name (`q`). Filter by `chain` and date range (`from`/`to`). Returns 404 if the project is not found. **Note:** this endpoint only returns data for DeFi protocol projects (e.g. `aave`, `uniswap`, `lido`, `makerdao`). Use `q` with a DeFi protocol name. */
3305
+ declare function useInfiniteProjectDefiMetrics(params?: Omit<ProjectDefiMetricsParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<ProjectDefiMetricsItem>, unknown>, Error>;
3306
+ /** Get top DeFi projects ranked by a protocol metric. Available metrics: `tvl`, `revenue`, `fees`, `volume`, `users`. */
3307
+ declare function useInfiniteProjectDefiRanking(params?: Omit<ProjectDefiRankingParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<ProjectDefiRankingItem>, unknown>, Error>;
3308
+ /** Get multiple project sub-resources in a single request. Use `fields` to select: `overview`, `token_info`, `tokenomics`, `funding`, `team`, `contracts`, `social`, `tge_status`. **Accepts project names directly** via `q` (e.g. `?q=aave`) — no need to call `/search/project` first. Also accepts UUID via `id`. Returns 404 if not found. For DeFi metrics (TVL, fees, revenue, volume, users) and per-chain breakdown, use `/project/defi/metrics`. */
3309
+ declare function useProjectDetail(params?: ProjectDetailParams): _tanstack_react_query.UseQueryResult<ApiObjectResponse<ProjectDetailData>, Error>;
3310
+
3311
+ /** Search and filter airdrop opportunities by keyword, status, reward type, and task type. Returns paginated results with optional task details. */
3312
+ declare function useInfiniteSearchAirdrop(params?: Omit<SearchAirdropParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<SearchAirdropItem>, unknown>, Error>;
3313
+ /** Search project events by keyword, optionally filtered by `type`. Valid types: `launch`, `upgrade`, `partnership`, `news`, `airdrop`, `listing`, `twitter`. Lookup by UUID (`id`) or name (`q`). Returns 404 if the project is not found. */
3314
+ declare function useInfiniteSearchEvents(params?: Omit<SearchEventsParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<SearchEventsItem>, unknown>, Error>;
3315
+ /** Search funds by keyword. Returns matching funds with name, tier, type, logo, and top invested projects. */
3316
+ declare function useInfiniteSearchFund(params?: Omit<SearchFundParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<SearchFundItem>, unknown>, Error>;
3317
+ /** Search Kalshi events by keyword and/or category. Filter by keyword matching event title, subtitle, or market title; or by category. At least one of `q` or `category` is required. Returns events with nested markets. Data refresh: ~30 minutes */
3318
+ declare function useInfiniteSearchKalshi(params?: Omit<SearchKalshiParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<SearchKalshiItem>, unknown>, Error>;
3319
+ /** Search crypto news articles by keyword. Returns top 10 results ranked by relevance with highlighted matching fragments. */
3320
+ declare function useSearchNews(params?: SearchNewsParams): _tanstack_react_query.UseQueryResult<ApiResponse<SearchNewsItem>, Error>;
3321
+ /** Search Polymarket events by keyword, tags, and/or category. Filter by keyword matching market question, event title, or description; by comma-separated tag labels; or by Surf-curated category. At least one of `q`, `tags`, or `category` is required. Returns events with nested markets ranked by volume. Data refresh: ~30 minutes */
3322
+ declare function useInfiniteSearchPolymarket(params?: Omit<SearchPolymarketParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<SearchPolymarketItem>, unknown>, Error>;
3323
+ /** Search crypto projects by keyword. Returns matching projects with name, description, chains, and logo. */
3324
+ declare function useInfiniteSearchProject(params?: Omit<SearchProjectParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<SearchProjectItem>, unknown>, Error>;
3325
+ /** Search X (Twitter) users by keyword. Returns user profiles with handle, display name, bio, follower count, and avatar. */
3326
+ declare function useInfiniteSearchSocialPeople(params?: Omit<SearchSocialPeopleParams, 'cursor'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiCursorResponse<SearchSocialPeopleItem>, unknown>, Error>;
3327
+ /** Search X (Twitter) posts by keyword or `from:handle` syntax. Returns posts with author, content, engagement metrics, and timestamp. To load more results, check `meta.has_more`; if true, pass `meta.next_cursor` as the `cursor` query parameter in the next request. */
3328
+ declare function useInfiniteSearchSocialPosts(params?: Omit<SearchSocialPostsParams, 'cursor'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiCursorResponse<SearchSocialPostsItem>, unknown>, Error>;
3329
+ /** Search wallets by ENS name, address label, or address prefix. Returns matching wallet addresses with entity labels. */
3330
+ declare function useInfiniteSearchWallet(params?: Omit<SearchWalletParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<SearchWalletItem>, unknown>, Error>;
3331
+ /** Search web pages, articles, and content by keyword. Filter by domain with `site` like `coindesk.com`. Returns titles, URLs, and content snippets. */
3332
+ declare function useInfiniteSearchWeb(params?: Omit<SearchWebParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<SearchWebItem>, unknown>, Error>;
3333
+
3334
+ /** Get a **point-in-time snapshot** of social analytics: sentiment score, follower geo breakdown, and top smart followers. Use `fields` to select: `sentiment`, `follower_geo`, `smart_followers`. Lookup by X account ID (`x_id`) or project name (`q`, e.g. `uniswap`, `solana`). The `q` parameter must be a crypto project name, not a personal Twitter handle. Returns 404 if the project has no linked Twitter account. For sentiment **trends over time**, use `/social/mindshare` instead. */
3335
+ declare function useSocialDetail(params?: SocialDetailParams): _tanstack_react_query.UseQueryResult<ApiObjectResponse<SocialDetailData>, Error>;
3336
+ /** Get mindshare (social view count) **time-series trend** for a project, aggregated by `interval`. Use this when the user asks about sentiment **trends**, mindshare **over time**, or social momentum changes. `interval` can be `5m`, `1h`, `1d`, or `7d`. Filter by date range with `from`/`to` (Unix seconds). Lookup by name (`q`). For a **point-in-time snapshot** of social analytics (sentiment score, follower geo, smart followers), use `/social/detail` instead. */
3337
+ declare function useSocialMindshare(params?: SocialMindshareParams): _tanstack_react_query.UseQueryResult<ApiResponse<SocialMindshareItem>, Error>;
3338
+ /** Get top crypto projects ranked by mindshare (social view count), sourced directly from Argus real-time data (refreshed every 5 minutes). Filter by `tag` to scope to a category (e.g. `dex`, `l1`, `meme`). Use `time_range` (`24h`, `48h`, `7d`, `30d`) to control the ranking window. Supports `limit`/`offset` pagination. */
3339
+ declare function useInfiniteSocialRanking(params?: Omit<SocialRankingParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<SocialRankingItem>, unknown>, Error>;
3340
+ /** Get smart follower count time-series for a project, sorted by date descending. Lookup by X account ID (`x_id`) or project name (`q`). The `q` parameter must be a project name (e.g. `uniswap`, `ethereum`), not a personal X handle — use `x_id` for individual accounts. Returns 404 if the project has no linked X account. */
3341
+ declare function useSocialSmartFollowersHistory(params?: SocialSmartFollowersHistoryParams): _tanstack_react_query.UseQueryResult<ApiResponse<SocialSmartFollowersHistoryItem>, Error>;
3342
+ /** Returns replies/comments on a specific tweet. Lookup by `tweet_id`. */
3343
+ declare function useInfiniteSocialTweetReplies(params?: Omit<SocialTweetRepliesParams, 'cursor'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiCursorResponse<SocialTweetRepliesItem>, unknown>, Error>;
3344
+ /** Get X (Twitter) posts by numeric post ID strings. Pass up to 100 comma-separated IDs via the `ids` query parameter. */
3345
+ declare function useSocialTweets(params?: SocialTweetsParams): _tanstack_react_query.UseQueryResult<ApiResponse<SocialTweetsItem>, Error>;
3346
+ /** Get an X (Twitter) user profile — display name, follower count, following count, and bio. Lookup by `handle` (without @). */
3347
+ declare function useSocialUser(params?: SocialUserParams): _tanstack_react_query.UseQueryResult<ApiObjectResponse<SocialUserData>, Error>;
3348
+ /** Returns a list of followers for the specified handle on X (Twitter). Lookup by `handle` (without @). */
3349
+ declare function useInfiniteSocialUserFollowers(params?: Omit<SocialUserFollowersParams, 'cursor'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiCursorResponse<SocialUserFollowersItem>, unknown>, Error>;
3350
+ /** Returns a list of users that the specified handle follows on X (Twitter). Lookup by `handle` (without @). */
3351
+ declare function useInfiniteSocialUserFollowing(params?: Omit<SocialUserFollowingParams, 'cursor'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiCursorResponse<SocialUserFollowingItem>, unknown>, Error>;
3352
+ /** Get recent X (Twitter) posts by a specific user, ordered by recency. Lookup by `handle` (without @). Use `filter=original` to exclude retweets. To load more results, check `meta.has_more`; if true, pass `meta.next_cursor` as the `cursor` query parameter in the next request. */
3353
+ declare function useInfiniteSocialUserPosts(params?: Omit<SocialUserPostsParams, 'cursor'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiCursorResponse<SocialUserPostsItem>, unknown>, Error>;
3354
+ /** Returns recent replies by the specified handle on X (Twitter). Lookup by `handle` (without @). */
3355
+ declare function useInfiniteSocialUserReplies(params?: Omit<SocialUserRepliesParams, 'cursor'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiCursorResponse<SocialUserRepliesItem>, unknown>, Error>;
3356
+
3357
+ /** Get recent DEX swap events for a token contract address. Covers DEXes like `uniswap`, `sushiswap`, `curve`, and `balancer` on `ethereum` and `base`. Returns trading pair, amounts, USD value, and taker address. Data refresh: ~24 hours · Chain: Ethereum, Base */
3358
+ declare function useInfiniteTokenDexTrades(params?: Omit<TokenDexTradesParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<TokenDexTradesItem>, unknown>, Error>;
3359
+ /** Get top token holders for a contract address — wallet address, balance, and percentage. Lookup by `address` and `chain`. Supports EVM chains and Solana. */
3360
+ declare function useInfiniteTokenHolders(params?: Omit<TokenHoldersParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<TokenHoldersItem>, unknown>, Error>;
3361
+ /** Get token unlock time-series — unlock events with amounts and allocation breakdowns. Lookup by project UUID (`id`) or token `symbol`. Filter by date range with `from`/`to`. Defaults to the current calendar month when omitted. Returns 404 if no token found. */
3362
+ declare function useTokenTokenomics(params?: TokenTokenomicsParams): _tanstack_react_query.UseQueryResult<ApiResponse<TokenTokenomicsItem>, Error>;
3363
+ /** Get recent transfer events **for a specific token** (ERC-20/TRC-20 contract). Pass the **token contract address** in `address` — returns every on-chain transfer of that token regardless of sender/receiver. Each record includes sender, receiver, raw amount, and block timestamp. Use this to analyze a token's on-chain activity (e.g. large movements, distribution patterns). Lookup: `address` (token contract) + `chain`. Sort by `asc` or `desc`. Data refresh: ~24 hours · Chain: Ethereum, Base, TRON (Solana uses a different source with no delay) */
3364
+ declare function useInfiniteTokenTransfers(params?: Omit<TokenTransfersParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<TokenTransfersItem>, unknown>, Error>;
3365
+
3366
+ /** Get multiple wallet sub-resources in a single request. Lookup by `address`. Use `fields` to select: `balance`, `tokens`, `labels`, `nft`. Partial failures return available fields with per-field error info. Returns 422 if `fields` is invalid. */
3367
+ declare function useWalletDetail(params?: WalletDetailParams): _tanstack_react_query.UseQueryResult<ApiObjectResponse<WalletDetailData>, Error>;
3368
+ /** Get full transaction history for a wallet — swaps, transfers, and contract interactions. Lookup by `address`. Filter by `chain` — supports `ethereum`, `polygon`, `bsc`, `arbitrum`, `optimism`, `avalanche`, `fantom`, `base`. */
3369
+ declare function useInfiniteWalletHistory(params?: Omit<WalletHistoryParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<WalletHistoryItem>, unknown>, Error>;
3370
+ /** Get entity labels for multiple wallet addresses. Pass up to 100 comma-separated addresses via the `addresses` query parameter. Returns entity name, type, and labels per address. */
3371
+ declare function useWalletLabelsBatch(params?: WalletLabelsBatchParams): _tanstack_react_query.UseQueryResult<ApiResponse<WalletLabelsBatchItem>, Error>;
3372
+ /** Get a time-series of the wallet's total net worth in USD. Returns ~288 data points at 5-minute intervals covering the last 24 hours. Fixed window — no custom time range supported. */
3373
+ declare function useWalletNetWorth(params?: WalletNetWorthParams): _tanstack_react_query.UseQueryResult<ApiResponse<WalletNetWorthItem>, Error>;
3374
+ /** Get all DeFi protocol positions for a wallet — lending, staking, LP, and farming with token breakdowns and USD values. Lookup by `address`. */
3375
+ declare function useInfiniteWalletProtocols(params?: Omit<WalletProtocolsParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<WalletProtocolsItem>, unknown>, Error>;
3376
+ /** Get recent token transfers **sent or received by a wallet**. Pass the **wallet address** in `address` — returns all ERC-20/SPL token transfers where this wallet is the sender or receiver. Each record includes token contract, counterparty, raw amount, and block timestamp. Use this to audit a wallet's token flow (e.g. inflows, outflows, airdrop receipts). Lookup: `address` (wallet, raw 0x hex or base58 — ENS not supported). Filter by `chain` — supports `ethereum`, `base`, `solana`. Data refresh: ~24 hours · Chain: Ethereum, Base (Solana uses a different source with no delay) */
3377
+ declare function useInfiniteWalletTransfers(params?: Omit<WalletTransfersParams, 'offset'>): _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ApiResponse<WalletTransfersItem>, unknown>, Error>;
3378
+
3379
+ /** Fetch a web page and convert it to clean, LLM-friendly markdown. Use `target_selector` to extract specific page sections and `remove_selector` to strip unwanted elements. Returns 400 if the URL is invalid or unreachable. */
3380
+ declare function useWebFetch(params?: WebFetchParams): _tanstack_react_query.UseQueryResult<ApiObjectResponse<WebFetchData>, Error>;
3381
+
3382
+ export { type ApiCursorResponse, type ApiObjectResponse, type ApiResponse, type CursorMeta, type ExchangeDepthItem, type ExchangeDepthItemAsksItem, type ExchangeDepthItemBidsItem, type ExchangeDepthParams, type ExchangeFundingHistoryItem, type ExchangeFundingHistoryParams, type ExchangeKlinesItem, type ExchangeKlinesItemCandlesItem, type ExchangeKlinesParams, type ExchangeLongShortRatioItem, type ExchangeLongShortRatioParams, type ExchangeMarketsItem, type ExchangeMarketsParams, type ExchangePerpData, type ExchangePerpDataFunding, type ExchangePerpDataOpenInterest, type ExchangePerpParams, type ExchangePriceItem, type ExchangePriceParams, type FundDetailData, type FundDetailDataLinksItem, type FundDetailDataMembersItem, type FundDetailDataRecentResearchesItem, type FundDetailDataXAccountsItem, type FundDetailParams, type FundPortfolioItem, type FundPortfolioParams, type FundRankingItem, type FundRankingItemTopProjectsItem, type FundRankingParams, type KalshiEventsItem, type KalshiEventsItemMarketsItem, type KalshiEventsParams, type KalshiMarketsItem, type KalshiMarketsParams, type KalshiOpenInterestItem, type KalshiOpenInterestParams, type KalshiPricesItem, type KalshiPricesItemSideA, type KalshiPricesItemSideB, type KalshiPricesParams, type KalshiRankingItem, type KalshiRankingParams, type KalshiTradesItem, type KalshiTradesParams, type KalshiVolumesItem, type KalshiVolumesParams, type MarketEtfItem, type MarketEtfItemEtfsItem, type MarketEtfParams, type MarketFearGreedItem, type MarketFearGreedParams, type MarketFuturesItem, type MarketFuturesParams, type MarketLiquidationChartItem, type MarketLiquidationChartParams, type MarketLiquidationExchangeListItem, type MarketLiquidationExchangeListParams, type MarketLiquidationOrderItem, type MarketLiquidationOrderParams, type MarketOnchainIndicatorItem, type MarketOnchainIndicatorParams, type MarketOptionsItem, type MarketOptionsParams, type MarketPriceIndicatorItem, type MarketPriceIndicatorItemValues, type MarketPriceIndicatorParams, type MarketPriceItem, type MarketPriceParams, type MarketRankingItem, type MarketRankingParams, type NewsDetailData, type NewsDetailParams, type NewsFeedItem, type NewsFeedItemHighlights, type NewsFeedParams, type OnchainBridgeRankingItem, type OnchainBridgeRankingParams, type OnchainGasPriceData, type OnchainGasPriceParams, type OnchainSchemaItem, type OnchainSchemaItemColumnsItem, type OnchainSqlItem, type OnchainSqlParams, type OnchainStructuredQueryItem, type OnchainStructuredQueryParams, type OnchainStructuredQueryParamsFiltersItem, type OnchainStructuredQueryParamsSortItem, type OnchainTxItem, type OnchainTxItemAccesslistItem, type OnchainTxParams, type OnchainYieldRankingItem, type OnchainYieldRankingParams, type PolymarketActivityItem, type PolymarketActivityParams, type PolymarketEventsItem, type PolymarketEventsItemMarketsItem, type PolymarketEventsItemMarketsItemSideA, type PolymarketEventsItemMarketsItemSideB, type PolymarketEventsParams, type PolymarketMarketsItem, type PolymarketMarketsItemSideA, type PolymarketMarketsItemSideB, type PolymarketMarketsParams, type PolymarketOpenInterestItem, type PolymarketOpenInterestParams, type PolymarketPositionsItem, type PolymarketPositionsParams, type PolymarketPricesItem, type PolymarketPricesItemSideA, type PolymarketPricesItemSideB, type PolymarketPricesParams, type PolymarketRankingItem, type PolymarketRankingParams, type PolymarketTradesItem, type PolymarketTradesParams, type PolymarketVolumesItem, type PolymarketVolumesParams, type PredictionMarketCategoryMetricsItem, type PredictionMarketCategoryMetricsParams, type ProjectDefiMetricsItem, type ProjectDefiMetricsParams, type ProjectDefiRankingItem, type ProjectDefiRankingParams, type ProjectDetailData, type ProjectDetailDataContracts, type ProjectDetailDataContractsContractsItem, type ProjectDetailDataFunding, type ProjectDetailDataFundingRoundsItem, type ProjectDetailDataFundingRoundsItemInvestorsItem, type ProjectDetailDataOverview, type ProjectDetailDataSocial, type ProjectDetailDataSocialDiscord, type ProjectDetailDataSocialGithub, type ProjectDetailDataSocialTelegram, type ProjectDetailDataSocialTwitter, type ProjectDetailDataTeam, type ProjectDetailDataTeamMembersItem, type ProjectDetailDataTeamMembersItemSocialLinks, type ProjectDetailDataTgeStatus, type ProjectDetailDataTokenInfo, type ProjectDetailDataTokenomics, type ProjectDetailParams, type ResponseMeta, type SearchAirdropItem, type SearchAirdropItemTaskSummary, type SearchAirdropItemTasksItem, type SearchAirdropParams, type SearchEventsItem, type SearchEventsParams, type SearchFundItem, type SearchFundItemTopProjectsItem, type SearchFundParams, type SearchKalshiItem, type SearchKalshiItemMarketsItem, type SearchKalshiParams, type SearchNewsItem, type SearchNewsItemHighlights, type SearchNewsParams, type SearchPolymarketItem, type SearchPolymarketItemMarketsItem, type SearchPolymarketItemMarketsItemSideA, type SearchPolymarketItemMarketsItemSideB, type SearchPolymarketParams, type SearchProjectItem, type SearchProjectItemTokensItem, type SearchProjectParams, type SearchSocialPeopleItem, type SearchSocialPeopleParams, type SearchSocialPostsItem, type SearchSocialPostsItemAuthor, type SearchSocialPostsItemMediaItem, type SearchSocialPostsItemStats, type SearchSocialPostsParams, type SearchWalletItem, type SearchWalletItemAddressesItem, type SearchWalletParams, type SearchWebItem, type SearchWebParams, type SocialDetailData, type SocialDetailDataFollowerGeo, type SocialDetailDataFollowerGeoLocationsItem, type SocialDetailDataSentiment, type SocialDetailDataSmartFollowers, type SocialDetailDataSmartFollowersFollowersItem, type SocialDetailParams, type SocialMindshareItem, type SocialMindshareParams, type SocialRankingItem, type SocialRankingItemProject, type SocialRankingItemToken, type SocialRankingItemTwitter, type SocialRankingParams, type SocialSmartFollowersHistoryItem, type SocialSmartFollowersHistoryParams, type SocialTweetRepliesItem, type SocialTweetRepliesItemAuthor, type SocialTweetRepliesItemMediaItem, type SocialTweetRepliesItemStats, type SocialTweetRepliesParams, type SocialTweetsItem, type SocialTweetsItemAuthor, type SocialTweetsItemMediaItem, type SocialTweetsItemStats, type SocialTweetsParams, type SocialUserData, type SocialUserFollowersItem, type SocialUserFollowersParams, type SocialUserFollowingItem, type SocialUserFollowingParams, type SocialUserParams, type SocialUserPostsItem, type SocialUserPostsItemAuthor, type SocialUserPostsItemMediaItem, type SocialUserPostsItemStats, type SocialUserPostsParams, type SocialUserRepliesItem, type SocialUserRepliesItemAuthor, type SocialUserRepliesItemMediaItem, type SocialUserRepliesItemStats, type SocialUserRepliesParams, type TokenDexTradesItem, type TokenDexTradesParams, type TokenHoldersItem, type TokenHoldersParams, type TokenTokenomicsItem, type TokenTokenomicsItemAllocationsItem, type TokenTokenomicsParams, type TokenTransfersItem, type TokenTransfersParams, type WalletDetailData, type WalletDetailDataActiveChainsItem, type WalletDetailDataApprovalsItem, type WalletDetailDataApprovalsItemSpendersItem, type WalletDetailDataErrorsItem, type WalletDetailDataEvmBalance, type WalletDetailDataEvmBalanceChainBalancesItem, type WalletDetailDataEvmTokensItem, type WalletDetailDataLabels, type WalletDetailDataLabelsLabelsItem, type WalletDetailDataNftItem, type WalletDetailDataSolBalance, type WalletDetailDataSolTokensItem, type WalletDetailParams, type WalletHistoryItem, type WalletHistoryParams, type WalletLabelsBatchItem, type WalletLabelsBatchItemLabelsItem, type WalletLabelsBatchParams, type WalletNetWorthItem, type WalletNetWorthParams, type WalletProtocolsItem, type WalletProtocolsItemPositionsItem, type WalletProtocolsItemPositionsItemBorrowTokensItem, type WalletProtocolsItemPositionsItemLpTokensItem, type WalletProtocolsItemPositionsItemRewardTokensItem, type WalletProtocolsItemPositionsItemSupplyTokensItem, type WalletProtocolsParams, type WalletTransfersItem, type WalletTransfersParams, type WebFetchData, type WebFetchParams, cn, toast, useExchangeDepth, useExchangeFundingHistory, useExchangeKlines, useExchangeLongShortRatio, useExchangeMarkets, useExchangePerp, useExchangePrice, useFundDetail, useInfiniteFundPortfolio, useInfiniteFundRanking, useInfiniteKalshiEvents, useInfiniteKalshiMarkets, useInfiniteKalshiRanking, useInfiniteKalshiTrades, useInfiniteMarketRanking, useInfiniteNewsFeed, useInfiniteOnchainBridgeRanking, useInfiniteOnchainYieldRanking, useInfinitePolymarketActivity, useInfinitePolymarketEvents, useInfinitePolymarketMarkets, useInfinitePolymarketPositions, useInfinitePolymarketRanking, useInfinitePolymarketTrades, useInfinitePredictionMarketCategoryMetrics, useInfiniteProjectDefiMetrics, useInfiniteProjectDefiRanking, useInfiniteSearchAirdrop, useInfiniteSearchEvents, useInfiniteSearchFund, useInfiniteSearchKalshi, useInfiniteSearchPolymarket, useInfiniteSearchProject, useInfiniteSearchSocialPeople, useInfiniteSearchSocialPosts, useInfiniteSearchWallet, useInfiniteSearchWeb, useInfiniteSocialRanking, useInfiniteSocialTweetReplies, useInfiniteSocialUserFollowers, useInfiniteSocialUserFollowing, useInfiniteSocialUserPosts, useInfiniteSocialUserReplies, useInfiniteTokenDexTrades, useInfiniteTokenHolders, useInfiniteTokenTransfers, useInfiniteWalletHistory, useInfiniteWalletProtocols, useInfiniteWalletTransfers, useKalshiOpenInterest, useKalshiPrices, useKalshiVolumes, useMarketEtf, useMarketFearGreed, useMarketFutures, useMarketLiquidationChart, useMarketLiquidationExchangeList, useMarketLiquidationOrder, useMarketOnchainIndicator, useMarketOptions, useMarketPrice, useMarketPriceIndicator, useNewsDetail, useOnchainGasPrice, useOnchainSchema, useOnchainSql, useOnchainStructuredQuery, useOnchainTx, usePolymarketOpenInterest, usePolymarketPrices, usePolymarketVolumes, useProjectDetail, useSearchNews, useSocialDetail, useSocialMindshare, useSocialSmartFollowersHistory, useSocialTweets, useSocialUser, useToast, useTokenTokenomics, useWalletDetail, useWalletLabelsBatch, useWalletNetWorth, useWebFetch };