robinhood-chain-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.
- package/LICENSE +21 -0
- package/README.md +248 -0
- package/dist/index.d.ts +800 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +332 -0
- package/dist/index.js.map +1 -0
- package/dist/stream.d.ts +72 -0
- package/dist/stream.d.ts.map +1 -0
- package/dist/stream.js +225 -0
- package/dist/stream.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +4 -0
- package/dist/version.js.map +1 -0
- package/llms.txt +71 -0
- package/package.json +74 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,800 @@
|
|
|
1
|
+
import { RobinhoodStream } from "./stream.js";
|
|
2
|
+
import type { StreamClientOptions } from "./stream.js";
|
|
3
|
+
export { RobinhoodStream } from "./stream.js";
|
|
4
|
+
export type { StreamClientOptions, StreamChannel, StreamEventName, StreamEvent, StreamLifecycleEvent, StreamTokenLike, } from "./stream.js";
|
|
5
|
+
/** Robinhood Chain — Arbitrum Orbit L2, chain id 4663. */
|
|
6
|
+
export declare const CHAIN_ID = 4663;
|
|
7
|
+
/** Thrown for any non-2xx API response (and exhausted network retries). */
|
|
8
|
+
export declare class RobinhoodError extends Error {
|
|
9
|
+
readonly status: number;
|
|
10
|
+
readonly body: unknown;
|
|
11
|
+
/** The API request id (`_rid`), when the error body carried one. Include it when reporting issues. */
|
|
12
|
+
readonly requestId: string | null;
|
|
13
|
+
constructor(message: string, status: number, body: unknown);
|
|
14
|
+
}
|
|
15
|
+
/** All Robinhood Chain responses echo `chain: "robinhood"`. */
|
|
16
|
+
export type Chain = "robinhood";
|
|
17
|
+
export type TradeAction = "buy" | "sell";
|
|
18
|
+
/** Deployer reputation tier on Robinhood Chain. */
|
|
19
|
+
export type DeployerTier = "elite" | "good" | "neutral" | "spammer";
|
|
20
|
+
/** Uniswap DEX version on Robinhood Chain. */
|
|
21
|
+
export type UniswapVersion = "uniswap-v2" | "uniswap-v3" | "uniswap-v4";
|
|
22
|
+
export interface RhcKolFeedParams {
|
|
23
|
+
/** Number of trades to return (1–100). Default: 50. */
|
|
24
|
+
limit?: number;
|
|
25
|
+
/** Cursor — return trades strictly older than this ISO 8601 timestamp. Pass `next_before` from the previous response. */
|
|
26
|
+
before?: string;
|
|
27
|
+
/** Filter by trade direction. */
|
|
28
|
+
action?: TradeAction;
|
|
29
|
+
/** Filter to a single KOL by their EVM wallet address (0x, 40 hex). */
|
|
30
|
+
kol?: string;
|
|
31
|
+
/** Minimum trade size in ETH. */
|
|
32
|
+
min_eth?: number;
|
|
33
|
+
}
|
|
34
|
+
/** One KOL trade row from `/rhc/kol/feed`. */
|
|
35
|
+
export interface RhcKolFeedTrade {
|
|
36
|
+
/** The KOL's Robinhood-Chain wallet (0x). */
|
|
37
|
+
evm_address: string;
|
|
38
|
+
kol_name: string | null;
|
|
39
|
+
kol_twitter: string | null;
|
|
40
|
+
token_address: string;
|
|
41
|
+
token_symbol: string | null;
|
|
42
|
+
token_name: string | null;
|
|
43
|
+
/** pons | flap | clanker | hood.fun | virtuals | null. */
|
|
44
|
+
launchpad: string | null;
|
|
45
|
+
is_graduated: boolean | null;
|
|
46
|
+
/** Reputation tier of the token's deployer. */
|
|
47
|
+
deployer_tier: DeployerTier | null;
|
|
48
|
+
/** Token age at request time (first-seen → now), minutes. */
|
|
49
|
+
token_age_minutes: number | null;
|
|
50
|
+
action: TradeAction;
|
|
51
|
+
/** Trade size in ETH. */
|
|
52
|
+
eth_amount: number | null;
|
|
53
|
+
token_amount: number | null;
|
|
54
|
+
price_usd_at_trade: number | null;
|
|
55
|
+
/** Token market cap when the KOL traded. */
|
|
56
|
+
market_cap_usd_at_trade: number | null;
|
|
57
|
+
/** Token market cap now. */
|
|
58
|
+
current_mc_usd: number | null;
|
|
59
|
+
/** All-time-high market cap observed since ingestion. */
|
|
60
|
+
peak_mc_usd: number | null;
|
|
61
|
+
liquidity_usd: number | null;
|
|
62
|
+
/** current_mc_usd ÷ market_cap_usd_at_trade — how far the token ran after the KOL's trade. */
|
|
63
|
+
mc_multiple_since_trade: number | null;
|
|
64
|
+
/** uniswap-v2/v3/v4 or the launchpad name for curve trades. */
|
|
65
|
+
dex: string;
|
|
66
|
+
pool: string | null;
|
|
67
|
+
tx_hash: string;
|
|
68
|
+
block_number: number;
|
|
69
|
+
traded_at: string;
|
|
70
|
+
}
|
|
71
|
+
export interface RhcKolFeedResponse {
|
|
72
|
+
chain: Chain;
|
|
73
|
+
trades: RhcKolFeedTrade[];
|
|
74
|
+
count: number;
|
|
75
|
+
/** Age of the newest row, seconds. */
|
|
76
|
+
data_age_seconds: number | null;
|
|
77
|
+
/** Cursor for the next page — pass as `before` to fetch older trades. */
|
|
78
|
+
next_before: string | null;
|
|
79
|
+
_rid?: string;
|
|
80
|
+
}
|
|
81
|
+
export type RhcKolPeriod = "24h" | "7d" | "30d";
|
|
82
|
+
export interface RhcKolLeaderboardParams {
|
|
83
|
+
/** Rolling window. Default: "24h". */
|
|
84
|
+
period?: RhcKolPeriod;
|
|
85
|
+
/** Max results (1–100). Default: 50. */
|
|
86
|
+
limit?: number;
|
|
87
|
+
}
|
|
88
|
+
export interface RhcKolLeaderboardRow {
|
|
89
|
+
kol_name: string | null;
|
|
90
|
+
kol_twitter: string | null;
|
|
91
|
+
trades: number;
|
|
92
|
+
buys: number;
|
|
93
|
+
sells: number;
|
|
94
|
+
/** Total ETH bought in the window. */
|
|
95
|
+
buy_eth: number;
|
|
96
|
+
/** Total ETH sold in the window. */
|
|
97
|
+
sell_eth: number;
|
|
98
|
+
/** buy_eth − sell_eth (flow, not realized PnL). */
|
|
99
|
+
net_eth: number;
|
|
100
|
+
/** Distinct tokens traded in the window. */
|
|
101
|
+
tokens_traded: number;
|
|
102
|
+
last_trade_at: string;
|
|
103
|
+
}
|
|
104
|
+
export interface RhcKolLeaderboardResponse {
|
|
105
|
+
chain: Chain;
|
|
106
|
+
period: RhcKolPeriod;
|
|
107
|
+
leaderboard: RhcKolLeaderboardRow[];
|
|
108
|
+
count: number;
|
|
109
|
+
_rid?: string;
|
|
110
|
+
}
|
|
111
|
+
export type RhcHotTokensWindow = "5m" | "15m" | "1h" | "6h" | "24h";
|
|
112
|
+
export interface RhcHotTokensParams {
|
|
113
|
+
/** Rolling consensus window. Default: "1h". */
|
|
114
|
+
window?: RhcHotTokensWindow;
|
|
115
|
+
}
|
|
116
|
+
export interface RhcHotToken {
|
|
117
|
+
token_address: string;
|
|
118
|
+
token_symbol: string | null;
|
|
119
|
+
token_name: string | null;
|
|
120
|
+
/** noxa | flap | pons | hood.fun | clanker | null. */
|
|
121
|
+
launchpad: string | null;
|
|
122
|
+
is_graduated: boolean | null;
|
|
123
|
+
/** elite | good | neutral | spammer | null. */
|
|
124
|
+
deployer_tier: DeployerTier | null;
|
|
125
|
+
/** Distinct KOL buyers in the window (>= 2). */
|
|
126
|
+
kols_buying: number;
|
|
127
|
+
buys: number;
|
|
128
|
+
sells: number;
|
|
129
|
+
buy_eth: number;
|
|
130
|
+
/** buy_eth − sell_eth. */
|
|
131
|
+
net_eth: number;
|
|
132
|
+
/** Current market cap. */
|
|
133
|
+
market_cap_usd: number | null;
|
|
134
|
+
last_trade_at: string;
|
|
135
|
+
}
|
|
136
|
+
export interface RhcHotTokensResponse {
|
|
137
|
+
chain: Chain;
|
|
138
|
+
window: RhcHotTokensWindow;
|
|
139
|
+
tokens: RhcHotToken[];
|
|
140
|
+
count: number;
|
|
141
|
+
_rid?: string;
|
|
142
|
+
}
|
|
143
|
+
export interface RhcKolProfileStats {
|
|
144
|
+
trades: number;
|
|
145
|
+
buys: number;
|
|
146
|
+
sells: number;
|
|
147
|
+
buy_eth: number;
|
|
148
|
+
sell_eth: number;
|
|
149
|
+
net_eth: number;
|
|
150
|
+
tokens_traded: number;
|
|
151
|
+
/** e.g. "last 200 trades". */
|
|
152
|
+
window: string;
|
|
153
|
+
}
|
|
154
|
+
/** A trade in a KOL profile's recent-trades list. Loosely shaped by the API. */
|
|
155
|
+
export interface RhcKolProfileTrade {
|
|
156
|
+
token_address?: string;
|
|
157
|
+
token_symbol?: string | null;
|
|
158
|
+
token_name?: string | null;
|
|
159
|
+
action?: TradeAction;
|
|
160
|
+
eth_amount?: number | null;
|
|
161
|
+
token_amount?: number | null;
|
|
162
|
+
price_usd_at_trade?: number | null;
|
|
163
|
+
market_cap_usd_at_trade?: number | null;
|
|
164
|
+
dex?: string;
|
|
165
|
+
tx_hash?: string;
|
|
166
|
+
traded_at?: string;
|
|
167
|
+
[key: string]: unknown;
|
|
168
|
+
}
|
|
169
|
+
export interface RhcKolProfileResponse {
|
|
170
|
+
chain: Chain;
|
|
171
|
+
evm_address: string;
|
|
172
|
+
kol_name: string | null;
|
|
173
|
+
kol_twitter: string | null;
|
|
174
|
+
stats: RhcKolProfileStats;
|
|
175
|
+
/** 50 most recent trades. */
|
|
176
|
+
trades: RhcKolProfileTrade[];
|
|
177
|
+
_rid?: string;
|
|
178
|
+
}
|
|
179
|
+
export interface RhcTradesParams {
|
|
180
|
+
/** Number of trades to return (1–100). Default: 50. */
|
|
181
|
+
limit?: number;
|
|
182
|
+
/** Filter to one token address (0x, 40 hex). */
|
|
183
|
+
token?: string;
|
|
184
|
+
/** Filter by DEX version. */
|
|
185
|
+
dex?: UniswapVersion;
|
|
186
|
+
/** Filter by direction. */
|
|
187
|
+
action?: TradeAction;
|
|
188
|
+
/** Minimum trade size in ETH. */
|
|
189
|
+
min_eth?: number;
|
|
190
|
+
/** Cursor: trades strictly older than this block_time (ISO 8601). Pass `next_before`. */
|
|
191
|
+
before?: string;
|
|
192
|
+
}
|
|
193
|
+
/** One raw DEX swap from `/rhc/trades`. */
|
|
194
|
+
export interface RhcTrade {
|
|
195
|
+
block_number: number;
|
|
196
|
+
block_time: string;
|
|
197
|
+
tx_hash: string;
|
|
198
|
+
log_index: number;
|
|
199
|
+
dex: string;
|
|
200
|
+
pool: string;
|
|
201
|
+
/** Swap-log recipient — the ROUTER for aggregated swaps. Use trader_eoa for wallet analytics. */
|
|
202
|
+
trader: string | null;
|
|
203
|
+
/** Authoritative trader wallet (tx.from). */
|
|
204
|
+
trader_eoa: string | null;
|
|
205
|
+
/** Router/aggregator contract (tx.to). */
|
|
206
|
+
router: string | null;
|
|
207
|
+
token_address: string | null;
|
|
208
|
+
action: TradeAction | null;
|
|
209
|
+
eth_amount: number | null;
|
|
210
|
+
price_native: number | null;
|
|
211
|
+
price_usd: number | null;
|
|
212
|
+
mc_usd_at_trade: number | null;
|
|
213
|
+
/** Effective gas price, gwei. */
|
|
214
|
+
gas_price: number | null;
|
|
215
|
+
/** Transaction position within the block (ordering / sandwich detection). */
|
|
216
|
+
tx_index: number | null;
|
|
217
|
+
/** 4-byte calldata selector. */
|
|
218
|
+
method_selector: string | null;
|
|
219
|
+
/** v3/v4 in-range liquidity at the trade. */
|
|
220
|
+
liquidity: number | null;
|
|
221
|
+
launchpad: string | null;
|
|
222
|
+
/** True if trader_eoa is a tracked KOL wallet. */
|
|
223
|
+
is_kol: boolean;
|
|
224
|
+
kol_name: string | null;
|
|
225
|
+
/** Set if trader_eoa is a known deployer. */
|
|
226
|
+
deployer_tier: DeployerTier | null;
|
|
227
|
+
}
|
|
228
|
+
export interface RhcTradesResponse {
|
|
229
|
+
chain: Chain;
|
|
230
|
+
trades: RhcTrade[];
|
|
231
|
+
count: number;
|
|
232
|
+
/** Pagination cursor (last row's block_time). */
|
|
233
|
+
next_before: string | null;
|
|
234
|
+
_rid?: string;
|
|
235
|
+
}
|
|
236
|
+
export type RhcTokensSort = "last_trade" | "market_cap" | "liquidity" | "peak_mc";
|
|
237
|
+
export interface RhcTokensListParams {
|
|
238
|
+
/** Number of tokens to return (1–100). Default: 50. */
|
|
239
|
+
limit?: number;
|
|
240
|
+
/** Ordering (all descending): most recent trade, market cap, current liquidity, or all-time-high MC. Default: "last_trade". */
|
|
241
|
+
sort?: RhcTokensSort;
|
|
242
|
+
/** Minimum current market cap (USD). */
|
|
243
|
+
min_mc_usd?: number;
|
|
244
|
+
/** Minimum current liquidity (USD). */
|
|
245
|
+
min_liquidity_usd?: number;
|
|
246
|
+
/** Filter by launchpad: pons, flap, clanker, hood.fun, noxa, virtuals. */
|
|
247
|
+
launchpad?: string;
|
|
248
|
+
}
|
|
249
|
+
export interface RhcTokenListItem {
|
|
250
|
+
token_address: string;
|
|
251
|
+
symbol: string | null;
|
|
252
|
+
name: string | null;
|
|
253
|
+
launchpad: string | null;
|
|
254
|
+
is_graduated: boolean | null;
|
|
255
|
+
deployer_address: string | null;
|
|
256
|
+
deployer_tier: DeployerTier | null;
|
|
257
|
+
price_usd: number | null;
|
|
258
|
+
market_cap_usd: number | null;
|
|
259
|
+
fdv_usd: number | null;
|
|
260
|
+
peak_mc_usd: number | null;
|
|
261
|
+
peak_mc_at: string | null;
|
|
262
|
+
/** Percent below all-time-high MC. */
|
|
263
|
+
drawdown_from_peak_pct: number | null;
|
|
264
|
+
liquidity_usd: number | null;
|
|
265
|
+
primary_dex: string | null;
|
|
266
|
+
primary_pool: string | null;
|
|
267
|
+
last_trade_time: string | null;
|
|
268
|
+
}
|
|
269
|
+
export interface RhcTokensListResponse {
|
|
270
|
+
chain: Chain;
|
|
271
|
+
tokens: RhcTokenListItem[];
|
|
272
|
+
count: number;
|
|
273
|
+
sort: string;
|
|
274
|
+
_rid?: string;
|
|
275
|
+
}
|
|
276
|
+
export interface RhcTokenDeployer {
|
|
277
|
+
address: string;
|
|
278
|
+
tier: DeployerTier;
|
|
279
|
+
tokens_deployed: number;
|
|
280
|
+
graduation_rate: number | null;
|
|
281
|
+
runner_rate: number | null;
|
|
282
|
+
runners: number;
|
|
283
|
+
best_peak_mc_usd: number | null;
|
|
284
|
+
launchpads: string[];
|
|
285
|
+
}
|
|
286
|
+
export interface RhcTokenKolActivity {
|
|
287
|
+
distinct_kols: number;
|
|
288
|
+
names: string[];
|
|
289
|
+
buys: number;
|
|
290
|
+
sells: number;
|
|
291
|
+
net_eth: number;
|
|
292
|
+
}
|
|
293
|
+
export interface RhcTokenSnapshot {
|
|
294
|
+
chain: Chain;
|
|
295
|
+
token_address: string;
|
|
296
|
+
symbol: string | null;
|
|
297
|
+
name: string | null;
|
|
298
|
+
decimals: number | null;
|
|
299
|
+
launchpad: string | null;
|
|
300
|
+
is_graduated: boolean | null;
|
|
301
|
+
graduated_pool: string | null;
|
|
302
|
+
graduated_at: string | null;
|
|
303
|
+
deployer_address: string | null;
|
|
304
|
+
first_seen_at: string | null;
|
|
305
|
+
token_age_minutes: number | null;
|
|
306
|
+
price_usd: number | null;
|
|
307
|
+
price_native: number | null;
|
|
308
|
+
market_cap_usd: number | null;
|
|
309
|
+
fdv_usd: number | null;
|
|
310
|
+
peak_mc_usd: number | null;
|
|
311
|
+
peak_mc_at: string | null;
|
|
312
|
+
drawdown_from_peak_pct: number | null;
|
|
313
|
+
total_supply_raw: string | null;
|
|
314
|
+
liquidity_usd: number | null;
|
|
315
|
+
primary_dex: string | null;
|
|
316
|
+
primary_pool: string | null;
|
|
317
|
+
last_trade_time: string | null;
|
|
318
|
+
/** Deployer reputation. */
|
|
319
|
+
deployer: RhcTokenDeployer | null;
|
|
320
|
+
/** Up to 10 other tokens by the same deployer (symbol or address). */
|
|
321
|
+
deployer_other_tokens: string[];
|
|
322
|
+
kol_activity: RhcTokenKolActivity;
|
|
323
|
+
/** Up to 20 pools with reserves/liquidity/sqrt_price. */
|
|
324
|
+
pools: Array<Record<string, unknown>>;
|
|
325
|
+
_rid?: string;
|
|
326
|
+
}
|
|
327
|
+
export interface RhcCandlesParams {
|
|
328
|
+
/** Number of candles (most recent first, returned chronological). 1–1000. Default: 240. */
|
|
329
|
+
limit?: number;
|
|
330
|
+
/** Lower bound on bucket_start (ISO 8601). */
|
|
331
|
+
from?: string;
|
|
332
|
+
/** Upper bound on bucket_start (ISO 8601). */
|
|
333
|
+
to?: string;
|
|
334
|
+
}
|
|
335
|
+
export interface RhcCandle {
|
|
336
|
+
bucket_start: string;
|
|
337
|
+
open_price_usd: number;
|
|
338
|
+
high_price_usd: number;
|
|
339
|
+
low_price_usd: number;
|
|
340
|
+
close_price_usd: number;
|
|
341
|
+
open_mc_usd: number | null;
|
|
342
|
+
high_mc_usd: number | null;
|
|
343
|
+
low_mc_usd: number | null;
|
|
344
|
+
close_mc_usd: number | null;
|
|
345
|
+
close_liquidity_usd: number | null;
|
|
346
|
+
close_supply: number | null;
|
|
347
|
+
volume_usd: number;
|
|
348
|
+
volume_buy_usd: number | null;
|
|
349
|
+
volume_sell_usd: number | null;
|
|
350
|
+
trades: number;
|
|
351
|
+
buy_count: number | null;
|
|
352
|
+
sell_count: number | null;
|
|
353
|
+
dex: string | null;
|
|
354
|
+
pool_address: string | null;
|
|
355
|
+
}
|
|
356
|
+
export interface RhcCandlesResponse {
|
|
357
|
+
chain: Chain;
|
|
358
|
+
token_address: string;
|
|
359
|
+
/** e.g. "1m". */
|
|
360
|
+
timeframe: string;
|
|
361
|
+
/** Candles ordered oldest → newest. */
|
|
362
|
+
candles: RhcCandle[];
|
|
363
|
+
count: number;
|
|
364
|
+
_rid?: string;
|
|
365
|
+
}
|
|
366
|
+
export interface RhcKolConsensus {
|
|
367
|
+
total_kol_buyers: number;
|
|
368
|
+
total_kol_sellers: number;
|
|
369
|
+
/** Fraction of KOL buyers who also sold (0–1). */
|
|
370
|
+
kol_exit_rate: number;
|
|
371
|
+
net_flow_eth: number;
|
|
372
|
+
total_buy_eth: number;
|
|
373
|
+
total_sell_eth: number;
|
|
374
|
+
first_kol_buy_at: string | null;
|
|
375
|
+
last_kol_buy_at: string | null;
|
|
376
|
+
first_touch_wallet: string | null;
|
|
377
|
+
first_touch_at: string | null;
|
|
378
|
+
/** Median MC at KOL buy — over buys that carried an MC-at-trade. Null under the pricer's liquidity gate. */
|
|
379
|
+
median_entry_mc_usd: number | null;
|
|
380
|
+
/** Number of buys with a market_cap_usd_at_trade — the median's sample size. */
|
|
381
|
+
entry_mc_samples: number;
|
|
382
|
+
total_trades: number;
|
|
383
|
+
/** ULTRA only — distinct KOL buyer wallets. */
|
|
384
|
+
buyers?: string[];
|
|
385
|
+
/** ULTRA only — KOL wallets that bought and sold. */
|
|
386
|
+
exited?: string[];
|
|
387
|
+
}
|
|
388
|
+
export interface RhcKolConsensusResponse {
|
|
389
|
+
chain: Chain;
|
|
390
|
+
token_address: string;
|
|
391
|
+
current_mc_usd: number | null;
|
|
392
|
+
current_price_usd: number | null;
|
|
393
|
+
/** Null when no tracked KOL has traded the token. */
|
|
394
|
+
consensus: RhcKolConsensus | null;
|
|
395
|
+
_rid?: string;
|
|
396
|
+
}
|
|
397
|
+
export type QualityConfidence = "low" | "medium" | "high";
|
|
398
|
+
export type QualitySignal = "positive" | "neutral" | "negative";
|
|
399
|
+
export interface RhcBuyerQualityBreakdown {
|
|
400
|
+
early_buyers_analyzed: number;
|
|
401
|
+
alpha_wallet_count: number;
|
|
402
|
+
kol_count: number;
|
|
403
|
+
/** Early buyers flagged as part of a same-block launch bundle. */
|
|
404
|
+
bundle_buyer_count: number;
|
|
405
|
+
/** Early buyers on the rolling dump-cluster list (informational — does not move the score). */
|
|
406
|
+
dump_cluster_count: number;
|
|
407
|
+
/** Early buyers with ≥5 recent early-buyer appearances of any kind (dump_cluster_count is a subset). */
|
|
408
|
+
recycled_early_buyer_count: number;
|
|
409
|
+
/** Percent (0–100), non-bot buyers with ≥3 tokens of history. */
|
|
410
|
+
avg_historical_win_rate: number | null;
|
|
411
|
+
bot_dominated: boolean;
|
|
412
|
+
}
|
|
413
|
+
export interface RhcBuyerQuality {
|
|
414
|
+
score: number;
|
|
415
|
+
confidence: QualityConfidence;
|
|
416
|
+
signal: QualitySignal;
|
|
417
|
+
breakdown: RhcBuyerQualityBreakdown;
|
|
418
|
+
}
|
|
419
|
+
export interface RhcBuyerQualityCoverage {
|
|
420
|
+
bundle_detection: "available";
|
|
421
|
+
dump_cluster_signal: "available";
|
|
422
|
+
note?: string;
|
|
423
|
+
}
|
|
424
|
+
export interface RhcBuyerQualityResponse {
|
|
425
|
+
chain: Chain;
|
|
426
|
+
token_address: string;
|
|
427
|
+
current_mc_usd: number | null;
|
|
428
|
+
quality: RhcBuyerQuality;
|
|
429
|
+
coverage?: RhcBuyerQualityCoverage;
|
|
430
|
+
/** Present only when buyer data is insufficient. */
|
|
431
|
+
note?: string;
|
|
432
|
+
_rid?: string;
|
|
433
|
+
}
|
|
434
|
+
/** Robinhood Chain is an Arbitrum Orbit L2 with no atomic multi-signer tx — so no `atomic_tx` kind. */
|
|
435
|
+
export type RhcBundleKind = "same_block" | "none";
|
|
436
|
+
export interface RhcBundleSummary {
|
|
437
|
+
/** Bundle-cohort size (0 when none). */
|
|
438
|
+
wallet_count: number;
|
|
439
|
+
bundle_kind: RhcBundleKind;
|
|
440
|
+
/** Net tokens still held ÷ tokens bought, [0,1]. The primary signal. */
|
|
441
|
+
held_ratio: number | null;
|
|
442
|
+
/** Net tokens held ÷ total supply, [0,1]; null when supply is unknown. */
|
|
443
|
+
held_pct_of_supply: number | null;
|
|
444
|
+
/** True when the cohort holds ≤0.5% of what it bought. */
|
|
445
|
+
fully_exited: boolean;
|
|
446
|
+
/** Cohort cumulative buy-side token volume (human-scaled). */
|
|
447
|
+
buy_volume: number;
|
|
448
|
+
/** Cohort net position (Σbuys − Σsells, human-scaled). */
|
|
449
|
+
tokens_held: number;
|
|
450
|
+
}
|
|
451
|
+
export interface RhcBundleWallet {
|
|
452
|
+
/** Early-buyer rank (1 = first buyer). */
|
|
453
|
+
rank: number;
|
|
454
|
+
/** Buyer wallet (lowercase 0x). */
|
|
455
|
+
wallet: string;
|
|
456
|
+
held_ratio: number | null;
|
|
457
|
+
has_sold: boolean;
|
|
458
|
+
/** Wallet is a tracked RHC KOL. */
|
|
459
|
+
is_kol: boolean;
|
|
460
|
+
/** ULTRA only — historical win-rate [0,1]. */
|
|
461
|
+
win_rate?: number | null;
|
|
462
|
+
/** ULTRA only — bot heuristic from mv_rhc_alpha_wallets. */
|
|
463
|
+
likely_bot?: boolean;
|
|
464
|
+
/** ULTRA only — net position, human-scaled. */
|
|
465
|
+
tokens_held?: number;
|
|
466
|
+
}
|
|
467
|
+
export interface RhcBundleResponse {
|
|
468
|
+
chain: Chain;
|
|
469
|
+
token_address: string;
|
|
470
|
+
bundle: RhcBundleSummary;
|
|
471
|
+
/** Empty for BASIC; top-10 for PRO; full cohort for ULTRA. */
|
|
472
|
+
wallets: RhcBundleWallet[];
|
|
473
|
+
_rid?: string;
|
|
474
|
+
}
|
|
475
|
+
export type RhcDeployerSort = "graduation_rate" | "runner_rate" | "tokens_deployed" | "best_peak_mc_usd" | "last_deploy_at";
|
|
476
|
+
export interface RhcDeployerLeaderboardParams {
|
|
477
|
+
/** Ordering (all descending, NULLs last). Default: "graduation_rate". */
|
|
478
|
+
sort?: RhcDeployerSort;
|
|
479
|
+
/** Filter to one reputation tier. */
|
|
480
|
+
tier?: DeployerTier;
|
|
481
|
+
/** Minimum tokens deployed (1–100000). Default: 3. */
|
|
482
|
+
min_tokens?: number;
|
|
483
|
+
/** Max results (1–50). Default: 20. */
|
|
484
|
+
limit?: number;
|
|
485
|
+
/** Page offset (0–10000). Default: 0. */
|
|
486
|
+
offset?: number;
|
|
487
|
+
}
|
|
488
|
+
export interface RhcDeployerLeaderboardRow {
|
|
489
|
+
/** Deployer wallet (lowercase 0x). */
|
|
490
|
+
deployer_address: string;
|
|
491
|
+
tokens_deployed: number;
|
|
492
|
+
/** Tokens that reached a $40K+ peak MC (the graduation milestone). */
|
|
493
|
+
graduated: number;
|
|
494
|
+
/** graduated ÷ tokens_deployed. */
|
|
495
|
+
graduation_rate: number;
|
|
496
|
+
/** Tokens that peaked ≥ $100K MC. */
|
|
497
|
+
runners: number;
|
|
498
|
+
/** runners ÷ tokens_deployed. */
|
|
499
|
+
runner_rate: number;
|
|
500
|
+
/** All-time-high MC across all their tokens. */
|
|
501
|
+
best_peak_mc_usd: number | null;
|
|
502
|
+
launchpads: string[];
|
|
503
|
+
first_deploy_at: string | null;
|
|
504
|
+
last_deploy_at: string | null;
|
|
505
|
+
tier: DeployerTier;
|
|
506
|
+
}
|
|
507
|
+
export interface RhcDeployerLeaderboardResponse {
|
|
508
|
+
chain: Chain;
|
|
509
|
+
deployers: RhcDeployerLeaderboardRow[];
|
|
510
|
+
/** Filtered deployer count. */
|
|
511
|
+
total: number;
|
|
512
|
+
limit: number;
|
|
513
|
+
offset: number;
|
|
514
|
+
has_more: boolean;
|
|
515
|
+
_rid?: string;
|
|
516
|
+
}
|
|
517
|
+
export interface RhcDeployerReputation {
|
|
518
|
+
deployer_address: string;
|
|
519
|
+
tokens_deployed: number;
|
|
520
|
+
curve_tokens: number;
|
|
521
|
+
graduated: number;
|
|
522
|
+
bonding_rate: number | null;
|
|
523
|
+
runners: number;
|
|
524
|
+
runner_rate: number;
|
|
525
|
+
best_peak_mc_usd: number | null;
|
|
526
|
+
launchpads: string[];
|
|
527
|
+
first_deploy_at: string | null;
|
|
528
|
+
last_deploy_at: string | null;
|
|
529
|
+
tier: DeployerTier;
|
|
530
|
+
}
|
|
531
|
+
export interface RhcDeployerToken {
|
|
532
|
+
address: string;
|
|
533
|
+
symbol: string | null;
|
|
534
|
+
name: string | null;
|
|
535
|
+
launchpad: string | null;
|
|
536
|
+
is_graduated: boolean | null;
|
|
537
|
+
graduated_at: string | null;
|
|
538
|
+
graduated_pool: string | null;
|
|
539
|
+
first_seen_at: string | null;
|
|
540
|
+
/** Live market cap. */
|
|
541
|
+
market_cap_usd: number | null;
|
|
542
|
+
/** All-time-high MC observed since ingestion. */
|
|
543
|
+
peak_mc_usd: number | null;
|
|
544
|
+
peak_mc_at: string | null;
|
|
545
|
+
}
|
|
546
|
+
export interface RhcDeployerProfileResponse {
|
|
547
|
+
chain: Chain;
|
|
548
|
+
/** False if this wallet has never deployed a tracked token (deployer is then null). */
|
|
549
|
+
is_deployer: boolean;
|
|
550
|
+
address: string;
|
|
551
|
+
deployer: RhcDeployerReputation | null;
|
|
552
|
+
/** Up to 50 most recent tokens by this deployer. */
|
|
553
|
+
recent_tokens: RhcDeployerToken[];
|
|
554
|
+
/** Rows returned (capped at 50) — the true total is deployer.tokens_deployed. */
|
|
555
|
+
recent_tokens_count: number;
|
|
556
|
+
_rid?: string;
|
|
557
|
+
}
|
|
558
|
+
export type AlphaClassificationFilter = "all" | "human" | "bot" | "smart_money";
|
|
559
|
+
export type AlphaIdentityFilter = "all" | "known_kol" | "unknown";
|
|
560
|
+
export type AlphaWalletClassification = "bot" | "smart_money" | "trader";
|
|
561
|
+
export type AlphaSort = "net_eth" | "win_rate" | "trades" | "tokens" | "buy_eth" | "memecoin_share" | "last_trade_at";
|
|
562
|
+
export type SortOrder = "desc" | "asc";
|
|
563
|
+
export interface RhcAlphaWalletsParams {
|
|
564
|
+
/** human = not likely_bot; smart_money = human + net_eth ≥ 2 + win_rate ≥ 0.45. Default: "all". */
|
|
565
|
+
classification?: AlphaClassificationFilter;
|
|
566
|
+
/** known_kol = already mapped to a tracked Solana KOL; unknown = net-new RHC smart money. Default: "all". */
|
|
567
|
+
identity?: AlphaIdentityFilter;
|
|
568
|
+
/** Minimum share of trades in launchpad memecoins (0–1). 0.7 ≈ mostly-memecoin traders. */
|
|
569
|
+
min_memecoin_share?: number;
|
|
570
|
+
/** Maximum average market cap traded — filter to low-cap degens. */
|
|
571
|
+
max_avg_mc_usd?: number;
|
|
572
|
+
min_net_eth?: number;
|
|
573
|
+
min_win_rate?: number;
|
|
574
|
+
max_win_rate?: number;
|
|
575
|
+
min_trades?: number;
|
|
576
|
+
min_tokens?: number;
|
|
577
|
+
/** Minimum ETH deployed (whale/size filter). */
|
|
578
|
+
min_buy_eth?: number;
|
|
579
|
+
/** Only wallets that traded within the last N hours (1–720). */
|
|
580
|
+
active_hours?: number;
|
|
581
|
+
/** Sort field. Default: "net_eth". */
|
|
582
|
+
sort?: AlphaSort;
|
|
583
|
+
/** Sort direction. Default: "desc". */
|
|
584
|
+
order?: SortOrder;
|
|
585
|
+
/** Max results (1–100). Default: 25. */
|
|
586
|
+
limit?: number;
|
|
587
|
+
/** Page offset (0–10000). Default: 0. */
|
|
588
|
+
offset?: number;
|
|
589
|
+
}
|
|
590
|
+
export interface RhcAlphaWallet {
|
|
591
|
+
/** Trader EOA (lowercase 0x). */
|
|
592
|
+
wallet: string;
|
|
593
|
+
classification: AlphaWalletClassification;
|
|
594
|
+
is_known_kol: boolean;
|
|
595
|
+
trades: number;
|
|
596
|
+
tokens: number;
|
|
597
|
+
buy_eth: number;
|
|
598
|
+
sell_eth: number;
|
|
599
|
+
/** Realized net flow (sell − buy). */
|
|
600
|
+
net_eth: number;
|
|
601
|
+
win_rate: number | null;
|
|
602
|
+
/** Share of trades in launchpad memecoins (vs tokenized stocks/stables). */
|
|
603
|
+
memecoin_share: number | null;
|
|
604
|
+
avg_trade_mc_usd: number | null;
|
|
605
|
+
last_trade_at: string | null;
|
|
606
|
+
}
|
|
607
|
+
export interface RhcAlphaWalletsResponse {
|
|
608
|
+
chain: Chain;
|
|
609
|
+
wallets: RhcAlphaWallet[];
|
|
610
|
+
total: number;
|
|
611
|
+
limit: number;
|
|
612
|
+
offset: number;
|
|
613
|
+
has_more: boolean;
|
|
614
|
+
_rid?: string;
|
|
615
|
+
}
|
|
616
|
+
export interface StreamToken {
|
|
617
|
+
token: string;
|
|
618
|
+
ws_url: string;
|
|
619
|
+
expires_at?: string;
|
|
620
|
+
[key: string]: unknown;
|
|
621
|
+
}
|
|
622
|
+
export interface RobinhoodConfig {
|
|
623
|
+
/**
|
|
624
|
+
* MadeOnSol API key (starts with `msk_`). The same key works across every tier.
|
|
625
|
+
* Get a free key at https://madeonsol.com/developer
|
|
626
|
+
*/
|
|
627
|
+
apiKey: string;
|
|
628
|
+
/** Max automatic retries on 429 / 5xx / network error (default: 2). */
|
|
629
|
+
maxRetries?: number;
|
|
630
|
+
/** Override the API base URL (advanced/testing). Default: https://madeonsol.com/api/v1 */
|
|
631
|
+
baseUrl?: string;
|
|
632
|
+
}
|
|
633
|
+
declare class KolClient {
|
|
634
|
+
private readonly _fetch;
|
|
635
|
+
private readonly _baseUrl;
|
|
636
|
+
constructor(_fetch: <T>(url: string) => Promise<T>, _baseUrl: string);
|
|
637
|
+
/**
|
|
638
|
+
* Live feed of KOL trades on Robinhood Chain — every buy/sell from tracked
|
|
639
|
+
* Solana KOLs' verified EVM wallets, attributed via tx.from. Tier: **BASIC**.
|
|
640
|
+
* @param params Optional filters: limit (1–100), before cursor, action, kol wallet (0x), min_eth.
|
|
641
|
+
*/
|
|
642
|
+
feed(params?: RhcKolFeedParams): Promise<RhcKolFeedResponse>;
|
|
643
|
+
/**
|
|
644
|
+
* KOL activity leaderboard — ranked by trade count then net ETH flow. Tier: **BASIC**.
|
|
645
|
+
* @param params Optional: period (24h/7d/30d), limit.
|
|
646
|
+
*/
|
|
647
|
+
leaderboard(params?: RhcKolLeaderboardParams): Promise<RhcKolLeaderboardResponse>;
|
|
648
|
+
/**
|
|
649
|
+
* Consensus tokens — bought by 2+ distinct tracked KOLs inside the window. Tier: **BASIC**.
|
|
650
|
+
* @param params Optional: window (5m/15m/1h/6h/24h, default 1h).
|
|
651
|
+
*/
|
|
652
|
+
hotTokens(params?: RhcHotTokensParams): Promise<RhcHotTokensResponse>;
|
|
653
|
+
/**
|
|
654
|
+
* Single KOL profile — aggregate stats over the last 200 RHC trades plus the
|
|
655
|
+
* 50 most recent. Tier: **BASIC**.
|
|
656
|
+
* @param wallet KOL EVM wallet address (0x, 40 hex).
|
|
657
|
+
*/
|
|
658
|
+
wallet(wallet: string): Promise<RhcKolProfileResponse>;
|
|
659
|
+
}
|
|
660
|
+
declare class TokensClient {
|
|
661
|
+
private readonly _fetch;
|
|
662
|
+
private readonly _baseUrl;
|
|
663
|
+
constructor(_fetch: <T>(url: string) => Promise<T>, _baseUrl: string);
|
|
664
|
+
/**
|
|
665
|
+
* Robinhood Chain token discovery — live-priced tokens with MC, liquidity,
|
|
666
|
+
* peak MC + drawdown, launchpad, and deployer tier. Tier: **PRO+**.
|
|
667
|
+
* @param params Optional: limit, sort, min_mc_usd, min_liquidity_usd, launchpad.
|
|
668
|
+
*/
|
|
669
|
+
list(params?: RhcTokensListParams): Promise<RhcTokensListResponse>;
|
|
670
|
+
/**
|
|
671
|
+
* Full snapshot for one token — metadata, live price/MC/FDV, peak + drawdown,
|
|
672
|
+
* deployer reputation, KOL activity, and pool inventory. Tier: **BASIC**.
|
|
673
|
+
* @param address Token address (0x, 40 hex).
|
|
674
|
+
*/
|
|
675
|
+
get(address: string): Promise<RhcTokenSnapshot>;
|
|
676
|
+
/**
|
|
677
|
+
* 1-minute OHLC candles — price + market-cap OHLC, close liquidity, volume
|
|
678
|
+
* with buy/sell split, and trade counts. Tier: **PRO+**.
|
|
679
|
+
* @param address Token address (0x, 40 hex).
|
|
680
|
+
* @param params Optional: limit (1–1000, default 240), from, to.
|
|
681
|
+
*/
|
|
682
|
+
candles(address: string, params?: RhcCandlesParams): Promise<RhcCandlesResponse>;
|
|
683
|
+
/**
|
|
684
|
+
* KOL consensus on a token — distinct KOL buyers vs sellers, exit rate, net
|
|
685
|
+
* ETH flow, median entry MC, first touch. ULTRA adds buyer/exited wallet lists.
|
|
686
|
+
* Tier: **PRO+**.
|
|
687
|
+
* @param address Token address (0x, 40 hex).
|
|
688
|
+
*/
|
|
689
|
+
kolConsensus(address: string): Promise<RhcKolConsensusResponse>;
|
|
690
|
+
/**
|
|
691
|
+
* Early-buyer quality — a 0–100 read on the first-20 buyer cohort (win-rate,
|
|
692
|
+
* KOL presence, bot-domination, bundle-buyer legs, dump-cluster ensemble).
|
|
693
|
+
* Tier: **BASIC**.
|
|
694
|
+
* @param address Token address (0x, 40 hex).
|
|
695
|
+
*/
|
|
696
|
+
buyerQuality(address: string): Promise<RhcBuyerQualityResponse>;
|
|
697
|
+
/**
|
|
698
|
+
* Launch-bundle detection — flags a same-block early-buyer cluster (3+ first
|
|
699
|
+
* buys in one block) and reports how much of what it bought it still holds.
|
|
700
|
+
* Field-gated by tier: BASIC scalar; PRO top-10 wallets; ULTRA full cohort + identity.
|
|
701
|
+
* Tier: **BASIC**.
|
|
702
|
+
* @param address Token address (0x, 40 hex).
|
|
703
|
+
*/
|
|
704
|
+
bundle(address: string): Promise<RhcBundleResponse>;
|
|
705
|
+
}
|
|
706
|
+
declare class DeployerHunterClient {
|
|
707
|
+
private readonly _fetch;
|
|
708
|
+
private readonly _baseUrl;
|
|
709
|
+
constructor(_fetch: <T>(url: string) => Promise<T>, _baseUrl: string);
|
|
710
|
+
/**
|
|
711
|
+
* Deployer reputation leaderboard — ranked over a 5-min-refresh rollup of every
|
|
712
|
+
* launchpad token indexed (40k+ deployers). Tier: **BASIC**.
|
|
713
|
+
* @param params Optional: sort, tier, min_tokens, limit (1–50), offset.
|
|
714
|
+
*/
|
|
715
|
+
leaderboard(params?: RhcDeployerLeaderboardParams): Promise<RhcDeployerLeaderboardResponse>;
|
|
716
|
+
/**
|
|
717
|
+
* Single deployer profile — full reputation row plus their 50 most recent
|
|
718
|
+
* tokens enriched with live + peak MC. Unknown wallets return 200 with
|
|
719
|
+
* `is_deployer: false`. Tier: **BASIC**.
|
|
720
|
+
* @param address Deployer EVM wallet address (0x, 40 hex).
|
|
721
|
+
*/
|
|
722
|
+
profile(address: string): Promise<RhcDeployerProfileResponse>;
|
|
723
|
+
}
|
|
724
|
+
declare class StreamClient {
|
|
725
|
+
private readonly _post;
|
|
726
|
+
private readonly _baseUrl;
|
|
727
|
+
constructor(_post: <T>(url: string) => Promise<T>, _baseUrl: string);
|
|
728
|
+
/**
|
|
729
|
+
* Generate a 24-hour WebSocket streaming token. Returns `ws_url` for the
|
|
730
|
+
* Robinhood Chain event stream. Tier: **PRO+**.
|
|
731
|
+
*/
|
|
732
|
+
getToken(): Promise<StreamToken>;
|
|
733
|
+
/**
|
|
734
|
+
* Open a managed real-time WebSocket stream for Robinhood Chain. Handles token
|
|
735
|
+
* fetch + refresh, auto-reconnect with backoff, heartbeat liveness, and typed
|
|
736
|
+
* events. Subscribe to `rhc:kol_trades` and/or `rhc:trades`.
|
|
737
|
+
*
|
|
738
|
+
* @example
|
|
739
|
+
* const stream = client.stream.connect();
|
|
740
|
+
* stream.on("rhc:kol_trade", (t) => console.log(t));
|
|
741
|
+
* stream.subscribe(["rhc:kol_trades"]);
|
|
742
|
+
*/
|
|
743
|
+
connect(opts?: Omit<StreamClientOptions, "getToken">): RobinhoodStream;
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Robinhood Chain API client (chain id 4663).
|
|
747
|
+
*
|
|
748
|
+
* EVM-native on-chain trading intelligence — live KOL trades, token discovery
|
|
749
|
+
* & bundles, the DEX trade tape, OHLC candles, deployer reputation, and
|
|
750
|
+
* smart-money wallets. Authenticate with a MadeOnSol `msk_` key (same key, same
|
|
751
|
+
* base URL as the Solana API — Robinhood Chain is bundled into every tier).
|
|
752
|
+
*
|
|
753
|
+
* @example
|
|
754
|
+
* ```ts
|
|
755
|
+
* import { RobinhoodClient } from "robinhood-chain-sdk";
|
|
756
|
+
*
|
|
757
|
+
* const client = new RobinhoodClient({ apiKey: "msk_your_api_key_here" });
|
|
758
|
+
*
|
|
759
|
+
* const { trades } = await client.kol.feed({ limit: 10, action: "buy" });
|
|
760
|
+
* const { tokens } = await client.kol.hotTokens({ window: "1h" });
|
|
761
|
+
* const bundle = await client.tokens.bundle("0x1234…");
|
|
762
|
+
* ```
|
|
763
|
+
*/
|
|
764
|
+
export declare class RobinhoodClient {
|
|
765
|
+
/** KOL trade intelligence on Robinhood Chain — feed, leaderboard, hot tokens, per-wallet profile. */
|
|
766
|
+
readonly kol: KolClient;
|
|
767
|
+
/** Token intelligence — discovery, per-token snapshot, candles, KOL consensus, buyer quality, launch bundle. */
|
|
768
|
+
readonly tokens: TokensClient;
|
|
769
|
+
/** Deployer reputation — leaderboard + per-deployer profile. */
|
|
770
|
+
readonly deployerHunter: DeployerHunterClient;
|
|
771
|
+
/** Managed WebSocket streaming (rhc:kol_trades, rhc:trades) — PRO+. */
|
|
772
|
+
readonly stream: StreamClient;
|
|
773
|
+
private readonly _apiKey;
|
|
774
|
+
private readonly _baseUrl;
|
|
775
|
+
private readonly _maxRetries;
|
|
776
|
+
constructor(config: RobinhoodConfig);
|
|
777
|
+
/**
|
|
778
|
+
* Robinhood Chain DEX trade tape — every Uniswap v2/v3/v4 swap on chain 4663,
|
|
779
|
+
* each row carrying the real trader wallet (tx.from), gas/ordering for MEV
|
|
780
|
+
* analysis, and KOL/deployer flags. Cursor via `next_before`. Tier: **PRO+**.
|
|
781
|
+
* @param params Optional: limit, token (0x), dex, action, min_eth, before cursor.
|
|
782
|
+
*/
|
|
783
|
+
trades(params?: RhcTradesParams): Promise<RhcTradesResponse>;
|
|
784
|
+
/**
|
|
785
|
+
* Smart-money wallet ranking on Robinhood Chain — trader wallets ranked by
|
|
786
|
+
* realized on-chain performance (net ETH, win rate, memecoin share), with
|
|
787
|
+
* bot-fleet flagging and KOL-identity mapping. Tier: **PRO+**.
|
|
788
|
+
* @param params Optional filters; see RhcAlphaWalletsParams.
|
|
789
|
+
*/
|
|
790
|
+
alphaWallets(params?: RhcAlphaWalletsParams): Promise<RhcAlphaWalletsResponse>;
|
|
791
|
+
private _headers;
|
|
792
|
+
private _request;
|
|
793
|
+
private _requestWithBody;
|
|
794
|
+
private _send;
|
|
795
|
+
/** Exponential backoff with jitter; prefers a server-provided retry hint when present. */
|
|
796
|
+
private _backoffMs;
|
|
797
|
+
private _handleResponse;
|
|
798
|
+
}
|
|
799
|
+
export type { RobinhoodConfig as Config };
|
|
800
|
+
//# sourceMappingURL=index.d.ts.map
|