SDKs — the KOL API in
TypeScript, Python and Rust
Official, open-source clients for the CabalSpy KOL and Smart Money API. Typed responses, pagination, reconnecting WebSocket streams — from install to first result in a minute.


















Install, authenticate, query KOL wallets
| Language | Install | REST | WebSocket | Source |
|---|---|---|---|---|
| TypeScript / JavaScript | npm install cabalspy | Full v1 | 6 streams | cabalspy-js |
| Python | pip install cabalspy | Full v1, sync + async | 6 streams | cabalspy-python |
| Rust | cabalspy = "0.1" | Full v1 | — | cabalspy-rust |
All SDKs read the key from CABALSPY_API_KEY and cover Solana, BNB Chain, Base, Ethereum and Robinhood Chain with the wallet types kol, smart and whale.
TypeScript
npm install cabalspyimport { CabalSpy } from 'cabalspy';
const client = new CabalSpy({ apiKey: process.env.CABALSPY_API_KEY });
// Who is this wallet? Searches every chain and wallet type.
const wallet = await client.wallets.lookup('DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK');
// Leaderboard of the best KOL wallets on Solana over 7 days
const board = await client.wallets.leaderboard({
blockchain: 'solana', type: 'kol', period: '7d', limit: 25,
});
// Live cluster signals: 5+ KOLs buying the same token within an hour
const signals = await client.signals.list({
blockchain: 'solana', type: 'kol', mode: 'cluster', min_wallets: 5, hours: 1,
});Real-time streams run over one socket; subscriptions survive reconnects automatically:
const rt = client.realtime();
rt.on('position_update', (msg) => console.log('trade', msg.data));
rt.on('signal', (msg) => console.log('signal', msg.data));
await rt.connect();
rt.subscribe({ stream: 'tx', blockchain: 'solana', type: 'kol', token: '*' });Python
pip install cabalspy
pip install "cabalspy[realtime]" # for WebSocket streamsfrom cabalspy import CabalSpy
client = CabalSpy() # reads CABALSPY_API_KEY
# Who is this wallet? Searches every chain and wallet type.
wallet = client.wallets.lookup("As7HjL7dzzvbRbaD3WCun47robib2kmAKRXMvjHkSMB5")
print(wallet["name"], wallet["type"])
# Best KOL wallets on Solana over 7 days
board = client.wallets.leaderboard(blockchain="solana", type="kol", period="7d", limit=25)
# Live cluster signals: 5+ KOLs buying the same token within an hour
signals = client.signals.list(
blockchain="solana", type="kol", mode="cluster", min_wallets=5, hours=1
)
for signal in signals["signals"]:
print(signal["token"]["token_name"], signal["window"]["wallet_count"])Every method also exists on AsyncCabalSpy with the same signature, for bots and agents that already run an event loop.
Rust
[dependencies]
cabalspy = "0.1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }use cabalspy::{CabalSpy, Chain, LeaderboardOpts, Period, WalletType};
#[tokio::main]
async fn main() -> Result<(), cabalspy::Error> {
let client = CabalSpy::from_env()?; // reads CABALSPY_API_KEY
let wallet = client.wallets().lookup("As7HjL7dzzvbRbaD3WCun47robib2kmAKRXMvjHkSMB5").await?;
println!("{:?}", wallet.data);
let board = client.wallets().leaderboard(Chain::Solana, LeaderboardOpts {
wallet_type: Some(WalletType::Kol),
period: Some(Period::D7),
limit: Some(25),
..Default::default()
}).await?;
Ok(())
}Impossible combinations — for example Whale wallets on Ethereum — are rejected before a request goes out, so a mistake costs no credits.
More ways to integrate
Example projects
Frequently asked questions
01Which SDKs does CabalSpy offer?
CabalSpy publishes official SDKs for TypeScript/JavaScript (npm install cabalspy), Python (pip install cabalspy) and Rust (the cabalspy crate). All three cover the v1 REST API; the TypeScript and Python SDKs also include the WebSocket streams with automatic re-subscription after a reconnect.
02Is there a Python SDK for KOL wallet data?
Yes. Install it with pip install cabalspy. It offers a synchronous CabalSpy client and an AsyncCabalSpy client with the same methods; realtime streams need the extra pip install "cabalspy[realtime]".
03Do I need an SDK to use the API?
No. The API is plain REST and WebSocket, so curl or any HTTP client works. The SDKs add typed responses, pagination helpers, reconnecting streams and validation that rejects impossible chain and wallet-type combinations before a request is sent.
04How do I authenticate with the SDK?
Create a free API key at apidashboard.cabalspy.xyz and set it as the CABALSPY_API_KEY environment variable, or pass it to the client constructor. The free tier includes 10,000 credits per month.
05Are the SDKs open source?
Yes. The source for all SDKs is on GitHub under github.com/CabalSpy, together with demo projects for a wallet tracker, a leaderboard, a real-time holder table and a TradingView integration.
Three languages, one API key. Start free today.
10,000 free credits every month, REST and WebSocket access, no credit card.
