# Count Stream Source: https://docs.cabalspy.xyz/Count Live WebSocket stream of the KOL wallet count per token, updated as tracked wallets buy, for activity indicators and cluster detection. A lightweight realtime counter. Every time a tracked KOL wallet buys a token, you receive the updated number of distinct KOL wallets that hold it. Use it for activity badges, heat indicators, or as a cheap trigger before pulling heavier data. All CabalSpy streams share one WebSocket endpoint. You open a single connection, authenticate, then subscribe. This page covers the count channel. ## Endpoint Connect to `wss://stream.cabalspy.xyz`. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => { ws.send(JSON.stringify({ op: "subscribe", stream: "count", blockchain: "solana", token: "*" })); }; ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === "wallet_count") { console.log(msg.data.mint, "kol count", msg.data.kol_count); } }; ``` ```python Python theme={null} import json, websocket def on_open(ws): ws.send(json.dumps({"op": "subscribe", "stream": "count", "blockchain": "solana", "token": "*"})) def on_message(ws, message): msg = json.loads(message) if msg.get("event") == "wallet_count": print(msg["data"]["mint"], msg["data"]["kol_count"]) ws = websocket.WebSocketApp( "wss://stream.cabalspy.xyz?apiKey=YOUR_KEY", on_open=on_open, on_message=on_message, ) ws.run_forever() ``` ## Authentication Provide your API key as a query parameter, wss\://stream.cabalspy.xyz?apiKey=YOUR\_KEY, or as a header, Authorization: Bearer YOUR\_KEY. A connection without a valid key is closed immediately with code 1008. ## Subscribe To start receiving counts, send a subscribe message after the connection opens. ```json Subscribe to all tokens on Solana theme={null} { "op": "subscribe", "stream": "count", "blockchain": "solana", "token": "*" } ``` The token field decides what you watch. Use "\*" to receive the count for every token, or a token mint or contract address to watch just one token. This stream is not split by wallet type, it always reports the KOL wallet count. ```json Watch one token theme={null} { "op": "subscribe", "stream": "count", "blockchain": "solana", "token": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump" } ``` **op** `string` *required* The operation. Use subscribe to start. **stream** `string` *required* Set to count for this stream. **blockchain** `string` *required* Chain. One of solana, bnb, base, eth. **token** `string` Which token to watch. Either "\*" for all tokens, or a single token mint or contract address. Defaults to all tokens. ## Unsubscribe and other operations To stop, send the same fields with op unsubscribe. ```json Unsubscribe theme={null} { "op": "unsubscribe", "stream": "count", "blockchain": "solana", "token": "*" } ``` To see your active subscriptions, send op subscriptions. To check the connection is alive, send op ping and you get a pong back. ```json List your subscriptions theme={null} { "op": "subscriptions" } ``` ## Event **success** `boolean` Always true for stream events. **channel** `string` The channel that produced the event, for example count.solana. **event** `string` wallet\_count. **data** `object` **data** **blockchain** `string` The chain. **mint** `string` The token mint or contract. **kol\_count** `integer` Number of distinct KOL wallets holding the token. ```json wallet_count theme={null} { "success": true, "channel": "count.solana", "event": "wallet_count", "data": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "kol_count": 5 }, "meta": { "request_id": "req_5162c7cf7f87", "version": "2.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Billing Each delivered event counts against your plan, the same way a request does. A wildcard subscription on a busy chain can produce many events, so filter by token when you can. ## Heartbeat The server sends WebSocket pings and expects pong, which standard clients answer automatically. A connection that stops answering is closed. You can also send op ping at any time. # Data APIs Source: https://docs.cabalspy.xyz/Data-APIs Access comprehensive on-chain labeled wallet data, analytics, token data, and more. ## **Overview** CabalSpy's Data APIs provide real-time and Historical access to on-chain data accross 4 blockchains: > [card] Wallet data > > Win-rate, token holdings, PNL/uPNL Social links, and detailed wallet analytics accross all supported chains. > [card] Historical data > > Historical transactions, Profits/loss, Portfolio balances, DeFi positions, and realtime feed with enriched token and hodler data. > [card] Dedicated endpoints > > Holding table, wallet tracker, leaderbaords, counts, chart events, supply holdings, signal service, bundles with github examples. ## **Authentication** All endpoints require an API key. Get one for free at [https://apidashboard.cabalspy.xyz/](https://apidashboard.cabalspy.xyz/) ```text theme={null} curl "https://api.cabalspy.xyz/v1/transactions/latest?blockchain=solana&type=kol" \ -H "Authorization: Bearer YOUR_API_KEY" ``` To try an endpoint first, use the [public demo](/demo) without a key: replace `api.cabalspy.xyz` with `demo-api.cabalspy.xyz`. The demo allows 20 requests per IP per day, with data delayed 15 minutes and at most 5 rows per list. ```text theme={null} curl "https://demo-api.cabalspy.xyz/v1/transactions/latest?blockchain=solana&type=kol" ``` ## Base URL ```text theme={null} https://api.cabalspy.xyz/v1/ ``` # Holders Source: https://docs.cabalspy.xyz/Holders GET /v1/tokens/holders The tracked wallets holding a token, ranked by amount held, each with live position, unrealized PnL, remaining value and entry market cap. List the tracked wallets holding a token, ranked by how much they hold. Each holder carries its profile and a live position with bag percentage, unrealized PnL, remaining value and the market cap at which it first entered. The token block carries the current market cap. This is the data behind a holder table, the classic view that shows which KOLs and smart money are sitting in a token and whether they are up or down on the position. > [!TIP] > > The live position fields (unrealized PnL, remaining value, entry market cap) are Solana only and null on other chains. entry\_market\_cap is null for positions that were opened before entry tracking started. Holders are sorted by amount held, highest first, and the list is paginated with limit and cursor. ## Query Parameters **blockchain** `string` *required* Chain of the token. One of solana, bnb, base, eth, rh (Robinhood Chain). **mint** `string` *required* The token mint or contract address. **type** `string` Optional wallet category kol, smart or whale. Omit to include all categories. **limit** `integer` Maximum number of holders to return. **cursor** `string` Opaque cursor for the next page. Pass the `next_cursor` value from the previous response, together with the same `limit`. A null `next_cursor` means there are no more pages. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/tokens/holders?blockchain=solana&mint=3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump&limit=50&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "limit": 50, "api_key": "YOUR_KEY", } r = requests.get("https://api.cabalspy.xyz/v1/tokens/holders", params=params) d = r.json()["data"] print("market cap", d["token"]["market_cap"]) for h in d["holders"]: pos = h["holdings"] print(h["profile"]["name"], "bag", pos["bag_pct"], "uPNL", pos.get("unrealized_pnl_sol")) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", mint: "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", limit: "50", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/tokens/holders?${p}`); const { data } = await res.json(); data.holders.forEach(h => console.log(h.profile.name, h.holdings.bag_pct)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **token** `object` **token** **mint** `string` Token mint or contract address. **token\_name** `string` Token name. **blockchain** `string` Chain. **currency** `string` Native currency. **token\_supply** `number` Total supply. **token\_decimals** `integer` Token decimals. **market\_cap** `number` Market cap in native currency, on every chain. See `market_cap_source` for where it comes from. Null when neither a live value nor a tracked trade is available. **market\_cap\_usd** `number` Market cap in USD. **market\_cap\_currency** `string` Currency of the market cap value (SOL, BNB or ETH), or null. **price** `number` Token price in native currency. **price\_usd** `number` Token price in USD. **market\_cap\_source** `string` `live` for the current market value of a token that is actively trading, `last_trade` when there is no live value and the market cap is the price of the newest tracked trade times supply, or null. **market\_cap\_updated\_at** `integer` Unix seconds of the market cap value: the time of the live update, or of the trade for `last_trade`. **native\_price\_usd** `number` USD price of the chain's native currency (SOL, BNB or ETH). **sol\_price\_usd** `number` SOL price in USD. Solana only, kept for compatibility; use `native_price_usd`. **total\_holders** `object` **total\_holders** **kol\_count** `integer` Number of KOL holders. **smart\_count** `integer` Number of smart money holders. **whale\_count** `integer` Number of whale holders. **still\_holding\_count** `integer` How many still hold a position. **holders** `array` **holder, sorted by amount held highest first** **profile** `object` Wallet profile (name, image\_url, twitter, telegram, blockchain, currency, type). **holdings** `object` **holdings** **token\_amount** `number` Tokens currently held. **token\_amount\_peak** `number` Peak tokens held. **supply\_pct** `number` Percent of supply held. **supply\_pct\_peak** `number` Peak percent of supply held. **bag\_pct** `number` Percent of peak holding still held. **still\_holding** `boolean` Whether the holder still holds. **unrealized\_pnl\_sol** `number` Unrealized PnL on the remaining bag (native). Solana only. Frozen to 0 once fully sold. **unrealized\_pnl\_usd** `number` Unrealized PnL in USD. Solana only. **unrealized\_pnl\_pct** `number` Unrealized PnL percentage. Solana only. **remaining\_sol** `number` Current value of the remaining bag (native). Solana only. **remaining\_usd** `number` Current value of the remaining bag in USD. Solana only. **entry\_market\_cap** `number` Market cap in SOL when the wallet first bought, frozen. Solana only, null for older positions. **entry\_market\_cap\_usd** `number` Entry market cap in USD, frozen at buy time. Solana only, null for older positions. **pagination** `object` **pagination** **limit** `integer` Holders per page. **total** `integer` Total holders. **has\_more** `boolean` Whether more pages follow. **next\_cursor** `string` Cursor for the next page (null means end). ```json Response theme={null} { "success": true, "data": { "token": { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "blockchain": "solana", "currency": "SOL", "token_supply": 1000000000, "token_decimals": 6, "market_cap": 40.08, "market_cap_usd": 3301.2, "market_cap_currency": "SOL", "price": 4.008e-8, "price_usd": 3.3e-6, "market_cap_source": "live", "market_cap_updated_at": 1783340510, "native_price_usd": 82.36, "sol_price_usd": 82.36 }, "total_holders": { "kol_count": 1, "smart_count": 0, "whale_count": 0, "still_holding_count": 1 }, "holders": [ { "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "holdings": { "token_amount": 22113972.03, "token_amount_peak": 22113972.03, "supply_pct": 2.211397, "supply_pct_peak": 2.211397, "bag_pct": 100.0, "still_holding": true, "unrealized_pnl_sol": -0.099817, "unrealized_pnl_usd": -8.22, "unrealized_pnl_pct": -10.12, "remaining_sol": 0.886537, "remaining_usd": 73.02, "entry_market_cap": 44.6, "entry_market_cap_usd": 3673.2 } } ] }, "pagination": { "limit": 50, "total": 1, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | mint is missing. | | 400 | invalid\_parameter | blockchain or type invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Build a Real-Time Holders tab with Balance and Bundle data Source: https://docs.cabalspy.xyz/Real-Time-Holders-tab-with-balance-and-bundle This is the advanced version of the holder table. The basic guide uses one stream. Here you merge three live streams into a single view, the holder stream for positions, the balance stream for each wallet native SOL balance, and the bundle stream to flag wallets that entered together in a coordinated bundle. This is what powers a full Axiom style holders tab. > [card] [CabalSpy/kol-realtime-holder-table](https://github.com/CabalSpy/kol-realtime-holder-table) > > The full styled demo is open source. This guide rebuilds its multi stream core in TypeScript. > [!TIP] > > If you only need positions, start with the basic holder table guide first. Add balance and bundles once that works, the merge below is layered on top of the same store. ## Why three streams Each stream answers a different question about the same wallet, and they all key on the wallet address, which is what makes the merge clean. | Stream | What it adds to a row | Event | | - | - | - | | holder | Position, bag percentage, unrealized PnL, remaining value | init, holder\_update, position\_update | | balance | The wallet current native SOL balance and its previous value | init, balance\_update | | bundle | Whether the wallet entered in a coordinated bundle, and the bundle confidence | init, kol\_bundle | The holder stream is the backbone, it decides which rows exist. The other two decorate those rows. A balance or bundle update for a wallet you are not holding is simply ignored. ## Architecture Three subscriptions write into one store keyed by wallet. The render reads the merged rows. ```text theme={null} holder stream --init / holder_update / position_update--> position, bag, uPNL balance stream --init / balance_update--------------------> native SOL balance bundle stream --init / kol_bundle------------------------> bundled? confidence | v MergedStore (Map keyed by wallet) | v renderTable(rows[]) ``` ## Step 1, the merged row type One row holds everything about a wallet. Position fields come from the holder stream, balance from the balance stream, and the bundle fields from the bundle stream. The balance and bundle fields are optional, a row is valid with position alone. ```typescript src/types.ts theme={null} export interface Profile { name: string; image_url: string; twitter: string; telegram: string; type: string; } export interface Position { held: number; bag_pct: number; supply_pct: number; remaining_usd: number; unrealized_pnl_usd: number; unrealized_pnl_pct: number; } export interface MergedRow { wallet: string; wallet_type: string; profile: Profile; position: Position; // From the balance stream (optional until a balance arrives) balanceSol?: number; balanceUsd?: number; // From the bundle stream (optional until a bundle is detected) bundled?: boolean; bundleConfidence?: string; } ``` ## Step 2, the merged store The store keeps one Map keyed by wallet. Each stream has its own writer, and every writer only touches the fields it owns. This is the key idea, the holder writer never overwrites a balance, and the balance writer never creates a row on its own. ```typescript src/store.ts theme={null} import type { MergedRow, Profile, Position } from './types'; interface HolderInput { wallet: string; wallet_type: string; profile: Profile; position: Position; } export class MergedStore { private rows = new Map(); /** holder stream owns which rows exist. Replace the whole set on snapshot. */ setHolders(holders: HolderInput[]): void { const next = new Map(); for (const h of holders) { const existing = this.rows.get(h.wallet); next.set(h.wallet, { wallet: h.wallet, wallet_type: h.wallet_type, profile: h.profile, position: h.position, // Preserve balance and bundle decorations across a snapshot replace balanceSol: existing?.balanceSol, balanceUsd: existing?.balanceUsd, bundled: existing?.bundled, bundleConfidence: existing?.bundleConfidence, }); } this.rows = next; } /** holder stream, a single wallet traded. */ upsertHolder(h: HolderInput): void { const existing = this.rows.get(h.wallet); this.rows.set(h.wallet, { ...existing, wallet: h.wallet, wallet_type: h.wallet_type, profile: h.profile, position: h.position, } as MergedRow); } /** balance stream, decorate an existing row only. */ setBalance(wallet: string, sol: number, usd: number): void { const row = this.rows.get(wallet); if (!row) return; // not a holder we track, ignore row.balanceSol = sol; row.balanceUsd = usd; } /** bundle stream, flag the wallets that came in via a bundle. */ setBundled(wallets: string[], confidence: string): void { for (const w of wallets) { const row = this.rows.get(w); if (row) { row.bundled = true; row.bundleConfidence = confidence; } } } list(): MergedRow[] { return [...this.rows.values()].sort((a, b) => b.position.remaining_usd - a.position.remaining_usd); } get count(): number { return this.rows.size; } } ``` ## Step 3, a small multi subscribe helper You open one WebSocket and send several subscribe messages on it, one per stream. This helper opens the socket, sends every subscription on open, and routes each message to your handler. ```typescript src/stream.ts theme={null} export interface Sub { stream: string; [key: string]: unknown; } export function connectStreams( apiKey: string, subs: Sub[], onMessage: (msg: any) => void, ): () => void { const ws = new WebSocket(`wss://stream.cabalspy.xyz?apiKey=${encodeURIComponent(apiKey)}`); ws.onopen = () => { for (const sub of subs) ws.send(JSON.stringify({ op: 'subscribe', ...sub })); }; ws.onmessage = (e) => { try { onMessage(JSON.parse(e.data)); } catch { /* ignore malformed frames */ } }; return () => { try { ws.close(); } catch { /* already closing */ } }; } ``` ## Step 4, route each stream to the store Subscribe to all three streams for the same token, then send each event to the writer that owns it. Note the channel prefix on each message tells you which stream it came from, which is how you route balance vs holder vs bundle. ```typescript src/holders.ts theme={null} import { MergedStore } from './store'; import { connectStreams } from './stream'; import type { MergedRow } from './types'; export function startAdvancedHolderTable( apiKey: string, mint: string, render: (rows: MergedRow[], count: number) => void, ): () => void { const store = new MergedStore(); const close = connectStreams(apiKey, [ { stream: 'holder', token: mint, wallet_types: ['kol', 'smart', 'whale'], mode: 'full' }, { stream: 'balance', wallet: '*', wallet_types: ['kol', 'smart', 'whale'] }, { stream: 'bundle', token: mint, mode: 'full' }, ], (msg) => { const channel: string = msg.channel || ''; // ── holder stream ── if (channel.startsWith('holder')) { if (msg.event === 'init' || msg.event === 'position_update') { if (Array.isArray(msg.data.holders)) store.setHolders(msg.data.holders); } else if (msg.event === 'holder_update' && msg.data.holder) { store.upsertHolder(msg.data.holder); } } // ── balance stream ── else if (channel.startsWith('balance')) { if (msg.event === 'balance_update') { store.setBalance(msg.data.wallet, msg.data.balance.amount, msg.data.balance.amount_usd); } else if (msg.event === 'init' && Array.isArray(msg.data.balances)) { for (const b of msg.data.balances) store.setBalance(b.wallet, b.balance.amount, b.balance.amount_usd); } } // ── bundle stream ── else if (channel.startsWith('bundle')) { if (msg.event === 'init' || msg.event === 'kol_bundle') { for (const bundle of msg.data.bundles ?? []) { const wallets = (bundle.bundle_wallets ?? []).map((w: any) => w.address); store.setBundled(wallets, bundle.confidence); } } } render(store.list(), store.count); }); return close; } ``` ## Step 5, render the merged row Now each row can show the position from the holder stream, the native SOL balance from the balance stream, and a bundle flag from the bundle stream, all live. ```typescript src/render.ts theme={null} import type { MergedRow } from './types'; const usd = (v?: number) => '$' + (Number(v) || 0).toLocaleString('en-US', { maximumFractionDigits: 2 }); const pct = (v?: number) => (Number(v) || 0).toFixed(2) + '%'; export function renderTable(rows: MergedRow[], count: number): void { const countEl = document.querySelector('#holder-count'); if (countEl) countEl.textContent = String(count); const body = document.querySelector('#holder-body'); if (!body) return; body.innerHTML = rows.map((r) => { const up = r.position.unrealized_pnl_usd >= 0; const bundleTag = r.bundled ? ` [bundle ${r.bundleConfidence ?? ''}]` : ''; const balance = r.balanceSol !== undefined ? `${r.balanceSol.toFixed(2)} SOL` : '-'; return ` ${r.profile.name || r.wallet.slice(0, 4)}${bundleTag} ${r.wallet_type} ${usd(r.position.remaining_usd)} ${pct(r.position.bag_pct)} ${balance} ${usd(r.position.unrealized_pnl_usd)} (${pct(r.position.unrealized_pnl_pct)}) `; }).join(''); } ``` ## Step 6, wire it together ```typescript src/main.ts theme={null} import { startAdvancedHolderTable } from './holders'; import { renderTable } from './render'; const API_KEY = import.meta.env.VITE_CABALSPY_KEY as string; const MINT = '3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump'; const stop = startAdvancedHolderTable(API_KEY, MINT, renderTable); // Call stop() when leaving the page to close the connection. ``` ```html index.html theme={null}

Holders (0)

TraderTypeValueBagBalanceUnrealized PnL
``` ## How the merge stays correct A few rules keep the three streams from fighting each other. The holder stream owns the row set. Only holder events create or remove rows. Balance and bundle events only decorate a row that already exists, so a balance update for some unrelated wallet is harmless. Each writer owns its own fields. The holder writer sets position, the balance writer sets balance, the bundle writer sets the bundle flag. Because they never write each other fields, the order the events arrive in does not matter. Decorations survive a snapshot. When a holder init or position\_update replaces the row set, the store carries the existing balance and bundle values forward, so a market cap tick does not wipe the balance you already received. ## Billing note You are now subscribed to three channels, so you receive three kinds of events, and each delivered event counts against your plan. On a busy token, use mode events on the holder and bundle streams, or set mc\_interval, to keep the market cap driven updates from using credits quickly. ## Reference > [card] [Holder stream](/websockets/holder) > > Positions, bag percentage and unrealized PnL. > [card] [Balance stream](/websockets/balance) > > Native SOL balance per wallet. > [card] [Bundle stream](/websockets/bundle) > > Coordinated bundle detection per token. # Analytics Source: https://docs.cabalspy.xyz/analytics GET /v1/analytics Aggregate analytics over tracked wallets for a period, including most traded tokens, top performing wallets, win rate stats and volume trends. Aggregate analytics over tracked wallets for a period. Four modes cover different questions, which tokens are most traded, which wallets perform best, what the win rate looks like, and how volume trends over time. Use it to build dashboards and leaderboards, for example a most traded tokens this week widget or a top performers table. > [!TIP] > > Choose the view with mode. All modes share the same wrapper (mode, blockchain, type, period, currency) and differ in the data they return. Set the window with period, one of 6h, 1d, 7d or 30d. ## Query Parameters **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh (Robinhood Chain). **type** `string` *required* Wallet category kol, smart or whale. **mode** `string` *required* Analytics view. One of most\_traded, top\_performers, win\_rate, volume\_trend. **period** `string` (default: 7d) Aggregation window, one of 6h, 1d, 7d or 30d. **limit** `integer` Maximum number of items to return, for list modes. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/analytics?blockchain=solana&type=kol&mode=most_traded&period=7d&limit=20&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "type": "kol", "mode": "most_traded", "period": "7d", "limit": 20, "api_key": "YOUR_KEY", } r = requests.get("https://api.cabalspy.xyz/v1/analytics", params=params) for t in r.json()["data"]["data"]: print(t["rank"], t["token_name"], "wallets", t["wallet_count"], "vol", t["total_volume"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", type: "kol", mode: "most_traded", period: "7d", limit: "20", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/analytics?${p}`); const { data } = await res.json(); data.data.forEach(t => console.log(t.rank, t.token_name, t.total_volume)); ``` ## Response All modes return the same wrapper. The list modes (most\_traded, top\_performers) put their items in a data array. win\_rate returns summary fields directly. The sections below describe each mode. **success** `boolean` True on success. **data** `object` **data (common wrapper)** **mode** `string` The requested mode. **blockchain** `string` Requested chain. **type** `string` Requested wallet type. **period** `string` Aggregation window. **currency** `string` Native currency. **data** `array` Present for most\_traded and top\_performers. Items described below. ### most\_traded item **rank** `integer` Rank in the list. **mint** `string` Token mint. **token\_name** `string` Token name. **wallet\_count** `integer` Number of tracked wallets that traded the token. **total\_volume** `number` Total volume (native). **total\_buy** `number` Total bought (native). **total\_sell** `number` Total sold (native). **net\_flow** `number` Buy minus sell (native). **buying\_pressure** `number` Buy share of volume. **currency** `string` Native currency. **first\_buy\_at** `string` When the first tracked buy happened. ### top\_performers item **profile** `object` Wallet profile. **period\_stats** `object` Period statistics for the wallet (period, currency, total\_buy, total\_buy\_usd, total\_sell, total\_sell\_usd, total\_volume, total\_volume\_usd, realized\_pnl, realized\_pnl\_usd and related fields). ### win\_rate fields For win\_rate the wrapper carries the summary directly instead of a data array. **total\_wallets** `integer` Total wallets considered. **wallets\_with\_trades** `integer` Wallets that traded in the period. **win\_count** `integer` Winning closed positions. **closed\_count** `integer` Total closed positions. **win\_rate\_percentage** `number` Win rate as a percentage. **distribution** `object` Profit buckets (above\_500, above\_100\_to\_500, above\_zero\_to\_100, below\_zero). ### volume\_trend For volume\_trend the data array holds time bucketed volume points over the period. ```json Response (most_traded) theme={null} { "success": true, "data": { "mode": "most_traded", "blockchain": "solana", "type": "kol", "period": "7d", "currency": "SOL", "data": [ { "rank": 1, "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "wallet_count": 12, "total_volume": 312.5, "total_buy": 180.25, "total_sell": 132.25, "net_flow": 48.0, "buying_pressure": 57.6, "currency": "SOL", "first_buy_at": "2026-07-01T09:58:00Z" } ] }, "pagination": { "limit": 20, "total": 1, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ```json Response (win_rate) theme={null} { "success": true, "data": { "mode": "win_rate", "blockchain": "solana", "type": "kol", "period": "7d", "currency": "SOL", "total_wallets": 342, "wallets_with_trades": 210, "win_count": 1240, "closed_count": 2010, "win_rate_percentage": 61.69, "distribution": { "above_500": 42, "above_100_to_500": 310, "above_zero_to_100": 888, "below_zero": 770 } }, "meta": { "request_id": "req_9aa1917e433b", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:02:10Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | blockchain, type, mode or period missing or invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Get an API Key Source: https://docs.cabalspy.xyz/api-key Create a free CabalSpy account, get your API key from the dashboard, and authenticate REST and WebSocket requests in seconds. Every request to the CabalSpy API needs an API key. Getting one is free and takes a minute, the free tier gives you 10,000 credits every month with no credit card. > [!TIP] > > Just looking around? The [public demo](/demo) needs no key at all: `curl "https://demo-api.cabalspy.xyz/v1/wallets?blockchain=solana&type=kol"`. It allows 20 requests per IP per day with data delayed 15 minutes. ## Get your key Create an account and copy your key from the dashboard. **1. Create a free account** Sign up at [apidashboard.cabalspy.xyz/register](https://apidashboard.cabalspy.xyz/register). No credit card is required for the free tier. **2. Open the API Dashboard** After signing in, go to the [API Dashboard](https://apidashboard.cabalspy.xyz). Your API key is shown there. **3. Copy your key** Copy the key and keep it somewhere safe. Treat it like a password, anyone with your key can spend your credits. Depending on your plan you can hold more than one key. Free and Starter include one key, Pro up to three, and Business up to five. Multiple keys let you separate environments or projects and revoke one without affecting the others. ## Use your key You can authenticate two ways. Pick whichever fits your setup, they are equivalent. ### REST requests Pass the key as the api\_key query parameter, or as an Authorization Bearer header. ```bash Query parameter theme={null} curl "https://api.cabalspy.xyz/v1/wallets?blockchain=solana&type=kol&api_key=YOUR_KEY" ``` ```bash Bearer header theme={null} curl "https://api.cabalspy.xyz/v1/wallets?blockchain=solana&type=kol" \ -H "Authorization: Bearer YOUR_KEY" ``` ### WebSocket connections Pass the key when you open the connection, either as the apiKey query parameter or as a Bearer header. A connection without a valid key is closed immediately. ```javascript Query parameter theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ``` ```javascript Bearer header theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz", { headers: { Authorization: "Bearer YOUR_KEY" }, }); ``` ## Keeping your key safe Your key is a secret. A few good habits keep it that way. Do not commit it to source control or paste it into client side code that ships to users. Load it from an environment variable or a secrets manager instead. If a key is ever exposed, create a new one in the dashboard and stop using the old one. When you need to separate projects or environments, use separate keys on a plan that allows several rather than sharing one everywhere. ## Managing usage and billing Your plan, current credit usage, and keys all live in the [API Dashboard](https://apidashboard.cabalspy.xyz). You can upgrade or downgrade at any time, upgrades take effect immediately and are pro-rated, downgrades apply on your next billing date. See [Pricing](/pricing) for what each plan includes and how credits work. # Balance Stream Source: https://docs.cabalspy.xyz/balance-1 Live WebSocket stream of the native balance of tracked wallets, updated on every trade, with previous balance and USD value. Solana, BNB, Base, Ethereum and Robinhood. Track the native balance of tracked wallets in real time. Whenever a wallet trades, CabalSpy reads its on-chain balance and streams the new value, along with the previous balance so you can show the change. This stream runs on **Solana, BNB, Base, Ethereum and Robinhood**. The event shape is identical on every chain, only the native currency changes. On subscribe you get a snapshot of known balances. Subscribing to a specific wallet that is not yet cached triggers an immediate on-demand balance fetch. > [!NOTE] > > On Solana the balance is read from the chain on every trade. On EVM chains it is streamed, which also catches plain transfers and bridge deposits, not just trades. In exchange an EVM update can land a few hundred milliseconds after the trade that caused it. ## Endpoint Connect to `wss://stream.cabalspy.xyz`. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => { ws.send(JSON.stringify({ op: "subscribe", stream: "balance", blockchain: "solana", wallet: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", })); }; ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === "balance_update") { const b = msg.data.balance; console.log(msg.data.wallet, b.amount, b.currency, b.amount_usd); } }; ``` ```python Python theme={null} import json, websocket def on_open(ws): ws.send(json.dumps({ "op": "subscribe", "stream": "balance", "blockchain": "solana", "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", })) def on_message(ws, message): msg = json.loads(message) if msg.get("event") == "balance_update": b = msg["data"]["balance"] print(msg["data"]["wallet"], b["amount"], b["currency"]) ws = websocket.WebSocketApp( "wss://stream.cabalspy.xyz?apiKey=YOUR_KEY", on_open=on_open, on_message=on_message, ) ws.run_forever() ``` ## Authentication Provide your API key as a query parameter, wss\://stream.cabalspy.xyz?apiKey=YOUR\_KEY, or as a header, Authorization: Bearer YOUR\_KEY. Invalid keys are closed with code 1008. ## Chains, currencies and wallet types The balance you receive is always the chain native asset. Decimals and the raw unit differ per chain, so read them from the payload rather than assuming. | blockchain | Currency | decimals | amount\_raw unit | wallet\_types | | - | - | - | - | - | | solana | SOL | 9 | lamports | kol, smart, whale | | bnb | BNB | 18 | wei | kol, smart | | base | ETH | 18 | wei | kol, smart | | eth | ETH | 18 | wei | kol | | rh | ETH | 18 | wei | kol, smart | Leaving blockchain out defaults to solana, which keeps existing integrations working unchanged. > [!WARNING] > > amount\_raw is a **string**, not a number. On EVM chains a wei value exceeds what a JSON number can hold exactly, so parse it with BigInt or a decimal library. Use amount for display. On EVM chains, wallet addresses are matched case-insensitively and are returned lowercased. ## Subscribe To start receiving balances, send a subscribe message after the connection opens. You choose a chain and which wallet to watch. ```json Watch one wallet on Solana theme={null} { "op": "subscribe", "stream": "balance", "blockchain": "solana", "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW" } ``` ```json Watch one wallet on Base theme={null} { "op": "subscribe", "stream": "balance", "blockchain": "base", "wallet": "0x7a16ff8270133f063aab6c9977183d9e72835428" } ``` The wallet field decides what you watch. Use a wallet address to follow one wallet, or the value "\*" to follow every tracked wallet of the chosen types. If you watch a single wallet that CabalSpy has not cached yet, its balance is fetched immediately. ```json Watch all KOL wallets on BNB theme={null} { "op": "subscribe", "stream": "balance", "blockchain": "bnb", "wallet": "*", "wallet_types": ["kol"] } ``` **op** `string` *required* The operation. Use subscribe to start. **stream** `string` *required* Set to balance for this stream. **blockchain** `string` Chain. One of solana, bnb, base, eth, rh. Defaults to solana. **wallet** `string` *required* Which wallet to watch. Either a wallet address for one wallet, or "\*" for all tracked wallets of the chosen types. **wallet\_types** `array` Which wallet types to include when you use "\*". See the table above. Defaults to every type the chain supports. Ignored when you watch a single wallet. ## Unsubscribe and other operations To stop watching a wallet, send the same chain and wallet with op unsubscribe. ```json Unsubscribe theme={null} { "op": "unsubscribe", "stream": "balance", "blockchain": "solana", "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW" } ``` To see your active subscriptions, send op subscriptions. To check the connection is alive, send op ping and you get a pong back. ```json List your subscriptions theme={null} { "op": "subscriptions", "stream": "balance" } ``` ## Events init on subscribe with a balance snapshot, then balance\_update whenever a watched wallet balance changes. **event** `string` init or balance\_update. **data** `object` **data** **blockchain** `string` The chain. solana, bnb, base, eth or rh. **wallet** `string` Present on balance\_update. The wallet whose balance changed. **wallet\_types** `array` Present on init. The wallet types in the snapshot. **profile** `object` Wallet profile (name, image\_url, twitter, telegram, blockchain, currency, type). **balance** `object` **balance** **currency** `string` Native currency of the chain. SOL, BNB or ETH. **amount** `number` Balance in the native currency. **amount\_raw** `string` Balance in the smallest unit as a string. Lamports on Solana, wei on EVM chains. **amount\_usd** `number` Balance value in USD, or null. **decimals** `integer` 9 on Solana, 18 on EVM chains. **symbol** `string` Same as currency. SOL, BNB or ETH. **name** `string` Solana, BNB or Ethereum. **previous\_amount** `number` Previous balance in the native currency, on balance\_update. Null in the snapshot. **previous\_amount\_raw** `string` Previous balance in the smallest unit as a string, on balance\_update. **updated\_at** `integer` Update time in milliseconds since epoch. **balances** `array` Present on init. Each entry has wallet, profile and a balance object without the previous fields. ```json balance_update theme={null} { "success": true, "channel": "balance.solana", "event": "balance_update", "data": { "blockchain": "solana", "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "balance": { "currency": "SOL", "amount": 12.48, "amount_raw": "12480000000", "amount_usd": 1027.85, "decimals": 9, "symbol": "SOL", "name": "Solana", "previous_amount": 14.14, "previous_amount_raw": "14140000000", "updated_at": 1751799717000 } }, "meta": { "request_id": "req_5162c7cf7f87", "version": "2.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ```json balance_update on Base theme={null} { "success": true, "channel": "balance.base", "event": "balance_update", "data": { "blockchain": "base", "wallet": "0x7a16ff8270133f063aab6c9977183d9e72835428", "profile": { "name": "Base Trader", "image_url": null, "twitter": "", "telegram": "", "blockchain": "base", "currency": "ETH", "type": "kol" }, "balance": { "currency": "ETH", "amount": 3.8175, "amount_raw": "3817500000000000000", "amount_usd": 9543.75, "decimals": 18, "symbol": "ETH", "name": "Ethereum", "previous_amount": 4.3175, "previous_amount_raw": "4317500000000000000", "updated_at": 1752743524000 } }, "meta": { "request_id": "req_9a1b2c3d4e5f", "version": "2.0.0", "timestamp": "2026-07-17T09:12:05Z" } } ``` ## Billing Each delivered balance\_update counts against your plan. A wildcard subscription across all wallets can produce many updates, watch specific wallets when you can. ## Heartbeat The server sends WebSocket pings and expects pong, which standard clients answer automatically. You can also send op ping at any time. # Build a Trader Leaderboard Source: https://docs.cabalspy.xyz/build-a-leaderboard-like-axiom-vision Build a ranked leaderboard of top KOL, Smart Money and Whale traders by PnL, win rate, trades or volume, with instant client side sorting. Step by step in TypeScript. Learn how to build a ranked leaderboard of the best tracked wallets, sorted by PnL, win rate, trades or volume, across any chain. One call gets the data, then you sort and search it on the client so the UI feels instant. This guide walks it end to end in TypeScript, with no CSS. > [card] [CabalSpy/Leaderboard-Demo](https://github.com/CabalSpy/Leaderboard-Demo) > > The full styled demo is open source. This guide rebuilds its core logic from scratch. ## What you will build A leaderboard that loads the ranked wallets for a chain, wallet type and period, then lets the user re sort and search without another request. The key idea, fetch once, sort and filter in memory. ## The endpoint One call returns the whole ranked list. > [card] [GET /v1/wallet/leaderboard](/api-reference/wallets-leaderboard) > > Ranked wallets for a chain, wallet type and period, each with a profile, period stats and win rate. ## Step 1, type the row The response nests data under profile, period\_stats and a win rate object. It is easier to work with if you flatten each row into one flat object as it comes in. ```typescript src/types.ts theme={null} export interface RawEntry { wallet?: string; profile?: { name?: string; image_url?: string; twitter?: string; currency?: string }; period_stats?: { realized_pnl?: number; realized_pnl_usd?: number; buy_txn?: number; sell_txn?: number; total_txn?: number; total_volume?: number; total_volume_usd?: number; avg_hold_time_minutes?: number; }; period_win_rate_distribution?: { win_rate_percentage?: number }; } export interface Entry { wallet: string; name: string; image_url: string; twitter: string; currency: string; pnlUsd: number; pnlNative: number; winRate: number; trades: number; buys: number; sells: number; volumeUsd: number; avgHoldMinutes: number; } export type SortKey = 'pnl' | 'winRate' | 'trades' | 'volume' | 'hold'; ``` ## Step 2, fetch and flatten Give it a chain, a wallet type and a period. Flatten each raw row into the clean Entry shape as you map over the list, so the rest of the app never touches the nested response. ```typescript src/leaderboard.ts theme={null} import type { RawEntry, Entry } from './types'; const API_BASE = 'https://api.cabalspy.xyz/v1'; const n = (v: unknown) => Number(v) || 0; function flatten(raw: RawEntry): Entry { const p = raw.profile ?? {}; const s = raw.period_stats ?? {}; const w = raw.period_win_rate_distribution ?? {}; return { wallet: raw.wallet ?? '', name: p.name ?? '', image_url: p.image_url ?? '', twitter: p.twitter ?? '', currency: p.currency ?? 'SOL', pnlUsd: n(s.realized_pnl_usd), pnlNative: n(s.realized_pnl), winRate: n(w.win_rate_percentage), trades: n(s.total_txn), buys: n(s.buy_txn), sells: n(s.sell_txn), volumeUsd: n(s.total_volume_usd), avgHoldMinutes: n(s.avg_hold_time_minutes), }; } export async function fetchLeaderboard(blockchain: string, type: string, period: string): Promise { const params = new URLSearchParams({ blockchain, type, period, api_key: import.meta.env.VITE_CABALSPY_KEY as string, }); const res = await fetch(`${API_BASE}/wallet/leaderboard?${params}`); const body = await res.json(); if (!body.success) throw new Error(body.error?.message || 'leaderboard failed'); return (body.data.leaderboard ?? []).map(flatten); } ``` ## Step 3, sort and search in memory This is what makes the leaderboard feel fast. Once you have the rows, sorting and searching never hit the network, they run on the array you already have. ```typescript src/view.ts theme={null} import type { Entry, SortKey } from './types'; function sortValue(e: Entry, key: SortKey): number { switch (key) { case 'pnl': return e.pnlUsd; case 'winRate': return e.winRate; case 'trades': return e.trades; case 'volume': return e.volumeUsd; case 'hold': return e.avgHoldMinutes; } } export function applyView( rows: Entry[], sortBy: SortKey, order: 'asc' | 'desc', search: string, ): Entry[] { const q = search.trim().toLowerCase(); const filtered = q ? rows.filter((e) => e.name.toLowerCase().includes(q) || e.wallet.toLowerCase().includes(q)) : rows; const dir = order === 'desc' ? -1 : 1; return [...filtered].sort((a, b) => (sortValue(a, sortBy) - sortValue(b, sortBy)) * dir); } ``` ## Step 4, render the ranked table Rendering is a map over the sorted rows. The rank is just the index plus one. ```typescript src/render.ts theme={null} import type { Entry } from './types'; const usd = (v: number) => '$' + v.toLocaleString('en-US', { maximumFractionDigits: 0 }); export function renderTable(el: HTMLElement, rows: Entry[]): void { el.innerHTML = ` ${rows.map((e, i) => ` `).join('')}
#TraderPnLWin RateTradesVolume
${i + 1} ${e.name || e.wallet.slice(0, 4)} ${usd(e.pnlUsd)} ${e.winRate.toFixed(2)}% ${e.trades} (${e.buys}/${e.sells}) ${usd(e.volumeUsd)}
`; } ``` ## Step 5, wire it together Hold the loaded rows and the current view options in a little state object. Loading a new chain, type or period refetches. Changing the sort or the search only re renders, no request. ```typescript src/main.ts theme={null} import { fetchLeaderboard } from './leaderboard'; import { applyView } from './view'; import { renderTable } from './render'; import type { Entry, SortKey } from './types'; const state = { chain: 'solana', type: 'kol', period: '1d', sortBy: 'pnl' as SortKey, order: 'desc' as 'asc' | 'desc', search: '', rows: [] as Entry[], }; const table = document.querySelector('#leaderboard') as HTMLElement; function draw() { renderTable(table, applyView(state.rows, state.sortBy, state.order, state.search)); } async function load() { state.rows = await fetchLeaderboard(state.chain, state.type, state.period); draw(); } // Sorting and search are instant, they only redraw. document.querySelector('#sort')!.addEventListener('change', (e) => { state.sortBy = (e.target as HTMLSelectElement).value as SortKey; draw(); }); document.querySelector('#search')!.addEventListener('input', (e) => { state.search = (e.target as HTMLInputElement).value; draw(); }); load(); ``` ## Wallet types per chain Not every chain has every wallet type, so match your type control to the chain. Solana has KOL, Smart Money and Whale. BNB, Base and Robinhood Chain (rh) have KOL and Smart Money. ETH has KOL only. Passing a type a chain does not support returns an error, so hide the ones that do not apply. ```typescript src/chain-types.ts theme={null} export const CHAIN_TYPES: Record = { solana: ['kol', 'smart', 'whale'], bnb: ['kol', 'smart'], base: ['kol', 'smart'], eth: ['kol'], }; ``` ## Lessons worth knowing Two things make this clean. Flatten on the way in. The response nests fields under profile and period\_stats. Flatten each row once in the fetch, and every other function works with a simple flat object. Fetch once, view many times. Sorting and search run on the array you already loaded, so they are instant. Only a new chain, type or period needs another request. This is the difference between a snappy leaderboard and one that reloads on every click. ## Reference > [card] [GET /v1/wallet/leaderboard](/api-reference/wallets-leaderboard) > > Ranked wallets for a chain, wallet type and period. # Build a Signal Service Source: https://docs.cabalspy.xyz/build-a-signal-for-wallet-cluster-buying Turn wallet activity into trade signals, surface tokens where several tracked wallets buy together, and stream live entry and exit alerts. Step by step in TypeScript. Learn how to turn raw wallet activity into signals, the tokens where several tracked wallets are buying at once, and live entry and exit alerts as they form. This guide covers both the REST cluster scan and the live signal stream in TypeScript, with no CSS, so you can wire it into a dashboard, a Telegram bot or a trading agent. ## Two levels of signal Start by knowing which you need. | Source | What it gives you | Best for | | - | - | - | | REST /v1/signals (mode cluster) | A snapshot of tokens where several wallets are buying now | A signals page you poll on a schedule | | WSS signal stream | Live entry and exit events with your own thresholds | Instant alerts pushed the moment a cluster forms | A common setup uses both, the REST scan to populate a signals page on load, and the stream to push new alerts live on top. ## Part 1, scan clusters over REST A cluster is a token that several tracked wallets are buying inside a time window. The REST endpoint returns the current clusters in one call. ### Step 1, type the cluster ```typescript src/types.ts theme={null} export interface ClusterWallet { wallet: string; profile: { name: string }; invested?: number; } export interface Cluster { token: { mint: string; token_name: string }; cluster: { wallet_count: number; total_invested: number; total_invested_usd: number; }; wallets: ClusterWallet[]; } ``` ### Step 2, fetch the clusters Pass mode cluster, and tune it with min\_wallets (how many wallets make a cluster) and hours (the window). type picks the wallet class. ```typescript src/clusters.ts theme={null} const API_BASE = 'https://api.cabalspy.xyz/v1'; export async function fetchClusters(minWallets = 3, hours = 6): Promise { const params = new URLSearchParams({ blockchain: 'solana', type: 'kol', mode: 'cluster', min_wallets: String(minWallets), hours: String(hours), api_key: import.meta.env.VITE_CABALSPY_KEY as string, }); const res = await fetch(`${API_BASE}/signals?${params}`); const body = await res.json(); if (!body.success) throw new Error(body.error?.message || 'signals failed'); return body.data.signals; } ``` ### Step 3, render the signals page Each cluster is a token plus the wallets buying it. Show the count, the money in, and who is buying. ```typescript src/render-clusters.ts theme={null} import type { Cluster } from './types'; export function renderClusters(el: HTMLElement, clusters: Cluster[]): void { el.innerHTML = clusters.map((c) => `
${c.token.token_name} bought by ${c.cluster.wallet_count} wallets, $${c.cluster.total_invested_usd.toLocaleString()} in
${c.wallets.map((w) => w.profile.name).join(', ')}
`).join(''); } ``` Poll this on a timer if you want the page to refresh, the same pattern as any REST snapshot. ## Part 2, live signals over WebSocket The stream is where the signal service comes alive. You define the rules when you subscribe, and the server pushes an event the moment they are met, an entry when enough wallets buy, an exit when they leave. ### Step 1, understand the thresholds Thresholds live in a block per wallet type, kol and smart. Inside a block, entry\_at is a list of wallet counts that each fire an entry, and exit\_at is a list of remaining holder counts that each fire an exit. min\_buy is the smallest buy for a wallet to count. An entry\_at of \[3, 5] fires once when the third qualifying wallet buys, and again at the fifth. If you set both a kol and a smart block, the entry gate is an AND, every type must reach its own count. ### Step 2, connect with your rules ```typescript src/signal-stream.ts theme={null} export interface SignalThresholds { kol?: { min_buy?: number; entry_at?: number[]; exit_at?: number[] }; smart?: { min_buy?: number; entry_at?: number[]; exit_at?: number[] }; min_win_rate?: number; } export interface Signal { signal_kind: 'entry' | 'exit'; token: { symbol: string; mint: string }; cluster: { qualifying_total: number }; } export function connectSignalStream( thresholds: SignalThresholds, onSignal: (s: Signal) => void, ): () => void { const key = import.meta.env.VITE_CABALSPY_KEY as string; const ws = new WebSocket(`wss://stream.cabalspy.xyz?apiKey=${encodeURIComponent(key)}`); ws.onopen = () => { ws.send(JSON.stringify({ op: 'subscribe', stream: 'signal', blockchain: 'solana', token: '*', ...thresholds, })); }; ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === 'signal') onSignal(msg.data as Signal); }; return () => { try { ws.close(); } catch { /* already closing */ } }; } ``` ### Step 3, handle the alerts Now you decide what a signal does. Here it prepends to an alerts feed, but this is where you would fire a Telegram message, a sound, or a webhook. ```typescript src/alerts.ts theme={null} import { connectSignalStream } from './signal-stream'; export function startAlerts(feed: HTMLElement): () => void { return connectSignalStream( { kol: { min_buy: 0.5, entry_at: [3, 5], exit_at: [1] }, min_win_rate: 50, }, (s) => { const row = document.createElement('div'); row.textContent = `${s.signal_kind.toUpperCase()} ${s.token.symbol} , ${s.cluster.qualifying_total} wallets`; feed.prepend(row); }, ); } ``` ### Step 4, wire it together ```typescript src/main.ts theme={null} import { fetchClusters } from './clusters'; import { renderClusters } from './render-clusters'; import { startAlerts } from './alerts'; async function main() { // Populate the page with current clusters. renderClusters(document.querySelector('#clusters')!, await fetchClusters()); // Then stream live entry and exit alerts on top. startAlerts(document.querySelector('#alerts')!); } main(); ``` ## Tuning the signal The thresholds are the whole product, and small changes matter. Raise entry\_at for stronger, rarer signals. entry\_at of \[5] only fires when five wallets have piled in, fewer false positives, later entries. Lower it for earlier, noisier signals. Use min\_win\_rate to filter quality. Only count wallets whose lifetime win rate clears a bar, so a cluster of proven wallets is worth more than a cluster of random ones. Gate on two types for conviction. Set both a kol and a smart block and the signal only fires when KOLs and Smart Money agree, the AND gate turns two feeds into one high conviction trigger. ## Billing note The REST scan is one request per call. On the stream, each delivered signal is billed a little more than a plain event because it aggregates a whole cluster, so scope your token filter when you can. ## Reference > [card] [GET /v1/signals](/api-reference/signals) > > The REST signal endpoint with cluster, entry and exit modes. > [card] [WSS signal stream](/websockets/signal) > > Live entry and exit signals with per type thresholds. # Supply Held by Wallets Source: https://docs.cabalspy.xyz/build-a-supply-and-bag-holdings-badge Show how much of a token supply tracked KOL, Smart Money and Whale wallets hold, per wallet and combined, from one REST call. Step by step in TypeScript. Learn how to show one of the most telling numbers about a token, how much of its supply sits in tracked smart hands. You will read the percent each wallet holds, add them up for a combined total, and split that total by wallet type. It is one REST call and a little math, in TypeScript, with no CSS. ## What you will build A supply concentration view with three parts, a headline total (the combined percent of supply held by tracked wallets), a breakdown by wallet type (KOL, Smart Money, Whale), and a per wallet list sorted by how much each holds. ## The endpoint One call returns every tracked holder of a token, each with the percent of supply they hold. > [card] [GET /v1/tokens/holders](/api-reference/tokens-holders) > > Every tracked holder of a token, each with a holdings.supply\_pct field, plus a total\_holders count by type. ## Step 1, type the response You only need a few fields, the per holder supply\_pct inside holdings, the wallet type, and the total\_holders counts. ```typescript src/types.ts theme={null} export interface Holder { wallet: string; wallet_type: 'kol' | 'smart' | 'whale'; profile: { name: string }; holdings: { supply_pct: number; // current percent of supply held supply_pct_peak: number; // highest they ever held }; } export interface HoldersResponse { total_holders: { kol_count: number; smart_count: number; whale_count: number; still_holding_count: number; }; holders: Holder[]; } ``` ## Step 2, fetch the holders Give it a chain and a mint. Optionally pass a type to restrict to one wallet class, or leave it off to get all of them. A higher limit returns more holders. ```typescript src/holders.ts theme={null} const API_BASE = 'https://api.cabalspy.xyz/v1'; export async function fetchHolders(mint: string, limit = 100): Promise { const params = new URLSearchParams({ blockchain: 'solana', mint, limit: String(limit), api_key: import.meta.env.VITE_CABALSPY_KEY as string, }); const res = await fetch(`${API_BASE}/tokens/holders?${params}`); const body = await res.json(); if (!body.success) throw new Error(body.error?.message || 'holders failed'); return body.data; } ``` ## Step 3, do the math This is the whole idea. Sum supply\_pct for the combined total, and sum it per wallet type for the breakdown. One pass over the holders gives you both. ```typescript src/supply.ts theme={null} import type { Holder } from './types'; export interface SupplyBreakdown { total: number; byType: { kol: number; smart: number; whale: number }; perWallet: { name: string; type: string; supplyPct: number }[]; } export function computeSupply(holders: Holder[]): SupplyBreakdown { const byType = { kol: 0, smart: 0, whale: 0 }; let total = 0; for (const h of holders) { const pct = h.holdings.supply_pct || 0; total += pct; byType[h.wallet_type] += pct; } const perWallet = holders .map((h) => ({ name: h.profile.name, type: h.wallet_type, supplyPct: h.holdings.supply_pct || 0 })) .sort((a, b) => b.supplyPct - a.supplyPct); return { total, byType, perWallet }; } ``` ## Step 4, render it The headline is the combined total. The breakdown shows how it splits across wallet types. The list shows who holds what. No CSS here, style it later. ```typescript src/render.ts theme={null} import type { SupplyBreakdown } from './supply'; const pct = (v: number) => v.toFixed(2) + '%'; export function renderSupply(el: HTMLElement, b: SupplyBreakdown): void { el.innerHTML = `

${pct(b.total)} of supply held by tracked wallets

  • KOL ${pct(b.byType.kol)}
  • Smart Money ${pct(b.byType.smart)}
  • Whale ${pct(b.byType.whale)}
${b.perWallet.map((w) => ``).join('')}
WalletTypeSupply held
${w.name}${w.type}${pct(w.supplyPct)}
`; } ``` ## Step 5, wire it together ```typescript src/main.ts theme={null} import { fetchHolders } from './holders'; import { computeSupply } from './supply'; import { renderSupply } from './render'; const MINT = '3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump'; async function main() { const { holders } = await fetchHolders(MINT); const breakdown = computeSupply(holders); renderSupply(document.querySelector('#supply')!, breakdown); } main(); ``` That is the whole feature. One call, one pass of math, three views. ## Making it live The holders endpoint is a snapshot. If you want the supply numbers to move in real time, the holder stream carries the same supply\_pct per holder on every update. Subscribe to it, recompute the breakdown when a holder changes, and re render. The math in step 3 does not change, only where the holders come from. See the holder table cookbook for the streaming setup. ## Lessons worth knowing Two things worth keeping in mind. supply\_pct is current, supply\_pct\_peak is the high. Show the current percent for how much a wallet holds now. The peak is useful to flag a wallet that has trimmed, if peak is much higher than current, they have been selling. The total is a sum, not a unique count. Adding supply\_pct across holders gives the share of supply in tracked hands. It is a concentration signal, the higher it is, the more of the token sits with wallets you follow. ## Reference > [card] [GET /v1/tokens/holders](/api-reference/tokens-holders) > > Every tracked holder with supply\_pct, plus total\_holders by wallet type. # Build a Wallet Tracker Source: https://docs.cabalspy.xyz/build-a-wallet-tracker-like-axiom Build a full wallet profile page with period stats, a realized PnL chart, holdings and a month by month PnL calendar, step by step in TypeScript. # Bundle Snapshot Source: https://docs.cabalspy.xyz/bundle GET /v1/bundle Detect coordinated KOL bundles on a Solana token, the side wallets that buy alongside a KOL in the same block, with proof and live positions. Detect coordinated bundles on a Solana token. A bundle is a KOL wallet plus the side wallets that bought alongside it in the same block, a common pattern for insiders riding a KOL call. For each detected bundle you get the KOL, the side wallets, a confidence score, on chain proof and a live position for every wallet. Use it to flag tokens where a KOL is buying together with hidden wallets, or to show a bundle breakdown on a token page. Positions (unrealized PnL, remaining value, entry market cap) are computed live at request time. > [!TIP] > > Bundle detection is Solana only. If no bundles are detected for the token you get a normal 200 with an empty bundles array and the token block, so you can poll. Within each bundle the KOL wallet is marked with is\_kol true, and side wallets carry extra proof fields like adjacent\_to\_kol and same\_fee. ## Query Parameters **blockchain** `string` *required* Must be solana. Bundle detection is only available on Solana. **mint** `string` *required* The token mint address to inspect for bundles. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/bundle?blockchain=solana&mint=3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "api_key": "YOUR_KEY", } r = requests.get("https://api.cabalspy.xyz/v1/bundle", params=params) d = r.json()["data"] for b in d["bundles"]: print("KOL", b["kol_wallet"], "confidence", b["confidence"], "wallets", b["wallet_count"]) for w in b["bundle_wallets"]: pos = w["position"] print(" ", w["address"], "kol" if w["is_kol"] else "side", "uPNL", pos["unrealized_pnl_sol"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", mint: "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/bundle?${p}`); const { data } = await res.json(); data.bundles.forEach(b => console.log(b.kol_wallet, b.confidence, b.wallet_count)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **blockchain** `string` Always solana for this endpoint. **token** `object` **token** **mint** `string` Token mint address. **symbol** `string` Token symbol. **name** `string` Token name. **supply** `number` Total supply. **market\_cap** `number` Current market cap in SOL. **market\_cap\_usd** `number` Current market cap in USD. **market\_cap\_currency** `string` Currency of the market cap value (SOL). **price** `number` Current token price in SOL. **price\_usd** `number` Current token price in USD. **sol\_price\_usd** `number` SOL price in USD used for USD conversions. **pool** `string` Liquidity pool identifier. **on\_curve** `boolean` Whether the token is still on the bonding curve. **bonding\_curve\_progress** `number` Bonding curve progress if on curve. **bundles** `array` **bundle** **bundle\_id** `string` Unique bundle identifier. **kol\_wallet** `string` Address of the KOL at the center of the bundle. **kol\_profile** `object` Profile of the KOL wallet (name, image\_url, twitter, telegram, blockchain, currency, type). **confidence** `number` Confidence score that this is a real coordinated bundle. **jito\_confirmed** `boolean` Whether the bundle was confirmed as a Jito bundle on chain. **proof\_type** `string` The kind of proof used for detection. **slot** `integer` Solana slot of the bundle. **wallet\_count** `integer` Number of wallets in the bundle. **proof** `string` On chain proof reference. **verify\_hint** `string` Hint for independently verifying the bundle on chain. **detected\_at** `string` When the bundle was detected. **bundle\_wallets** `array` **bundle wallet, KOL first then by invested** **address** `string` Wallet address. **is\_kol** `boolean` True for the KOL wallet, false for side wallets. **transaction\_type** `string` Last transaction type buy or sell. **signature** `string` Last transaction signature. **entry\_source** `string` How the entry was detected, for example at\_discovery. **position\_source** `string` Source of the position data, live. **profile** `object` Wallet profile. For side wallets this may be empty. **fee\_lamports** `integer` Side wallets only. Fee paid in lamports. **block\_index** `integer` Side wallets only. Index within the block. **adjacent\_to\_kol** `boolean` Side wallets only. Whether the wallet traded directly next to the KOL. **same\_fee** `boolean` Side wallets only. Whether the wallet paid the same fee as the KOL. **occurrences** `integer` Side wallets only. How often this wallet bundled with the KOL. **position** `object` **position** **held** `number` Tokens currently held. **peak** `number` Peak tokens held. **bought\_tokens** `number` Total tokens bought. **sold\_tokens** `number` Total tokens sold. **bag\_pct** `number` Percent of peak holding still held. **supply\_pct** `number` Percent of total supply held. **invested** `number` Total invested (SOL). **invested\_usd** `number` Total invested in USD. **max\_single\_buy** `number` Largest single buy (SOL). **buy\_txn** `integer` Number of buys. **sell\_txn** `integer` Number of sells. **sold\_value** `number` Total sold value (SOL). **sold\_value\_usd** `number` Total sold value in USD. **realized\_pnl\_sol** `number` Realized PnL (SOL). **realized\_pnl\_usd** `number` Realized PnL in USD. **entry\_market\_cap** `number` Market cap in SOL when the wallet first bought, frozen. **entry\_market\_cap\_usd** `number` Entry market cap in USD, frozen at buy time. **unrealized\_pnl\_sol** `number` Unrealized PnL on the remaining bag (SOL). Null if market cap is missing. **unrealized\_pnl\_usd** `number` Unrealized PnL in USD. **unrealized\_pnl\_pct** `number` Unrealized PnL percentage. **remaining\_sol** `number` Current value of the remaining bag (SOL). **remaining\_usd** `number` Current value of the remaining bag in USD. **first\_buy\_at** `string` Timestamp of the first buy. **last\_activity\_at** `string` ISO timestamp of the last activity. ```json Response theme={null} { "success": true, "data": { "blockchain": "solana", "token": { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "invisibull", "name": "invisibull", "supply": 1000000000, "market_cap": 40.08, "market_cap_usd": 3301.2, "market_cap_currency": "SOL", "price": 4.008e-8, "price_usd": 3.3e-6, "sol_price_usd": 82.36, "pool": "pump", "on_curve": true, "bonding_curve_progress": 42.5 }, "bundles": [ { "bundle_id": "bnd_7f3a2c", "kol_wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "kol_profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "confidence": 0.92, "jito_confirmed": true, "proof_type": "same_block", "slot": 301948220, "wallet_count": 3, "proof": "slot:301948220", "verify_hint": "check same slot buys on solscan", "detected_at": "2026-07-04T16:25:34Z", "bundle_wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "is_kol": true, "transaction_type": "buy", "signature": "5xr8abc...", "entry_source": "at_discovery", "position_source": "live", "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "position": { "held": 22113972.03, "peak": 22113972.03, "bought_tokens": 22113972.03, "sold_tokens": 0.0, "bag_pct": 100.0, "supply_pct": 2.21, "invested": 1.66, "invested_usd": 137.44, "max_single_buy": 1.66, "buy_txn": 1, "sell_txn": 0, "sold_value": 0.0, "sold_value_usd": 0.0, "realized_pnl_sol": 0.0, "realized_pnl_usd": 0.0, "entry_market_cap": 44.6, "entry_market_cap_usd": 3673.2, "unrealized_pnl_sol": -0.099817, "unrealized_pnl_usd": -8.22, "unrealized_pnl_pct": -10.12, "remaining_sol": 0.886537, "remaining_usd": 73.02, "first_buy_at": "2026-07-04T16:25:34Z", "last_activity_at": "2026-07-04T16:40:10Z" } }, { "address": "SideWa11etAbc123...", "is_kol": false, "transaction_type": "buy", "signature": "9kp2def...", "entry_source": "at_discovery", "position_source": "live", "profile": { "name": "", "image_url": "", "twitter": "", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": null }, "fee_lamports": 5000, "block_index": 4, "adjacent_to_kol": true, "same_fee": true, "occurrences": 7, "position": { "held": 8000000.0, "peak": 8000000.0, "bought_tokens": 8000000.0, "sold_tokens": 0.0, "bag_pct": 100.0, "supply_pct": 0.8, "invested": 0.6, "invested_usd": 49.4, "max_single_buy": 0.6, "buy_txn": 1, "sell_txn": 0, "sold_value": 0.0, "sold_value_usd": 0.0, "realized_pnl_sol": 0.0, "realized_pnl_usd": 0.0, "entry_market_cap": 44.6, "entry_market_cap_usd": 3673.2, "unrealized_pnl_sol": -0.036, "unrealized_pnl_usd": -2.97, "unrealized_pnl_pct": -10.12, "remaining_sol": 0.320, "remaining_usd": 26.4, "first_buy_at": "2026-07-04T16:25:34Z", "last_activity_at": "2026-07-04T16:25:34Z" } } ] } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | mint is missing. | | 400 | invalid\_parameter | blockchain is not solana. Bundle detection is Solana only. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Bundle Stream Source: https://docs.cabalspy.xyz/bundle-1 Live WebSocket stream of coordinated KOL bundles on a Solana token, the side wallets buying alongside a KOL, with proof and live positions. The live counterpart to the Bundle Snapshot endpoint. Subscribe to a token and receive its bundles as they are detected and as the wallets trade, a KOL plus the side wallets buying alongside it in the same block. Each wallet carries a full live position, and side wallets carry the on-chain proof fields. This stream is Solana only. On subscribe to a concrete token you get an init snapshot with the current bundles, then kol\_bundle events as the detector and the market cap update. ## Endpoint Connect to `wss://stream.cabalspy.xyz`. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => { ws.send(JSON.stringify({ op: "subscribe", stream: "bundle", token: "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", mode: "full", })); }; ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === "init" || msg.event === "kol_bundle") { msg.data.bundles.forEach(b => console.log(b.kol_wallet, "wallets", b.wallet_count)); } }; ``` ```python Python theme={null} import json, websocket def on_open(ws): ws.send(json.dumps({ "op": "subscribe", "stream": "bundle", "token": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "mode": "full", })) def on_message(ws, message): msg = json.loads(message) if msg.get("event") in ("init", "kol_bundle"): for b in msg["data"]["bundles"]: print(b["kol_wallet"], b["wallet_count"]) ws = websocket.WebSocketApp( "wss://stream.cabalspy.xyz?apiKey=YOUR_KEY", on_open=on_open, on_message=on_message, ) ws.run_forever() ``` ## Authentication Provide your API key as a query parameter, wss\://stream.cabalspy.xyz?apiKey=YOUR\_KEY, or as a header, Authorization: Bearer YOUR\_KEY. Invalid keys are closed with code 1008. ## Subscribe To start receiving data, send a subscribe message after the connection opens. You choose which token to watch. ```json Subscribe to one token theme={null} { "op": "subscribe", "stream": "bundle", "token": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "mode": "full" } ``` The token field decides what you watch. Use a token mint address to follow one token, or the value "*" to follow every tracked token. Following one token also gives you an initial snapshot of its current bundles, "*" does not. **op** `string` *required* The operation. Use subscribe to start. **stream** `string` *required* Set to bundle for this stream. **token** `string` *required* Which token to watch. Either a token mint address for one token, or "\*" for all tracked tokens. A single mint also returns a starting snapshot of its bundles. **mode** `string` (default: full) How much you want to receive. See the modes below. **mc\_interval** `integer` Optional. Only used with mode full. See the modes below. ### Choosing a mode The mode decides whether you also receive live price driven updates, not just detection and trade events. This is the main control over how many messages, and how many credits, you use. | mode | What you receive | Can you set mc\_interval | | - | - | - | | full | Detection and trade events plus live position updates every time the market cap moves. This is the default. | Yes | | events | Only real detection and trade events. No market cap updates, so unrealized PnL and remaining value do not tick between trades. Cheapest option. | No, it is ignored | With mode full you can slow down the market cap updates to save credits. Set mc\_interval to a number of seconds from 1 to 30, and you get at most one price update per token in that window. Leave mc\_interval out to get every update live. ```json Full, but at most one price update every 5 seconds theme={null} { "op": "subscribe", "stream": "bundle", "token": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "mode": "full", "mc_interval": 5 } ``` ```json Events only, no price updates at all theme={null} { "op": "subscribe", "stream": "bundle", "token": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "mode": "events" } ``` Setting mc\_interval together with mode events does nothing, because events never sends price updates in the first place. ## Unsubscribe and other operations To stop receiving a token, send the same token with op unsubscribe. ```json Unsubscribe theme={null} { "op": "unsubscribe", "stream": "bundle", "token": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump" } ``` To see what you are currently subscribed to, send op subscriptions. To check the connection is alive, send op ping and you get a pong back. ```json List your subscriptions theme={null} { "op": "subscriptions", "stream": "bundle" } ``` ## Events init on subscribe to a concrete token, then kol\_bundle as bundles change. **event** `string` init or kol\_bundle. **data** `object` **data** **blockchain** `string` solana. **token** `object` Token block with mint, symbol, name, supply, market\_cap, market\_cap\_usd, market\_cap\_currency, price, price\_usd, sol\_price\_usd, pool, on\_curve and bonding\_curve\_progress. **bundles** `array` **bundle** **bundle\_id** `string` Bundle identifier, or null. **kol\_wallet** `string` The KOL at the center of the bundle. **kol\_profile** `object` Profile of the KOL wallet. **confidence** `string` Detection confidence, low, medium, high or verified. **jito\_confirmed** `boolean` Whether confirmed as a Jito bundle. **proof\_type** `string` The kind of proof, for example jito\_bundle, same\_transaction or on\_chain\_footprint. **slot** `integer` Solana slot, or null. **wallet\_count** `integer` Number of wallets in the bundle. **proof** `string` On-chain proof reference. **verify\_hint** `string` Hint for verifying the bundle on-chain. **detected\_at** `string` When the bundle was detected. **bundle\_wallets** `array` **bundle wallet** **address** `string` Wallet address. **is\_kol** `boolean` True for the KOL, false for side wallets. **transaction\_type** `string` Last transaction type, buy or sell. **signature** `string` Last transaction signature. **entry\_source** `string` How the entry was detected. **position\_source** `string` Source of the position data, live. **profile** `object` Wallet profile. **fee\_lamports** `integer` Side wallets only. Fee paid in lamports. **block\_index** `integer` Side wallets only. Index within the block. **adjacent\_to\_kol** `boolean` Side wallets only. Whether it traded directly next to the KOL. **same\_fee** `boolean` Side wallets only. Whether it paid the same fee as the KOL. **occurrences** `integer` Side wallets only. How often this wallet bundled with the KOL. **position** `object` Live position, same fields as the Bundle Snapshot endpoint (held, peak, bought\_tokens, sold\_tokens, bag\_pct, supply\_pct, invested, invested\_usd, max\_single\_buy, buy\_txn, sell\_txn, sold\_value, sold\_value\_usd, realized\_pnl\_sol, realized\_pnl\_usd, entry\_market\_cap, entry\_market\_cap\_usd, unrealized\_pnl\_sol, unrealized\_pnl\_usd, unrealized\_pnl\_pct, remaining\_sol, remaining\_usd, first\_buy\_at, last\_activity\_at). ```json kol_bundle theme={null} { "success": true, "channel": "bundle.solana", "event": "kol_bundle", "data": { "blockchain": "solana", "token": { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "invisibull", "name": "invisibull", "supply": 1000000000, "market_cap": 40.08, "market_cap_usd": 3301.2, "market_cap_currency": "SOL", "price": 4.008e-8, "price_usd": 3.3e-6, "sol_price_usd": 82.36, "pool": "pump", "on_curve": true, "bonding_curve_progress": 42.5 }, "bundles": [ { "bundle_id": "bnd_7f3a2c", "kol_wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "kol_profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "confidence": "verified", "jito_confirmed": true, "proof_type": "jito_bundle", "slot": 301948220, "wallet_count": 2, "proof": "slot:301948220", "verify_hint": "check same slot buys on solscan", "detected_at": "2026-07-04T16:25:34Z", "bundle_wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "is_kol": true, "transaction_type": "buy", "signature": "5xr8abc...", "entry_source": "at_bundle", "position_source": "live", "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "position": { "held": 22113972.03, "peak": 22113972.03, "bought_tokens": 22113972.03, "sold_tokens": 0.0, "bag_pct": 100.0, "supply_pct": 2.21, "invested": 1.66, "invested_usd": 137.44, "max_single_buy": 1.66, "buy_txn": 1, "sell_txn": 0, "sold_value": 0.0, "sold_value_usd": 0.0, "realized_pnl_sol": 0.0, "realized_pnl_usd": 0.0, "entry_market_cap": 44.6, "entry_market_cap_usd": 3673.2, "unrealized_pnl_sol": -0.099817, "unrealized_pnl_usd": -8.22, "unrealized_pnl_pct": -10.12, "remaining_sol": 0.886537, "remaining_usd": 73.02, "first_buy_at": "2026-07-04T16:25:34Z", "last_activity_at": "2026-07-04T16:40:10Z" } }, { "address": "SideWa11etAbc123...", "is_kol": false, "transaction_type": "buy", "signature": "9kp2def...", "entry_source": "at_bundle", "position_source": "live", "profile": null, "fee_lamports": 5000, "block_index": 4, "adjacent_to_kol": true, "same_fee": true, "occurrences": 7, "position": { "held": 8000000.0, "peak": 8000000.0, "bought_tokens": 8000000.0, "sold_tokens": 0.0, "bag_pct": 100.0, "supply_pct": 0.8, "invested": 0.6, "invested_usd": 49.4, "max_single_buy": 0.6, "buy_txn": 1, "sell_txn": 0, "sold_value": 0.0, "sold_value_usd": 0.0, "realized_pnl_sol": 0.0, "realized_pnl_usd": 0.0, "entry_market_cap": 44.6, "entry_market_cap_usd": 3673.2, "unrealized_pnl_sol": -0.036, "unrealized_pnl_usd": -2.97, "unrealized_pnl_pct": -10.12, "remaining_sol": 0.32, "remaining_usd": 26.4, "first_buy_at": "2026-07-04T16:25:34Z", "last_activity_at": "2026-07-04T16:25:34Z" } } ] } ] }, "meta": { "request_id": "req_5162c7cf7f87", "version": "2.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Billing Each delivered event counts against your plan. In mode full a busy token can produce frequent updates as the market cap moves, use mc\_interval to throttle them or mode events to receive only detection and trade events. ## Heartbeat The server sends WebSocket pings and expects pong, which standard clients answer automatically. You can also send op ping at any time. # Callouts Source: https://docs.cabalspy.xyz/cabalspy-id/callouts Let your users publicly call tokens. CabalSpy ID stamps the price and market cap at the call, tracks the token like the CabalSpy call statistics, and gives you stats, a leaderboard, a live stream, webhooks and callout competitions. > [!NOTE] > > Callouts are switched on per instance on request. Contact us ([contact@cabalspy.xyz](mailto:contact@cabalspy.xyz)) to enable them. Without them every endpoint answers 403 [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled). A **callout** is a user of your platform publicly calling a token: "this one goes up". CabalSpy ID stamps the token's price and market cap at that moment and tracks how the token performs from there, the same way CabalSpy scores its own calls. You get each callout's current and peak multiple, statistics per user, a leaderboard of your callers, a live stream, webhooks and [callout competitions](/cabalspy-id/competitions-callouts). A key only reaches the callouts of its own instance. [GET /v1/me](/cabalspy-id/me) lists `"callouts"` in `features` when they are switched on for your instance. ## Who can make a callout You make a callout from your backend, in the name of one of your users: * a [platform user](/cabalspy-id/white-label), by `external_id` or `csid_id`, * or a person who signed in to your app with CabalSpy ID and granted the scope `thesis`, by `csid_id`. To read the callouts or stats of a person who signed in with CabalSpy ID (not a platform user), the `thesis` scope is not needed: it is enough that they use your app. Your instance's [callout settings](/cabalspy-id/callouts-settings) decide the rest: | Setting | Default | Effect | | - | - | - | | `who` | `all` | `all`: every user can call. `kol_only`: only users with the KOL badge. | | `require_holding` | `true` | The user must hold the token in one of their wallets that count on its chain. | | `cooldown_minutes` | `360` | Minutes a user waits between two callouts, 0 to 10,080 (7 days). 0 switches the cooldown off. | Independent of the settings, a user can call the same token only **once per 24 hours**: a new callout on that token is possible once the first day of the previous one is over. Users paused from writing theses cannot make callouts either. ## How a callout is tracked **1. At the call** The current price and market cap of the token are stamped on the callout (`at_call`). A token without a market price cannot be called (`no_price`). **2. First 24 hours** The price is read **every minute**. Each read updates the current multiple (`now.x`) and, when it is a new high, the peak (`peak`). Milestones are announced as they are reached. **3. First day scored** About five minutes after the first 24 hours, the day is scored on price candles, like the CabalSpy call statistics, and `callout.scored` is sent. From now on the multiples are measured against the candle entry. **4. While the token is active** The price is read **every 5 minutes**, and once a day the highest high of that day's 5-minute candles is added to the peak, so a spike between two reads still counts. **5. Tracking stops** When the token's market cap stays **below \$10,000 for 24 hours in a row**, or the token has no price at all for 24 hours in a row, tracking stops, the callout's `status` becomes `final` and `callout.final` is sent. Its score stays as it was. The 24-hour clock for an inactive token starts at the first read below $10,000 after the first day, or at the end of the first day if the token is below $10,000 then. A token the market data provider no longer prices counts as below $10,000. Any read at $10,000 or more resets the clock. A temporary error at the provider changes nothing. `tracking.below_10k_since` shows when the current clock started. `tracking.stop_reason` says why tracking stopped: `inactive` when the last read before the stop had a market cap below \$10,000, `no_price` when the token had no price. While a callout is in its first day it is never stopped. All callouts on the same token share one price read per round, however many users called it. ## Scoring The score of a callout is its **peak multiple**: ```text theme={null} score_x = highest price since the call / entry price ``` **Entry price.** Until the first day is scored, the entry is the price stamped at the call. After that, it is the candle entry, as in the CabalSpy call statistics: * the close of the 1-minute candle right before the call, so nothing after the call is used; * if trading only starts in the minute of the call (a fresh token), the close of that candle; * if the first trade comes at most 2 minutes after the call, the open of that candle. **Highest price.** Only prices seen **after** the call count: the highest high of the first day's candles (1-minute candles for the first hour, then 5-minute candles), and every price read and the highest high of each later day's 5-minute candles. Only candles that start after the call count. The price stamped at the call is the entry, never the peak. Right after the call, before any later price was seen, `score_x` and `peak.x` are exactly 1.0. During the first day they rise above 1.0 once a read is higher than the price at the call. Once the first day is scored on candles, the multiples are measured against the candle entry, so `score_x` can move at that moment, and it can be below 1.0 when the token never traded above the entry after the call. After that it only rises, with every new high while the token is tracked. Price is compared with price, so the token supply does not matter. Market caps for the current and peak price are the price times the supply known at the call. They are null when the supply is unknown. ### The first day Once the first day is scored, every callout carries `first_day`: | Field | Meaning | | - | - | | `kind` | `candles`: scored on candles. `live`: no candles were available, the live numbers stand. | | `entry_price_usd` | The entry price the multiples are measured against. | | `peak_x` | Highest high of the first 24 hours against the candle entry. Null for `live`. | | `close_x` | Last close of the first 24 hours against the candle entry. Null for `live`. | | `minutes_to_peak` | Minutes from the call to the first day's peak candle. | | `flags` | Notes on the data, see below. | | Flag | Meaning | | - | - | | `STALE_ENTRY` | The last trade before the call was more than 10 minutes earlier. | | `NO_TRADES_AFTER` | No candles after the call within the first day. The first-day peak is the entry. | | `NO_TRADES_LAST_6H` | No trades in the last 6 hours of the first day. | | `EXTREME_MULTIPLE` | The first-day peak is 200x or more. Worth a manual look. | | `NO_CANDLES_NO_DATA` | No candles at all. Scored `live`. | | `NO_CANDLES_NO_ENTRY` | No candle to take the entry from. Scored `live`. | | `CANDLES_UNAVAILABLE`, `NO_CANDLES_ERROR` | Candles could not be loaded after several attempts. Scored `live`. | ## Milestones When a callout's peak multiple reaches **2x, 3x, 5x, 10x, 20x, 50x or 100x**, a `callout.milestone` event is sent on the [stream](/cabalspy-id/callouts-stream) and as a [webhook](/cabalspy-id/webhooks#callout-events), with `milestone_x`. Each milestone is announced once per callout. When the price jumps past several milestones between two reads, only the highest one reached is announced. ## Statuses | Status | Meaning | | - | - | | `tracking` | Being tracked. `tracking.phase` is `first_day` or `extended`. | | `final` | Tracking stopped because the token became inactive. `tracking.phase` is `stopped`. | Callouts you [remove](/cabalspy-id/callouts-create#remove-a-callout) disappear from every list, statistic, leaderboard and competition. ## Statistics and leaderboard [Stats](/cabalspy-id/callouts-stats) and the [leaderboard](/cabalspy-id/callouts-leaderboard) summarize the callouts **made** in a period (6h, 1d, 7d or 30d), each with its current score: | Value | Meaning | | - | - | | `callouts` | Number of callouts. | | `avg_peak_x` | Average score. | | `median_peak_x` | Median score. | | `best_peak_x` | Best score. | | `sum_peak_x` | Sum of the scores. | | `hits` | Callouts that reached `hit_x` (2x by default). | | `hit_rate` | Hits as a percentage of callouts, 0 to 100. | ## Webhooks and stream | Event | Webhook | Stream | When | | - | - | - | - | | `callout.created` | Yes | Yes | A user made a callout. | | `callout.update` | No | Yes | A new price was read. | | `callout.milestone` | Yes | Yes | A milestone was reached. | | `callout.scored` | Yes | Yes | The first day was scored. | | `callout.final` | Yes | Yes | Tracking stopped. | | `callout.removed` | No | Yes | You removed a callout. | The callout webhooks are only offered to instances with callouts switched on. See [Callout events](/cabalspy-id/webhooks#callout-events) and the [callouts stream](/cabalspy-id/callouts-stream). ## Dashboard When callouts are switched on, the instance shows a [Callouts](/cabalspy-id/dashboard#callouts) tab with the settings, and the Competitions tab can create callout competitions. ## Endpoints | Method | Path | Description | | - | - | - | | POST | [/v1/callouts](/cabalspy-id/callouts-create) | Make a callout in a user's name. | | POST | [/v1/callouts/remove](/cabalspy-id/callouts-create#remove-a-callout) | Remove a callout. | | GET | [/v1/callouts](/cabalspy-id/callouts-list) | Callouts, newest first, by token, user or time. Chart markers. | | GET | [/v1/callouts/item](/cabalspy-id/callouts-list#get-one-callout) | One callout. | | GET | [/v1/callouts/stats](/cabalspy-id/callouts-stats) | One user's stats per period. | | GET | [/v1/callouts/leaderboard](/cabalspy-id/callouts-leaderboard) | Your callers ranked. | | GET, POST | [/v1/callouts/settings](/cabalspy-id/callouts-settings) | Who may call, holders only, cooldown. | | WS | [/v1/callouts/stream](/cabalspy-id/callouts-stream) | Every callout event, live. | | POST | [/v1/competitions](/cabalspy-id/competitions-callouts) | Callout competitions with `kind: "callouts"`. | # Make and remove callouts Source: https://docs.cabalspy.xyz/cabalspy-id/callouts-create POST /v1/callouts: make a callout on a token in the name of one of your users, with the price and market cap stamped at the call. POST /v1/callouts/remove takes one down. > [!NOTE] > > Callouts are switched on per instance on request. Contact us ([contact@cabalspy.xyz](mailto:contact@cabalspy.xyz)) to enable them. Without them every endpoint answers 403 [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled). ## Make a callout `POST /v1/callouts` Makes a [callout](/cabalspy-id/callouts) on a token in the name of one of your users, from your backend. The token's current price and market cap are stamped on it and tracking starts at once. A `callout.created` event goes out on the [stream](/cabalspy-id/callouts-stream) and as a [webhook](/cabalspy-id/webhooks#callout-events). > [!TIP] > > Your instance's [settings](/cabalspy-id/callouts-settings) decide who can call: everyone or KOLs only, holders only (the default), and a cooldown between two callouts of a user (6 hours by default). A user can call the same token once per 24 hours. Take the user's id from your own session, never from the browser request: whoever controls it makes callouts in that user's name. ### Body Send JSON with `Content-Type: application/json`. **external\_id** `string` *required* Your id of the user, a [platform user](/cabalspy-id/white-label). Alternatively pass `csid_id`. **csid\_id** `string` The user's CabalSpy ID: a platform user, or a person who signed in to your app with the scope `thesis`. **chain** `string` *required* Chain of the token. One of solana, bnb, base, eth, rh. **mint** `string` *required* Token address: a Solana mint or a 0x contract address. **note** `string` Optional text shown with the callout, up to 280 characters. Whitespace is collapsed, at most one link, no blocked words. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ### Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/callouts" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "external_id": "user_8412", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "note": "Dev still holding, chart is coiling." }' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/callouts", json={ "external_id": "user_8412", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "note": "Dev still holding, chart is coiling.", }, headers={"Authorization": "Bearer YOUR_KEY"}) if r.status_code == 429: print("cooldown, retry in", r.headers["Retry-After"], "seconds") else: c = r.json()["data"] print(c["id"], c["at_call"]["price_usd"], c["at_call"]["market_cap_usd"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/callouts", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412", chain: "solana", mint: "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", }), }); const body = await res.json(); if (!body.success) console.error(body.error.code, body.error.message); else console.log(body.data.id, body.data.at_call); ``` ### Response **201** with the callout object, as in [List callouts](/cabalspy-id/callouts-list#the-callout-object). Right after the call, `now` and `peak` equal the price at the call, and `peak.x` and `score_x` are exactly 1.0. ```json Response theme={null} { "success": true, "data": { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token": { "name": "invisibull", "symbol": "invisibull", "logo": "https://..." }, "author": { "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "name": "Maze", "username": "MazeCCC", "avatar_url": "https://cdn.example.com/avatars/8412.png", "kol": false }, "note": "Dev still holding, chart is coiling.", "called_at": "2026-11-01T18:02:11Z", "window_ends_at": "2026-11-02T18:02:11Z", "status": "tracking", "at_call": { "price_usd": 0.0000412, "market_cap_usd": 41200.0 }, "now": { "price_usd": 0.0000412, "market_cap_usd": 41200.0, "x": 1.0, "at": "2026-11-01T18:02:11Z" }, "peak": { "price_usd": 0.0000412, "market_cap_usd": 41200.0, "x": 1.0, "at": "2026-11-01T18:02:11Z" }, "score_x": 1.0, "source": "mobula", "tracking": { "active": true, "phase": "first_day", "next_check_at": null, "below_10k_since": null, "daily_checks": 0, "stopped_at": null, "stop_reason": null } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:02:11Z" } } ``` ### Errors The checks run in this order, so the first rule a callout breaks is the one you see. Messages are written for end users, you can show them as they are. | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | chain, mint or external\_id (or csid\_id) is missing. | | 400 | invalid\_parameter | Unknown chain, invalid token address, invalid csid\_id, or a note that is too long, has more than one link or a blocked word. `parameter` names it. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled) | Callouts are not switched on for your instance. | | 404 | platform\_user\_not\_found | No platform user with this external\_id. | | 403 | consent\_required | A csid\_id that is not a platform user has not granted your app the scope thesis. | | 403 | plan\_user\_limit | The user is beyond your plan's user limit. | | 403 | sandbox\_user | Sandbox test users cannot make callouts. | | 403 | [invalid\_account](/cabalspy-id/errors#invalid_account) | The user's account is not active. | | 403 | [kol\_only](/cabalspy-id/errors#kol_only) | Only users with the KOL badge can call on your platform. | | 403 | posting\_paused | The user is paused from writing. | | 403 | [not\_a\_holder](/cabalspy-id/errors#not_a_holder) | Holders only: the user does not hold the token. | | 409 | [already\_called](/cabalspy-id/errors#already_called) | The user called this token less than 24 hours ago. | | 429 | [callout\_cooldown](/cabalspy-id/errors#callout_cooldown) | The user's cooldown is running. `Retry-After` says how many seconds are left. | | 422 | [no\_price](/cabalspy-id/errors#no_price) | The token has no market price yet. | | 503 | service\_unavailable | The price could not be read right now. Retry in a moment. | | 429 | rate\_limit\_exceeded | Your API key's request rate is exceeded. | ```json callout_cooldown theme={null} { "success": false, "error": { "code": "callout_cooldown", "message": "One callout every 360 minutes; next one in 118 minutes.", "request_id": "req_5162c7cf7f87", "docs": "https://docs.cabalspy.xyz/cabalspy-id/errors#callout_cooldown", "retry_after": 7051 } } ``` ## Remove a callout `POST /v1/callouts/remove` Takes a callout down, for moderation. It disappears from every list, statistic, leaderboard and competition standing, and a `callout.removed` event goes out on the [stream](/cabalspy-id/callouts-stream). There is no webhook for removals. Removing cannot be undone. A removed callout no longer counts for the 24-hour rule or the cooldown, so the user can call again. ### Body **id** `string` *required* The callout id. **reason** `string` Your reason, up to 200 characters. Stored, not shown. ### Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/callouts/remove" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "reason": "Spam"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/callouts/remove", json={"id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "reason": "Spam"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/callouts/remove", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ id: "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d" }), }); console.log((await res.json()).data); ``` ### Response **id** `string` The callout id. **removed** `boolean` Always true. ```json Response theme={null} { "success": true, "data": { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "removed": true }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T19:10:42Z" } } ``` ### Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | id is missing. | | 400 | invalid\_parameter | id is not a valid id, or reason is longer than 200 characters. | | 403 | [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled) | Callouts are not switched on for your instance. | | 404 | [callout\_not\_found](/cabalspy-id/errors#callout_not_found) | No callout with this id in your instance, or it was already removed. | See [Errors](/cabalspy-id/errors) for the full list. # Callout leaderboard Source: https://docs.cabalspy.xyz/cabalspy-id/callouts-leaderboard GET /v1/callouts/leaderboard: your callers ranked for a period by average, median, best or summed peak multiple, hit rate or number of callouts, with their best call. > [!NOTE] > > Callouts are switched on per instance on request. Contact us ([contact@cabalspy.xyz](mailto:contact@cabalspy.xyz)) to enable them. Without them every endpoint answers 403 [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled). Every user of your instance who made callouts in the period, ranked. A period covers the callouts **made** in that window back from now, each counted with its current [score](/cabalspy-id/callouts#scoring). Each entry carries the user's `external_id`, so you can render the leaderboard with your own user data. > [!TIP] > > The leaderboard is cached for 30 seconds. To page through it, pass pagination.next\_cursor as cursor. An unknown or malformed cursor is answered with 400 invalid\_parameter. ## Query Parameters **period** `string` (default: 7d) Ranking window, one of 6h, 1d, 7d or 30d. **chain** `string` Only callouts on this chain. One of solana, bnb, base, eth, rh. Empty means every chain. **sort** `string` (default: avg\_peak\_x) Ranking order, highest first: avg\_peak\_x, median\_peak\_x, best\_peak\_x, sum\_peak\_x, hit\_rate or callouts. Ties go to the user with more callouts. **min\_callouts** `integer` (default: 1) Callouts a user needs in the period to be listed, 1 to 1,000. **hit\_x** `number` (default: 2) The multiple that counts as a hit, above 1 and at most 1000. **limit** `integer` (default: 100) Entries per page, 1 to 500. **cursor** `string` Cursor for the next page, the pagination.next\_cursor from the previous response. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/callouts/leaderboard?period=7d&sort=avg_peak_x&min_callouts=3&limit=25" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests params = {"period": "30d", "sort": "hit_rate", "min_callouts": 5, "hit_x": 3} r = requests.get("https://api-id.cabalspy.xyz/v1/callouts/leaderboard", params=params, headers={"Authorization": "Bearer YOUR_KEY"}) for e in r.json()["data"]["leaderboard"]: print(e["rank"], e["author"]["external_id"], e["callouts"], e["hit_rate"], e["best_call"]["symbol"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ period: "1d", chain: "solana", sort: "best_peak_x" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/callouts/leaderboard?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); data.leaderboard.forEach(e => console.log(e.rank, e.author?.username, e.best_peak_x)); ``` ## Response **data** `object` **data** **period, chain, sort** `string` The values used. chain is null for every chain. **hit\_x** `number` The hit multiple used. **leaderboard** `array` **entry** **rank** `integer` Position, starting at 1. **csid\_id** `string` The user's CabalSpy ID. **author** `object` csid\_id, external\_id, name, username, avatar\_url and kol, as in the [callout object](/cabalspy-id/callouts-list#the-callout-object). **callouts** `integer` Callouts in the period. **avg\_peak\_x, median\_peak\_x, best\_peak\_x, sum\_peak\_x** `number` Average, median, best and summed score. **hits, hit\_rate** `number` Callouts that reached hit\_x, and their percentage of the user's callouts (0 to 100). **best\_call** `object` The user's best callout in the period: id, chain, mint, symbol and peak\_x. **pagination** `object` limit, total (listed users), has\_more and next\_cursor (null means end). ```json Response theme={null} { "success": true, "data": { "period": "7d", "chain": null, "sort": "avg_peak_x", "hit_x": 2.0, "leaderboard": [ { "callouts": 4, "avg_peak_x": 2.3911, "median_peak_x": 1.8273, "best_peak_x": 4.48, "sum_peak_x": 9.5644, "hits": 2, "hit_rate": 50.0, "best_call": { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "invisibull", "peak_x": 4.48 }, "rank": 1, "author": { "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "name": "Maze", "username": "MazeCCC", "avatar_url": "https://cdn.example.com/avatars/8412.png", "kol": false }, "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718" } ] }, "pagination": { "limit": 100, "total": 1, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": true, "cache_age_seconds": 12, "version": "v1", "timestamp": "2026-11-03T09:41:02Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | period, chain, sort, min\_callouts, hit\_x, limit or cursor invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled) | Callouts are not switched on for your instance. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # List callouts Source: https://docs.cabalspy.xyz/cabalspy-id/callouts-list GET /v1/callouts and GET /v1/callouts/item: your instance's callouts newest first, by token, user or time, with price and market cap at the call, now and at the peak. Use them as markers on a price chart. > [!NOTE] > > Callouts are switched on per instance on request. Contact us ([contact@cabalspy.xyz](mailto:contact@cabalspy.xyz)) to enable them. Without them every endpoint answers 403 [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled). ## List callouts `GET /v1/callouts` The [callouts](/cabalspy-id/callouts) of your instance, newest first. Narrow them to one token, one user or a time range. Removed callouts are never returned. ### Query Parameters **chain** `string` Only callouts on this chain. One of solana, bnb, base, eth, rh. **mint** `string` Only callouts on this token. Needs chain. **external\_id** `string` Only callouts of this user. Alternatively pass csid\_id: a platform user, or a person who signed in to your app with CabalSpy ID (no `thesis` scope needed to read). **since** `string` Only callouts made at or after this time, ISO 8601, for example `2026-11-01T00:00:00Z`. Without a time zone UTC is assumed. **until** `string` Only callouts made at or before this time, ISO 8601. **limit** `integer` (default: 50) Callouts per page, 1 to 200. **cursor** `string` Cursor for the next page, the pagination.next\_cursor from the previous response. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ### Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/callouts?chain=solana&mint=3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump&limit=50" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests params = {"external_id": "user_8412", "limit": 20} r = requests.get("https://api-id.cabalspy.xyz/v1/callouts", params=params, headers={"Authorization": "Bearer YOUR_KEY"}) for c in r.json()["data"]: print(c["token"]["symbol"], c["called_at"], c["score_x"], c["status"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ since: "2026-11-01T00:00:00Z", limit: "100" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/callouts?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data, pagination } = await res.json(); data.forEach(c => console.log(c.author.username, c.token.symbol, c.peak.x)); ``` ### Response **data** `array` [Callout objects](#the-callout-object), newest first. **pagination** `object` limit, has\_more and next\_cursor (pass it as cursor; null on the last page). ```json Response theme={null} { "success": true, "data": [ { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token": { "name": "invisibull", "symbol": "invisibull", "logo": "https://..." }, "author": { "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "name": "Maze", "username": "MazeCCC", "avatar_url": "https://cdn.example.com/avatars/8412.png", "kol": false }, "note": "Dev still holding, chart is coiling.", "called_at": "2026-11-01T18:02:11Z", "window_ends_at": "2026-11-02T18:02:11Z", "status": "tracking", "at_call": { "price_usd": 0.0000412, "market_cap_usd": 41200.0 }, "now": { "price_usd": 0.0000903, "market_cap_usd": 90300.0, "x": 2.2296, "at": "2026-11-03T09:40:00Z" }, "peak": { "price_usd": 0.000131, "market_cap_usd": 131000.0, "x": 3.2346, "at": "2026-11-01T19:40:00Z" }, "score_x": 3.2346, "source": "mobula", "tracking": { "active": true, "phase": "extended", "next_check_at": "2026-11-03T18:02:11Z", "below_10k_since": null, "daily_checks": 1, "stopped_at": null, "stop_reason": null }, "first_day": { "kind": "candles", "entry_price_usd": 0.0000405, "peak_x": 3.2346, "close_x": 1.8642, "minutes_to_peak": 98, "flags": [] } } ], "pagination": { "limit": 50, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-03T09:41:02Z" } } ``` ### Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | mint was passed without chain. | | 400 | invalid\_parameter | chain, mint, since, until, limit, cursor or csid\_id invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled) | Callouts are not switched on for your instance. | | 404 | platform\_user\_not\_found | No platform user with this external\_id, and no user of your app with this csid\_id. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | ## Chart markers To show callouts on a token's price chart, list them by `chain` and `mint`, with `since` and `until` set to the range the chart shows. Put a marker at `called_at` and `at_call.price_usd` for each, and show the author, `note` and `score_x` on hover. Page with `cursor` until `has_more` is false. ```javascript JavaScript theme={null} async function calloutMarkers(chain, mint, fromIso, toIso) { const markers = []; let cursor = null; do { const p = new URLSearchParams({ chain, mint, since: fromIso, until: toIso, limit: "200" }); if (cursor) p.set("cursor", cursor); const res = await fetch(`https://api-id.cabalspy.xyz/v1/callouts?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data, pagination } = await res.json(); for (const c of data) { markers.push({ time: Date.parse(c.called_at) / 1000, price: c.at_call.price_usd, label: `${c.author.username ?? c.author.external_id}: ${c.score_x}x`, }); } cursor = pagination.next_cursor; } while (cursor); return markers; } ``` Call this from your backend, which holds the API key. To add new callouts while the chart is open, follow the [callouts stream](/cabalspy-id/callouts-stream) with the same `chain` and `mint`. ## Get one callout `GET /v1/callouts/item` One callout by id, as a [callout object](#the-callout-object). ### Query Parameters **id** `string` *required* The callout id. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/callouts/item?id=5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d" \ -H "Authorization: Bearer YOUR_KEY" ``` ### Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | id is missing. | | 400 | invalid\_parameter | id is not a valid id. | | 403 | [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled) | Callouts are not switched on for your instance. | | 404 | [callout\_not\_found](/cabalspy-id/errors#callout_not_found) | No callout with this id in your instance, or it was removed. | ## The callout object **id** `string` The callout id. **chain, mint** `string` The token's chain and address. **token** `object` name, symbol and logo of the token at the call. Any of them can be null. **author** `object` **author** **csid\_id** `string` The user's CabalSpy ID. **external\_id** `string` Your id of the user, or null for users who are not platform users. **name, username, avatar\_url** `string` Display name, handle and avatar, if known. **kol** `boolean` Whether the user has the KOL badge. **note** `string` The user's note, or null. **called\_at** `string` When the callout was made. **window\_ends\_at** `string` End of the first 24 hours. Until then the user cannot call this token again. **status** `string` `tracking` or `final`. See [Statuses](/cabalspy-id/callouts#statuses). **at\_call** `object` price\_usd and market\_cap\_usd stamped at the call. **now** `object` The latest price read: price\_usd, market\_cap\_usd, x (against the entry) and at. **peak** `object` The highest price seen after the call: price\_usd, market\_cap\_usd, x (against the entry) and at. Until a later price is seen, the entry price with x 1.0 and at the time of the call. **score\_x** `number` The callout's score, its peak multiple. See [Scoring](/cabalspy-id/callouts#scoring). **source** `string` The market data source of the prices. **tracking** `object` **tracking** **active** `boolean` Whether the callout is still tracked. **phase** `string` `first_day` (read every minute), `extended` (first day scored, read every 5 minutes) or `stopped`. **next\_check\_at** `string` When the next day's candles are added to the peak. Null in the first day and once stopped. **below\_10k\_since** `string` Since when the market cap has been below \$10,000 (or the token has had no price) without interruption, or null. Tracking stops 24 hours after this time. **daily\_checks** `integer` Days scored so far, counting the first day. **stopped\_at** `string` When tracking stopped, or null. **stop\_reason** `string` Why tracking stopped: `inactive` (market cap below \$10,000 for 24 hours) or `no_price` (no price for 24 hours). Null while tracked. **first\_day** `object` Only once the first day is scored: kind, entry\_price\_usd, peak\_x, close\_x, minutes\_to\_peak and flags. See [The first day](/cabalspy-id/callouts#the-first-day). `now.x`, `peak.x` and `score_x` are measured against the entry price: the price at the call during the first day, the candle entry once the first day is scored with `kind: "candles"`. # Callout settings Source: https://docs.cabalspy.xyz/cabalspy-id/callouts-settings GET and POST /v1/callouts/settings: who may make callouts on your platform, whether they must hold the token, and the cooldown between two callouts of a user. > [!NOTE] > > Callouts are switched on per instance on request. Contact us ([contact@cabalspy.xyz](mailto:contact@cabalspy.xyz)) to enable them. Without them every endpoint answers 403 [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled). Your instance's rules for [callouts](/cabalspy-id/callouts). They apply to every new callout from the moment you save them; existing callouts are not affected. You can also change them on the instance's [Callouts](/cabalspy-id/dashboard#callouts) tab in the dashboard. | Setting | Values | Default | Effect | | - | - | - | - | | `who` | `all` or `kol_only` | `all` | `kol_only`: only users with the KOL badge can call, others get `kol_only`. | | `require_holding` | `true` or `false` | `true` | The user must hold the token in one of their wallets that count on its chain, otherwise `not_a_holder`. | | `cooldown_minutes` | 0 to 10,080 | 360 | Minutes between two callouts of the same user, on any token. 0 switches it off. Too early gets `callout_cooldown` with `Retry-After`. | The rule that a user can call the same token only once per 24 hours always applies, whatever the settings. ## Read the settings `GET /v1/callouts/settings` Returns the current settings, or the defaults if you never changed them. ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/callouts/settings" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/callouts/settings", headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/callouts/settings", { headers: { Authorization: "Bearer YOUR_KEY" }, }); console.log((await res.json()).data); ``` ```json Response theme={null} { "success": true, "data": { "who": "all", "require_holding": true, "cooldown_minutes": 360 }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:00:00Z" } } ``` ## Change the settings `POST /v1/callouts/settings` Send only the settings you want to change. The response contains all three settings as they are now. ### Body **who** `string` `all` or `kol_only`. **require\_holding** `boolean` `true` or `false`. **cooldown\_minutes** `integer` A whole number from 0 to 10,080 (7 days). **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ### Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/callouts/settings" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"who": "kol_only", "cooldown_minutes": 60}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/callouts/settings", json={"require_holding": False}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/callouts/settings", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ cooldown_minutes: 0 }), }); console.log((await res.json()).data); ``` ```json Response theme={null} { "success": true, "data": { "who": "kol_only", "require_holding": true, "cooldown_minutes": 60 }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:00:00Z" } } ``` ### Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | An unknown setting (`allowed` lists the known ones), or a value of the wrong type or out of range. `parameter` names it. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled) | Callouts are not switched on for your instance. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Callout stats Source: https://docs.cabalspy.xyz/cabalspy-id/callouts-stats GET /v1/callouts/stats: one user's callout record for the last 6 hours, day, 7 days and 30 days: callouts, average, median and best peak multiple, hit rate and the average multiple right now. > [!NOTE] > > Callouts are switched on per instance on request. Contact us ([contact@cabalspy.xyz](mailto:contact@cabalspy.xyz)) to enable them. Without them every endpoint answers 403 [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled). One user's callout record, for four periods at once: 6h, 1d, 7d and 30d. A period covers the callouts the user **made** in that window back from now, each counted with its current [score](/cabalspy-id/callouts#scoring), so a callout from yesterday that keeps rising improves the 1d, 7d and 30d numbers. The same block is part of the [platform user profile](/cabalspy-id/platform-users-profile) as `callouts`, with the default `hit_x` of 2. ## Query Parameters **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id: a platform user, or a person who signed in to your app with CabalSpy ID (no `thesis` scope needed). **hit\_x** `number` (default: 2) The multiple that counts as a hit, above 1 and at most 1000. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/callouts/stats?external_id=user_8412&hit_x=3" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests d = requests.get("https://api-id.cabalspy.xyz/v1/callouts/stats", params={"external_id": "user_8412"}, headers={"Authorization": "Bearer YOUR_KEY"}).json()["data"] for period, s in d["periods"].items(): print(period, s["callouts"], s["avg_peak_x"], f'{s["hit_rate"]}% hit {d["hit_x"]}x') ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ external_id: "user_8412" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/callouts/stats?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.periods["7d"].avg_peak_x, data.callouts_all_time); ``` ## Response **data** `object` **data** **user** `object` The user: csid\_id, external\_id, name, username, avatar\_url and kol, as `author` in the [callout object](/cabalspy-id/callouts-list#the-callout-object). **hit\_x** `number` The hit multiple used. **periods** `object` One entry each for `6h`, `1d`, `7d` and `30d`. **period** **callouts** `integer` Callouts made in the period. **avg\_peak\_x, median\_peak\_x, best\_peak\_x** `number` Average, median and best score. Null without callouts. **sum\_peak\_x** `number` Sum of the scores. **hits** `integer` Callouts whose score reached hit\_x. **hit\_rate** `number` Hits as a percentage of callouts, 0 to 100. **avg\_now\_x** `number` Average current multiple: the latest price against the entry, the same entry as `now.x` in the callout object. Null without a price read. **tracking** `integer` How many of these callouts are still tracked. **callouts\_all\_time** `integer` All callouts of the user on your instance, removed ones excluded. ```json Response theme={null} { "success": true, "data": { "user": { "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "name": "Maze", "username": "MazeCCC", "avatar_url": "https://cdn.example.com/avatars/8412.png", "kol": false }, "hit_x": 2.0, "periods": { "6h": { "callouts": 0, "avg_peak_x": null, "median_peak_x": null, "best_peak_x": null, "sum_peak_x": 0.0, "hits": 0, "hit_rate": 0.0, "avg_now_x": null, "tracking": 0 }, "1d": { "callouts": 1, "avg_peak_x": 1.42, "median_peak_x": 1.42, "best_peak_x": 1.42, "sum_peak_x": 1.42, "hits": 0, "hit_rate": 0.0, "avg_now_x": 1.1, "tracking": 1 }, "7d": { "callouts": 4, "avg_peak_x": 2.3911, "median_peak_x": 1.8273, "best_peak_x": 4.48, "sum_peak_x": 9.5644, "hits": 2, "hit_rate": 50.0, "avg_now_x": 1.0412, "tracking": 3 }, "30d": { "callouts": 11, "avg_peak_x": 2.0127, "median_peak_x": 1.61, "best_peak_x": 4.48, "sum_peak_x": 22.1397, "hits": 4, "hit_rate": 36.36, "avg_now_x": 0.7215, "tracking": 5 } }, "callouts_all_time": 23 }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-03T09:41:02Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | external\_id (or csid\_id) is missing. | | 400 | invalid\_parameter | hit\_x or csid\_id invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled) | Callouts are not switched on for your instance. | | 404 | platform\_user\_not\_found | No platform user with this external\_id, and no user of your app with this csid\_id. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Callouts stream Source: https://docs.cabalspy.xyz/cabalspy-id/callouts-stream wss://api-id.cabalspy.xyz/v1/callouts/stream: every callout of your instance live: new callouts, price updates, milestones, first-day scores, the end of tracking and removals. > [!NOTE] > > Callouts are switched on per instance on request. Contact us ([contact@cabalspy.xyz](mailto:contact@cabalspy.xyz)) to enable them. Without them every endpoint answers 403 [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled). A WebSocket with every [callout](/cabalspy-id/callouts) event of your instance as it happens: new callouts, each new price, milestones, the first-day score, the end of tracking and removals. Use it for a live callout feed, live multiples next to each callout, or new markers on a price chart. It is available on every plan once callouts are switched on, and only carries your own instance's callouts. ## Connecting Pass your API key as the `api_key` or `apiKey` query parameter, or as an Authorization Bearer header. The connection starts streaming right away, there is nothing to subscribe to. ```text theme={null} wss://api-id.cabalspy.xyz/v1/callouts/stream?api_key=YOUR_KEY wss://api-id.cabalspy.xyz/v1/callouts/stream?api_key=YOUR_KEY&chain=solana wss://api-id.cabalspy.xyz/v1/callouts/stream?api_key=YOUR_KEY&chain=solana&mint=TOKEN_MINT ``` **api\_key** `string` *required* Your API key. `apiKey` works too, or an Authorization Bearer header. **chain** `string` Only events on this chain. One of solana, bnb, base, eth, rh. Empty means every chain. An unknown chain is refused. **mint** `string` Only events of this token. Needs chain. The address is normalized as in [List callouts](/cabalspy-id/callouts-list), so EVM addresses match in any letter case. **instance** `string` Your Instance ID. Only needed when your account has several instances. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://api-id.cabalspy.xyz/v1/callouts/stream?api_key=YOUR_KEY&chain=solana"); ws.onmessage = (e) => { const msg = JSON.parse(e.data); switch (msg.event) { case "callout.created": console.log("new callout", msg.data.author.username, msg.data.token.symbol); break; case "callout.update": console.log(msg.data.id, "now", msg.data.x, "peak", msg.data.peak_x); break; case "callout.milestone": console.log(msg.data.token.symbol, "hit", msg.data.milestone_x + "x"); break; case "error": console.error(msg.error.code, msg.error.message); break; } }; ``` ```python Python theme={null} import asyncio, json, websockets async def main(): url = "wss://api-id.cabalspy.xyz/v1/callouts/stream?api_key=YOUR_KEY" async with websockets.connect(url) as ws: async for raw in ws: msg = json.loads(raw) if msg["event"] == "callout.created": print("new", msg["data"]["token"]["symbol"], msg["data"]["at_call"]["price_usd"]) elif msg["event"] == "callout.milestone": print(msg["data"]["id"], msg["data"]["milestone_x"], "x") elif msg["event"] == "error": print("error", msg["error"]) asyncio.run(main()) ``` ## Messages Every message is a JSON object with an `event` field and, except for `heartbeat`, `pong` and `error`, a `data` field. | Event | When | data | | - | - | - | | `ready` | Right after connecting. | `events` (the callout events this stream sends), `chain` and `mint`. | | `callout.created` | A user made a callout. | The [callout object](/cabalspy-id/callouts-list#the-callout-object). | | `callout.update` | A new price was read: every minute in the first day, every 5 minutes after. Only sent when the price changed and no milestone was reached. | `id`, `chain`, `mint`, `price_usd`, `market_cap_usd`, `x` and `peak_x`. | | `callout.milestone` | The peak multiple reached 2, 3, 5, 10, 20, 50 or 100x. | The callout object plus `milestone_x`. | | `callout.scored` | The first 24 hours were scored. | The callout object with `first_day`. | | `callout.final` | Tracking stopped: market cap below \$10,000, or no price, for 24 hours in a row. | The callout object with `status: "final"`. | | `callout.removed` | You removed a callout. | `id`, `chain` and `mint`. | | `heartbeat` | After 30 seconds without a message from you. | None, `ts` is Unix time in seconds. | | `pong` | After you send `ping`. | None. | | `error` | The connection is refused. | None, `error.code` and `error.message`. The server then closes with code 4403. | ```json ready theme={null} { "event": "ready", "data": { "events": ["callout.created", "callout.update", "callout.milestone", "callout.scored", "callout.final", "callout.removed"], "chain": "solana", "mint": null } } ``` ```json callout.update theme={null} { "event": "callout.update", "data": { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "price_usd": 0.0000781, "market_cap_usd": 78100.0, "x": 1.8956, "peak_x": 1.9466 } } ``` ```json callout.milestone theme={null} { "event": "callout.milestone", "data": { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token": { "name": "invisibull", "symbol": "invisibull", "logo": "https://..." }, "author": { "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "name": "Maze", "username": "MazeCCC", "avatar_url": "https://cdn.example.com/avatars/8412.png", "kol": false }, "called_at": "2026-11-01T18:02:11Z", "status": "tracking", "at_call": { "price_usd": 0.0000412, "market_cap_usd": 41200.0 }, "peak": { "price_usd": 0.0000851, "market_cap_usd": 85100.0, "x": 2.0655, "at": "2026-11-01T18:47:00Z" }, "score_x": 2.0655, "...": "the full callout object", "milestone_x": 2 } } ``` ```json callout.removed theme={null} { "event": "callout.removed", "data": { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump" } } ``` ```json heartbeat theme={null} { "event": "heartbeat", "ts": 1793548975 } ``` ```json error theme={null} { "event": "error", "error": { "code": "feature_not_enabled", "message": "Callouts are not enabled for this instance." } } ``` ## Staying connected Send the text `ping` at any time, the server answers with `pong`. When you send nothing for 30 seconds, the server sends a `heartbeat` and checks that your key is still valid. A revoked or disabled key ends the connection. Reconnect with a short backoff when the connection drops, and use [List callouts](/cabalspy-id/callouts-list) with `since` to fill any gap. ## Limits and errors Each API key can hold at most 5 callouts stream connections at once, counted separately from the other streams. | Code | Meaning | | - | - | | invalid\_api\_key | API key missing, invalid or not enabled for CabalSpy ID. | | feature\_not\_enabled | Callouts are not switched on for your instance. | | too\_many\_connections | At most 5 callouts stream connections per API key. | | invalid\_parameter | chain is unknown, or mint is not a valid token address for chain. | | missing\_parameter | mint was passed without chain. | # Trading competitions Source: https://docs.cabalspy.xyz/cabalspy-id/competitions Run trading competitions between your platform users: ranked on real on-chain trades by PnL, volume, trades or win rate, with standings every 5 minutes and webhooks. Run trading competitions between your [platform users](/cabalspy-id/white-label). Participants are ranked on their real on-chain trades during the competition, by the metric you choose. You set the rules, CabalSpy ID starts the competition, computes the standings every 5 minutes, ends it on time and freezes the results. Competitions are for individual traders. A key only reaches the competitions of its own instance, and participants are your platform users, addressed by `external_id`. > [!NOTE] > > Instances with [callouts](/cabalspy-id/callouts) switched on can also run **callout competitions** (`"kind": "callouts"`), ranked on the callouts participants make instead of their trades. See [Callout competitions](/cabalspy-id/competitions-callouts). You can also create, change and cancel competitions and follow their standings on the instance's [Competitions](/cabalspy-id/dashboard#competitions) tab in the dashboard. Chain, enrollment, start time, description and prizes of an existing competition can only be changed through the API. ## Lifecycle | Status | Meaning | | - | - | | `scheduled` | Created, the start time has not come yet. | | `waiting` | The start time has passed, but fewer than `min_participants` joined. It starts as soon as enough have joined. | | `running` | Started. The timer of `duration_hours` runs from `started_at` to `ends_at`. | | `ended` | Over. The final standings are frozen and are the results. | | `cancelled` | Cancelled by you before it ended. | A competition starts at `starts_at`, or at once when you leave it out, but only once `min_participants` have joined. The duration counts from the actual start. At most **5 competitions** can be open at the same time (scheduled, waiting and running) per developer account, across all your instances. End or cancel one to start another. ## Who takes part * `enrollment: "opt_in"`: users take part when you [join](/cabalspy-id/competitions-participants) them, for example when they press a button on your site. * `enrollment: "all_users"`: every platform user of your instance takes part, also users you add later while the competition is scheduled, and while it runs if `late_join` is true. `late_join` decides whether users can still join after the start. `max_participants` caps the field, also with `all_users`: then the users you created first take part. A user who [left](/cabalspy-id/competitions-participants#leave) is not entered again automatically. ## What counts Each participant competes with **all their wallets that count on the competition's chain**. With the competition's `wallet_trust: "verified_only"`, only payment-verified wallets count; your instance's own `wallet_trust` [setting](/cabalspy-id/platform-users-settings) always applies too. Only trades made while the competition runs count. A wallet added or verified after the start counts from that moment on. ## Kinds | kind | Ranked on | | - | - | | `trading` | The default. Real on-chain trades during the competition, as described on this page. | | `callouts` | The [callouts](/cabalspy-id/callouts) participants make during the competition, by their peak multiple. Needs callouts switched on for your instance. See [Callout competitions](/cabalspy-id/competitions-callouts). | `kind` is set when you create a competition and cannot be changed. Everything else on this page applies to both kinds, except What counts, Metrics and Minimums, which callout competitions replace with their own. ## Metrics | metric | Score | | - | - | | `pnl_usd` | Sells minus buys in USD during the competition. | | `pnl` | Sells minus buys in the chain's native currency. | | `volume_usd` | Buy plus sell volume in USD. | | `volume` | Buy plus sell volume in the native currency. | | `trades` | Number of buys and sells. | | `win_rate` | Winning closed positions as a percentage of closed positions. | Highest score ranks first. Ties are broken by higher USD volume, then by who joined first. ## Minimums `min_trades` and `min_volume_usd` set what a trader needs to be ranked. A participant below them, or without any trade, is still listed in the standings, with `rank: null` and `ranked: false`, after the ranked traders. With `metric: "win_rate"` a trader also needs at least one closed position. ## Changing the rules Every rule can be changed at any time, also while the competition runs, with [Update](/cabalspy-id/competitions-update). Each change raises `rules_version`, is recorded with what changed, when and in which phase, and is sent as the `competition.updated` webhook. The competition detail returns every change in `changes` and `changed_while_running`, so you can show participants a transparent rules history. Changing `duration_hours` while running moves `ends_at`. ## Standings and results Standings are recomputed every **5 minutes** while a competition runs, and once more when it ends. [Standings](/cabalspy-id/competitions-standings) returns them with `updated_at`; after the end they are final. ## Webhooks Competition events go to your instance's [webhook](/cabalspy-id/webhooks#competition-events): | Event | When | | - | - | | `competition.started` | The competition started. | | `competition.updated` | A rule was changed. | | `competition.standings` | New standings were computed, with the top 20. | | `competition.ended` | The competition ended with the results, or was cancelled. | ## Endpoints | Method | Path | Description | | - | - | - | | POST | [/v1/competitions](/cabalspy-id/competitions-create) | Create a competition. With `"kind": "callouts"` a [callout competition](/cabalspy-id/competitions-callouts). | | GET | [/v1/competitions](/cabalspy-id/competitions-list) | Your competitions. | | GET | [/v1/competitions/detail](/cabalspy-id/competitions-list#competition-detail) | One competition with its rules history. | | POST | [/v1/competitions/update](/cabalspy-id/competitions-update) | Change rules. | | POST | [/v1/competitions/cancel](/cabalspy-id/competitions-update#cancel) | Cancel. | | POST | [/v1/competitions/join](/cabalspy-id/competitions-participants) | Enter a user. | | POST | [/v1/competitions/leave](/cabalspy-id/competitions-participants#leave) | Take a user out. | | GET | [/v1/competitions/participants](/cabalspy-id/competitions-participants#list-participants) | Participants. | | GET | [/v1/competitions/standings](/cabalspy-id/competitions-standings) | Standings and results. | # Callout competitions Source: https://docs.cabalspy.xyz/cabalspy-id/competitions-callouts Competitions ranked on callouts instead of trades: kind callouts, metrics avg_peak_x, best_peak_x, sum_peak_x, hit_rate and callouts, with min_callouts, hit_x and chain all. > [!NOTE] > > Callouts are switched on per instance on request. Contact us ([contact@cabalspy.xyz](mailto:contact@cabalspy.xyz)) to enable them. Without them every endpoint answers 403 [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled). A callout competition ranks your platform users on the [callouts](/cabalspy-id/callouts) they make while it runs, instead of on their trades. It is a [competition](/cabalspy-id/competitions) like any other: the same endpoints, lifecycle, enrollment, participant limits, rule changes, standings every 5 minutes and webhooks. Only what counts and how it is scored differ. Create one with [POST /v1/competitions](/cabalspy-id/competitions-create) and `"kind": "callouts"`. `kind` cannot be changed later. Without callouts switched on, the request is refused with `feature_not_enabled`. Callout competitions count towards the same limit of 5 open competitions. ## What counts Every callout a participant makes **on your instance while the competition runs**, from `started_at` to `ends_at`, on the competition's chain, or on any chain with `"chain": "all"`. A participant who joined after the start counts only the callouts made after joining, so earlier callouts do not count for late joiners. Removed callouts do not count. Each callout is counted with its current [score](/cabalspy-id/callouts#scoring), its peak multiple so far. A callout made during the competition keeps improving its participant's score while its token makes new highs, until the competition ends. At the end the standings are frozen, later highs no longer change the results. Wallets play no part: `wallet_trust` has no effect on a callout competition. ## Metrics | metric | Score | | - | - | | `avg_peak_x` | Average score of the participant's callouts. | | `best_peak_x` | Best score of a single callout. | | `sum_peak_x` | Sum of the scores. | | `hit_rate` | Callouts that reached `hit_x`, as a percentage of the participant's callouts (0 to 100). | | `callouts` | Number of callouts. | Highest score ranks first. Ties are broken by more callouts, then by who joined first. ## Fields Callout competitions take the fields of [Create a competition](/cabalspy-id/competitions-create), with these differences: | Field | Callout competitions | | - | - | | `kind` | `"callouts"`. Default `"trading"`. Only on create. | | `metric` | One of the callout metrics above. | | `chain` | solana, bnb, base, eth, rh, or `all` for callouts on any chain. | | `min_callouts` | Callouts a participant needs to be ranked, 0 to 100,000. Default 0. A participant needs at least one callout either way. | | `hit_x` | The multiple that counts as a hit for `hit_rate`, above 1 and at most 1000. Default 2. | | `min_trades`, `min_volume_usd` | Do not apply. Sending them is refused with `invalid_parameter`. | | `wallet_trust` | Accepted, but has no effect. | `min_callouts` and `hit_x` in turn are refused on trading competitions. Both can be changed at any time with [Update](/cabalspy-id/competitions-update), like every other rule. If callouts were switched off for your instance in the meantime, updating a callout competition is refused with `403 feature_not_enabled`. The competition object returns `kind`, plus `min_callouts` and `hit_x` in place of `min_trades` and `min_volume_usd`. With `"chain": "all"`, `chain_name` is `All chains`. ## Create one ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/competitions" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Caller of the Week", "kind": "callouts", "chain": "all", "metric": "avg_peak_x", "duration_hours": 168, "enrollment": "all_users", "min_participants": 2, "min_callouts": 3, "hit_x": 2, "prizes": [{"rank": 1, "prize": "Caller of the Week badge"}] }' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/competitions", json={ "name": "Caller of the Week", "kind": "callouts", "chain": "all", "metric": "avg_peak_x", "duration_hours": 168, "min_callouts": 3, }, headers={"Authorization": "Bearer YOUR_KEY"}) c = r.json()["data"] print(c["id"], c["kind"], c["status"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/competitions", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ name: "Solana 5x Hunt", kind: "callouts", chain: "solana", metric: "hit_rate", hit_x: 5, min_callouts: 5, duration_hours: 72, }), }); const { data } = await res.json(); console.log(data.id, data.metric, data.hit_x); ``` ```json Response theme={null} { "success": true, "data": { "id": "2e7a9c4b-1d3f-4b5a-8c6d-9e0f1a2b3c4d", "name": "Caller of the Week", "description": null, "chain": "all", "chain_name": "All chains", "metric": "avg_peak_x", "wallet_trust": "all", "enrollment": "all_users", "status": "scheduled", "starts_at": null, "duration_hours": 168.0, "started_at": null, "ends_at": null, "ended_at": null, "min_participants": 2, "max_participants": null, "kind": "callouts", "participants": 148, "min_callouts": 3, "hit_x": 2.0, "late_join": true, "prizes": [{ "rank": 1, "prize": "Caller of the Week badge" }], "rules_version": 1, "standings_updated_at": null, "created_at": "2026-11-01T18:00:00Z", "updated_at": "2026-11-01T18:00:00Z", "changes": [], "changed_while_running": false }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:00:00Z" } } ``` ## Standings [Standings](/cabalspy-id/competitions-standings) of a callout competition carry callout stats instead of trading stats in each entry: | Field | Meaning | | - | - | | `score` | The value of the competition's metric. | | `callouts` | Callouts counted. | | `avg_peak_x`, `median_peak_x`, `best_peak_x` | Average, median and best score. Null without callouts. | | `sum_peak_x` | Sum of the scores. | | `hits`, `hit_rate` | Callouts that reached `hit_x`, and their percentage (0 to 100). | | `best_call` | The participant's best callout: id, chain, mint, symbol and peak\_x. Null without callouts. | Participants below `min_callouts`, or without any callout, are listed after the ranked ones with `rank: null` and `ranked: false`. The same entries appear in `top` of `competition.standings` and `results` of `competition.ended`. ```json Standings entry theme={null} { "rank": 1, "ranked": true, "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "score": 2.3911, "callouts": 4, "avg_peak_x": 2.3911, "median_peak_x": 1.8273, "best_peak_x": 4.48, "sum_peak_x": 9.5644, "hits": 2, "hit_rate": 50.0, "best_call": { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "invisibull", "peak_x": 4.48 } } ``` # Create a competition Source: https://docs.cabalspy.xyz/cabalspy-id/competitions-create POST /v1/competitions: create a trading competition between your platform users with chain, metric, duration, start time, participant limits and minimums. Creates a [trading competition](/cabalspy-id/competitions) for your instance. It starts at `starts_at`, or at once, as soon as `min_participants` have joined. With `"kind": "callouts"` it creates a [callout competition](/cabalspy-id/competitions-callouts) instead, ranked on callouts. That needs [callouts](/cabalspy-id/callouts) switched on for your instance. > [!TIP] > > At most 5 competitions can be open at the same time per developer account, across all your instances. A sixth is refused with `competition_limit`. ## Body **kind** `string` (default: trading) `trading` or `callouts`. Cannot be changed later. See [Callout competitions](/cabalspy-id/competitions-callouts). **name** `string` *required* Name, 1 to 100 characters. **chain** `string` *required* The chain traded on: solana, bnb, base, eth or rh. Callout competitions also accept `all`, for callouts on any chain. **metric** `string` *required* What ranks the traders: pnl\_usd, pnl, volume\_usd, volume, trades or win\_rate. See [Metrics](/cabalspy-id/competitions#metrics). Callout competitions: avg\_peak\_x, best\_peak\_x, sum\_peak\_x, hit\_rate or callouts, see [Callout metrics](/cabalspy-id/competitions-callouts#metrics). **duration\_hours** `number` *required* How long it runs once started, 1 to 8760 hours (one year). Fractions are allowed. **starts\_at** `string` Earliest start, ISO 8601, for example `2027-01-15T18:00:00Z`. Without a time zone UTC is assumed. Leave it out to start as soon as enough participants joined. **description** `string` Description, at most 2,000 characters. **enrollment** `string` `opt_in`: you join users one by one. `all_users`: every platform user takes part. **min\_participants** `integer` Participants needed before it starts, 1 to 1,000,000. **max\_participants** `integer` Maximum participants, at least min\_participants. null for no limit. **min\_trades** `integer` Trades a participant needs to be ranked, 0 to 1,000,000. Trading competitions only. **min\_volume\_usd** `number` USD volume a participant needs to be ranked, 0 or more. Trading competitions only. **min\_callouts** `integer` (default: 0) Callout competitions only: callouts a participant needs to be ranked, 0 to 100,000. At least one callout is always needed. **hit\_x** `number` (default: 2) Callout competitions only: the multiple that counts as a hit for `hit_rate`, above 1 and at most 1000. **late\_join** `boolean` Whether users can join after the start. **wallet\_trust** `string` `all` or `verified_only`: whether unverified wallets count in this competition. No effect on callout competitions. **prizes** `any` Free-form JSON describing the prizes, at most 5,000 characters as JSON. Stored and returned as you send it, for display. CabalSpy ID does not pay out prizes. Fields you leave out take their default value; the response shows every value in effect. ## Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/competitions" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Weekend PnL Cup", "description": "Best realized PnL on Solana over the weekend.", "chain": "solana", "metric": "pnl_usd", "duration_hours": 48, "starts_at": "2027-01-15T18:00:00Z", "enrollment": "opt_in", "min_participants": 10, "max_participants": 500, "min_trades": 3, "min_volume_usd": 100, "late_join": true, "prizes": [{"rank": 1, "prize": "1,000 USDC"}, {"rank": 2, "prize": "500 USDC"}] }' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/competitions", json={ "name": "Weekend PnL Cup", "chain": "solana", "metric": "pnl_usd", "duration_hours": 48, "starts_at": "2027-01-15T18:00:00Z", "min_participants": 10, "min_trades": 3, }, headers={"Authorization": "Bearer YOUR_KEY"}) c = r.json()["data"] print(c["id"], c["status"], c["starts_at"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/competitions", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ name: "Volume Sprint", chain: "base", metric: "volume_usd", duration_hours: 24, enrollment: "all_users", }), }); const { data } = await res.json(); console.log(data.id, data.status); ``` ## Response **201** with the competition object. **id** `string` The competition id. **name, description** `string` Name and description. **chain, chain\_name** `string` Chain id and name. **metric** `string` The ranking metric. **wallet\_trust** `string` all or verified\_only. **enrollment** `string` opt\_in or all\_users. **status** `string` scheduled, waiting, running, ended or cancelled. See [Lifecycle](/cabalspy-id/competitions#lifecycle). **starts\_at** `string` Earliest start, or null. **duration\_hours** `number` Duration in hours. **started\_at, ends\_at, ended\_at** `string` Actual start, planned end and actual end. Null until they happen. **min\_participants, max\_participants** `integer` Participant limits. max\_participants is null for no limit. **participants** `integer` Current number of participants. **kind** `string` trading or callouts. **min\_trades, min\_volume\_usd** `number` Minimums to be ranked. Callout competitions return min\_callouts and hit\_x instead. **late\_join** `boolean` Whether users can join after the start. **prizes** `any` Your prizes JSON, or null. **rules\_version** `integer` Raised by one with every rule change. **standings\_updated\_at** `string` When the standings were last computed, or null. **created\_at, updated\_at** `string` Creation and last change. **changes** `array` Every rule change, see [Competition detail](/cabalspy-id/competitions-list#competition-detail). Empty for a new competition. **changed\_while\_running** `boolean` Whether a rule was changed while the competition ran. ```json Response theme={null} { "success": true, "data": { "id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "name": "Weekend PnL Cup", "description": "Best realized PnL on Solana over the weekend.", "chain": "solana", "chain_name": "Solana", "metric": "pnl_usd", "wallet_trust": "all", "enrollment": "opt_in", "status": "scheduled", "starts_at": "2027-01-15T18:00:00Z", "duration_hours": 48.0, "started_at": null, "ends_at": null, "ended_at": null, "min_participants": 10, "max_participants": 500, "kind": "trading", "participants": 0, "min_trades": 3, "min_volume_usd": 100.0, "late_join": true, "prizes": [{ "rank": 1, "prize": "1,000 USDC" }, { "rank": 2, "prize": "500 USDC" }], "rules_version": 1, "standings_updated_at": null, "created_at": "2026-10-26T08:04:11Z", "updated_at": "2026-10-26T08:04:11Z", "changes": [], "changed_while_running": false }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | name, chain, metric or duration\_hours missing. | | 400 | invalid\_parameter | A field has an invalid value, or an unknown field was sent, or a field of the other kind (for example min\_trades on a callout competition). `parameter` names it. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled) | `kind: "callouts"`, but callouts are not switched on for your instance. | | 409 | competition\_limit | 5 competitions are already open. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # List and detail Source: https://docs.cabalspy.xyz/cabalspy-id/competitions-list GET /v1/competitions and GET /v1/competitions/detail: your instance's competitions, newest first, and one competition with its full rules history. ## List competitions `GET /v1/competitions` The competitions of your instance, newest first, as [competition objects](/cabalspy-id/competitions-create#response) without the rules history. ### Query Parameters **status** `string` Only competitions in this status: scheduled, waiting, running, ended or cancelled. **limit** `integer` (default: 50) Competitions per page, 1 to 500. **offset** `integer` (default: 0) How many to skip. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. > [!NOTE] > > Page with `offset`, or pass `pagination.next_cursor` as `cursor`. `next_cursor` is null on the last page. ### Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/competitions?status=running" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/competitions", params={"limit": 50, "offset": 0}, headers={"Authorization": "Bearer YOUR_KEY"}).json() for c in r["data"]: print(c["id"], c["name"], c["status"], c["participants"]) print("total", r["pagination"]["total"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ status: "scheduled" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/competitions?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data, pagination } = await res.json(); console.log(data.map(c => c.name), pagination.total); ``` ```json Response theme={null} { "success": true, "data": [ { "id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "name": "Weekend PnL Cup", "chain": "solana", "metric": "pnl_usd", "status": "running", "started_at": "2026-11-01T18:00:00Z", "ends_at": "2026-11-03T18:00:00Z", "participants": 214, "rules_version": 1, "standings_updated_at": "2026-11-02T09:15:00Z", "...": "the other fields of the competition object" } ], "pagination": { "limit": 50, "total": 1, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-02T09:16:02Z" } } ``` ## Competition detail `GET /v1/competitions/detail?id=` One competition, as the [competition object](/cabalspy-id/competitions-create#response) including every rule change. **id** `string` *required* The competition id. ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/competitions/detail?id=9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests c = requests.get("https://api-id.cabalspy.xyz/v1/competitions/detail", params={"id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f"}, headers={"Authorization": "Bearer YOUR_KEY"}).json()["data"] for ch in c["changes"]: print(ch["rules_version"], ch["during"], ch["changes"], ch["note"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ id: "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/competitions/detail?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.status, data.changed_while_running); ``` ### Rules history **changes** `array` **change** **rules\_version** `integer` The rules version this change created. **changed\_at** `string` When it was changed. **during** `string` The phase it was changed in: scheduled or running. **changes** `object` Per changed field: `from` and `to`. Durations are shown as duration\_hours. **note** `string` Your note on the change, or null. **changed\_while\_running** `boolean` Whether any rule was changed while the competition ran. ```json Response theme={null} { "success": true, "data": { "id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "name": "Weekend PnL Cup", "status": "running", "duration_hours": 72.0, "ends_at": "2026-11-04T18:00:00Z", "rules_version": 2, "...": "the other fields of the competition object", "changes": [ { "rules_version": 2, "changed_at": "2026-11-02T10:00:00Z", "during": "running", "changes": { "duration_hours": { "from": 48.0, "to": 72.0 } }, "note": "Extended by one day after the outage." } ], "changed_while_running": true }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-02T10:00:05Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | Detail: id missing. | | 400 | invalid\_parameter | status, limit, offset or id invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | competition\_not\_found | No competition with this id in your instance. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Participants Source: https://docs.cabalspy.xyz/cabalspy-id/competitions-participants POST /v1/competitions/join and /leave, GET /v1/competitions/participants: enter a platform user into a competition, take them out, and list the participants. With `enrollment: "opt_in"` you enter users one by one, for example when they press **Join** on your site. With `all_users` every platform user takes part automatically, see [Who takes part](/cabalspy-id/competitions#who-takes-part). ## Join `POST /v1/competitions/join` Enters one of your [platform users](/cabalspy-id/white-label). Answers **201** when the user joined, **200** with `"already": true` when they were already in. After the start, joining needs `late_join: true`. **id** `string` *required* The competition id. **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/competitions/join" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "external_id": "user_8412"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/competitions/join", json={"id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "external_id": "user_8412"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.status_code, r.json()["data"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/competitions/join", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ id: "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", external_id: "user_8412" }), }); const { data } = await res.json(); console.log(res.status, data.joined, data.already); ``` ```json Response theme={null} { "success": true, "data": { "competition_id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "external_id": "user_8412", "joined": true, "already": false }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ## Leave `POST /v1/competitions/leave` Takes a user out of a competition that has not ended, also while it runs. Their entry is removed from the standings. With `enrollment: "all_users"` the user stays out until you [join](#join) them again. Returns `competition_id`, `external_id` and `left` (false when the user was not in). **id** `string` *required* The competition id. **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. ```bash theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/competitions/leave" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "external_id": "user_8412"}' ``` ## List participants `GET /v1/competitions/participants` The participants in the order they joined. **id** `string` *required* The competition id. **limit** `integer` (default: 100) Participants per page, 1 to 1,000. **offset** `integer` (default: 0) How many to skip. Instead of offset you can pass `pagination.next_cursor` as `cursor`; it is null on the last page. ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/competitions/participants?id=9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f&limit=100" \ -H "Authorization: Bearer YOUR_KEY" ``` ```json Response theme={null} { "success": true, "data": [ { "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "joined_at": "2026-10-26T08:04:11Z" } ], "pagination": { "limit": 100, "total": 1, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:05:00Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | id or external\_id missing. | | 400 | invalid\_parameter | id, external\_id, limit or offset invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | competition\_not\_found | No competition with this id in your instance. | | 404 | platform\_user\_not\_found | No user with this id in your instance. | | 409 | competition\_closed | The competition already ended or was cancelled. | | 409 | late\_join\_closed | Join: the competition runs and does not take new participants. | | 409 | competition\_full | Join: max\_participants is reached. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Standings Source: https://docs.cabalspy.xyz/cabalspy-id/competitions-standings GET /v1/competitions/standings: the ranking of a competition with score and trading stats per participant, recomputed every 5 minutes and final after the end. The ranking of a [competition](/cabalspy-id/competitions): the ranked traders first, by rank, then the participants below the minimums. Each entry has the score and the trading stats during the competition. Standings are recomputed every 5 minutes while the competition runs and once more at the end. After the end `final` is true and the standings are the results. Entries of a [callout competition](/cabalspy-id/competitions-callouts#standings) carry callout stats (callouts, avg\_peak\_x, median\_peak\_x, best\_peak\_x, sum\_peak\_x, hits, hit\_rate and best\_call) instead of the trading stats below. ## Query Parameters **id** `string` *required* The competition id. **limit** `integer` (default: 100) Entries per page, 1 to 1,000. **offset** `integer` (default: 0) How many to skip. Instead of offset you can pass `pagination.next_cursor` as `cursor`; it is null on the last page. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/competitions/standings?id=9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f&limit=50" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests d = requests.get("https://api-id.cabalspy.xyz/v1/competitions/standings", params={"id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "limit": 50}, headers={"Authorization": "Bearer YOUR_KEY"}).json()["data"] print(d["status"], "final" if d["final"] else "as of " + str(d["updated_at"])) for s in d["standings"]: print(s["rank"], s["external_id"], s["score"], s["trades"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ id: "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/competitions/standings?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); data.standings.filter(s => s.ranked).forEach(s => console.log(s.rank, s.external_id, s.score)); ``` ## Response **data** `object` **data** **competition\_id** `string` The competition id. **status** `string` The competition's status. **metric** `string` The metric the score is in. **rules\_version** `integer` The current rules version. **updated\_at** `string` When the standings were computed, or null before the first computation. **final** `boolean` True once the competition ended. **standings** `array` **entry** **rank** `integer` Position, starting at 1. Null below the minimums. **ranked** `boolean` Whether the participant is ranked. **external\_id** `string` Your id of the participant. **csid\_id** `string` Their CabalSpy ID account id. **score** `number` The value of the competition's metric. **pnl, pnl\_usd** `number` Sells minus buys during the competition, native and USD. **volume, volume\_usd** `number` Buy plus sell volume, native and USD. **trades, buys, sells** `integer` Number of trades, buys and sells. **win\_count, closed\_count** `integer` Winning and closed positions. **win\_rate** `number` Winning closed positions in percent. **tokens** `integer` Tokens traded. **wallets** `integer` Wallets the participant competed with. **pagination** `object` limit, total (all entries), has\_more and next\_cursor (pass it as cursor; null on the last page). ```json Response theme={null} { "success": true, "data": { "competition_id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "status": "running", "metric": "pnl_usd", "rules_version": 1, "updated_at": "2026-11-02T09:15:00Z", "final": false, "standings": [ { "rank": 1, "ranked": true, "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "score": 3968.6, "pnl": 48.2, "pnl_usd": 3968.6, "volume": 408.7, "volume_usd": 33649.8, "trades": 40, "buys": 22, "sells": 18, "win_count": 14, "closed_count": 18, "win_rate": 77.78, "tokens": 21, "wallets": 2 }, { "rank": null, "ranked": false, "external_id": "user_8413", "csid_id": "8e2b4d6f-1a3c-4e5f-9b7d-0c2e4a6b8d10", "score": 12.4, "pnl": 0.15, "pnl_usd": 12.4, "volume": 0.9, "volume_usd": 74.1, "trades": 2, "buys": 1, "sells": 1, "win_count": 1, "closed_count": 1, "win_rate": 100.0, "tokens": 1, "wallets": 1 } ] }, "pagination": { "limit": 50, "total": 2, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-02T09:16:02Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | id missing. | | 400 | invalid\_parameter | id, limit or offset invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | competition\_not\_found | No competition with this id in your instance. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Update and cancel Source: https://docs.cabalspy.xyz/cabalspy-id/competitions-update POST /v1/competitions/update and /cancel: change any rule of a competition at any time, recorded in its rules history, or cancel it. ## Update `POST /v1/competitions/update` Changes any rule of a competition at any time before it ends, also while it runs. Pass the `id` and only the fields you want to change, with the same values as in [Create a competition](/cabalspy-id/competitions-create#body). Each real change raises `rules_version` by one, is recorded in the [rules history](/cabalspy-id/competitions-list#rules-history) with the phase it happened in and your note, and is sent as the `competition.updated` [webhook](/cabalspy-id/webhooks#competition-events). Fields sent with their current value are not a change; if nothing changes, the competition is returned as it is. * Changing `duration_hours` while running moves `ends_at` to `started_at` plus the new duration. * Switching `enrollment` to `all_users` enters every platform user. * New metrics, minimums and wallet rules apply from the next standings computation. **id** `string` *required* The competition id. **note** `string` Why you changed it, at most 500 characters. Shown in the rules history and the webhook. **name, description, chain, metric, wallet\_trust, enrollment, starts\_at, duration\_hours, min\_participants, max\_participants, min\_trades, min\_volume\_usd, late\_join, prizes** `any` The fields to change. At least one. On a [callout competition](/cabalspy-id/competitions-callouts), `min_callouts` and `hit_x` in place of `min_trades` and `min_volume_usd`. `kind` cannot be changed. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/competitions/update" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "duration_hours": 72, "note": "Extended by one day after the outage."}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/competitions/update", json={ "id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "min_trades": 5, "note": "Raised the minimum to stop wash trades.", }, headers={"Authorization": "Bearer YOUR_KEY"}) c = r.json()["data"] print(c["rules_version"], c["changes"][-1]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/competitions/update", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ id: "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", prizes: [{ rank: 1, prize: "2,000 USDC" }] }), }); const { data } = await res.json(); console.log(data.rules_version); ``` Returns the [competition object](/cabalspy-id/competitions-create#response) with its rules history. ## Cancel `POST /v1/competitions/cancel` Cancels a scheduled, waiting or running competition. Its status becomes `cancelled`, it no longer counts towards your 5 open competitions, and the `competition.ended` webhook is sent with `"cancelled": true` and no results. **id** `string` *required* The competition id. ```bash theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/competitions/cancel" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f"}' ``` Returns the competition object with status `cancelled`. ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | id missing, or no field to change. | | 400 | invalid\_parameter | A field has an invalid value, or an unknown field was sent. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | [feature\_not\_enabled](/cabalspy-id/errors#feature_not_enabled) | A callout competition, but callouts are no longer switched on for your instance. | | 404 | competition\_not\_found | No competition with this id in your instance. | | 409 | competition\_closed | The competition already ended or was cancelled. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Copy trading Source: https://docs.cabalspy.xyz/cabalspy-id/copy-trading Let your users copy the traders in their Trade Feed. For every trade of a copied trader, CabalSpy ID sends your app a ready-to-execute instruction sized by the user's settings. Your app executes it with the user's wallet and reports the result. Copy trading lets your users copy the traders in their [Trade Feed](/cabalspy-id/trade-feed). Whenever a copied trader buys or sells, CabalSpy ID sends your app a **copy instruction** for each user who copies them: which token, on which chain, buy or sell, how much, and the price limit. Your app executes the instruction with the user's wallet and reports back whether it was executed, failed or skipped. > [!WARNING] > > CabalSpy ID never holds keys and never executes trades. It only tells your app what to do. Your platform executes every trade with the user's own wallet, under your own rules, and stays responsible for it. Copy trading is available to every instance on every plan, there is nothing to switch on. A key only reaches the copy settings and instructions of its own instance. ## Who can copy Copying always happens in the name of one of your users: * a [platform user](/cabalspy-id/white-label), by `external_id` or `csid_id`, * or a person who signed in to your app with CabalSpy ID and granted the scope `trade_feed`, by `csid_id`. The user must be within your plan's user limit. Users without the scope get 403 [consent\_required](/cabalspy-id/errors#consent_required). Platform users always have it. A user can copy any trader they can add to their Trade Feed: a CabalSpy ID user whose trading is public, or another of your own platform users. Copy settings are stored per user and trader, and switching copying on adds the trader to the user's Trade Feed if they are not there yet. ## How it works **1. The user switches copying on** Your backend calls [POST /v1/copy-trading/settings](/cabalspy-id/copy-trading-settings) with the user, the trader and how much to copy. From now on your instance copies this trader for this user. **2. The trader trades** CabalSpy ID sees the trade on one of the trader's verified wallets, the same moment it reaches the Trade Feed. **3. CabalSpy ID sends an instruction** For each user who copies the trader, CabalSpy ID sizes the trade by the user's settings and sends a [copy instruction](#the-instruction) as the `copy_trade.instruction` [webhook](/cabalspy-id/webhooks#copy-trading-events) and on the [copy trading stream](/cabalspy-id/copy-trading-stream). You can also poll [GET /v1/copy-trading/instructions](/cabalspy-id/copy-trading-instructions). **4. Your app executes it** Within 120 seconds, your app swaps with the user's wallet, respecting `max_price_usd` (buys) or `min_price_usd` (sells). **5. Your app reports the result** Call [POST /v1/copy-trading/instructions/status](/cabalspy-id/copy-trading-status) with `executed`, `failed` or `skipped`, and the transaction signature when there is one. The result decides whether later sells of that token are copied. ## One platform at a time A user can use several platforms with CabalSpy ID, but each trader is copied by **one platform at a time**, so a user is never copied twice. The platform that switches copying on for a trader receives that trader's instructions for that user, and nobody else does. While your platform copies a trader for a user, another platform cannot switch copying on for the same trader and gets 409 [copy\_managed\_elsewhere](/cabalspy-id/errors#copy_managed_elsewhere). It sees `managed_by_other_platform: true` in [GET /v1/copy-trading/settings](/cabalspy-id/copy-trading-settings#read-the-settings). Once the first platform switches copying off, another platform can take over. ## Sizing Each user has their own settings per trader. See [Copy settings](/cabalspy-id/copy-trading-settings) for all fields and limits. **Buys.** The amount in USD comes from `mode`: | Mode | Amount of each copied buy | | - | - | | `fixed_usd` (default) | Always `amount_usd`, default \$50. | | `percent` | `percent` % of the trader's buy in USD. 100 (default) is the same size as the trader, 10 is a tenth, up to 1,000. A buy whose USD value is unknown is not copied. | `max_usd`, if set, caps every buy. Buys that come out **below \$1** are not sent. The instruction carries the amount in USD (`amount_usd`) and, where the price of the chain's native coin is known, in the native coin (`amount_native`, for example SOL). **Sells.** With `sides: "both"` (default), sells are copied as a share of the user's copied position, not as an amount: * The trader sold part of their position: sell the same share. A trader who sold 50 % of their tokens sends `sell_percent: 50`. * The trader closed their position: `sell_percent: 100`. * A sell is only sent when the user has a **copied buy** in that token from that trader that you did not report as `failed` or `skipped`. A user who never copied the entry does not get the exit. * Sells whose entry is unknown, for example of tokens the trader bought before CabalSpy ID tracked their wallet, are not copied. With `sides: "buys"`, only buys are copied and the user decides when to sell. **Price limit.** Every instruction carries the trader's price (`price_usd`) and the user's slippage (`slippage_bps`, default 300 = 3 %). For a buy, `max_price_usd` is the trader's price plus the slippage, for a sell `min_price_usd` is the trader's price minus the slippage. Do not execute beyond that limit; report `skipped` instead. **Example.** A user copies with `mode: "fixed_usd"`, `amount_usd: 25` and `max_usd: 20`. The trader buys 1,000 tokens for 1 SOL ($150), so at $0.15 per token. The user's instruction: buy for \*\*$20** (capped), 0.133333333 SOL, at most $0.1545 per token (+3 %). Copying does **not** depend on the user's alert filters. A trader the user muted in their Trade Feed, or with buy or sell alerts off or a minimum trade size, is still copied in full. ## The instruction One instruction per user and trade. The same trade is never sent twice for the same user: the `id` is fixed per user and trade, so deduplicate on it. ```json copy_trade.instruction theme={null} { "id": "9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b", "type": "copy_instruction", "status": "pending", "created_at": "2026-11-01T18:02:11Z", "expires_at": "2026-11-01T18:04:11Z", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/1/maze_normal.jpg", "kol": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "action": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "CPT", "name": "Copycat", "logo": "https://...", "side": "buy", "amount_usd": 20.0, "amount_native": 0.133333333, "currency": "SOL", "sell_percent": null, "price_usd": 0.15, "max_price_usd": 0.1545, "min_price_usd": null, "slippage_bps": 300 }, "source_trade": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "CPT", "name": "Copycat", "logo": "https://...", "side": "buy", "label": "new", "sold_percent": null, "amount_native": 1.0, "currency": "SOL", "amount_usd": 150.0, "token_amount": 1000.0, "price_usd": 0.15, "pnl_usd": null, "pnl_percent": null, "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "wallet_url": "https://solscan.io/account/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "tx_signature": "5xr8...", "tx_url": "https://solscan.io/tx/5xr8..." }, "settings": { "enabled": true, "mode": "fixed_usd", "amount_usd": 25.0, "percent": 100.0, "max_usd": 20.0, "sides": "both", "slippage_bps": 300, "updated_at": "2026-11-01T17:58:40Z" }, "links": { "token": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "terminal": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "profile": "https://id.cabalspy.xyz/u/MazeCCC" }, "tx_signature": null, "executed_amount_usd": null, "note": null, "updated_at": "2026-11-01T18:02:11Z" } ``` A copied sell looks the same, with `"side": "sell"`, `sell_percent` set, `amount_usd` and `amount_native` null and `min_price_usd` instead of `max_price_usd`: ```json action of a sell theme={null} { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "CPT", "name": "Copycat", "logo": "https://...", "side": "sell", "amount_usd": null, "amount_native": null, "currency": "SOL", "sell_percent": 50.0, "price_usd": 0.225, "max_price_usd": null, "min_price_usd": 0.21825, "slippage_bps": 300 } ``` **id** `string` The instruction id, fixed per user and trade. Deduplicate on it. **type** `string` Always `copy_instruction`. **status** `string` `pending`, `executed`, `failed`, `skipped` or `expired`. See [Statuses](#statuses). **created\_at, expires\_at** `string` When the instruction was made, and until when it is meant to be executed: 120 seconds later. **csid\_id** `string` The user who copies. **external\_id** `string` Your own id of the user when they are a platform user, otherwise null. Only in the webhook and on the stream; look the user up by `csid_id` in REST responses. **trader** `object` The trader who traded: csid\_id, username, name, image\_url, kol and profile\_url. username and profile\_url are null for platform users. **action** `object` What to execute. **action** **blockchain** `string` solana, bnb, base, eth or rh. **mint** `string` The token address. **symbol, name, logo** `string` Token info, any of them can be null. **side** `string` `buy` or `sell`. **amount\_usd** `number` Buys: how much to buy, in USD. Null for sells. **amount\_native** `number` Buys: the same amount in the chain's native coin (`currency`), at the trader's rate. Null for sells, and when the rate is unknown. **currency** `string` The chain's native coin: SOL, BNB or ETH. **sell\_percent** `number` Sells: the share of the user's copied position to sell, 0 to 100. 100 when the trader closed their position. Null for buys. **price\_usd** `number` The trader's price per token in USD, or null when unknown. **max\_price\_usd** `number` Buys: the highest price per token to accept, the trader's price plus `slippage_bps`. Null for sells. **min\_price\_usd** `number` Sells: the lowest price per token to accept, the trader's price minus `slippage_bps`. Null for buys. **slippage\_bps** `integer` The user's slippage in basis points, 300 = 3 %. **source\_trade** `object` The trader's own trade, the same trade object as in the [Trade Feed](/cabalspy-id/trade-feed-api#the-trade-item): side, label (`new`, `add`, `partial`, `close`), sold\_percent, amounts in the native coin and USD, token amount, price, realized PnL of a sell, the trader's wallet and the transaction with explorer links. **settings** `object` The user's [copy settings](/cabalspy-id/copy-trading-settings) for this trader at the time of the instruction. **links** `object` token (the token page), terminal (the CabalSpy Terminal on Solana and BNB Chain, otherwise null) and profile (the trader's profile). **tx\_signature, executed\_amount\_usd, note** `string` What your app reported, see [Report the result](/cabalspy-id/copy-trading-status). Null until then. **updated\_at** `string` When the instruction was made or last reported. ## Statuses | Status | Meaning | | - | - | | `pending` | Waiting for your app. | | `executed` | You reported that the trade went through. | | `failed` | You reported that the trade failed, for example for lack of balance. | | `skipped` | You decided not to execute it, for example because the price moved beyond the limit. | | `expired` | Still pending 120 seconds after it was made. You can still report it, for example `executed` when your transaction confirmed late. | `executed`, `failed` and `skipped` are final. A copied buy reported as `failed` or `skipped` means later sells of that token are not copied for that user. A buy still `pending` or `expired` counts as a position. ## Quickstart **1. Switch copying on** Copy `@MazeCCC` for one of your platform users with $25 per buy, at most $20: ```bash theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/copy-trading/settings" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412", "trader": "MazeCCC", "enabled": true, "mode": "fixed_usd", "amount_usd": 25, "max_usd": 20}' ``` **2. Receive instructions** Subscribe your webhook to `copy_trade.instruction` on the instance's [Webhooks](/cabalspy-id/dashboard#webhooks) tab, or connect to the [copy trading stream](/cabalspy-id/copy-trading-stream). Verify the signature as described in [Webhooks](/cabalspy-id/webhooks#verify-the-signature) and answer `2xx` right away. **3. Execute** Look up the user by `external_id` or `csid_id`, check `expires_at`, and swap with their wallet within the price limit. For sells, sell `sell_percent` % of what the user holds from their copied buys of this token. **4. Report** Report every instruction, also the ones you did not execute. ```python Python theme={null} import requests from flask import Flask, request API = "https://api-id.cabalspy.xyz" H = {"Authorization": "Bearer YOUR_KEY"} app = Flask(__name__) seen = set() @app.post("/webhooks/csid") def webhook(): # verify the Standard Webhooks signature first, see Webhooks event = request.get_json() if event["type"] != "copy_trade.instruction" or event["data"]["id"] in seen: return "", 204 i = event["data"] seen.add(i["id"]) queue_copy(i) # do the work outside the request return "", 204 def execute(i): a = i["action"] try: if a["side"] == "buy": # your swap: spend a["amount_usd"] (or a["amount_native"] of a["currency"]) # on a["mint"], at most a["max_price_usd"] per token sig, usd = my_buy(i["external_id"] or i["csid_id"], a) else: # sell a["sell_percent"] % of the user's copied position, at least a["min_price_usd"] sig, usd = my_sell(i["external_id"] or i["csid_id"], a) body = {"id": i["id"], "status": "executed", "tx_signature": sig, "executed_amount_usd": usd} except PriceMoved: body = {"id": i["id"], "status": "skipped", "note": "price above the limit"} except Exception as e: body = {"id": i["id"], "status": "failed", "note": str(e)[:300]} requests.post(f"{API}/v1/copy-trading/instructions/status", json=body, headers=H) ``` ```javascript JavaScript theme={null} import express from "express"; const API = "https://api-id.cabalspy.xyz"; const H = { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }; const app = express(); const seen = new Set(); app.post("/webhooks/csid", express.json(), (req, res) => { // verify the Standard Webhooks signature first, see Webhooks const event = req.body; res.sendStatus(204); if (event.type !== "copy_trade.instruction" || seen.has(event.data.id)) return; seen.add(event.data.id); execute(event.data); }); async function execute(i) { const a = i.action; let body; try { const { sig, usd } = a.side === "buy" ? await myBuy(i.external_id ?? i.csid_id, a) // a.amount_usd on a.mint, at most a.max_price_usd : await mySell(i.external_id ?? i.csid_id, a); // a.sell_percent % of the copied position, at least a.min_price_usd body = { id: i.id, status: "executed", tx_signature: sig, executed_amount_usd: usd }; } catch (e) { body = { id: i.id, status: e.priceMoved ? "skipped" : "failed", note: String(e.message).slice(0, 300) }; } await fetch(`${API}/v1/copy-trading/instructions/status`, { method: "POST", headers: H, body: JSON.stringify(body) }); } ``` If your app was down, list what is still open with `GET /v1/copy-trading/instructions?status=pending` and decide whether to execute or skip each one. ## Stopping Copying of a trader stops for a user when: * you switch it off with `"enabled": false` in [POST /v1/copy-trading/settings](/cabalspy-id/copy-trading-settings), * the trader is removed from the user's Trade Feed, * the user revokes your app's access or the scope `trade_feed`, or falls outside your plan's user limit, * the trader makes their trading private. Instructions already sent stay readable and can still be reported. ## Dashboard The instance's [Copy trading](/cabalspy-id/dashboard#copy-trading) tab shows how many users copy how many traders, the instructions of the last 24 hours by status, the executed volume and the newest instructions. ## Endpoints | Method | Path | Description | | - | - | - | | GET, POST | [/v1/copy-trading/settings](/cabalspy-id/copy-trading-settings) | A user's copy settings per trader. Switch copying on or off. | | GET | [/v1/copy-trading/instructions](/cabalspy-id/copy-trading-instructions) | Instructions of your instance, newest first, by user and status. | | GET | [/v1/copy-trading/instructions/item](/cabalspy-id/copy-trading-instructions#get-one-instruction) | One instruction. | | POST | [/v1/copy-trading/instructions/status](/cabalspy-id/copy-trading-status) | Report executed, failed or skipped. | | WS | [/v1/copy-trading/stream](/cabalspy-id/copy-trading-stream) | Every new instruction, live. | | Webhook | [copy\_trade.instruction](/cabalspy-id/webhooks#copy-trading-events) | Every new instruction, pushed to your backend. | # Copy instructions Source: https://docs.cabalspy.xyz/cabalspy-id/copy-trading-instructions GET /v1/copy-trading/instructions and GET /v1/copy-trading/instructions/item: the copy instructions of your instance, newest first, by user and status, and one instruction by id. The [copy instructions](/cabalspy-id/copy-trading#the-instruction) CabalSpy ID made for your users. New instructions are pushed as the `copy_trade.instruction` [webhook](/cabalspy-id/webhooks#copy-trading-events) and on the [stream](/cabalspy-id/copy-trading-stream); use these endpoints to catch up after downtime, to show a user's copy history, or to poll when you have neither. A key only reaches the instructions of its own instance: those made for users whose copying your instance switched on. ## List instructions `GET /v1/copy-trading/instructions` Instructions newest first, for all your users or one. ### Query Parameters **external\_id** `string` Only instructions of this user, by your own user id. Alternatively pass csid\_id. Without either, instructions of all your users. **csid\_id** `string` Only instructions of this user, by CabalSpy ID. **status** `string` Only instructions with this status: `pending`, `executed`, `failed`, `skipped` or `expired`. `pending` means not reported and not yet expired, `expired` means not reported and older than 120 seconds. **limit** `integer` (default: 50) Instructions per page, 1 to 100. **cursor** `string` Cursor for the next page, the pagination.next\_cursor from the previous response. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ### Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/copy-trading/instructions?status=pending&limit=100" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests params = {"external_id": "user_8412", "limit": 50} while True: r = requests.get("https://api-id.cabalspy.xyz/v1/copy-trading/instructions", params=params, headers={"Authorization": "Bearer YOUR_KEY"}).json() for i in r["data"]: a = i["action"] print(i["created_at"], a["side"], a["symbol"], a["amount_usd"] or f'{a["sell_percent"]}%', i["status"]) if not r["pagination"]["has_more"]: break params["cursor"] = r["pagination"]["next_cursor"] ``` ```javascript JavaScript theme={null} // after a restart: everything still waiting for you const res = await fetch("https://api-id.cabalspy.xyz/v1/copy-trading/instructions?status=pending&limit=100", { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); data.forEach(i => queueCopy(i)); ``` ### Response **data** `array` [Instruction objects](/cabalspy-id/copy-trading#the-instruction), newest first. `external_id` is not part of them here; match the user by `csid_id`. **pagination** `object` limit, has\_more and next\_cursor (pass it as cursor; null on the last page). ```json Response theme={null} { "success": true, "data": [ { "id": "9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b", "type": "copy_instruction", "status": "executed", "created_at": "2026-11-01T18:02:11Z", "expires_at": "2026-11-01T18:04:11Z", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/1/maze_normal.jpg", "kol": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "action": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "CPT", "name": "Copycat", "logo": "https://...", "side": "buy", "amount_usd": 20.0, "amount_native": 0.133333333, "currency": "SOL", "sell_percent": null, "price_usd": 0.15, "max_price_usd": 0.1545, "min_price_usd": null, "slippage_bps": 300 }, "source_trade": { "side": "buy", "label": "new", "amount_usd": 150.0, "price_usd": 0.15, "...": "the trader's trade" }, "settings": { "enabled": true, "mode": "fixed_usd", "amount_usd": 25.0, "percent": 100.0, "max_usd": 20.0, "sides": "both", "slippage_bps": 300, "updated_at": "2026-11-01T17:58:40Z" }, "links": { "token": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "terminal": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "profile": "https://id.cabalspy.xyz/u/MazeCCC" }, "tx_signature": "4hXt9...", "executed_amount_usd": 19.8, "note": null, "updated_at": "2026-11-01T18:02:19Z" } ], "pagination": { "limit": 50, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:05:00Z" } } ``` ### Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | status, limit, cursor or csid\_id invalid. For status, `allowed` lists the accepted values. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | [consent\_required](/cabalspy-id/errors#consent_required) | The user you filtered by has not granted your app the scope `trade_feed`, or is beyond your plan's user limit. | | 404 | [platform\_user\_not\_found](/cabalspy-id/errors#platform_user_not_found) | No platform user with this external\_id. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | ## Get one instruction `GET /v1/copy-trading/instructions/item` One instruction by id, as an [instruction object](/cabalspy-id/copy-trading#the-instruction), with its current status and what you reported. ### Query Parameters **id** `string` *required* The instruction id. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/copy-trading/instructions/item?id=9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/copy-trading/instructions/item", params={"id": "9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b"}, headers={"Authorization": "Bearer YOUR_KEY"}) i = r.json()["data"] print(i["status"], i["tx_signature"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/copy-trading/instructions/item?id=9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b", { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.status, data.action.side, data.action.mint); ``` ### Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | id is missing. | | 400 | invalid\_parameter | id is not a valid id. | | 404 | [not\_found](/cabalspy-id/errors#not_found) | No copy instruction with this id for your instance. | # Copy settings Source: https://docs.cabalspy.xyz/cabalspy-id/copy-trading-settings GET and POST /v1/copy-trading/settings: switch copying of a trader on or off for one of your users, and set the amount per buy, a cap, buys only or buys and sells, and the slippage. A user's [copy trading](/cabalspy-id/copy-trading) settings, one set per trader in their [Trade Feed](/cabalspy-id/trade-feed). They apply to the trader's next trade from the moment you save them; instructions already sent are not changed. The user is a [platform user](/cabalspy-id/white-label) (by `external_id` or `csid_id`) or a person who signed in to your app with the scope `trade_feed` (by `csid_id`), within your plan's user limit. | Setting | Values | Default | Effect | | - | - | - | - | | `enabled` | `true` or `false` | `false` | Copy this trader. | | `mode` | `fixed_usd` or `percent` | `fixed_usd` | How buys are sized. | | `amount_usd` | Above 0, at most 1,000,000 | 50 | `fixed_usd`: every copied buy is this many USD. | | `percent` | Above 0, at most 1,000 | 100 | `percent`: every copied buy is this share of the trader's buy in USD. 100 is the same size as the trader. | | `max_usd` | Above 0, at most 1,000,000, or null | null | Cap per copied buy, in both modes. `null` or `0` removes the cap. | | `sides` | `buys` or `both` | `both` | `both`: buys and sells are copied. `buys`: only buys. | | `slippage_bps` | Whole number, 1 to 5,000 | 300 | The price limit sent with every instruction, in basis points: 300 = 3 %. | Copied buys below \$1 are not sent. Sells are copied as a share of the user's copied position, see [Sizing](/cabalspy-id/copy-trading#sizing). ## Read the settings `GET /v1/copy-trading/settings` All traders in the user's Trade Feed with their copy settings, those copied first, then newest first. With `trader`, only that one trader as a single object. ### Query Parameters **external\_id** `string` The user, by your own user id. Alternatively pass csid\_id. **csid\_id** `string` The user's CabalSpy ID. Required unless you pass external\_id. **trader** `string` Only this trader: a handle (with or without @) or a csid\_id. Alternatively pass trader\_external\_id for one of your own platform users. **trader\_external\_id** `string` Only this trader, by your own user id of a platform user. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ### Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/copy-trading/settings?external_id=user_8412" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/copy-trading/settings", params={"csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "trader": "MazeCCC"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]["copy"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ external_id: "user_8412" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/copy-trading/settings?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); for (const t of (await res.json()).data) { console.log(t.trader.username, t.copy.enabled, t.managed_by_other_platform); } ``` ### Response **data** `array` One entry per trader in the user's Trade Feed, or a single entry when you passed `trader`. **entry** **trader** `object` csid\_id, username, name, image\_url, kol and profile\_url. username and profile\_url are null for platform users. **copy** `object` enabled, mode, amount\_usd, percent, max\_usd, sides, slippage\_bps and updated\_at (when the copy settings were last changed, or null). **managed\_by\_other\_platform** `boolean` `true` when another platform copies this trader for this user. You cannot switch copying on until it is switched off there, see [One platform at a time](/cabalspy-id/copy-trading#one-platform-at-a-time). ```json Response theme={null} { "success": true, "data": [ { "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/1/maze_normal.jpg", "kol": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "copy": { "enabled": true, "mode": "fixed_usd", "amount_usd": 25.0, "percent": 100.0, "max_usd": 20.0, "sides": "both", "slippage_bps": 300, "updated_at": "2026-11-01T17:58:40Z" }, "managed_by_other_platform": false } ], "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:00:00Z" } } ``` The same `copy` object is also part of each trader's `settings` in [GET /v1/trade-feed/traders](/cabalspy-id/trade-feed-api#list-traders). ### Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | Neither csid\_id nor external\_id was passed. | | 400 | invalid\_parameter | csid\_id is not a valid id. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | [consent\_required](/cabalspy-id/errors#consent_required) | The user has not granted your app the scope `trade_feed`, or is beyond your plan's user limit. | | 403 | [plan\_user\_limit](/cabalspy-id/errors#plan_user_limit) | The user signed in beyond your plan's user limit. | | 404 | [platform\_user\_not\_found](/cabalspy-id/errors#platform_user_not_found) | No platform user with this external\_id or trader\_external\_id. | | 404 | [trader\_not\_found](/cabalspy-id/errors#trader_not_found) | No CabalSpy ID trader with this handle or csid\_id. | | 404 | [not\_in\_trade\_feed](/cabalspy-id/errors#not_in_trade_feed) | The trader is not in the user's Trade Feed. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | ## Change the settings `POST /v1/copy-trading/settings` Changes the copy settings of one user for one trader. Send only the settings you want to change, at least one of them. If the trader is not in the user's Trade Feed yet, they are added first (with the user's default alert settings) and the response has status **201**; otherwise **200**. Switching copying on (`"enabled": true`) makes your instance the platform that copies this trader for this user. While another platform copies the trader for the user, the request is refused with 409 `copy_managed_elsewhere`. Each call counts towards the user's Trade Feed changes, at most 120 per hour. ### Body **external\_id** `string` The user, by your own user id. Alternatively pass csid\_id. **csid\_id** `string` The user's CabalSpy ID. Required unless you pass external\_id. **trader** `string` *required* The trader to copy: a handle (with or without @) or a csid\_id. Alternatively pass trader\_external\_id. **trader\_external\_id** `string` The trader, by your own user id of one of your platform users. **enabled** `boolean` `true` to copy this trader, `false` to stop. **mode** `string` `fixed_usd` or `percent`. **amount\_usd** `number` USD per copied buy in `fixed_usd` mode. Above 0, at most 1,000,000. **percent** `number` Share of the trader's buy in `percent` mode. Above 0, at most 1,000. **max\_usd** `number` Cap per copied buy. Above 0, at most 1,000,000. `null` or `0` removes the cap. **sides** `string` `buys` or `both`. **slippage\_bps** `integer` Whole number from 1 to 5,000. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ### Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/copy-trading/settings" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412", "trader": "MazeCCC", "enabled": true, "mode": "fixed_usd", "amount_usd": 25, "max_usd": 20}' ``` ```python Python theme={null} import requests # copy 10 % of every buy, no cap, buys only r = requests.post("https://api-id.cabalspy.xyz/v1/copy-trading/settings", json={"csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "trader": "MazeCCC", "enabled": True, "mode": "percent", "percent": 10, "max_usd": None, "sides": "buys"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.status_code, r.json()["data"]["copy"]) ``` ```javascript JavaScript theme={null} // stop copying const res = await fetch("https://api-id.cabalspy.xyz/v1/copy-trading/settings", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412", trader: "MazeCCC", enabled: false }), }); console.log((await res.json()).data.copy.enabled); ``` ### Response The trader's entry as in [Read the settings](#read-the-settings): `trader`, `copy` and `managed_by_other_platform`. ```json Response theme={null} { "success": true, "data": { "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/1/maze_normal.jpg", "kol": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "copy": { "enabled": true, "mode": "fixed_usd", "amount_usd": 25.0, "percent": 100.0, "max_usd": 20.0, "sides": "both", "slippage_bps": 300, "updated_at": "2026-11-01T17:58:40Z" }, "managed_by_other_platform": false }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T17:58:40Z" } } ``` ### Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | No user, no trader, or none of the settings was sent (`parameter` is then `enabled`). | | 400 | invalid\_parameter | A setting has the wrong type or is out of range. `parameter` names it. | | 400 | [cannot\_add\_self](/cabalspy-id/errors#cannot_add_self) | The user and the trader are the same person. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | [consent\_required](/cabalspy-id/errors#consent_required) | The user has not granted your app the scope `trade_feed`, or is beyond your plan's user limit. | | 403 | [trading\_private](/cabalspy-id/errors#trading_private) | The trader keeps their trading private. | | 404 | [platform\_user\_not\_found](/cabalspy-id/errors#platform_user_not_found) | No platform user with this external\_id or trader\_external\_id. | | 404 | [trader\_not\_found](/cabalspy-id/errors#trader_not_found) | No CabalSpy ID trader with this handle or csid\_id. | | 409 | [copy\_managed\_elsewhere](/cabalspy-id/errors#copy_managed_elsewhere) | Another platform copies this trader for this user. It has to be switched off there first. | | 409 | [trade\_feed\_full](/cabalspy-id/errors#trade_feed_full) | The trader would have to be added, and the user's Trade Feed already has 300 traders. | | 429 | [rate\_limited](/cabalspy-id/errors#rate_limited) | More than 120 Trade Feed changes for this user in an hour. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Report the result Source: https://docs.cabalspy.xyz/cabalspy-id/copy-trading-status POST /v1/copy-trading/instructions/status: tell CabalSpy ID whether a copy instruction was executed, failed or skipped, with the transaction signature and the executed amount. After your app has handled a [copy instruction](/cabalspy-id/copy-trading#the-instruction), report what happened. Report **every** instruction, also those you did not execute: * `executed`: the trade went through. Add the transaction signature and the amount in USD. * `failed`: you tried and it did not work, for example for lack of balance or a failed transaction. * `skipped`: you decided not to execute it, for example because the price moved beyond `max_price_usd` or `min_price_usd`, the instruction expired, or your own risk rules said no. The result matters for later sells: a copied buy reported as `failed` or `skipped` means the trader's later sells of that token are not copied for that user, because there is no position to sell. A buy you never report counts as a position. You can report an instruction after it expired, for example `executed` when your transaction confirmed late. `executed`, `failed` and `skipped` are final. Sending the same report again is fine and returns the instruction unchanged, so you can retry safely. A different status after that is refused with 409 `already_reported`. `POST /v1/copy-trading/instructions/status` ### Body **id** `string` *required* The instruction id. **status** `string` *required* `executed`, `failed` or `skipped`. **tx\_signature** `string` The transaction signature or hash, 10 to 200 characters. **executed\_amount\_usd** `number` What was actually bought or sold, in USD. Above 0, at most 10,000,000. **note** `string` A short note, for example why it failed or was skipped. Longer notes are cut at 300 characters. Shown on the dashboard's [Copy trading](/cabalspy-id/dashboard#copy-trading) tab. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ### Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/copy-trading/instructions/status" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"id": "9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b", "status": "executed", "tx_signature": "4hXt9...", "executed_amount_usd": 19.8}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/copy-trading/instructions/status", json={"id": "9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b", "status": "failed", "note": "insufficient balance"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]["status"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/copy-trading/instructions/status", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ id: "9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b", status: "skipped", note: "price above the limit" }), }); console.log((await res.json()).data.status); ``` ### Response The [instruction](/cabalspy-id/copy-trading#the-instruction) with its new status, `tx_signature`, `executed_amount_usd`, `note` and `updated_at`. ```json Response theme={null} { "success": true, "data": { "id": "9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b", "type": "copy_instruction", "status": "executed", "created_at": "2026-11-01T18:02:11Z", "expires_at": "2026-11-01T18:04:11Z", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "action": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "side": "buy", "amount_usd": 20.0, "...": "the full action" }, "...": "the full instruction", "tx_signature": "4hXt9...", "executed_amount_usd": 19.8, "note": null, "updated_at": "2026-11-01T18:02:19Z" }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:02:19Z" } } ``` ### Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | id or status is missing. | | 400 | invalid\_parameter | id is not a valid id, status is not `executed`, `failed` or `skipped`, tx\_signature is not 10 to 200 characters, or executed\_amount\_usd is not a number above 0. `parameter` names it. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | [not\_found](/cabalspy-id/errors#not_found) | No copy instruction with this id for your instance. | | 409 | [already\_reported](/cabalspy-id/errors#already_reported) | The instruction was already reported with a different status. The message names it. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Copy trading stream Source: https://docs.cabalspy.xyz/cabalspy-id/copy-trading-stream wss://api-id.cabalspy.xyz/v1/copy-trading/stream: every new copy instruction of your instance, live, the moment a copied trader trades. A WebSocket with every new [copy instruction](/cabalspy-id/copy-trading#the-instruction) of your instance as it is made. It carries the same instructions as the `copy_trade.instruction` [webhook](/cabalspy-id/webhooks#copy-trading-events), without the round trip to a public URL, so it suits a trading backend that holds a connection open. It is available on every plan and only carries your own instance's instructions. ## Connecting Pass your API key as the `api_key` or `apiKey` query parameter, or as an Authorization Bearer header. The connection starts streaming right away, there is nothing to subscribe to. ```text theme={null} wss://api-id.cabalspy.xyz/v1/copy-trading/stream?api_key=YOUR_KEY ``` **api\_key** `string` *required* Your API key. `apiKey` works too, or an Authorization Bearer header. **instance** `string` Your Instance ID. Only needed when your account has several instances. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://api-id.cabalspy.xyz/v1/copy-trading/stream?api_key=YOUR_KEY"); ws.onmessage = (e) => { const msg = JSON.parse(e.data); switch (msg.event) { case "copy_trade.instruction": { const i = msg.data; console.log(i.external_id ?? i.csid_id, i.action.side, i.action.symbol, i.action.amount_usd ?? i.action.sell_percent + "%"); queueCopy(i); // execute, then report with POST /v1/copy-trading/instructions/status break; } case "error": console.error(msg.error.code, msg.error.message); break; } }; ``` ```python Python theme={null} import asyncio, json, websockets async def main(): url = "wss://api-id.cabalspy.xyz/v1/copy-trading/stream?api_key=YOUR_KEY" async with websockets.connect(url) as ws: async for raw in ws: msg = json.loads(raw) if msg["event"] == "copy_trade.instruction": i = msg["data"] print(i["id"], i["action"]["side"], i["action"]["mint"], i["expires_at"]) queue_copy(i) elif msg["event"] == "error": print("error", msg["error"]) asyncio.run(main()) ``` ## Messages Every message is a JSON object with an `event` field. | Event | When | Fields | | - | - | - | | `ready` | Right after connecting. | `data.events`: the events this stream sends. | | `copy_trade.instruction` | A copied trader traded and an instruction was made for one of your users. | `id`: the instruction id. `data`: the [instruction object](/cabalspy-id/copy-trading#the-instruction) plus `external_id`. | | `heartbeat` | After 30 seconds without a message from you. | `ts`: Unix time in seconds. | | `pong` | After you send `ping`. | None. | | `error` | The connection is refused. | `error.code` and `error.message`. The server then closes with code 4403. | ```json ready theme={null} { "event": "ready", "data": { "events": ["copy_trade.instruction"] } } ``` ```json copy_trade.instruction theme={null} { "event": "copy_trade.instruction", "id": "9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b", "data": { "id": "9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b", "type": "copy_instruction", "status": "pending", "created_at": "2026-11-01T18:02:11Z", "expires_at": "2026-11-01T18:04:11Z", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/1/maze_normal.jpg", "kol": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "action": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "CPT", "name": "Copycat", "logo": "https://...", "side": "buy", "amount_usd": 20.0, "amount_native": 0.133333333, "currency": "SOL", "sell_percent": null, "price_usd": 0.15, "max_price_usd": 0.1545, "min_price_usd": null, "slippage_bps": 300 }, "source_trade": { "side": "buy", "label": "new", "amount_usd": 150.0, "price_usd": 0.15, "...": "the trader's trade" }, "settings": { "enabled": true, "mode": "fixed_usd", "amount_usd": 25.0, "percent": 100.0, "max_usd": 20.0, "sides": "both", "slippage_bps": 300, "updated_at": "2026-11-01T17:58:40Z" }, "links": { "token": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "terminal": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "profile": "https://id.cabalspy.xyz/u/MazeCCC" } } } ``` ```json heartbeat theme={null} { "event": "heartbeat", "ts": 1793548975 } ``` ```json error theme={null} { "event": "error", "error": { "code": "too_many_connections", "message": "At most 5 copy trading stream connections per API key." } } ``` When several of your services hold a connection, each of them receives every instruction. Deduplicate on the instruction `id` before you execute, and if you also receive the webhook, use the same `id` across both. ## Staying connected Send the text `ping` at any time, the server answers with `pong`. When you send nothing for 30 seconds, the server sends a `heartbeat` and checks that your key is still valid. A revoked or disabled key ends the connection. Instructions made while you were disconnected are not replayed. Reconnect with a short backoff and fetch what is still open with [GET /v1/copy-trading/instructions](/cabalspy-id/copy-trading-instructions)`?status=pending`. ## Limits and errors Each API key can hold at most 5 copy trading stream connections at once, counted separately from the other streams. | Code | Meaning | | - | - | | invalid\_api\_key | API key missing, invalid or not enabled for CabalSpy ID. | | too\_many\_connections | At most 5 copy trading stream connections per API key. | # Dashboard settings Source: https://docs.cabalspy.xyz/cabalspy-id/dashboard Every CabalSpy ID setting in the API Dashboard, tab by tab: instances, credentials, login button, theses widget, White-Label, competitions, callouts, copy trading, scopes, domains, testers, webhooks and API keys. You manage CabalSpy ID in the [API Dashboard](https://apidashboard.cabalspy.xyz/csid), on the **CabalSpy ID** tab. One dashboard account and one API key work for the CabalSpy API, the Widget and CabalSpy ID. This page lists every field and button you see there, what it does and where the API reference explains it in detail. Each app is an **instance**: an OpenID Connect client with its own users, settings and statistics. Open an instance from **Instances** to see its tabs: Overview, Users & stats, Credentials, Login button, Theses, White-label, Competitions, Copy trading, Settings, Domains & testers, Webhooks and Activity. Instances with [callouts](/cabalspy-id/callouts) switched on also have a **Callouts** tab. > [!NOTE] > > Where a dashboard label differs from the name in the API, both are given, for example the dashboard's **Where your users' data is visible** is the API setting `data_scope`. ## Start page The first page of the CabalSpy ID tab sums up all your instances over the last 30 days. It has no settings, only figures and shortcuts. | Item | Meaning | | - | - | | Users, Active 30 days, KOLs, Verified wallets | Your users across all instances: new in 7 days, sign-ins, users with the KOL badge and users with at least one verified wallet. | | API requests, Rate limited | Data API calls of all your keys and instances, with rate-limited calls and errors. See [Rate limits](/cabalspy-id/plans#rate-limits). | | API requests per day, Sign-ins per day | Daily charts for the last 30 days. | | Instances | Each instance with its users, API requests and mode (LIVE, SANDBOX or DEV). | | Top endpoints | The Data API endpoints you call most, with rate-limited calls. | | Theses | Theses, replies, reactions and authors on your instances, and the most discussed tokens. | | Plan & user limit | Per verified domain: plan, users out of the user limit and request rate. Every domain starts on Free (50 users, 1 request per second). See [Plans and limits](/cabalspy-id/plans). | | Users beyond your plan's user limit | A warning with the number of people who signed in above the limit. They can sign in, but you receive no data for them. See [The user limit](/cabalspy-id/plans#the-user-limit). | | **Sandbox**, **New instance** | Open the [sandbox](#sandbox) or the [Instances](#instances-page) page. | ## Instances page Lists your instances with their logo, Instance ID, mode, number of users and domain. The mode is one of **DEVELOPMENT**, **SANDBOX**, **IN REVIEW** or **LIVE**, see [Instance modes](/cabalspy-id/overview#instance-modes). **Create an instance** asks for: | Field | Values | Meaning | | - | - | - | | Name | Up to 60 characters, required | Shown on the consent screen. You can change it later in [Settings](#settings). | | Type | **Server-side web app** (default) or **Single-page or mobile app** | A server-side app is a confidential client: it has a backend and uses a client secret. A single-page or mobile app is a public client: no secret, PKCE only. See [Clients](/cabalspy-id/openid-connect#clients). The type cannot be changed later in the dashboard. | | Start in | **Development** (default) or **Sandbox** | Development: real CabalSpy ID accounts, only you and up to 25 [testers](#domains-and-testers) can sign in. Sandbox: made-up test identities only. An instance becomes live with **Go live** on its [Overview](#overview). | | Redirect URIs | One per line | Where people return after signing in. `http://` only for localhost while developing. You can change them later in [Settings](#settings). | After creating a server-side app, the dashboard shows its first client secret once, on the [Credentials](#credentials) tab. ## Sandbox **Sandbox** on the start page lets you call every CabalSpy ID endpoint live with your own API key and copy ready-to-run code. Pick an endpoint, fill in its parameters or JSON body and press **Send request**; **Reset** restores the example values. Only API keys with CabalSpy ID switched on are offered, see [API keys](#api-keys). The sandbox page is a request tool for the Data API. It is not the same as an instance in sandbox mode. ## Instance tabs ### Overview | Item | Meaning | | - | - | | Get your instance ready | A checklist for both paths: redirect URIs and scopes (Login only), testers by X handle (your dashboard login is not a CabalSpy ID), a first sign-in or your first White-Label users, verify your domain, add logo, website, privacy policy, terms and support e-mail, go live. Sandbox instances only show the first three steps. | | **Go live** | Switches the instance to live: everyone with a CabalSpy ID can sign in. The button is disabled while something is missing, and the dashboard lists what (**Still missing**). Live instances need a verified domain, a logo, privacy policy and terms URLs and a support e-mail, and every redirect URI and web origin on a verified domain; the checklist also asks for your website. If you request the `wallets` or `onchain` scope, the instance goes to **IN REVIEW** first; a rejected review shows the reviewer's note. | | Users, Scopes, Domains, Webhook | Connected users, the scopes the instance may request, verified domains and whether a webhook is set. | | Plan & user limit | The plan of your domain: users out of the limit, users with data and without data, request rate and whether the live stream is included. The plan starts when you verify a domain. **Plan & billing** opens the billing page. See [Plans and limits](/cabalspy-id/plans). | | Delete instance | Type the instance name exactly and press **Delete**. This signs everyone out of the app and removes it for good. | When a live instance reaches 80 percent of its user limit, and again at 100 percent, the instance page shows a banner and you receive an e-mail. ### Users & stats | Item | Meaning | | - | - | | Users, Active 30 days, KOLs, Verified wallets | Users of this instance, new in 7 days, sign-ins, users with the KOL badge, verified wallets and how many users removed access. | | Sign-ins, last 30 days | Daily sign-ins and first sign-ins. | | Newest users | The latest users with name, handle, KOL badge and join date. Only people within your plan's user limit are shown by name. | | **Block** | Blocks the user for this instance. They can no longer sign in to the app, your instance stops seeing them in the Data API, their seat in your plan is freed and you receive a [`consent.revoked`](/cabalspy-id/webhooks#events) webhook with `reason: "blocked_by_platform"`. A blocked user who tries to sign in gets `access_denied`, see [OAuth errors](/cabalspy-id/openid-connect#oauth-errors). | | Blocked, **Unblock** | The users you blocked, with the date. **Unblock** lets them sign in again. | ### Credentials | Item | Meaning | | - | - | | Client ID (public) | The Instance ID, `csid_...`, your OpenID Connect `client_id`. Use it in widgets on your sites as `data-client-id`. It is not a secret and not your API key. Widgets only load on your instance's allowed origins and verified domain. | | API key (secret) | A link to the dashboard's [API keys](#api-keys) page. The Data API uses the same key as the CabalSpy API. Keep it on your server. | | Issuer, Discovery URL | `https://id.cabalspy.xyz` and its discovery document, for your OpenID Connect library. See [Endpoints](/cabalspy-id/openid-connect#endpoints). | | Client secrets | Server-side apps only. Each active secret is listed as `csid_sk_...` with its last characters, its creation date and either **active** or the time it expires. | | **Create secret** / **Roll secret** | Creates a new client secret and shows it once. Copy it to your server right away, only a hash is stored. | | Current secrets keep working for | Used when you roll: **24 hours** (default), **1 hour**, **7 days** or **0 (stop now)**. The existing secrets stay valid for this long, so you can deploy the new one without downtime. | | **Revoke** | Ends that secret at once. | | Data API, Quick start | Copyable examples for the Data API and for Auth.js / NextAuth with your Instance ID and scopes. | See [Clients](/cabalspy-id/openid-connect#clients) and [Authentication](/cabalspy-id/data-api#authentication). ### Login button The design every embedded login button of this instance uses. `data-*` attributes on an element override single values, see [Attributes](/cabalspy-id/login-button#attributes). **Save design** stores it; the preview shows the saved design. | Field | Values | Attribute | | - | - | - | | Theme | **Filled** (`dark`) or **Outline (light)** (`light`) | `data-theme` | | Button colour | Hex colour, `#rrggbb` | `data-color` | | Text colour | Hex colour, `#rrggbb` | `data-text-color` | | Shape | **Square**, **Rounded** or **Pill** | `data-shape` | | Size | **Small**, **Medium** or **Large** (`sm`, `md`, `lg`) | `data-size` | | Text | Up to 40 characters | `data-label` | | Show CSID mark | On or off | `data-show-logo` | | Full width | On or off | `data-full-width` | | Profile page on your site | Optional URL, up to 300 characters. `{username}` and `{csid_id}` are filled in. | none | **Profile page on your site** is where **View profile** in the signed-in menu goes, for example `https://yourplatform.xyz/u/{username}`. Left empty, it opens the person's CabalSpy ID profile. **Settings** in the menu always opens CabalSpy ID. See [Signed-in menu](/cabalspy-id/login-button#signed-in-menu). The **Embed** box shows the two lines of HTML for your instance: with `data-href` for server-side apps, without it for browser apps. ### Theses The design and reach of the [thesis widget](/cabalspy-id/theses) for every embed with this instance's `data-client-id`. `data-*` attributes on an element override single values. **Save design** stores it; the live preview updates as you type but is not saved until you save. | Field | Values | Attribute | | - | - | - | | Which theses are shown | **All platforms** (default) or **Only this instance** | `data-scope` (`global` or `instance`) | | Theme | **Dark** or **Light** | `data-theme` | | Font | System, Inter, Mono or Serif | `data-font` | | Corner radius (px) | 0 to 24 | `data-radius` | | Default sort | **Newest** (`new`) or **Top** (`top`) | `data-sort` | | Background, Cards, Text, Secondary text, Borders, Accent, Text on accent, Bullish, Bearish | Hex colours | `data-bg`, `data-card`, `data-text`, `data-muted`, `data-border`, `data-accent`, `data-accent-text`, `data-bull`, `data-bear` | | Show token header (logo, counts) | On or off | `data-show-header` | | Show bullish / bearish filter | On or off | `data-show-sentiment` | | Compact text size | On or off | `data-compact` | **Reset colours to theme** puts all colours back to the defaults of the chosen theme; changing the theme does the same. **Only this instance** also applies to the Data API and the theses stream when you pass `scope=instance`, see [Reach](/cabalspy-id/theses#reach). The tab also shows thesis statistics, the most discussed tokens and the latest theses on this instance. Reports and moderation are handled by CabalSpy. To let people signed in with your login button write theses directly, request the `thesis` scope in [Settings](#settings). ### White-label Settings for the users your platform manages through the API by your own user id, see [White-Label](/cabalspy-id/white-label). If the box shows a warning instead, CabalSpy ID could not be reached. **Platform users** shows how many platform users the instance has, how many sign in to their CabalSpy ID themselves and the free places for new users. Sandbox and development instances hold up to 25 platform users; live instances count against the plan of their domain, where every user on the domain counts. When no place is left, new users are refused with `plan_user_limit` and existing ones keep working. See [Plan limits](/cabalspy-id/white-label#plan-limits). **White-label settings** apply at once when you press **Save settings**. They are the same settings as [GET and POST /v1/platform-users/settings](/cabalspy-id/platform-users-settings). | Dashboard | API setting | Values | Effect | | - | - | - | - | | Wallets that count | `wallet_trust` | **All wallets** (`all`) or **Verified wallets only** (`verified_only`) | `all`: wallets you import from Privy, Dynamic or any provider count at once for tracking, trades and the leaderboard; payment verification stays available as a badge. `verified_only`: imported wallets are stored but only count once the user verified them with the payment; until then their status is `needs_verification`. | | Leaderboard | `leaderboard_trust` | **All wallets** (`all`) or **Verified wallets only** (`verified_only`) | Which wallets the [platform leaderboard](/cabalspy-id/platform-users-leaderboard) ranks. With `all`, each entry says whether the wallet is verified. | | Where your users' data is visible | `data_scope` | **CabalSpy ID network** (`csid`, default) or **Your platform only** (`platform`) | `csid`: your users are also part of CabalSpy ID: profiles, leaderboard, Trade Feed and theses. `platform`: only your API key sees them, nothing on CabalSpy ID's public pages or on other platforms. | | No CabalSpy ID branding | `white_label` | On or off | The verify widget, the embedded Theses and Trade Feed widgets and the Telegram trade alerts your users get carry no CabalSpy ID wording or links. | | Telegram alerts for your users | `telegram_alerts` | On or off | Trade Feed alerts through the CabalSpy ID Telegram bot for platform users who [linked Telegram](/cabalspy-id/platform-users-telegram). | > [!NOTE] > > The dashboard always saves all settings together. **Sign-up URL** is the [inbound URL](/cabalspy-id/platform-users-inbound): your platform or your auth provider (Privy, Dynamic and others) posts its sign-up and wallet events to it, and CabalSpy ID creates or updates the user with their wallets. The URL is the secret, no API key is needed. | Button | Effect | API | | - | - | - | | **Switch on** | Creates the secret URL and shows it once. | [POST /v1/platform-users/inbound/enable](/cabalspy-id/platform-users-inbound#enable) | | **Create a new URL** | Replaces the URL. The old one stops working at once. | The same call again | | **Switch off** | Removes the URL. Events sent to it are no longer accepted. | [POST /v1/platform-users/inbound/disable](/cabalspy-id/platform-users-inbound#disable) | While it is on, the box shows **ON** and the time of the last event received. ### Competitions [Trading competitions](/cabalspy-id/competitions) between your platform users. The tab lists your competitions with status, metric, participants, end time and rules version (**CHANGED** marks rules that were changed while running). You can run 5 at a time across all your instances, the box shows how many are open. Open a competition to see its standings (top entries; unranked traders below the minimums show **–**), its rule changes and, while it is scheduled, waiting or running, the forms to change or cancel it. **New competition** creates one, the same as [POST /v1/competitions](/cabalspy-id/competitions-create): | Field | Dashboard default | API field | | - | - | - | | Name | Required, up to 100 characters | `name` | | Chain | Choose from the supported chains | `chain` | | Ranked by | **Realized PnL (USD)** | `metric`: `pnl_usd` Realized PnL (USD), `pnl` Realized PnL (native), `volume_usd` Volume (USD), `volume` Volume (native), `trades` Number of trades, `win_rate` Win rate | | Duration (hours) | 168, in steps of 0.5, 1 to 8,760 | `duration_hours` | | Start (UTC) | Empty: starts when enough participants joined | `starts_at` | | Min. participants | 2 | `min_participants` | | Max. participants | Empty: no limit | `max_participants` | | Min. trades per trader | 1 | `min_trades` | | Min. volume per trader (USD) | 0 | `min_volume_usd` | | Wallets | **All wallets** | `wallet_trust`: `all` or `verified_only` | | Participants | **Users join** | `enrollment`: `opt_in` (you join users with [POST /v1/competitions/join](/cabalspy-id/competitions-participants)) or `all_users` (every platform user) | | Joining after the start allowed | On | `late_join` | | Description | Optional, up to 2,000 characters | `description` | | Prizes | Optional free text, up to 2,000 characters, returned by the API | `prizes` | When 5 competitions are open, the form is replaced by a notice. End or cancel one first. **Change the rules** edits a scheduled, waiting or running competition, the same as [POST /v1/competitions/update](/cabalspy-id/competitions-update). The form covers name, metric, duration, min. and max. participants, min. trades, min. volume, wallets and late join, plus an optional **Note for the change log** (up to 500 characters). Every change raises the rules version, is listed under **Rule changes** with the time and phase and is sent as the `competition.updated` webhook. Chain, participants mode, start time, description and prizes can only be changed through the API. **Cancel competition** cancels it for good, the same as [POST /v1/competitions/cancel](/cabalspy-id/competitions-update#cancel), and sends `competition.ended` with `cancelled: true`. With callouts switched on, **New competition** can also create a [callout competition](/cabalspy-id/competitions-callouts) (`kind: "callouts"`): the metric is then one of the callout metrics, the chain can be **All chains** (`all`), and **Min. callouts** (`min_callouts`) and the hit multiple (`hit_x`) take the place of min. trades and min. volume. ### Callouts Only shown when [callouts](/cabalspy-id/callouts) are switched on for the instance. Callouts are switched on per instance on request; contact us at [contact@cabalspy.xyz](mailto:contact@cabalspy.xyz). The settings are the same as [GET and POST /v1/callouts/settings](/cabalspy-id/callouts-settings) and apply to new callouts once saved. | API setting | Values | Default | Effect | | - | - | - | - | | `who` | `all` or `kol_only` | `all` | Who may make callouts: everyone, or only users with the KOL badge. | | `require_holding` | On or off | On | Only users who hold the token in one of their wallets may call it. | | `cooldown_minutes` | 0 to 10,080 | 360 | Minutes between two callouts of the same user. 0 switches the cooldown off. | A user can call the same token only once per 24 hours, whatever the settings. The callout webhooks (`callout.created`, `callout.milestone`, `callout.scored`, `callout.final`) appear in the event list of the [Webhooks](#webhooks) tab only while callouts are on. ### Copy trading An overview of [copy trading](/cabalspy-id/copy-trading) on your instance. It has no settings: copying is switched on per user and trader with [POST /v1/copy-trading/settings](/cabalspy-id/copy-trading-settings), and the tab is shown for every instance. | Item | Meaning | | - | - | | Users copying | How many of your users copy at least one trader, and how many traders they copy. | | Instructions, 24 h | [Copy instructions](/cabalspy-id/copy-trading-instructions) made in the last 24 hours, with how many are still pending and how many expired without a report. | | Executed, 24 h | Of the instructions made in the last 24 hours, how many you reported as executed, their executed volume in USD (the sum of your `executed_amount_usd`), and how many you reported as failed or skipped. | | Newest instructions | The latest 25 instructions: time, user (your `external_id` or the `csid_id`), trader, action (buy amount in USD or share of the position to sell, token and chain), price and status with your note. | When no webhook of the instance subscribes to `copy_trade.instruction`, the tab says so. Subscribe on the [Webhooks](#webhooks) tab, connect to the [copy trading stream](/cabalspy-id/copy-trading-stream), or poll `GET /v1/copy-trading/instructions?status=pending`. ### Settings | Box | Field | Meaning | | - | - | - | | Branding | Name | Up to 60 characters, required. Shown on the consent screen. | | Branding | Short description | Up to 200 characters. | | Branding | Website, Privacy policy, Terms, Support e-mail | Shown on the consent screen. Privacy policy, terms and support e-mail are required to go live, and the go-live checklist also asks for the website. For live apps the links must be on a verified domain. | | Logo | Upload | Square PNG, JPEG or WebP, at most 256 KB. Required to go live. | | Redirect URIs and web origins | Redirect URIs | One per line. Must match the `redirect_uri` of your sign-in requests exactly. `http://` only for localhost while developing. Live instances need them on a verified domain. | | Redirect URIs and web origins | Web origins | One per line. Needed for browser apps that call the token endpoint, for example with the login button. Also where widgets with your client ID may load. Live instances need them on a verified domain. | | Scopes | Checkboxes | What your app may ask people for. `openid` is always on. Your sign-in requests can only use the scopes checked here, others fail with `invalid_scope`. Scopes marked **REVIEW** (`wallets`, `onchain`) need a short review before they work in live apps. See [Scopes](/cabalspy-id/openid-connect#scopes). | | Scopes | Why do you need wallet or on-chain data? | Your reason for the review, for example how you show wallets on your platform. | Each box has its own save button. Scopes added later show the consent screen again to people who already signed in. ### Domains and testers The dashboard calls this tab **Domains & testers**. **Domains** proves that you own your platform's domain. A verified domain is needed to go live and carries your plan: the main domain of your first verified domain (for example `example.com` for `app.example.com`) belongs to your account, and nobody else can add it. | Item | Meaning | | - | - | | **Add domain** | Adds a domain, shown as **NOT VERIFIED** with a token. | | DNS TXT record or file | Add **one** of them: a TXT record at `_csid-verification.` or a file at `https:///.well-known/csid-verification.txt`, containing the token the dashboard shows. | | **Verify** | Checks the record or file. The domain then shows **VERIFIED**. | | **Remove** | Removes the domain from the instance. | **Testers** (not shown for sandbox instances): while an instance is in development, only you and these people can sign in. Add up to 25 by their X handle; they need a CabalSpy ID first. Anyone else gets `access_denied`. **Remove** takes a tester off the list. ### Webhooks | Item | Meaning | | - | - | | Endpoint URL | Where CabalSpy ID sends events with a `POST`, signed with Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`). See [Verify the signature](/cabalspy-id/webhooks#verify-the-signature). | | Events | The events to send. Events are only sent for people who granted the matching scope and are within your plan's user limit. See [Events](/cabalspy-id/webhooks#events). | | **Save webhook** | Saves URL and events. | | **Send test event** | Sends a `webhook.test` event to the URL. | | **Roll signing secret** | Creates a new signing secret (`whsec_...`) and shows it once. The old one stays valid for a while, see [Rolling the secret](/cabalspy-id/webhooks#rolling-the-secret). | | **Remove webhook** | Removes the webhook. No more events are sent. | | Recent deliveries | The latest deliveries with event, status (**DELIVERED**, **FAILED** or pending), attempts, time and last error. See [Delivery and retries](/cabalspy-id/webhooks#delivery-and-retries). | ### Activity A log of changes to the instance: when, what, details and the IP address they came from. It has no settings. ## API keys The **API keys** page of the dashboard is shared by all products. For each key you choose which APIs it may call: the CabalSpy API, CabalSpy ID or both. A key needs at least one. Only keys with CabalSpy ID switched on can call the [Data API](/cabalspy-id/data-api#authentication), others get `product_not_enabled`, and only they are offered in the [sandbox](#sandbox). Changes reach CabalSpy ID within about 30 seconds. ## Plan and billing **Plan & billing** opens the CabalSpy ID plans of your domains. Plans are per registrable domain and cover all its live instances, see [Plans and limits](/cabalspy-id/plans). # SocialFi Data API — authentication Source: https://docs.cabalspy.xyz/cabalspy-id/data-api Authenticate to the CabalSpy ID SocialFi Data API: base URL, API keys, instance scope, response envelope, pagination and rate-limit headers. The Data API returns the profiles, verified wallets and trading data of the people who signed in to your platform with CabalSpy ID. It follows the same conventions as the [CabalSpy API](/Data-APIs): the same envelope, the same error format and the same `blockchain`, `address` and `period` parameters. Wallet statistics are computed exactly like the CabalSpy API, so a wallet shows the same numbers on both. ## Base URL ```text theme={null} https://api-id.cabalspy.xyz/v1/ ``` ## Authentication The Data API uses the same API key as the CabalSpy API. In the [API Dashboard](https://apidashboard.cabalspy.xyz), open the **API keys** page: every key shows **Works with: CabalSpy API / CabalSpy ID API**, both on by default. A key with CabalSpy ID switched off is refused with `product_not_enabled`. No key yet? See [API key](/api-key). Pass the key as an Authorization Bearer header or as the `apiKey` or `api_key` query parameter, the same as on the CabalSpy API. ```bash Bearer header theme={null} curl "https://api-id.cabalspy.xyz/v1/me" \ -H "Authorization: Bearer YOUR_KEY" ``` ```bash Query parameter theme={null} curl "https://api-id.cabalspy.xyz/v1/me?api_key=YOUR_KEY" ``` > [!WARNING] > > Your API key is a secret. Call the Data API from your backend, never from code that ships to the browser. ## Instance A key works with one CabalSpy ID instance at a time. If your account has a single instance, nothing else is needed. With several instances, add `instance=` to every request, otherwise the API answers `instance_required` and lists your instances. **instance** `string` The Instance ID (`csid_...`) to work with. Only needed when your account has several instances. ## Scope: who a key can see A key sees the users of its instance only: * **Live instances**: the users who signed in to any live app on your registrable domain, within your plan's user limit. * **Development and sandbox instances**: the users who signed in to that app. Users beyond your plan's user limit, users who removed access to your app and users you blocked are not visible. Requests for them return `profile_not_found` or `wallet_not_found`. On the **Enterprise** plan, add `scope=global` to see every CabalSpy ID user. Other plans get `scope_not_allowed`. **scope** `string` (default: instance) `instance` or `global`. `global` requires the Enterprise plan. ## External ID If you use [White-Label](/cabalspy-id/white-label), `external_id`, your own id of a platform user, works wherever `csid_id` does, on every endpoint, as a query parameter and in request bodies. The API looks up the user in your instance and uses their `csid_id`. ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/profile?external_id=user_8412" \ -H "Authorization: Bearer YOUR_KEY" ``` Pass either `external_id` or `csid_id`, not both. An unknown `external_id` returns `404 platform_user_not_found`. ## Response format Every successful response has the same envelope. ```json Success theme={null} { "success": true, "data": { }, "pagination": { "limit": 50, "total": 312, "has_more": true, "next_cursor": "MjAyNi0xMC0xMlQxNDoyMTowNy40MDIxMTMrMDA6MDB8..." }, "meta": { "request_id": "req_1f265546e444", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T08:04:11Z" } } ``` `pagination` is only present on list endpoints. `meta.cached` and `meta.cache_age_seconds` show whether the data came from the short-lived cache. Errors carry a machine-readable `code`, a message, the request id and a link to the [error reference](/cabalspy-id/errors). ```json Error theme={null} { "success": false, "error": { "code": "invalid_parameter", "message": "Invalid value for 'period'", "request_id": "req_5162c7cf7f87", "docs": "https://docs.cabalspy.xyz/cabalspy-id/errors#invalid_parameter", "parameter": "period", "allowed": ["6h", "1d", "7d", "30d"] } } ``` ## Pagination List endpoints are cursor based. Read `next_cursor` from the response and pass it back as `cursor` to get the next page. When `next_cursor` is null, or `has_more` is false, you have reached the end. ## Rate-limit headers Every authenticated response carries the limit of your plan. | Header | Meaning | | - | - | | `X-RateLimit-Limit` | Requests per second of your plan. | | `X-RateLimit-Remaining` | Requests left in the current second. | | `X-RateLimit-Reset` | Seconds until the window resets (always 1). | | `X-Request-ID` | The request id, also in `meta.request_id`. | Above the limit the API answers `429 rate_limit_exceeded` with `Retry-After: 1`. See [Plans and limits](/cabalspy-id/plans). ## Common parameters | Parameter | Values | | - | - | | `blockchain` | `solana`, `bnb`, `base`, `eth`, `rh` | | `period` | `6h`, `1d`, `7d`, `30d` (rolling windows back from now) | | `address` | A wallet verified by one of your users. EVM addresses are case-insensitive. | ## Endpoints | Method | Path | Description | | - | - | - | | GET | [/v1/health](/cabalspy-id/health) | Service health, no key needed. | | GET | [/v1/me](/cabalspy-id/me) | Your instance, plan and limits. | | GET | [/v1/users](/cabalspy-id/users) | Your users, newest first. | | GET | [/v1/profile](/cabalspy-id/profile) | One user by handle, id or wallet. | | GET | [/v1/wallets/lookup](/cabalspy-id/wallet-lookup) | Who owns a verified wallet. | | GET | [/v1/wallets/tracker](/cabalspy-id/tracker) | Trading profile of a wallet for a period. | | GET | [/v1/wallets/history](/cabalspy-id/history) | Lifetime stats and the full trade log. | | GET | [/v1/wallets/holdings](/cabalspy-id/holdings) | Current token balances. | | GET | [/v1/wallets/pnl\_calendar](/cabalspy-id/pnl-calendar) | Realized PnL per day. | | GET | [/v1/wallets/leaderboard](/cabalspy-id/leaderboard) | Your users ranked. | | GET | [/v1/transactions/latest](/cabalspy-id/latest) | Newest trades of your users. | | GET, POST | [/v1/theses/...](/cabalspy-id/theses#endpoints) | Token theses: read, and write in your users' names. | | WS | [/v1/stream](/cabalspy-id/stream) | Every trade of your users and every thesis event, live. | | GET, POST | [/v1/platform-users/...](/cabalspy-id/white-label#endpoints) | White-Label: your own users by external\_id. | | GET, POST | [/v1/competitions/...](/cabalspy-id/competitions#endpoints) | Trading competitions between your platform users. | | GET, POST, WS | [/v1/callouts/...](/cabalspy-id/callouts#endpoints) | Callouts: your users call tokens, tracked with stats, a leaderboard and a stream. An extra, switched on per instance on request. | | GET, POST, WS | [/v1/trade-feed/...](/cabalspy-id/trade-feed#endpoints) | Trade Feed: the traders your users follow, every trade and thesis of them, notifications and a stream. | | GET, POST, WS | [/v1/copy-trading/...](/cabalspy-id/copy-trading#endpoints) | Copy trading: settings per user and trader, ready-to-execute instructions, status reports and a stream. | You can try every endpoint in the sandbox in the dashboard on the **CabalSpy ID** tab. # Errors Source: https://docs.cabalspy.xyz/cabalspy-id/errors Every error code of the CabalSpy ID Data API, White-Label, competitions, callouts, the Trade Feed, copy trading, the thesis browser API and the streams, what it means and how to fix it. Every Data API error has the same shape. The `docs` field links to the matching section of this page. ```json theme={null} { "success": false, "error": { "code": "wallet_not_found", "message": "This wallet is not verified by a CabalSpy ID user in your instance (or beyond your plan's user limit)", "request_id": "req_5162c7cf7f87", "docs": "https://docs.cabalspy.xyz/cabalspy-id/errors#wallet_not_found" } } ``` Parameter errors add `parameter`, the parameter at fault, and where it helps `allowed`, the accepted values. Always quote the `request_id` when you contact support. Errors of the OpenID Connect endpoints use the OAuth format instead, see [OAuth errors](/cabalspy-id/openid-connect#oauth-errors). ## Overview | Status | Code | Meaning | | - | - | - | | 400 | [missing\_parameter](#missing_parameter) | A required parameter is missing. | | 400 | [invalid\_parameter](#invalid_parameter) | A parameter has an invalid value. | | 400 | [instance\_required](#instance_required) | Your account has several instances, pass instance. | | 401 | [missing\_api\_key](#missing_api_key) | No API key was sent. | | 403 | [invalid\_api\_key](#invalid_api_key) | The API key is invalid or does not exist. | | 403 | [product\_not\_enabled](#product_not_enabled) | The key is not enabled for CabalSpy ID. | | 403 | [no\_instance](#no_instance) | Your account has no CabalSpy ID instance yet. | | 403 | [scope\_not\_allowed](#scope_not_allowed) | scope=global needs the Enterprise plan. | | 403 | [plan\_user\_limit](#plan_user_limit) | The user signed in beyond your plan's user limit, or no room for a new platform user. | | 404 | [instance\_not\_found](#instance_not_found) | No instance with this client\_id in your account. | | 404 | [profile\_not\_found](#profile_not_found) | No such user in your instance. | | 404 | [wallet\_not\_found](#wallet_not_found) | The wallet is not verified by one of your users, or the platform user has no such wallet. | | 429 | [rate\_limit\_exceeded](#rate_limit_exceeded) | Too many requests per second. | | 500 | [internal\_error](#internal_error) | Something went wrong on our side. | | 503 | [service\_unavailable](#service_unavailable) | A data source is temporarily unavailable. | | 400 | [invalid\_body](#invalid_body) | Thesis or reply text rejected, or an inbound event that is not JSON. | | 400 | [duplicate](#duplicate) | The user already posted that text. | | 401 | [sign\_in\_required](#sign_in_required) | Browser API: no user token sent. | | 401 | [invalid\_token](#invalid_token) | Browser API: user token invalid or expired. | | 403 | [scope\_missing](#scope_missing) | Browser API: the token lacks the scope thesis (or trade\_feed for the Trade Feed widgets). | | 401 | [client\_id\_required](#client_id_required) | Browser API: no client\_id was sent. | | 401 | [invalid\_client](#invalid_client) | Browser API: unknown, suspended or deleted instance. | | 403 | [origin\_not\_allowed](#origin_not_allowed) | Browser API: the origin is not allowed for the instance. | | 403 | [consent\_required](#consent_required) | The user has not granted your app the scope thesis, or trade\_feed for the Trade Feed and copy trading. | | 403 | [sandbox\_user](#sandbox_user) | Sandbox test users cannot write theses. | | 403 | [not\_a\_holder](#not_a_holder) | Only holders can post a thesis or, with require\_holding, make a callout. | | 403 | [posting\_paused](#posting_paused) | The user is paused from writing. | | 403 | [reporting\_paused](#reporting_paused) | The user cannot report for now. | | 404 | [not\_found](#not_found) | The thesis or reply is not available, or no such copy instruction. | | 429 | [rate\_limited](#rate_limited) | The user writes too fast, too many browser API requests per IP or client\_id, or too many new platform users or inbound events. | | 400 | [wallet\_required](#wallet_required) | White-Label: a user needs at least one wallet. | | 400 | [invalid\_address](#invalid_address) | White-Label: not a valid Solana or EVM address. | | 400 | [invalid\_return\_url](#invalid_return_url) | White-Label: return\_url is not on your instance's sites. | | 410 | [claim\_removed](#claim_removed) | White-Label: claim links are gone (one CabalSpy ID per person). | | 404 | [platform\_user\_not\_found](#platform_user_not_found) | White-Label: no user with this external\_id. | | 404 | [verification\_not\_found](#verification_not_found) | White-Label: no such wallet verification. | | 404 | [invalid\_inbound\_url](#invalid_inbound_url) | White-Label: unknown or disabled inbound URL. | | 409 | [self\_managed](#self_managed) | White-Label: the person manages their CabalSpy ID themselves. | | 409 | [too\_many\_wallets](#too_many_wallets) | White-Label: more than 5 Solana or 5 EVM wallets. | | 409 | [last\_wallet](#last_wallet) | White-Label: the user's only wallet cannot be removed. | | 409 | [wallet\_already\_verified](#wallet_already_verified) | White-Label: another account verified this wallet. | | 409 | [already\_verified](#already_verified) | White-Label: the wallet is already verified on this chain. | | 429 | [too\_many\_open\_verifications](#too_many_open_verifications) | White-Label: too many open verifications. | | 409 | [kol\_badge](#kol_badge) | White-Label: X cannot be disconnected from a KOL. | | 409 | [x\_required](#x_required) | White-Label: the KOL badge needs X. | | 409 | [kol\_not\_eligible](#kol_not_eligible) | White-Label: the KOL application was refused. | | 409 | [volume\_check\_unavailable](#volume_check_unavailable) | White-Label: a volume check is not possible now. | | 404 | [competition\_not\_found](#competition_not_found) | Competitions: no such competition. | | 409 | [competition\_limit](#competition_limit) | Competitions: 5 are already open. | | 409 | [competition\_closed](#competition_closed) | Competitions: it ended or was cancelled. | | 409 | [late\_join\_closed](#late_join_closed) | Competitions: no joining after the start. | | 409 | [competition\_full](#competition_full) | Competitions: max\_participants reached. | | 403 | [feature\_not\_enabled](#feature_not_enabled) | Callouts: not switched on for your instance. | | 403 | [invalid\_account](#invalid_account) | Callouts: the user's account is not active. | | 403 | [kol\_only](#kol_only) | Callouts: only KOLs can call on your platform. | | 409 | [already\_called](#already_called) | Callouts: the user called this token less than 24 hours ago. | | 429 | [callout\_cooldown](#callout_cooldown) | Callouts: the user's cooldown is running. | | 422 | [no\_price](#no_price) | Callouts: the token has no market price. | | 404 | [callout\_not\_found](#callout_not_found) | Callouts: no such callout. | | 400 | [cannot\_add\_self](#cannot_add_self) | Trade Feed: a user cannot add themselves. | | 403 | [trading\_private](#trading_private) | Trade Feed: the trader keeps their trading private. | | 404 | [trader\_not\_found](#trader_not_found) | Trade Feed: no such trader. | | 409 | [trade\_feed\_full](#trade_feed_full) | Trade Feed: already 300 traders. | | 404 | [not\_in\_trade\_feed](#not_in_trade_feed) | Copy trading: the trader is not in the user's Trade Feed. | | 409 | [copy\_managed\_elsewhere](#copy_managed_elsewhere) | Copy trading: another platform copies this trader for the user. | | 409 | [already\_reported](#already_reported) | Copy trading: the instruction already has a different final status. | | stream | [plan\_required](#plan_required) | The stream needs the Pro plan or higher. | | stream | [too\_many\_tokens](#too_many_tokens) | Theses stream: more than 200 tokens on one connection. | | stream | [invalid\_frame](#invalid_frame) | Theses stream: a frame was not understood. | | stream | [too\_many\_connections](#too_many_connections) | At most 5 stream connections per key. | ## Request errors ### missing\_parameter **400.** A required parameter is missing. `parameter` names it. On [Profile](/cabalspy-id/profile) it means you did not pass exactly one of `username`, `csid_id` or `address`. ### invalid\_parameter **400.** A parameter has an invalid value, for example an unknown `blockchain`, a `period` other than 6h, 1d, 7d or 30d, a `limit` out of range, an unknown `sort`, a malformed `cursor` or a `csid_id` that is not the `sub` of a CabalSpy ID token. `parameter` names it and `allowed` lists the accepted values where there is a fixed list. On the stream it means an invalid `blockchain`. ### instance\_required **400.** Your account has several CabalSpy ID instances and the API cannot tell which one you mean. Add `instance=` to the request. The message lists your instances. ## Authentication errors ### missing\_api\_key **401.** No API key was sent. Pass it as `Authorization: Bearer ` or as the `apiKey` or `api_key` query parameter. See [Authentication](/cabalspy-id/data-api#authentication). ### invalid\_api\_key **403.** The API key is invalid, revoked or does not exist. Copy the key again from the [API Dashboard](https://apidashboard.cabalspy.xyz). On the stream this code is also used when no key was sent. ### product\_not\_enabled **403.** The key is valid for the CabalSpy API but not enabled for CabalSpy ID. Open the **API keys** page of the dashboard and switch on **CabalSpy ID** for the key. ### no\_instance **403.** Your account has no CabalSpy ID instance yet. Create one in the dashboard on the **CabalSpy ID** tab. ### instance\_not\_found **404.** The `instance` you passed is not an active CabalSpy ID instance of your account. Check the Instance ID (`csid_...`) in the dashboard. ## Access errors ### scope\_not\_allowed **403.** `scope=global`, access to every CabalSpy ID user, is available on the Enterprise plan. Without it your key sees the users of your instance. Remove the parameter or contact sales. ### plan\_user\_limit **403.** You passed an anonymous id (`anon_...`). The person signed in beyond your plan's user limit, so your platform receives no data for them until it upgrades. The error carries `"limited": true`. See [Plans and limits](/cabalspy-id/plans#the-user-limit). White-Label: a new [platform user](/cabalspy-id/white-label#plan-limits) does not fit in your plan. All seats of your domain's plan are taken, or a sandbox or development instance already holds 25 platform users. The error carries `user_limit`, and on live instances `users` and `plan`. Existing users can still be updated. Starting a wallet verification for a user without a seat returns it too. ### profile\_not\_found **404.** No CabalSpy ID user matches the username, csid\_id or address, or the user is not visible to your key: they never signed in to your instance, removed access, were blocked by you, or are beyond your plan's user limit. ### wallet\_not\_found **404.** The wallet is not verified on this chain by one of your users. Check the `blockchain`: a wallet is only found on the chains it is verified on, listed in the user's `wallets[].chains`. As with profile\_not\_found, users outside your instance or beyond your plan's user limit are not visible. White-Label: on [Remove a wallet](/cabalspy-id/platform-users-wallets#remove-a-wallet), the platform user has no wallet with this address. ## Limits ### rate\_limit\_exceeded **429.** You sent more requests per second than your plan allows. The response carries `Retry-After: 1`, wait a second and retry. `X-RateLimit-Limit` shows your limit. See [Plans and limits](/cabalspy-id/plans#rate-limits). ## Server errors ### internal\_error **500.** Something went wrong on our side. Retry with a backoff, and contact support with the `request_id` if it persists. ### service\_unavailable **503.** A data source is temporarily unavailable, used by [Holdings](/cabalspy-id/holdings), and by [wallet verification](/cabalspy-id/platform-users-verification) and [Telegram linking](/cabalspy-id/platform-users-telegram) for platform users. Retry shortly. ## Thesis errors These codes come from the [thesis](/cabalspy-id/theses) endpoints of the Data API and from the [browser API](/cabalspy-id/theses-browser-api). Their messages are written for end users, so you can show them as they are. `plan_user_limit` (above) also applies when a user beyond your plan's user limit tries to write. ### invalid\_body **400.** The text was rejected: empty, longer than 1,000 characters, more than two links, written in all caps, repeated-character spam, or containing a blocked word. The message says which. On the [inbound URL](/cabalspy-id/platform-users-inbound): the body is not JSON. A JSON body that is not an object is answered with 200 and `accepted: false` with this code. ### duplicate **400.** The user posted exactly the same text within the last day. ### sign\_in\_required **401.** Browser API only: no `Authorization: Bearer ` was sent. Let the user sign in with CabalSpy ID and pass their access token. ### invalid\_token **401.** Browser API only: the user's token is invalid or expired, the user revoked access, or the account is not active. Access tokens live 15 minutes, refresh the token or let the user sign in again. ### scope\_missing **403.** Browser API only: the access token does not carry the scope `thesis`. Request `thesis` at sign-in. The [Trade Feed widgets](/cabalspy-id/trade-feed-widgets) and their browser API need the scope `trade_feed` instead. ### client\_id\_required **401.** Browser API only: the request carried no client\_id. Every call of `https://id.cabalspy.xyz/thesis/v1` needs your instance's public client\_id, as header `X-CSID-Client-Id: csid_...` or query `?client_id=csid_...`; the websocket takes `?client_id=`. For the widget set `data-client-id` on the `data-csid-thesis` element. The SDK's `ThesisClient` needs `clientId` (TypeScript) or `client_id` (Python) from version 0.5.2. The client\_id is shown in the [API Dashboard](https://apidashboard.cabalspy.xyz) under **CabalSpy ID**, **Instances** next to the API key. It is public, not the API key. On the websocket the connection closes with code 4401 and reason `client_id_required`. See [Client ID](/cabalspy-id/theses-browser-api#client-id). ### invalid\_client **401.** Browser API only: the client\_id is not an active instance: it is unknown, suspended or deleted. Also returned when the header and the query parameter carry different client\_ids. Copy the Instance ID (`csid_...`) again from the dashboard. On the websocket the connection closes with code 4401 and reason `invalid_client`. ### origin\_not\_allowed **403.** Browser API only: the request came from a page that is not one of your instance's sites. Allowed are the registered allowed origins, the origins of your redirect URIs and your verified domain including its subdomains (https), and, while the instance is not in live mode, `http://localhost:*` and `http://127.0.0.1:*`. Add the origin in the dashboard or verify the domain. Calls from a server without an `Origin` or `Referer` header only need a valid client\_id. The `/embed/thesis` iframe of the widget can likewise only be framed by these sites. On the websocket the connection closes with code 4403 and reason `origin_not_allowed`. ### consent\_required **403.** Data API: the user has not signed in to your app with the scope `thesis`, revoked it, or is blocked by you. Ask the user to sign in again with the scope. [Eligibility](/cabalspy-id/theses-eligibility) returns this as `reason` instead of an error. [Trade Feed](/cabalspy-id/trade-feed-api) and [copy trading](/cabalspy-id/copy-trading) endpoints answer with this code when the user has not signed in to your app with the scope `trade_feed`, revoked it, is blocked by you, or is beyond your plan's user limit. Request `trade_feed` at sign-in. Platform users always have the scope. ### sandbox\_user **403.** Made-up sandbox test users cannot write theses. ### not\_a\_holder **403.** Only holders can post a thesis: one of the user's verified wallets must have bought the token and still hold it. Replies, reactions and reports do not need this. [Callouts](/cabalspy-id/callouts-create): with the setting `require_holding` (on by default), the user must hold the token in one of their wallets that count on its chain. Switch it off in the [callout settings](/cabalspy-id/callouts-settings) to let anyone call. ### posting\_paused **403.** The user is paused from posting, replying and reacting, for example after several of their posts were hidden after reports. The message says until when. ### reporting\_paused **403.** Moderators rejected too many of the user's reports, so they cannot report posts for 30 days. The message says until when. See [Moderation and appeals](/cabalspy-id/theses-moderation#reports). ### not\_found **404.** For appeals: there is no such notification for this user, or it cannot be appealed. Otherwise: the thesis or reply does not exist, was hidden or deleted, or the user tried to delete someone else's post. Replies to a reply are also refused with this code. [Copy trading](/cabalspy-id/copy-trading-instructions): there is no copy instruction with this id for your instance. Instructions of users copied by another platform are not visible to you. ### rate\_limited **429.** The user writes too fast: 5 theses per hour and 1 per token every 10 minutes, 30 replies per hour, 120 reactions per hour, 20 reports per day. On the browser API also too many requests from one IP address or for one client\_id: about 600 reads and 300 writes per minute per client\_id, 120 reads per minute per IP address, and the per-IP write limits of the [browser API](/cabalspy-id/theses-browser-api#responses). The response carries `Retry-After: 60`. On the websocket the connection closes with code 4429 and reason `rate_limited`. Different from rate\_limit\_exceeded, which is about your API key. Trade Feed: more than 120 changes to one user's Trade Feed per hour, including [copy settings](/cabalspy-id/copy-trading-settings) changes. Try again later. White-Label: more than 2,000 new platform users per minute, more than 600 events per minute on the [inbound URL](/cabalspy-id/platform-users-inbound#rate-limit-and-retries), or wallet verifications started too fast. These answers carry a `Retry-After` header with the seconds until the next full minute. ## White-Label errors These codes come from the [White-Label](/cabalspy-id/white-label) endpoints under `/v1/platform-users` and from other endpoints when you pass `external_id`. ### platform\_user\_not\_found **404.** No platform user with this `external_id` (or `csid_id`) in your instance. Create it with [POST /v1/platform-users](/cabalspy-id/platform-users-create) first. Every endpoint that takes `external_id` in place of `csid_id` answers with this code too. ### wallet\_required **400.** A new platform user needs at least one wallet. Pass `wallets: [{"address": "..."}]`. Also returned by Add wallets without wallets. ### invalid\_address **400.** A wallet is not a valid Solana or EVM address, or, for a verification, the address does not match the chain. `wallets[i]` in the message names the item. ### too\_many\_wallets **409.** The user would have more than 5 Solana or more than 5 EVM wallets. Remove one first. ### last\_wallet **409.** Every platform user needs at least one wallet, so the last one cannot be removed. Add another wallet first, or [delete the user](/cabalspy-id/platform-users-delete). ### self\_managed **409.** The person signs in to their CabalSpy ID themselves and manages profile, X and Telegram. You can still read their data, report wallets and [delete](/cabalspy-id/platform-users-delete) your link, but not change the account. Until 0.10.0 of the SDKs this code was `account_claimed`. ### already\_linked Not an HTTP error. A person is your user only once: when one of your users proves an identity (X, Telegram or a paid wallet) of a CabalSpy ID that is already your user under another `external_id`, nothing is merged. What you see depends on the flow: * **X:** the return URL gets `error=x_already_linked`. * **Telegram:** the bot tells the person, and the Telegram stays unlinked. * **Wallet verification:** the payment is not matched; the verification expires (`verification.expired`). Contact support if a user paid. Remove one of the two users first. ### wallet\_already\_verified **409.** Another account already verified this wallet with a payment. It cannot be verified again. ### already\_verified **409.** The wallet is already verified on this chain. ### too\_many\_open\_verifications **429.** Too many wallet verifications are open at once. Wait until one is paid or expires, or [cancel](/cabalspy-id/platform-users-verification#cancel) one. ### verification\_not\_found **404.** No wallet verification with this id for your platform users. ### claim\_removed **410.** Claim links are gone. Every person has one CabalSpy ID: your user moves to their own ID by itself when they prove it, see [One person, one CabalSpy ID](/cabalspy-id/white-label#one-person-one-cabalspy-id). ### invalid\_return\_url **400.** `return_url` must be on one of your instance's verified domains (or a subdomain), registered origins or redirect URIs, over https, or on `http://localhost`. ### kol\_badge **409.** The user has the KOL badge, which belongs to their X account, so X cannot be disconnected. ### x\_required **409.** The KOL badge needs a connected X account. Connect it with [X connect](/cabalspy-id/platform-users-x) first. ### kol\_not\_eligible **409.** The KOL application was refused. The message says why and `criteria` lists the badge criteria. See [KOL badge](/cabalspy-id/platform-users-kol). ### volume\_check\_unavailable **409.** A volume check cannot be requested right now. The message says why; `volume_check_next_at` in the [KOL status](/cabalspy-id/platform-users-kol#status) says when the next one is possible. ### invalid\_inbound\_url **404.** The [inbound URL](/cabalspy-id/platform-users-inbound) is unknown, was replaced by a newer one, or is disabled. Enable it again to get a new URL. ## Competition errors These codes come from the [competition](/cabalspy-id/competitions) endpoints. ### competition\_not\_found **404.** No competition with this id in your instance. ### competition\_limit **409.** At most 5 competitions can be open at the same time (scheduled, waiting and running) per developer account, across all your instances. End or [cancel](/cabalspy-id/competitions-update#cancel) one first. The error carries `limit`. ### competition\_closed **409.** The competition already ended or was cancelled. It can no longer be changed, joined or left. ### late\_join\_closed **409.** The competition is running and `late_join` is false, so it takes no new participants. ### competition\_full **409.** The competition reached `max_participants`. ## Callout errors These codes come from the [callout](/cabalspy-id/callouts) endpoints and from creating or updating a [callout competition](/cabalspy-id/competitions-callouts). Their messages are written for end users, so you can show them as they are. Callouts also use [not\_a\_holder](#not_a_holder), [posting\_paused](#posting_paused), [consent\_required](#consent_required), [sandbox\_user](#sandbox_user), [plan\_user\_limit](#plan_user_limit), [platform\_user\_not\_found](#platform_user_not_found) and [service\_unavailable](#service_unavailable) (the price could not be read). ### feature\_not\_enabled **403.** Callouts are switched on per instance on request, and they are not on for yours. Every callout endpoint, the callouts stream, creating a competition with `"kind": "callouts"` and updating an existing callout competition answer with this code. Contact us at [contact@cabalspy.xyz](mailto:contact@cabalspy.xyz) to enable them. [GET /v1/me](/cabalspy-id/me) lists `"callouts"` in `features` once they are on. ### invalid\_account **403.** The user's account is not active, so they cannot make callouts. ### kol\_only **403.** Your [callout settings](/cabalspy-id/callouts-settings) have `who: "kol_only"`, and the user does not have the KOL badge. See [KOL badge](/cabalspy-id/platform-users-kol). ### already\_called **409.** The user called this token less than 24 hours ago. A user can call the same token once per 24 hours; a new callout is possible once the first day of the previous one is over (its `window_ends_at`). This rule applies whatever the settings. ### callout\_cooldown **429.** The user made a callout less than `cooldown_minutes` ago (6 hours by default, see [callout settings](/cabalspy-id/callouts-settings)). The response carries a `Retry-After` header and `retry_after` in the error, both the seconds until the user can call again. Different from rate\_limit\_exceeded, which is about your API key. ### no\_price **422.** The token has no market price yet, for example because it has not traded, so a callout could not be tracked. Try again once it trades. ### callout\_not\_found **404.** No callout with this id in your instance, or it was removed. Removing a callout that is already removed answers with this code too. ## Trade Feed errors These codes come from the [Trade Feed](/cabalspy-id/trade-feed-api) endpoints, the [Trade Feed widgets](/cabalspy-id/trade-feed-widgets) and from [copy settings](/cabalspy-id/copy-trading-settings), which add the trader to the Trade Feed when needed. Their messages are written for end users, so you can show them as they are. The Trade Feed also uses [consent\_required](#consent_required), [plan\_user\_limit](#plan_user_limit), [platform\_user\_not\_found](#platform_user_not_found) and [rate\_limited](#rate_limited). ### trader\_not\_found **404.** No active CabalSpy ID trader with this handle or csid\_id. Platform users of another platform can only be found when that platform switched on network sharing. ### cannot\_add\_self **400.** The user tried to add themselves to their own Trade Feed, or to copy themselves. ### trading\_private **403.** The trader keeps their trading private, so they cannot be added to a Trade Feed or copied. Traders already in a Trade Feed who switch to private stay listed with `trading_public: false`, but nothing of them shows until they are public again. ### trade\_feed\_full **409.** The user's Trade Feed already has the maximum of 300 traders. Remove one first with [POST /v1/trade-feed/traders/delete](/cabalspy-id/trade-feed-api#remove-a-trader). ## Copy trading errors These codes come from the [copy trading](/cabalspy-id/copy-trading) endpoints. Copy trading also uses [consent\_required](#consent_required), [platform\_user\_not\_found](#platform_user_not_found), [not\_found](#not_found) and the [Trade Feed errors](#trade-feed-errors). ### not\_in\_trade\_feed **404.** [GET /v1/copy-trading/settings](/cabalspy-id/copy-trading-settings#read-the-settings) with a `trader` who is not in the user's Trade Feed, so there are no copy settings for them. [POST /v1/copy-trading/settings](/cabalspy-id/copy-trading-settings#change-the-settings) adds the trader automatically. ### copy\_managed\_elsewhere **409.** Another platform copies this trader for this user, and each trader is copied by one platform at a time so the user is never copied twice. The user has to switch copying of this trader off on the other platform first. [GET /v1/copy-trading/settings](/cabalspy-id/copy-trading-settings#read-the-settings) shows this as `managed_by_other_platform: true`. See [One platform at a time](/cabalspy-id/copy-trading#one-platform-at-a-time). ### already\_reported **409.** The copy instruction was already reported with a different final status (`executed`, `failed` or `skipped`), and a final status cannot change. The message names the current status. Sending the same status again is not an error. See [Report the result](/cabalspy-id/copy-trading-status). ## Stream errors The [trades stream](/cabalspy-id/stream) sends errors as a message and then closes the connection with code 4403. ```json theme={null} { "event": "error", "error": { "code": "too_many_connections", "message": "At most 5 stream connections per API key." } } ``` It can also send invalid\_api\_key, invalid\_parameter (blockchain, events or mint), missing\_parameter (mint without blockchain) and scope\_not\_allowed, described above. The [callouts stream](/cabalspy-id/callouts-stream) sends errors the same way, with invalid\_api\_key, [feature\_not\_enabled](#feature_not_enabled), invalid\_parameter (chain or mint), missing\_parameter (mint without chain) and too\_many\_connections. The [Trade Feed stream](/cabalspy-id/trade-feed-api#live-stream) and the [copy trading stream](/cabalspy-id/copy-trading-stream) send invalid\_api\_key and too\_many\_connections. ### plan\_required The live stream is included from the Pro plan. Upgrade at [apidashboard.cabalspy.xyz/billing/csid](https://apidashboard.cabalspy.xyz/billing/csid). ### too\_many\_connections Each API key can hold at most 5 stream connections at once, and separately 5 [theses stream](/cabalspy-id/theses-stream), 5 [callouts stream](/cabalspy-id/callouts-stream), 5 [Trade Feed stream](/cabalspy-id/trade-feed-api#live-stream) and 5 [copy trading stream](/cabalspy-id/copy-trading-stream) connections. Close unused connections, or share one connection across your services. ### too\_many\_tokens Theses stream only: a subscribe frame would take the connection above 200 tokens. The frame is ignored and the connection stays open. Unsubscribe from tokens you no longer show, subscribe with `"all": true`, or open another connection. ### invalid\_frame Theses stream only: the frame is not JSON or not a known op. Send `{"op": "subscribe", "tokens": [{"blockchain": "solana", "mint": "..."}]}`, `{"op": "unsubscribe", ...}`, `{"op": "subscribe", "all": true}` or `ping`. The connection stays open. # Health Source: https://docs.cabalspy.xyz/cabalspy-id/health GET /v1/health: service health and freshness of the trade data. No API key required. Service health of the Data API and how fresh the trade data is. No API key is required, so you can use it for uptime monitoring. `status` is `ok` while trades are being synced, `degraded` when the last sync is more than 60 seconds old. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/health" ``` ```python Python theme={null} import requests d = requests.get("https://api-id.cabalspy.xyz/v1/health").json()["data"] print(d["status"], d["trade_sync_age_seconds"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/health"); const { data } = await res.json(); console.log(data.status, data.trade_sync_age_seconds); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **status** `string` `ok` or `degraded`. **trade\_sync\_age\_seconds** `integer` Seconds since the last trade sync, or null if unknown. ```json Response theme={null} { "success": true, "data": { "status": "ok", "trade_sync_age_seconds": 2 }, "meta": { "request_id": "req_1f265546e444", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T08:04:11Z" } } ``` # History Source: https://docs.cabalspy.xyz/cabalspy-id/history GET /v1/wallets/history: lifetime stats, a per-token overview and the complete paginated trade log of a wallet of your users. The full lifetime record of a wallet of your users. Returns lifetime statistics, a win rate distribution across profit buckets, a per-token overview of everything the wallet has traded, and a paginated log of individual trades, newest first. Where the tracker focuses on a single period, history covers the whole life of the wallet. Use it for a complete profile page, trade exports or deep research on a trader. > [!TIP] > > The trade log is paginated. Read pagination.next\_cursor from the response and pass it back as cursor to fetch the next page. When next\_cursor is null you have reached the end. Statistics and the token overview always cover the whole history. > [!NOTE] > > White-Label: unverified wallets of your platform users work here too, while `wallet_trust` is `all`. `profile.wallet_verified` tells you whether the wallet is payment-verified, so you can show a badge. With `wallet_trust: verified_only` only payment-verified wallets are answered. ## Query Parameters **blockchain** `string` *required* Chain of the wallet. One of solana, bnb, base, eth, rh. **address** `string` *required* A wallet of one of your users on this chain: payment-verified, or an unverified wallet of one of your [platform users](/cabalspy-id/white-label#unverified-and-verified-wallets) while your instance's `wallet_trust` is `all`. **mint** `string` Only the trades of this token, for example to mark a user's buys and sells on a token's price chart. The lifetime stats then cover this token only. **limit** `integer` (default: 500) Trades per page in the trade log, 1 to 1000. **cursor** `string` Cursor for the next page of trades, the pagination.next\_cursor from the previous response. Empty means from the newest trade. **scope** `string` (default: instance) `global` allows any CabalSpy ID wallet. Enterprise plan only. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/wallets/history?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW&limit=50" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests H = {"Authorization": "Bearer YOUR_KEY"} params = { "blockchain": "solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "limit": 50, } r = requests.get("https://api-id.cabalspy.xyz/v1/wallets/history", params=params, headers=H).json() d = r["data"] print("lifetime pnl", d["lifetime_stats"]["realized_pnl"]) for t in d["trades"]: print(t["created_at"], t["transaction_type"], t["token_name"], t["value"]) nxt = r["pagination"]["next_cursor"] if nxt: params["cursor"] = nxt ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", limit: "50", }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/wallets/history?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data, pagination } = await res.json(); data.trades.forEach(t => console.log(t.created_at, t.transaction_type, t.token_name)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **profile** `object` The owner's profile, the same fields as on the [tracker](/cabalspy-id/tracker), plus wallet\_address. **lifetime\_stats** `object` **lifetime\_stats** **buy** `number` Total bought over the wallet lifetime (native). **sell** `number` Total sold over the wallet lifetime (native). **realized\_pnl** `number` Lifetime realized PnL (native), sells minus buys. **realized\_pnl\_percentage** `number` Lifetime realized PnL percentage. **buy\_txn** `integer` Total buys. **sell\_txn** `integer` Total sells. **total\_tx\_count** `integer` Total trades. **win\_rate** `number` Wins divided by tokens sold, as a percentage. **win\_count** `integer` Number of winning tokens. **total\_sold** `integer` Number of tokens with at least one sell. **active\_tokens\_count** `integer` Number of tokens ever traded. **largest\_buy** `number` Largest single buy (native). **best\_trade\_pnl** `number` Best realized PnL on a single token. **worst\_trade\_pnl** `number` Worst realized PnL on a single token. **still\_holding\_count** `integer` Tokens where less than 95 percent of the buy value was sold. **win\_rate\_distribution** `object` **win\_rate\_distribution** **above\_500** `integer` Tokens sold for at least 5x the buy. **above\_100\_to\_500** `integer` Tokens sold for 2x to 5x. **above\_zero\_to\_100** `integer` Tokens sold for more than 1x and less than 2x. **below\_zero** `integer` Tokens sold at a loss. **token\_overview** `array` **token** **mint** `string` Token mint or contract. **token\_name** `string` Token name. **token\_logo** `string` Token logo URL. **invested** `number` Total invested in this token (native). **sold** `number` Total sold value of this token (native). **realized\_pnl** `number` Realized PnL on this token (native). **realized\_pnl\_percentage** `number` Realized PnL percentage. **currency** `string` Native currency. **buy\_txn** `integer` Buys on this token. **sell\_txn** `integer` Sells on this token. **first\_seen** `string` ISO timestamp of the first trade on this token. **last\_seen** `string` ISO timestamp of the most recent trade on this token. **still\_holding** `boolean` Whether less than 95 percent of the buy value was sold. **trades** `array` **trade** **tx\_signature** `string` Transaction signature or hash. **mint** `string` Token mint or contract. **token\_name** `string` Token symbol or name. **token\_logo** `string` Token logo URL. **transaction\_type** `string` buy or sell. **value** `number` Trade value (native). **value\_usd** `number` Trade value in USD. **currency** `string` Native currency. **token\_amount** `number` Tokens bought or sold. **price\_usd** `number` Price per token in USD at the trade: value\_usd / token\_amount. **created\_at** `string` ISO timestamp of the trade. **pagination** `object` **pagination** **limit** `integer` Trades per page. **next\_cursor** `string` Cursor for the next page (null means end). **has\_more** `boolean` Whether more pages follow. ```json Response theme={null} { "success": true, "data": { "lifetime_stats": { "buy": 1840.5, "sell": 2010.75, "realized_pnl": 170.25, "realized_pnl_percentage": 9.25, "buy_txn": 412, "sell_txn": 388, "total_tx_count": 800, "win_count": 138, "total_sold": 225, "win_rate": 61.33, "active_tokens_count": 240, "largest_buy": 42.0, "best_trade_pnl": 88.6, "worst_trade_pnl": -19.4, "still_holding_count": 15 }, "win_rate_distribution": { "above_500": 6, "above_100_to_500": 28, "above_zero_to_100": 104, "below_zero": 87 }, "token_overview": [ { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "token_logo": "https://...", "invested": 1.66, "sold": 0.0, "realized_pnl": -1.66, "realized_pnl_percentage": -100.0, "currency": "SOL", "buy_txn": 1, "sell_txn": 0, "first_seen": "2026-10-12T16:25:34Z", "last_seen": "2026-10-12T16:25:34Z", "still_holding": true } ], "trades": [ { "tx_signature": "5xr8abc...", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "token_logo": "https://...", "transaction_type": "buy", "value": 1.66, "value_usd": 137.44, "currency": "SOL", "created_at": "2026-10-12T16:25:34Z" } ], "profile": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "csid", "kol": true, "active_hours": "", "profile_url": "https://id.cabalspy.xyz/u/MazeCCC", "wallet_address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW" } }, "pagination": { "limit": 50, "next_cursor": "MjAyNi0xMC0xMlQxNjoyNTozNCswMDowMHw1eHI4YWJj...", "has_more": true }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | blockchain or address is missing. | | 400 | invalid\_parameter | blockchain, address, limit or cursor invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | scope\_not\_allowed | scope=global needs the Enterprise plan. | | 404 | wallet\_not\_found | The wallet does not count on this chain for one of your users: not payment-verified, and not an unverified wallet of one of your platform users (or `wallet_trust` is `verified_only`). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # Holdings Source: https://docs.cabalspy.xyz/cabalspy-id/holdings GET /v1/wallets/holdings: current token balances of a wallet of your users with USD value, read from the chain. The current token balances of a wallet of your users of your users, with price and USD value, read from the chain. Balances worth less than \$0.01 are hidden. Tokens are sorted by USD value, largest first. Use it to show a portfolio on a profile page or to check what a trader you copy is holding right now. > [!TIP] > > Holdings are cached for 30 seconds. meta.cached and meta.cache\_age\_seconds show the age of the data. > [!NOTE] > > White-Label: unverified wallets of your platform users work here too, while `wallet_trust` is `all`. `profile.wallet_verified` tells you whether the wallet is payment-verified, so you can show a badge. With `wallet_trust: verified_only` only payment-verified wallets are answered. ## Query Parameters **blockchain** `string` *required* Chain of the wallet. One of solana, bnb, base, eth, rh. **address** `string` *required* A wallet of one of your users on this chain: payment-verified, or an unverified wallet of one of your [platform users](/cabalspy-id/white-label#unverified-and-verified-wallets) while your instance's `wallet_trust` is `all`. **scope** `string` (default: instance) `global` allows any CabalSpy ID wallet. Enterprise plan only. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/wallets/holdings?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW"} r = requests.get("https://api-id.cabalspy.xyz/v1/wallets/holdings", params=params, headers={"Authorization": "Bearer YOUR_KEY"}) h = r.json()["data"]["active_holdings"] print(h["count"], "tokens worth", h["total_value_usd"], "USD") for t in h["tokens"][:5]: print(t["symbol"], t["amount_formatted"], t["value_usd"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/wallets/holdings?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.active_holdings.total_value_usd, data.active_holdings.tokens); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **wallet** `string` The wallet address. **blockchain** `string` Chain. **profile** `object` The owner's profile, the same fields as on the [tracker](/cabalspy-id/tracker). **active\_holdings** `object` **active\_holdings** **tokens** `array` **token** **token\_address** `string` Token mint or contract. **token\_name** `string` Token name. **symbol** `string` Token symbol. **logo** `string` Token logo URL. **amount** `string` Raw balance in the token's smallest unit. **amount\_formatted** `string` Balance in whole tokens. **decimals** `integer` Token decimals. **price\_usd** `number` Token price in USD. **value\_usd** `number` Value of the balance in USD. **verified\_contract** `boolean` Reserved, currently null. **count** `integer` Number of tokens. **total\_value\_usd** `number` Total value of all tokens in USD. **last\_updated** `string` When the balances were read. **stale** `boolean` True when the cached balances are older than 30 seconds. **loading** `boolean` Always false, kept for compatibility with the CabalSpy API. ```json Response theme={null} { "success": true, "data": { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "blockchain": "solana", "profile": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "csid", "kol": true, "active_hours": "", "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "active_holdings": { "tokens": [ { "token_address": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "symbol": "invisibull", "logo": "https://...", "amount": "22113972030000", "amount_formatted": "22113972.03", "decimals": 6, "price_usd": 0.0000071, "value_usd": 157.009201, "verified_contract": null } ], "count": 1, "total_value_usd": 157.01, "last_updated": "2026-10-13T08:04:11Z", "stale": false, "loading": false } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | blockchain or address is missing. | | 400 | invalid\_parameter | blockchain or address invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | scope\_not\_allowed | scope=global needs the Enterprise plan. | | 404 | wallet\_not\_found | The wallet does not count on this chain for one of your users: not payment-verified, and not an unverified wallet of one of your platform users (or `wallet_trust` is `verified_only`). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | | 503 | service\_unavailable | Holdings are temporarily unavailable, retry shortly. | # Latest trades Source: https://docs.cabalspy.xyz/cabalspy-id/latest GET /v1/transactions/latest: the newest trades of your users' verified wallets, each with the trader's profile. The newest trades of your users' verified wallets, newest first, each with the trader's CabalSpy ID profile. Leave out blockchain to get every chain at once. Use it for a social trade feed or to backfill a feed before you connect to the [live stream](/cabalspy-id/stream), which pushes the same trade objects. ## Query Parameters **blockchain** `string` Chain filter. One of solana, bnb, base, eth, rh. Empty means every chain. **limit** `integer` (default: 50) Number of trades, 1 to 100. **scope** `string` (default: instance) `global` returns trades of every CabalSpy ID user. Enterprise plan only. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/transactions/latest?blockchain=solana&limit=20" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/transactions/latest", params={"limit": 20}, headers={"Authorization": "Bearer YOUR_KEY"}) for t in r.json()["data"]: who = t["trader"]["username"] if t["trader"] else t["wallet"] print(t["timestamp"], who, t["transaction_type"], t["token_symbol"], t["value_usd"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", limit: "20" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/transactions/latest?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); data.forEach(t => console.log(t.timestamp, t.trader?.username, t.transaction_type, t.token_symbol)); ``` ## Response **success** `boolean` True on success. **data** `array` **trade** **signature** `string` Transaction signature or hash. **blockchain** `string` Chain. **wallet** `string` The trading wallet. **mint** `string` Token mint or contract. **transaction\_type** `string` buy or sell. **token\_symbol** `string` Token symbol. **token\_name** `string` Token name. **token\_logo** `string` Token logo URL. **token\_amount** `number` Tokens bought or sold. **value** `number` Trade value (native). **value\_usd** `number` Trade value in USD. **currency** `string` Native currency. **timestamp** `string` ISO timestamp of the trade. **trader** `object` **trader** **csid\_id** `string` The trader's CabalSpy ID. **username** `string` X handle. **name** `string` Display name. **image\_url** `string` Avatar URL. **kol** `boolean` Whether the trader holds the KOL badge. **pagination** `object` limit, total (always null), has\_more (always false) and next\_cursor (always null). This endpoint returns only the newest trades. ```json Response theme={null} { "success": true, "data": [ { "signature": "5xr8abc...", "blockchain": "solana", "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "transaction_type": "buy", "token_symbol": "invisibull", "token_name": "invisibull", "token_logo": "https://...", "token_amount": 22113972.03, "value": 1.66, "value_usd": 137.44, "currency": "SOL", "timestamp": "2026-10-13T08:03:58Z", "trader": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol": true } } ], "pagination": { "limit": 20, "total": null, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | blockchain, limit or scope invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | scope\_not\_allowed | scope=global needs the Enterprise plan. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # Leaderboard Source: https://docs.cabalspy.xyz/cabalspy-id/leaderboard GET /v1/wallets/leaderboard: your users' verified wallets ranked by volume, PnL, win rate or trades for a period. Your users' verified wallets ranked for a period, by volume, realized PnL, win rate or number of trades. Every entry carries the owner's profile and KOL badge, so you can render a verified leaderboard in your app directly. Only wallets with trades in the period appear. Enterprise keys can add scope=global to rank every CabalSpy ID user. > [!TIP] > > The leaderboard is cached for 30 seconds. To page through it, pass the wallet of the last entry, data.pagination.next\_cursor, as cursor. ## Query Parameters **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh. **period** `string` (default: 1d) Ranking window, one of 6h, 1d, 7d or 30d. **sort** `string` (default: volume) Ranking order, highest first. One of volume, pnl (native), pnl\_usd, win\_rate (ties broken by closed positions) or trades. **limit** `integer` (default: 100) Entries per page, 1 to 500. **cursor** `string` Cursor for the next page, the data.pagination.next\_cursor from the previous response. **scope** `string` (default: instance) `global` ranks every CabalSpy ID user. Enterprise plan only. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/wallets/leaderboard?blockchain=solana&period=7d&sort=pnl_usd&limit=25" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "period": "7d", "sort": "pnl_usd", "limit": 25} r = requests.get("https://api-id.cabalspy.xyz/v1/wallets/leaderboard", params=params, headers={"Authorization": "Bearer YOUR_KEY"}) for e in r.json()["data"]["leaderboard"]: print(e["rank"], e["profile"]["username"], e["period_stats"]["realized_pnl_usd"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", period: "7d", sort: "pnl_usd", limit: "25" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/wallets/leaderboard?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); data.leaderboard.forEach(e => console.log(e.rank, e.profile.username, e.period_stats.realized_pnl_usd)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **blockchain** `string` Chain. **type** `string` Always csid. **scope** `string` instance or global. **period** `string` The requested window. **sort** `string` The ranking order. **currency** `string` Native currency of the chain. **pagination** `object` limit, total (ranked wallets), has\_more and next\_cursor (null means end). **leaderboard** `array` **entry** **rank** `integer` Position in the ranking, starting at 1. **wallet** `string` Wallet address. **profile** `object` csid\_id, username, name, image\_url, twitter (null without X), telegram (t.me link or empty), blockchain, currency, wallet\_type (always csid), kol and public\_trading (whether the user shows their trading publicly on CabalSpy ID). **period\_stats** `object` **period\_stats** **period** `string` The requested window. **total\_buy** `number` Bought (native). **total\_buy\_usd** `number` Bought in USD. **total\_sell** `number` Sold (native). **total\_sell\_usd** `number` Sold in USD. **total\_volume** `number` Buy plus sell volume (native). **total\_volume\_usd** `number` Buy plus sell volume in USD. **realized\_pnl** `number` Realized PnL (native), sells minus buys. **realized\_pnl\_usd** `number` Realized PnL in USD. **realized\_pnl\_percentage** `number` Realized PnL percentage. **avg\_hold\_time\_minutes** `number` Average holding time in minutes. **total\_txn** `integer` All trades. **buy\_txn** `integer` Buys. **sell\_txn** `integer` Sells. **period\_win\_rate\_distribution** `object` win\_count, closed\_count and win\_rate\_percentage. **period\_history\_tokens** `object` total\_tokens, the number of tokens traded in the period. ```json Response theme={null} { "success": true, "data": { "blockchain": "solana", "type": "csid", "scope": "instance", "period": "7d", "sort": "pnl_usd", "currency": "SOL", "pagination": { "limit": 25, "total": 1, "has_more": false, "next_cursor": null }, "leaderboard": [ { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "profile": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "wallet_type": "csid", "kol": true, "public_trading": true }, "period_stats": { "period": "7d", "total_buy": 180.25, "total_buy_usd": 14840.6, "total_sell": 228.45, "total_sell_usd": 18809.2, "total_volume": 408.7, "total_volume_usd": 33649.8, "realized_pnl": 48.2, "realized_pnl_usd": 3968.6, "realized_pnl_percentage": 26.74, "avg_hold_time_minutes": 84.5, "total_txn": 40, "buy_txn": 22, "sell_txn": 18 }, "period_win_rate_distribution": { "win_count": 14, "closed_count": 18, "win_rate_percentage": 77.78 }, "period_history_tokens": { "total_tokens": 21 }, "rank": 1 } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": true, "cache_age_seconds": 12, "version": "v1", "timestamp": "2026-10-13T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | blockchain is missing. | | 400 | invalid\_parameter | blockchain, period, sort, limit, cursor or scope invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | scope\_not\_allowed | scope=global needs the Enterprise plan. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # Login button Source: https://docs.cabalspy.xyz/cabalspy-id/login-button Add Sign in with CabalSpy ID to any website with two lines of HTML. The widget runs PKCE for browser apps and shows an account menu once signed in. The login button is a small script that renders a **Sign in with CabalSpy ID** button. Browser apps get the whole OpenID Connect flow with PKCE, state and nonce out of the box. Server-side apps point the button at their own login route. Once someone is signed in, the button turns into their avatar with a menu. > [!NOTE] > > On the CabalSpy ID sign-in page people choose how to sign in: with X, with Telegram through the CabalSpy ID bot, or with Google. Nothing changes for your platform, the button and the flow are the same. Users without X arrive with `x` set to null, see [Users without X](/cabalspy-id/openid-connect#users-without-x). ## Add the button ```html theme={null}
``` Every element with `data-csid-login` becomes a button. The design comes from the button builder on the instance's [Login button](/cabalspy-id/dashboard#login-button) tab in the dashboard, the `data-*` attributes below override it per element. The button renders in a shadow root, so your page styles do not leak into it. ## Attributes **data-client-id** `string` *required* Your Instance ID (`csid_...`). **data-href** `string` Server-side apps: your own login route, for example `/auth/csid/login`. A click navigates there and your server starts the flow with its client secret. **data-redirect-uri** `string` Browser apps: where CabalSpy ID sends the user back. Defaults to the current page (origin plus path). Must be registered exactly as a redirect URI. **data-scope** `string` (default: openid profile) Browser apps: the scopes to request, separated by spaces. **data-theme** `string` `light` draws an outlined white button, any other value a filled button in `data-color`. **data-color** `string` Button color, for example `#01b400`. **data-text-color** `string` Text color. **data-shape** `string` One of `square`, `rounded` or `pill`. **data-size** `string` One of `sm`, `md` or `lg`. **data-label** `string` (default: Sign in with CabalSpy ID) Button text. **data-full-width** `string` `true` stretches the button to the width of its container. **data-show-logo** `string` `false` hides the ID mark. **data-user** `string` Server-side apps: the `sub` of the signed-in person. The button then shows their avatar and menu. **data-logout-href** `string` Server-side apps: where **Sign out** in the menu navigates, for example `/logout`. ## Browser apps For a public client (no secret), the widget does everything. On click it creates a PKCE verifier, state and nonce, sends the user to CabalSpy ID, exchanges the code when they come back, checks the issuer, nonce and audience, loads the user info and fires `csid:login`. ```javascript theme={null} window.addEventListener("csid:login", (e) => { const { user, idToken, accessToken, expiresIn } = e.detail; // send idToken to your backend and verify it there }); window.addEventListener("csid:error", (e) => { console.warn("CabalSpy ID sign-in failed", e.detail.error, e.detail.description); }); ``` | Field | Meaning | | - | - | | `user` | The user info response, see [claims](/cabalspy-id/openid-connect#claims). | | `idToken` | The signed ID token (ES256). | | `accessToken` | Access token for `/oauth/userinfo`, valid for `expiresIn` seconds. | | `expiresIn` | Lifetime of the access token in seconds (900). | > [!WARNING] > > The `user` object comes from the browser. Before you trust it, send `idToken` to your backend and verify it with the public keys at `https://id.cabalspy.xyz/oauth/jwks`, see the [Quickstart](/cabalspy-id/quickstart). Register the page as a redirect URI and its origin as a web origin of your instance, the token request is sent from the browser. ## Server-side apps A confidential client keeps its secret on the server, so the button only starts the flow. ```html theme={null}
``` Your `/auth/csid/login` route redirects to the authorization endpoint, and your callback exchanges the code with the client secret. See [OpenID Connect](/cabalspy-id/openid-connect) for the requests. To show the signed-in state, render the person's `sub` and your logout route on the element: ```html theme={null}
``` ## Signed-in menu Once signed in, the button shows the person's avatar, name and KOL badge. The menu has three entries. | Entry | Target | | - | - | | View profile | The **Profile page on your site** set on the [Login button](/cabalspy-id/dashboard#login-button) tab, with `{username}` and `{csid_id}` filled in, for example `https://yourplatform.xyz/u/{username}`. Otherwise the CabalSpy ID profile `https://id.cabalspy.xyz/u/`. | | Settings | The person's CabalSpy ID settings. | | Sign out | Fires `csid:logout`. With `data-logout-href` the browser goes there. | For users beyond your plan's user limit the button shows **Signed in** without a name or avatar, because you receive no profile data for them. ## JavaScript API The script exposes `window.CSID`. | Member | Description | | - | - | | `CSID.login({ clientId, redirectUri, scope })` | Starts the browser flow from your own UI. | | `CSID.onLogin(callback)` | Calls `callback` with the same object as `csid:login`, also if the sign-in already happened. | | `CSID.setUser(clientId, user)` | Shows someone as signed in, for apps that restore their own session. | | `CSID.signOut(clientId)` | Forgets the signed-in user on this device and fires `csid:logout`. | | `CSID.mount()` | Renders buttons added to the page after load. | | `CSID.user` | The result of the last sign-in on this page, or null. | | Event | Detail | | - | - | | `csid:login` | `{ user, idToken, accessToken, expiresIn }` | | `csid:logout` | `{ clientId }` | | `csid:error` | `{ error, description }` | In browser apps the signed-in user is remembered on the device until `CSID.signOut()` is called or the user signs out from the menu. # Me Source: https://docs.cabalspy.xyz/cabalspy-id/me GET /v1/me: the instance your API key works with, its plan, request rate, how many users you receive data for and the extras switched on for it. The instance your API key works with, its mode and plan, the request rate, how many users you currently receive data for and which extras are switched on. Call it first to check that your key is set up. ## Query Parameters **instance** `string` Your Instance ID (`csid_...`). Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/me" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/me", headers={"Authorization": "Bearer YOUR_KEY"}) d = r.json()["data"] print(d["plan"], d["rate_limit_rps"], "rps,", d["users_with_data"], "users") ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/me", { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.plan, data.rate_limit_rps, data.users_with_data); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **instance** `string` The registrable domain of a live instance, otherwise its client\_id. **client\_id** `string` The Instance ID. **mode** `string` `sandbox`, `development` or `live`. **plan** `string` `free`, `starter`, `pro`, `business` or `enterprise` for live instances, `development` otherwise. **rate\_limit\_rps** `integer` Requests per second, null means unlimited. **websockets** `boolean` Whether the live stream is available. **global\_scope** `boolean` Whether `scope=global` is available (Enterprise). **users\_with\_data** `integer` Number of users you currently receive data for. **features** `array` Extras CabalSpy switched on for this instance on request. Currently only `"callouts"` (see [Callouts](/cabalspy-id/callouts)). Empty when none are on. ```json Response theme={null} { "success": true, "data": { "instance": "example.com", "client_id": "csid_3f9a1c0e7b2d4a6f8e1c5b09", "mode": "live", "plan": "pro", "rate_limit_rps": 10, "websockets": true, "global_scope": false, "users_with_data": 128, "features": ["callouts"] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | instance\_required | Your account has several instances, pass instance. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid or does not exist. | | 403 | product\_not\_enabled | CabalSpy ID is not enabled for this key. | | 403 | no\_instance | Create a CabalSpy ID instance first. | | 404 | instance\_not\_found | No instance with this client\_id in your account. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # OpenID Connect Source: https://docs.cabalspy.xyz/cabalspy-id/openid-connect CabalSpy ID is a standard OpenID Connect provider: authorization code flow with mandatory PKCE, ES256 ID tokens, rotating refresh tokens. CabalSpy ID is a standard OpenID Connect provider. Any certified OpenID Connect or OAuth 2.0 library works. The only flow is the authorization code flow, and PKCE with S256 is required for every client, confidential clients included. ## Endpoints All endpoints are listed in the discovery document. ```bash theme={null} curl "https://id.cabalspy.xyz/.well-known/openid-configuration" ``` | Endpoint | URL | | - | - | | Issuer | `https://id.cabalspy.xyz` | | Authorization | `https://id.cabalspy.xyz/oauth/authorize` | | Token | `https://id.cabalspy.xyz/oauth/token` | | User info | `https://id.cabalspy.xyz/oauth/userinfo` | | JWKS | `https://id.cabalspy.xyz/oauth/jwks` | | Revocation | `https://id.cabalspy.xyz/oauth/revoke` | | Capability | Supported values | | - | - | | Response types | `code` (response mode `query`) | | Grant types | `authorization_code`, `refresh_token` | | PKCE | `S256`, required | | ID token signing | `ES256` | | Client authentication | `client_secret_basic`, `client_secret_post`, `none` (public browser apps) | | Prompt | `none`, `consent` | | Authorization response `iss` parameter | Yes | ## Clients Create a client in the [API Dashboard](https://apidashboard.cabalspy.xyz) on the **CabalSpy ID** tab. The Instance ID is the `client_id` (`csid_...`). Confidential clients (server-side apps) authenticate with a client secret (`csid_sk_...`). Only a hash of the secret is stored, so copy it when you create it. Several secrets can be active at once: when you roll a secret on the [Credentials](/cabalspy-id/dashboard#credentials) tab, the existing secrets stay valid for 24 hours, 1 hour, 7 days or not at all, as you choose, so you can deploy the new one without downtime. **Revoke** ends a secret at once. Public clients (browser apps, mobile apps) have no secret and use `none` as authentication method. PKCE protects their flow. Redirect URIs must be registered and match exactly. Live instances need every redirect URI and web origin on a verified domain. Redirect URIs, web origins and scopes are set on the instance's [Settings](/cabalspy-id/dashboard#settings) tab, testers on [Domains & testers](/cabalspy-id/dashboard#domains-and-testers). ## Scopes | Scope | What the user approves | | - | - | | `openid` | Sign in with CabalSpy ID. Required. | | `profile` | Profile: name, handle, avatar, KOL badge and, when the user has X, their X account with follower counts. | | `wallets` | Verified wallet addresses and the chains they are verified on. Needs a review for live instances. | | `onchain` | The latest 7-day trading volume. Needs a review for live instances. | | `offline_access` | A refresh token, so the app keeps access while the user is away. | | `thesis` | Post theses and replies, react and report in your name when you use the app. See [Token theses](/cabalspy-id/theses). | | `trade_feed` | Add traders to your Trade Feed and get their trades. Needed for the [Trade Feed](/cabalspy-id/trade-feed) and [copy trading](/cabalspy-id/copy-trading). | An instance can only request the scopes enabled for it in the dashboard. The user approves the scopes once per app. Asking for more scopes later shows the consent screen again. ## Authorization request Create a random `code_verifier` (43 to 128 characters), its S256 `code_challenge`, a random `state` and a random `nonce`, then redirect the user. ```text theme={null} https://id.cabalspy.xyz/oauth/authorize ?response_type=code &client_id=csid_... &redirect_uri=https://app.example.com/auth/csid/callback &scope=openid profile wallets offline_access &state=STATE &nonce=NONCE &code_challenge=CODE_CHALLENGE &code_challenge_method=S256 ``` **response\_type** `string` *required* Always `code`. **client\_id** `string` *required* Your Instance ID. **redirect\_uri** `string` *required* A registered redirect URI, matched exactly. **scope** `string` *required* Space-separated scopes. Must contain `openid`. **code\_challenge** `string` *required* Base64url SHA-256 of the code verifier (43 characters). **code\_challenge\_method** `string` *required* Always `S256`. **state** `string` Random value you check on the callback. Up to 500 characters. **nonce** `string` Random value that comes back in the ID token. Up to 300 characters. **prompt** `string` `none` signs in silently or returns `login_required` or `consent_required`. `consent` always shows the consent screen. `none` cannot be combined with other values. The user signs in to CabalSpy ID if needed, with X, Telegram or Google, and approves the scopes. CabalSpy ID then redirects back with `code`, `state` and `iss`. Check that `state` matches and that `iss` is `https://id.cabalspy.xyz`. The code is single use and valid for 60 seconds. ```text theme={null} https://app.example.com/auth/csid/callback?code=CODE&state=STATE&iss=https%3A%2F%2Fid.cabalspy.xyz ``` A request with an unknown client or an unregistered redirect URI is never redirected. CabalSpy ID shows an error page instead. ## Token request Exchange the code at the token endpoint with the code verifier. ```bash Confidential client theme={null} curl -X POST "https://id.cabalspy.xyz/oauth/token" \ -u "csid_...:csid_sk_..." \ -d grant_type=authorization_code \ -d code=CODE \ -d redirect_uri=https://app.example.com/auth/csid/callback \ -d code_verifier=CODE_VERIFIER ``` ```bash Public client theme={null} curl -X POST "https://id.cabalspy.xyz/oauth/token" \ -d grant_type=authorization_code \ -d client_id=csid_... \ -d code=CODE \ -d redirect_uri=https://app.example.com/ \ -d code_verifier=CODE_VERIFIER ``` ```json Response theme={null} { "access_token": "eyJhbGciOiJFUzI1NiIsImtpZCI6...", "token_type": "Bearer", "expires_in": 900, "id_token": "eyJhbGciOiJFUzI1NiIsImtpZCI6...", "scope": "openid profile wallets offline_access", "refresh_token": "csid_rt_..." } ``` `refresh_token` is only returned when `offline_access` was granted. ## Tokens | Token | Format | Lifetime | | - | - | - | | Authorization code | Opaque, single use | 60 seconds | | Access token | ES256 JWT, header `typ: at+jwt`, `aud` = your client\_id | 15 minutes | | ID token | ES256 JWT, `aud` = your client\_id | 15 minutes | | Refresh token | Opaque, `csid_rt_...` | 30 days of inactivity, 90 days at most | Verify ID tokens with the keys at `https://id.cabalspy.xyz/oauth/jwks`. Check the signature (ES256, select the key by `kid`), `iss` = `https://id.cabalspy.xyz`, `aud` = your client\_id, `exp`, and `nonce` if you sent one. New signing keys are published in the JWKS before they are used, so cache the JWKS but refresh it when you see an unknown `kid`. ```json JWKS theme={null} { "keys": [ { "kty": "EC", "crv": "P-256", "use": "sig", "alg": "ES256", "kid": "20261009-50277aee", "x": "CeEkzMniNB_BEK9V4xBLFLxJylTAG-w6B3fQ7BXYXw8", "y": "nEE3Bwd4rNXiu3i-1zZjtL9OJPjZPxv_L9zFqhW7P9U" } ] } ``` ## Refresh tokens With `offline_access` you get a refresh token. Exchange it for new tokens at the token endpoint. ```bash theme={null} curl -X POST "https://id.cabalspy.xyz/oauth/token" \ -u "csid_...:csid_sk_..." \ -d grant_type=refresh_token \ -d refresh_token=csid_rt_... ``` Refresh tokens rotate. Every refresh returns a new refresh token and the old one stops working. If a used refresh token is presented again, the whole token family is revoked and the user has to sign in again, so always store the newest one. A refresh token expires after 30 days without use, and every family ends 90 days after the sign-in. A refresh fails with `invalid_grant` when the user removed access to your app. ## Revocation Revoke a refresh token when the user signs out of your app. This ends its whole family. Unknown tokens are not an error. ```bash theme={null} curl -X POST "https://id.cabalspy.xyz/oauth/revoke" \ -u "csid_...:csid_sk_..." \ -d token=csid_rt_... ``` Access tokens are short-lived JWTs and expire on their own. ## User info ```bash theme={null} curl "https://id.cabalspy.xyz/oauth/userinfo" \ -H "Authorization: Bearer ACCESS_TOKEN" ``` Returns the claims for the granted scopes. The ID token itself carries `sub` and, with `profile`, `name`, `preferred_username`, `picture` and `kol_badge`. The full `x`, `wallets` and `onchain` claims come from the user info endpoint. ## Claims **sub** `string` Stable user id. Use it as the user's key in your database. It is the `csid_id` in the Data API. **name** `string` Display name: from X, otherwise from Telegram or Google. Scope `profile`. **preferred\_username** `string` The X handle without the @. Users without X get `tg.` or `id.<10 hex characters>`, see [Users without X](#users-without-x). Scope `profile`. **picture** `string` Avatar URL from X or Google, can be null. Scope `profile`. **profile** `string` Public CabalSpy ID profile URL. Scope `profile`. **kol\_badge** `boolean` Whether the user holds the reviewed KOL badge. Always false without X. Scope `profile`. **x** `object` X account details, or null when the user has no X account connected. Scope `profile`. **x** **id** `string` Numeric X user id. **username** `string` X handle. **followers** `integer` Followers. **following** `integer` Accounts followed. **posts** `integer` Number of posts. **listed** `integer` Number of lists the account is on. **verified** `boolean` X verification. **verified\_type** `string` X verification type. **created\_at** `string` When the X account was created (ISO 8601). **fetched\_at** `string` When the profile was last read from X (ISO 8601). **wallets** `array` Verified wallets. Scope `wallets`. **wallet** **address** `string` Wallet address. **family** `string` Address family, for example `solana` or `evm`. **chains** `array` Chains the wallet is verified on, for example `["base", "eth"]`. **verified\_at** `string` When the wallet was first verified (ISO 8601). **onchain** `object` Latest on-chain volume check, or null. Scope `onchain`. **onchain** **volume\_7d\_usd** `number` Trading volume over 7 days in USD. **checked\_at** `string` When the volume was checked (ISO 8601). **sandbox** `boolean` Present and true for made-up sandbox test users. Never trust such an identity in production. ```json User info theme={null} { "sub": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "name": "Maze", "preferred_username": "MazeCCC", "picture": "https://pbs.twimg.com/profile_images/.../photo.jpg", "profile": "https://id.cabalspy.xyz/u/MazeCCC", "kol_badge": true, "x": { "id": "1440000000000000000", "username": "MazeCCC", "followers": 48210, "following": 812, "posts": 15320, "listed": 210, "verified": true, "verified_type": "blue", "created_at": "2021-08-11T09:12:44+00:00", "fetched_at": "2026-10-12T18:03:10.512000+00:00" }, "wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"], "verified_at": "2026-10-09T14:21:07.000000+00:00" } ], "onchain": { "volume_7d_usd": 182450.5, "checked_at": "2026-10-12T06:00:00+00:00" } } ``` ## Users without X People sign in to CabalSpy ID with X, with Telegram through the CabalSpy ID bot, or with Google as an alternative. Nothing changes in the flow for your app, but users who signed in with Telegram or Google and have not connected X look different: | Claim | With X | Without X | | - | - | - | | `x` | X account details | `null` | | `preferred_username` | X handle, for example `MazeCCC` | `tg.`, or `id.<10 hex characters>` | | `name` | X display name | Telegram name, else Google name, else `CabalSpy ID user` | | `picture` | X avatar | Google picture, else null | | `kol_badge` | true or false | false, the KOL badge requires X | Handles of users without X always contain a dot, X handles never do. When a user connects X later, `preferred_username`, `name`, `picture` and `x` switch to their X account while `sub` stays the same, so always key your users on `sub`, never on the handle. ```json User info without X theme={null} { "sub": "5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19", "name": "Dan", "preferred_username": "tg.degen_dan", "picture": null, "profile": "https://id.cabalspy.xyz/u/tg.degen_dan", "kol_badge": false, "x": null } ``` ## Limited users Your plan sets how many users you receive data for. Everyone can always sign in, but above the limit the person gets an anonymous `sub` that starts with `anon_` and no profile, wallet or on-chain data. The ID token and the user info then look like this: ```json theme={null} { "sub": "anon_k3x9w2...", "limited": true, "reason": "plan_user_limit", "message": "This platform has reached the user limit of its CabalSpy ID plan. It receives no data for this user until it upgrades." } ``` The anonymous `sub` is stable for that person and your domain, so you can still keep an account for them. After you upgrade, people who sign in again receive their real `sub` and data. See [Plans and limits](/cabalspy-id/plans). ## OAuth errors The token, user info and revocation endpoints return errors in the standard OAuth format. ```json theme={null} { "error": "invalid_grant", "error_description": "The code is invalid, expired or already used." } ``` | Error | Where | Meaning | | - | - | - | | invalid\_request | authorize | Missing or malformed parameter, for example no PKCE or an unregistered redirect URI. | | invalid\_client | authorize, token | Unknown or disabled client, or client authentication failed (401). | | invalid\_scope | authorize | `openid` missing, unknown scope, or a scope not enabled for the instance. | | unsupported\_response\_type | authorize | Only `response_type=code` is supported. | | login\_required | authorize | `prompt=none` and the user is not signed in. | | consent\_required | authorize | `prompt=none` and the user has not approved the app yet. | | access\_denied | authorize | The user declined, the user is blocked by your instance, or the instance is in development and the user is not a tester. | | invalid\_grant | token | Code invalid, expired, used or issued to another client or redirect URI, PKCE failed, refresh token invalid, or the user revoked access. | | unsupported\_grant\_type | token | Use `authorization_code` or `refresh_token`. | | invalid\_token | userinfo | Access token missing, invalid, expired or access revoked (401). | | slow\_down | token, userinfo | Too many requests from your IP (429). | # CabalSpy ID — SocialFi API & SDK Source: https://docs.cabalspy.xyz/cabalspy-id/overview CabalSpy ID is a SocialFi API and SDK for trading platforms: sign in with X, verified wallets, live trades and PnL on Solana, BNB Chain, Base, Ethereum and Robinhood Chain, token theses and webhooks. #### **The SocialFi layer for your trading platform.** CabalSpy ID is a SocialFi API and SDK that gives a trading platform a social layer for its own customers. Add **Sign in with CabalSpy ID** and every user who signs in arrives with their social identity, X or Telegram, and their verified wallets. From that moment every trade those users make is tracked live across Solana, BNB Chain, Base, Ethereum and Robinhood Chain. Your platform gets each user's identity, KOL badge and full trading record, PnL, win rate, trades, holdings and a daily PnL calendar, through one API, a live trade stream and webhooks: one SocialFi integration instead of building identity, wallet verification and trade tracking yourself. Build leaderboards of your own users, show real positions next to every opinion, put your users' trades on the chart, and turn trading into something people follow, copy and compete in. > [card] [Login](/cabalspy-id/login-button) > > A drop-in login button and a standard OpenID Connect provider. Every user arrives with X and verified wallets. > [card] [Data API](/cabalspy-id/data-api) > > Profiles, trading stats, PnL charts, holdings, calendars and leaderboards of your users. > [card] [Live](/cabalspy-id/stream) > > Every trade of your users pushed live, plus webhooks when a user verifies a wallet or becomes a KOL. ## Choose your path CabalSpy ID works in two ways. Pick one, or use both in the same instance. > [card] [Login with CabalSpy ID](/cabalspy-id/quickstart) > > Your users sign in with CabalSpy ID and arrive with X, Telegram and verified wallets. For platforms without a login yet, or that want verified identities. Start with the **Login quickstart**. > [card] [White-Label](/cabalspy-id/white-label-quickstart) > > You keep your own login (Privy, Dynamic, your own) and brand. Your backend adds your users and their existing wallets by your own user id. Your users never see CabalSpy ID. Start with the **White-Label quickstart**. Both paths get the same data and features: profiles, wallet tracker, leaderboards, theses, callouts, Trade Feed, copy trading and [trading competitions](/cabalspy-id/competitions). ## Use cases What platforms build with CabalSpy ID, and the endpoints that power each feature. | Use case | What your users see | Powered by | | - | - | - | | Leaderboards of your users | Your community ranked by PnL, volume, win rate or trades over 6h, 1d, 7d or 30d. | [leaderboard](/cabalspy-id/leaderboard) | | Token theses with real positions | Opinions on a token written only by holders, each showing the author's real position and PnL, shared across every platform. | [theses](/cabalspy-id/theses) (widget or API), [stream](/cabalspy-id/stream), [holdings](/cabalspy-id/holdings), [tracker](/cabalspy-id/tracker) | | Trades on the token chart | Buys and sells of your users, and of KOLs among them, as markers on the price chart. | [stream](/cabalspy-id/stream), [transactions/latest](/cabalspy-id/latest) | | Live social activity feed | Who just bought or sold what, with name, avatar and KOL badge, as it happens. | [stream](/cabalspy-id/stream), [transactions/latest](/cabalspy-id/latest) | | Copy trading with verified performance | Traders to follow chosen on real, on-chain results, with their trades pushed live. | [leaderboard](/cabalspy-id/leaderboard), [tracker](/cabalspy-id/tracker), [history](/cabalspy-id/history), [stream](/cabalspy-id/stream) | | In-app trader profiles | A profile page per user with stats, PnL chart, holdings, trade history and PnL calendar. | [profile](/cabalspy-id/profile), [tracker](/cabalspy-id/tracker), [holdings](/cabalspy-id/holdings), [history](/cabalspy-id/history), [pnl\_calendar](/cabalspy-id/pnl-calendar) | | Verified and KOL badges | A badge next to every user whose X account and wallets are verified, and a KOL badge for reviewed KOLs. | [users](/cabalspy-id/users), [profile](/cabalspy-id/profile), [webhooks](/cabalspy-id/webhooks) | | Competitions and rewards | Trading competitions and rewards based on real trading in a chosen period, not on self-reported numbers. | [competitions](/cabalspy-id/competitions), [leaderboard](/cabalspy-id/leaderboard), [tracker](/cabalspy-id/tracker) | | Your own login, our data | Keep your login and brand: import your users and their existing wallets, and get their trades, PnL and leaderboards. | [White-Label](/cabalspy-id/white-label), [platform profile](/cabalspy-id/platform-users-profile), [platform leaderboard](/cabalspy-id/platform-users-leaderboard) | | Keeping your user base in sync | New wallets, profile changes, new KOL badges and revoked access reach your backend without polling. | [webhooks](/cabalspy-id/webhooks), [users](/cabalspy-id/users) | All trading numbers are computed exactly like the CabalSpy API, so a wallet shows the same figures everywhere. ## Trust The social layer is only worth something if it is real. CabalSpy ID makes sure that the person, the wallets and the badges are genuine. **1. Identity from X or Telegram** Users sign in with X, with Telegram through the CabalSpy ID bot, or with Google as an alternative. With X, name, handle, avatar and follower counts come from X. Users without X can connect it later, and anyone can verify their Telegram account, which then shows on their public profile. **2. Verified wallets** A user proves a wallet by sending a tiny payment from it. No wallet connect and no signatures, the payment itself is the proof. Every verified wallet is tracked live from then on. **3. Reviewed KOL badge** Accounts with at least 5,000 followers, an X account older than 90 days and at least \$25,000 on-chain volume in the last 7 days can apply. Every badge is reviewed and approved manually. Users without X can do everything except earn the KOL badge, which requires X. Your app receives them with `x` set to null and a handle like `tg.`, see [Users without X](/cabalspy-id/openid-connect#users-without-x). Users stay in control. Every user has a public profile at `https://id.cabalspy.xyz/u/`, sees every app they signed in to and can remove access at any time. Your app then receives a `consent.revoked` webhook. ## Getting started Everything for developers lives in the [API Dashboard](https://apidashboard.cabalspy.xyz), on the **CabalSpy ID** tab. No account yet? [Create one and get your API key](/api-key) first. The [Login quickstart](/cabalspy-id/quickstart) and the [White-Label quickstart](/cabalspy-id/white-label-quickstart) walk through it. **1. Create an instance** An instance is your app on CabalSpy ID. Its Instance ID is your `client_id` and starts with `csid_`. Server-side apps also create a client secret, which starts with `csid_sk_`. Redirect URIs are only needed for Login with CabalSpy ID; leave them empty for White-Label. **2. Add the login button, or your users** Login: switch on the scopes you ask for (Settings, Scopes), add yourself and your testers by X handle, then design the button or run the OpenID Connect flow yourself. White-Label: add your users with your API key. **3. Read your users' data** Call the Data API with the same API key you use for the CabalSpy API. On the API keys page every key has **Works with: CabalSpy API / CabalSpy ID API**; both are on by default. The dashboard also holds your redirect URIs, verified domain, testers, webhooks, users and statistics, billing and a sandbox to try every endpoint. [Dashboard settings](/cabalspy-id/dashboard) explains every field, tab by tab. ### Instance modes | Mode | Who can sign in | Requirements | | - | - | - | | sandbox | Made-up test identities only, no real sign-ins | None. For building the login and CI. | | development | Up to 25 testers, by X handle | None. Real CabalSpy ID sign-in. Your dashboard login is not a CabalSpy ID: add your own X handle as a tester too. | | live | Everyone | A verified domain, a logo, privacy policy and terms URLs and a support e-mail. The scopes `wallets` and `onchain` need an admin review. | Development and sandbox instances allow 1 request per second and 25 users; a live instance uses your [plan](/cabalspy-id/plans). For White-Label, use **development**: your platform users have real wallets and real trades. You verify a domain with a DNS TXT record at `_csid-verification.` or with a file at `https:///.well-known/csid-verification.txt`. The dashboard shows the exact value. ## White-Label Platforms that keep their own login use CabalSpy ID as white-label technology. Your users never see a CabalSpy ID sign-in: you add them by your own user id (`external_id`) with the wallets they already have, one by one, in bulk or automatically from Privy, Dynamic or your backend through an inbound URL. Every trade of their wallets is tracked, and you read profiles, leaderboards and run trading competitions through the Data API. White-Label is available on every plan; the plan sets how many users you can have. See [White-Label](/cabalspy-id/white-label). ## What platforms receive At sign-in, what you receive depends on the scopes the user approves. | Scope | Data | | - | - | | `openid` | A stable user id (`sub`). Required. | | `profile` | Name, handle, avatar, the KOL badge and, when the user has X, their X account with follower counts. | | `wallets` | Verified wallet addresses and the chains they are verified on. | | `onchain` | The latest 7-day on-chain trading volume. | | `offline_access` | A refresh token, so you keep access while the user is away. | | `thesis` | Lets your app post theses and replies, react and report in the user's name. | | `trade_feed` | Lets your app manage the user's [Trade Feed](/cabalspy-id/trade-feed), get every trade of the traders in it and [copy](/cabalspy-id/copy-trading) them. | Through the [Data API](/cabalspy-id/data-api), the [stream](/cabalspy-id/stream) and [webhooks](/cabalspy-id/webhooks) you get the live trading record of every user who signed in. Users who granted `trade_feed` can follow traders in their [Trade Feed](/cabalspy-id/trade-feed) and [copy](/cabalspy-id/copy-trading) them: CabalSpy ID sends your app a ready-to-execute instruction for every trade of a copied trader, and your app executes it with the user's wallet. CabalSpy ID never holds keys or executes trades. On request, CabalSpy also switches on [Callouts](/cabalspy-id/callouts) for your instance: your users publicly call tokens, and CabalSpy ID tracks each call like the CabalSpy call statistics, with stats, a leaderboard, a stream and callout competitions. > [!NOTE] > > Your plan sets how many users you receive data for. Everyone can always sign in. Above the limit you receive an anonymous id and no data for the extra users until you upgrade. See [Plans and limits](/cabalspy-id/plans). ## Supported chains | Chain | `blockchain` value | Currency | | - | - | - | | Solana | `solana` | SOL | | BNB Chain | `bnb` | BNB | | Base | `base` | ETH | | Ethereum | `eth` | ETH | | Robinhood Chain | `rh` | ETH | ## Base URLs ```text theme={null} https://id.cabalspy.xyz Sign-in, OpenID Connect, login button https://api-id.cabalspy.xyz/v1 Data API wss://api-id.cabalspy.xyz/v1/stream Live trades ``` # Plans and limits Source: https://docs.cabalspy.xyz/cabalspy-id/plans CabalSpy ID plans per registrable domain: how many users you receive data for, the API request rate, the live stream and what happens above the limit. CabalSpy ID plans are priced per month and per registrable domain, for example `example.com`, with all its subdomains and live apps counting towards the same plan. The plan sets how many users you receive data for and how fast you can call the Data API. Yearly billing saves 20 percent. ## Plans > [card] Free — \$0 / mo > > Data for 50 users. 1 request per second. > [card] Starter — \$49 / mo > > Data for 200 users. 5 requests per second. \$468 per year. > [card] Pro — \$149 / mo > > Data for 500 users. 10 requests per second. Live WebSocket stream. \$1,428 per year. > [card] Business — \$499 / mo > > Data for 1,000 users. 25 requests per second. Live WebSocket stream. \$4,788 per year. The **Enterprise** plan adds unlimited users, a custom request rate with an SLA and `scope=global`, access to every CabalSpy ID user. Contact sales at [contact@cabalspy.xyz](mailto:contact@cabalspy.xyz). ## Compare plans | Feature | Free | Starter | Pro | Business | Enterprise | | - | - | - | - | - | - | | Price per month | \$0 | \$49 | \$149 | \$499 | Custom | | Price per year | – | \$468 | \$1,428 | \$4,788 | Custom | | Users with data | 50 | 200 | 500 | 1,000 | Unlimited | | Data API requests per second | 1 | 5 | 10 | 25 | Custom, with SLA | | Live trades stream ([/v1/stream](/cabalspy-id/stream)) | No | No | Yes | Yes | Yes | | `scope=global` (all CabalSpy ID users) | No | No | No | No | Yes | | Token theses, widget and theses stream | Yes | Yes | Yes | Yes | Yes | | Sign-in for everyone | Yes | Yes | Yes | Yes | Yes | | White-Label and trading competitions | Yes | Yes | Yes | Yes | Yes | | Trade Feed and copy trading (API, streams, webhooks) | Yes | Yes | Yes | Yes | Yes | | Callouts and callout competitions | On request | On request | On request | On request | On request | Instances in development or sandbox mode are limited to 1 request per second and 25 users, and include the live trades stream for testing. The theses, Trade Feed, copy trading and callouts streams are on every plan. ## The user limit Everyone can always sign in to your platform, the user limit never blocks a sign-in. It decides who you receive data for. > [!NOTE] > > White-Label: platform users you add count the same way, but over the limit a new user is refused with `plan_user_limit` instead of being created without data. Existing users keep working. The first users of your domain, counted by their first sign-in across all your live apps, up to your plan's limit, hold a seat. For them you receive the full identity, wallets, trading data and webhooks. Everyone beyond the limit still signs in, but you only receive an anonymous id that starts with `anon_` and `"limited": true`, with no name, no wallets, no Data API data and no webhooks. ```json theme={null} { "sub": "anon_k3x9w2...", "limited": true, "reason": "plan_user_limit" } ``` The Data API answers `plan_user_limit` when you pass such an anonymous id. When a seated user leaves, by removing access, being blocked by you or deleting their account, the seat is freed and the next person moves up. When you upgrade, more users get a seat and receive their real id and data the next time they sign in. You receive an e-mail when your domain reaches 80 percent and 100 percent of its user limit. [GET /v1/me](/cabalspy-id/me) shows how many users you currently receive data for. ## White-Label [White-Label](/cabalspy-id/white-label) is available on every plan. Platform users you add through the API count against the same user limit as people who sign in with CabalSpy ID: on a live instance, every platform user takes a seat of your domain's plan. When all seats are taken, new platform users are refused with `plan_user_limit`; existing ones can still be updated. Sandbox and development instances can hold 25 platform users. On every plan, a developer account can run up to 5 [trading competitions](/cabalspy-id/competitions) at the same time (scheduled and running together). ## Extras on request [Callouts](/cabalspy-id/callouts) are an extra that CabalSpy switches on per instance on request, on any plan: your users call tokens, CabalSpy ID tracks them and you get stats, a leaderboard, a live stream, webhooks and [callout competitions](/cabalspy-id/competitions-callouts). Contact us at [contact@cabalspy.xyz](mailto:contact@cabalspy.xyz) to enable them. [GET /v1/me](/cabalspy-id/me) lists the extras of your instance in `features`. ## Rate limits The request rate is per API key and counted in fixed one-second windows. Every response carries `X-RateLimit-Limit` and `X-RateLimit-Remaining`. Above the limit the API answers `429 rate_limit_exceeded` with `Retry-After: 1`, wait a second and retry. The live stream allows at most 5 connections per API key. ## Payment and billing Manage your plan at [apidashboard.cabalspy.xyz/billing/csid](https://apidashboard.cabalspy.xyz/billing/csid). You can pay by card through Stripe or with crypto through MoonPay or Helio. When a paid plan expires, the domain falls back to the Free plan. The CabalSpy ID plan is separate from your CabalSpy API plan and its credits. # Claim link Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-claim POST /v1/platform-users/claim-link is gone: one CabalSpy ID per person, merged automatically when the person proves their identity. > [!WARNING] > > Claim links are gone. `POST /v1/platform-users/claim-link` answers **410 `claim_removed`**. Every person has one CabalSpy ID: when your user connects X or Telegram, or verifies a wallet, that their own CabalSpy ID holds, your user moves there by itself and you receive [`platform_user.merged`](/cabalspy-id/webhooks#white-label-events). See [One person, one CabalSpy ID](/cabalspy-id/white-label#one-person-one-cabalspy-id). ## Response Every call answers: ```json Response theme={null} { "success": false, "error": { "code": "claim_removed", "message": "Claim links are gone: a CabalSpy ID is one account for every platform now. When your user connects X or Telegram, or verifies a wallet, that their own CabalSpy ID already has, your link moves to it by itself (webhook platform_user.merged)." } } ``` | Status | Code | Meaning | | - | - | - | | 410 | claim\_removed | Claim links are gone; see [One person, one CabalSpy ID](/cabalspy-id/white-label#one-person-one-cabalspy-id). | # Create or update a user Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-create POST /v1/platform-users: add one of your users by your own id with their existing wallets, or update an existing one. POST /v1/platform-users/update changes the display name or avatar. Adds one of your users as a [platform user](/cabalspy-id/white-label), by your own id, with the wallets they already have. If a user with this `external_id` exists, it is updated instead: profile fields you pass are changed and new wallets are added. Wallets are never removed by this call. Call it from your sign-up flow, or whenever a user adds a wallet on your side. It is safe to call repeatedly with the same data. > [!TIP] > > A new user needs at least one wallet. Wallets you send are unverified and count straight away unless your instance sets `wallet_trust` to `verified_only`. See [Unverified and verified wallets](/cabalspy-id/white-label#unverified-and-verified-wallets). ## Body **external\_id** `string` *required* Your id of the user. 1 to 128 printable ASCII characters, no spaces. **wallets** `array` The user's wallets, up to 10. Required to create a user. Each item is an object or just the address as a string. **wallet** **address** `string` *required* A Solana or EVM address. **chains** `array` Chains to track it on. Default: `solana` for a Solana address, every supported EVM chain (bnb, base, eth, rh) for an EVM address. A single chain can be passed as a string. **source** `string` Where the wallet comes from, for example `privy`. 1 to 40 characters a-z 0-9 \_ . - **display\_name** `string` Display name, 1 to 60 characters. null clears it. **avatar\_url** `string` Avatar as an https URL, at most 500 characters. null clears it. ## Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "external_id": "user_8412", "display_name": "Maze", "avatar_url": "https://cdn.example.com/avatars/8412.png", "wallets": [ {"address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "source": "privy"}, {"address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01", "chains": ["base"]} ] }' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users", json={ "external_id": "user_8412", "display_name": "Maze", "wallets": [{"address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "source": "privy"}], }, headers={"Authorization": "Bearer YOUR_KEY"}) d = r.json()["data"] print(r.status_code, d["created"], d["csid_id"], d["wallets_added"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412", wallets: [{ address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", source: "privy" }], }), }); const { data } = await res.json(); console.log(res.status, data.created, data.csid_id); ``` ## Response **201** when the user was created, **200** when an existing user was updated. **data** `object` The [user object](/cabalspy-id/platform-users-get#response), plus: **extra fields** **created** `boolean` True when this call created the user. **wallets\_added** `array` The wallets and chains that are new with this call: address, family, chains and source. Empty when nothing new was added. ```json Response theme={null} { "success": true, "data": { "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "self_managed": false, "self_managed_at": null, "merged_from": null, "claimed": false, "claimed_at": null, "managed": true, "display_name": "Maze", "avatar_url": "https://cdn.example.com/avatars/8412.png", "limited": false, "x": null, "telegram": null, "kol": { "badge": false, "since": null }, "wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"], "verified": false, "verified_chains": [], "status": "active", "counts": true, "source": "privy", "verified_at": null, "added_at": "2026-10-24T09:12:40Z" } ], "pending_verifications": [], "created_at": "2026-10-24T09:12:40Z", "created": true, "wallets_added": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"], "source": "privy" } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-24T09:12:40Z" } } ``` A new user triggers the `platform_user.created` and `wallet.added` [webhooks](/cabalspy-id/webhooks#white-label-events). ## Update a user `POST /v1/platform-users/update` or `PATCH /v1/platform-users` Changes the display name and/or avatar of an existing user without touching the wallets. Returns the [user object](/cabalspy-id/platform-users-get#response). **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. **display\_name** `string` Display name, 1 to 60 characters. null clears it. **avatar\_url** `string` Avatar as an https URL, at most 500 characters. null clears it. Pass at least one of display\_name and avatar\_url. ```bash cURL theme={null} curl -X PATCH "https://api-id.cabalspy.xyz/v1/platform-users" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412", "display_name": "Maze 2"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/update", json={"external_id": "user_8412", "avatar_url": None}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]["avatar_url"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/update", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412", display_name: "Maze 2" }), }); const { data } = await res.json(); console.log(data.display_name); ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | external\_id missing, or nothing to update. | | 400 | invalid\_parameter | external\_id, display\_name, avatar\_url or a wallet's chains or source invalid, or more than 10 wallets. | | 400 | wallet\_required | A new user needs at least one wallet. | | 400 | invalid\_address | A wallet is not a valid Solana or EVM address. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | plan\_user\_limit | Your plan's user limit is reached, or 25 users on a sandbox or development instance. | | 404 | platform\_user\_not\_found | Update: no user with this id in your instance. | | 409 | self\_managed | The person signs in to their CabalSpy ID themselves and manages it. | | 409 | too\_many\_wallets | The user would have more than 5 Solana or 5 EVM wallets. | | 429 | rate\_limited | More than 2,000 new platform users per minute. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Delete a user Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-delete POST /v1/platform-users/delete: remove a platform user from your platform; their account goes too while only your platform holds it. Removes one of your [platform users](/cabalspy-id/white-label). Your platform is removed from the person: your link, the wallets only you reported and your consent. * **Created by your platform, held by no other platform** (`managed`, not `self_managed`): the account and its data are deleted. Tracking of its wallets stops at the next sync. * **The person's own CabalSpy ID** (`self_managed`, or merged into their ID) **or another platform still holds them**: only your link goes. The account stays. Afterwards the `external_id` is free again and can be created anew. ## Body **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. ## Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/delete" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/delete", json={"external_id": "user_8412"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/delete", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412" }), }); const { data } = await res.json(); console.log(data.deleted, data.unlinked); ``` ## Response **data** `object` **data** **external\_id** `string` Your id of the user. **deleted** `boolean` True when the account and its data were deleted. False when only your link was removed. **unlinked** `boolean` Always true: the user is no longer one of your platform users. ```json Response theme={null} { "success": true, "data": { "external_id": "user_8412", "deleted": true, "unlinked": true }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | external\_id missing. | | 400 | invalid\_parameter | external\_id or csid\_id invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | platform\_user\_not\_found | No user with this id in your instance. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Get and list users Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-get GET /v1/platform-users and GET /v1/platform-users/list: one platform user by external_id or csid_id, or all your platform users, newest first. Read one of your [platform users](/cabalspy-id/white-label) by your own id, or page through all of them. The user object carries the identity, the wallets with their trust status, X, Telegram, the KOL badge and open wallet verifications. Trading data is in the [profile](/cabalspy-id/platform-users-profile). ## Get a user `GET /v1/platform-users` ### Query Parameters **external\_id** `string` Your id of the user. Pass this or csid\_id. **csid\_id** `string` The user's CabalSpy ID account id. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ### Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users?external_id=user_8412" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/platform-users", params={"external_id": "user_8412"}, headers={"Authorization": "Bearer YOUR_KEY"}) u = r.json()["data"] print(u["csid_id"], [(w["address"], w["status"]) for w in u["wallets"]]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ external_id: "user_8412" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/platform-users?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.csid_id, data.wallets.map(w => w.status)); ``` ### Response **success** `boolean` True on success. **data** `object` **user** **csid\_id** `string` The CabalSpy ID account id. Changes to the person's own CabalSpy ID when they prove it through your platform (`platform_user.merged`). **external\_id** `string` Your id of the user. **self\_managed** `boolean` Whether the person signs in to their CabalSpy ID themselves and manages profile, X and Telegram. You can still report wallets for them. **self\_managed\_at** `string` Since when, or null. **claimed, claimed\_at** `boolean, string` Old names of `self_managed` and `self_managed_at`, kept for existing integrations. **managed** `boolean` True while the account was created by a platform and the person has not signed in themselves. **merged\_from** `string` The account your platform had created, when the user moved to their own CabalSpy ID; otherwise null. **display\_name** `string` Display name, or null. **avatar\_url** `string` Avatar URL, or null. **limited** `boolean` True when the user has no seat in your plan's user limit, so you receive no data for them. **x** `object` Connected X account, or null: id, username, name, avatar\_url, followers, following, verified, verified\_type, created\_at (of the X account) and url. **telegram** `object` Linked Telegram account, or null: username, name and linked\_at. **kol** `object` badge (boolean) and since (when it was granted, or null). **wallets** `array` **wallet** **address** `string` Wallet address. **family** `string` solana or evm. **chains** `array` Every chain the wallet is tracked or verified on. **verified** `boolean` Whether it is payment-verified on at least one chain. **verified\_chains** `array` Chains it is payment-verified on. **status** `string` verified, active, needs\_verification, verified\_elsewhere or pending. See [Unverified and verified wallets](/cabalspy-id/white-label#unverified-and-verified-wallets). **counts** `boolean` Whether the wallet counts for data, profiles and leaderboards (status verified or active). **source** `string` The source you sent with the wallet, or null. **verified\_at** `string` When it was verified, or null. **added\_at** `string` When it was added. **pending\_verifications** `array` Open payment verifications, each the [verification object](/cabalspy-id/platform-users-verification#response). **created\_at** `string` When you added the user. ```json Response theme={null} { "success": true, "data": { "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "self_managed": false, "self_managed_at": null, "merged_from": null, "claimed": false, "claimed_at": null, "managed": true, "display_name": "Maze", "avatar_url": "https://cdn.example.com/avatars/8412.png", "limited": false, "x": null, "telegram": null, "kol": { "badge": false, "since": null }, "wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"], "verified": false, "verified_chains": [], "status": "active", "counts": true, "source": "privy", "verified_at": null, "added_at": "2026-10-24T09:12:40Z" }, { "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01", "family": "evm", "chains": ["base", "bnb", "eth", "rh"], "verified": true, "verified_chains": ["base"], "status": "verified", "counts": true, "source": null, "verified_at": "2026-10-25T16:02:11Z", "added_at": "2026-10-24T09:12:40Z" } ], "pending_verifications": [], "created_at": "2026-10-24T09:12:40Z" }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ## List users `GET /v1/platform-users/list` All platform users of your instance, newest first, each as the user object above. > [!TIP] > > Read pagination.next\_cursor from the response and pass it back as cursor to fetch the next page. When next\_cursor is null you have reached the end. ### Query Parameters **limit** `integer` (default: 50) Users per page, 1 to 100. **cursor** `string` Cursor for the next page, the pagination.next\_cursor from the previous response. A malformed cursor is answered with 400 invalid\_parameter. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ### Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users/list?limit=100" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests H = {"Authorization": "Bearer YOUR_KEY"} params = {"limit": 100} while True: r = requests.get("https://api-id.cabalspy.xyz/v1/platform-users/list", params=params, headers=H).json() for u in r["data"]: print(u["external_id"], len(u["wallets"]), "wallets") if not r["pagination"]["next_cursor"]: break params["cursor"] = r["pagination"]["next_cursor"] ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ limit: "100" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/platform-users/list?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data, pagination } = await res.json(); console.log(data.length, pagination.total, pagination.next_cursor); ``` ### Response `data` is an array of user objects. `pagination` has limit, total (all platform users of the instance), has\_more and next\_cursor. ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | Neither external\_id nor csid\_id was passed. | | 400 | invalid\_parameter | external\_id, csid\_id, limit or cursor invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | platform\_user\_not\_found | No user with this id in your instance. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Import users Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-import POST /v1/platform-users/import: create or update up to 1,000 platform users with their existing wallets in one call. Creates or updates up to 1,000 [platform users](/cabalspy-id/white-label) in one call, for example to bring your existing user base and their Privy or Dynamic wallets over. Each user is handled exactly like [Create or update a user](/cabalspy-id/platform-users-create). Each entry is handled on its own: one invalid entry, or reaching your plan's user limit, never undoes the others. The response lists the result of every entry in the order you sent them. > [!TIP] > > At most 1,000 users per call and a request body of up to 1 MB. Split larger user bases into several calls, and wait about a minute after every two calls: at most 2,000 new users per minute are created, the rest come back as `rejected` with `rate_limited` and can simply be sent again. Re-running an import is safe: unchanged users are reported as `unchanged`. > [!TIP] > > A development instance holds at most 25 platform users. Test with a few, then import your whole user base after [going live](/cabalspy-id/white-label-quickstart#going-live). ## Body **users** `array` *required* 1 to 1,000 users. **user** **external\_id** `string` *required* Your id of the user. 1 to 128 printable ASCII characters, no spaces. **wallets** `array` Up to 10 wallets, objects with address, chains and source, or plain addresses. Required for new users. See [Create or update a user](/cabalspy-id/platform-users-create#body). **display\_name** `string` Display name, 1 to 60 characters, or null. **avatar\_url** `string` Avatar as an https URL, or null. ## Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/import" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "users": [ {"external_id": "user_8412", "display_name": "Maze", "wallets": [{"address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "source": "privy"}]}, {"external_id": "user_8413", "wallets": ["0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01"]}, {"external_id": "user_8414"} ] }' ``` ```python Python theme={null} import requests H = {"Authorization": "Bearer YOUR_KEY"} batch = [{"external_id": u["id"], "wallets": u["wallets"]} for u in my_users] for i in range(0, len(batch), 1000): r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/import", json={"users": batch[i:i + 1000]}, headers=H).json()["data"] print(r["summary"]) for res in r["results"]: if res["status"] == "rejected": print(res["external_id"], res["error"]["code"], res["error"]["message"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/import", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ users: myUsers.slice(0, 1000) }), }); const { data } = await res.json(); console.log(data.summary); data.results.filter(r => r.status === "rejected").forEach(r => console.log(r.external_id, r.error.code)); ``` ## Response **data** `object` **data** **summary** `object` Counts per status: created, updated, unchanged and rejected. **results** `array` One result per entry, in the order sent. **result** **external\_id** `string` The entry's external\_id, as sent. **csid\_id** `string` The user's CabalSpy ID account id. Not present for rejected entries. **status** `string` `created`, `updated` (wallets added or a profile field changed), `unchanged` (nothing new, also when the same display\_name or avatar\_url was passed again) or `rejected`. **wallets\_added** `array` Wallets and chains that are new: address, family, chains and source. Not present for rejected entries. **error** `object` Rejected entries only: code and message, the same codes as [Create or update a user](/cabalspy-id/platform-users-create#errors). Once an entry hits your plan's user limit, every following entry for a **new** user is rejected with `plan_user_limit` as well. Entries for existing users are still updated. ```json Response theme={null} { "success": true, "data": { "summary": { "created": 2, "updated": 0, "unchanged": 0, "rejected": 1 }, "results": [ { "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "status": "created", "wallets_added": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"], "source": "privy" } ] }, { "external_id": "user_8413", "csid_id": "8e2b4d6f-1a3c-4e5f-9b7d-0c2e4a6b8d10", "status": "created", "wallets_added": [ { "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01", "family": "evm", "chains": ["base", "bnb", "eth", "rh"], "source": null } ] }, { "external_id": "user_8414", "status": "rejected", "error": { "code": "wallet_required", "message": "Every user needs at least one wallet: pass wallets: [{\"address\": \"...\"}]." } } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-24T09:12:41Z" } } ``` ## Errors These errors reject the whole call. Errors of single entries are returned in `results`. | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | users is missing or empty. | | 400 | invalid\_parameter | More than 1,000 users. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Inbound URL Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-inbound A secret URL for sign-up events: Privy, Dynamic or your own backend post new users and wallets to it, and CabalSpy ID creates or updates the platform users automatically. Instead of calling the API on every sign-up, you can give your auth provider or your backend a secret **inbound URL**. Every sign-up or wallet event posted to it creates or updates the [platform user](/cabalspy-id/white-label), exactly like [Create or update a user](/cabalspy-id/platform-users-create). It works with the webhooks of Privy, Dynamic and any other provider that sends JSON, and with your own format. No API key is needed: the secret in the URL identifies your instance. In the dashboard the inbound URL is the **Sign-up URL** on the instance's [White-label](/cabalspy-id/dashboard#white-label) tab: **Switch on** creates it, **Create a new URL** replaces it and **Switch off** disables it, like the calls below. > [!WARNING] > > Keep the URL secret. Whoever knows it can create users in your instance. If it leaks, enable it again to get a new URL, the old one stops working at once. ## Enable `POST /v1/platform-users/inbound/enable` Creates the secret URL and returns it. It is shown only once. Calling it again replaces the URL. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/inbound/enable" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/inbound/enable", headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]["url"]) # store it as a secret ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/inbound/enable", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.url); ``` ```json Response theme={null} { "success": true, "data": { "enabled": true, "url": "https://api-id.cabalspy.xyz/v1/inbound/csin_r8Tq2...", "note": "Keep this URL secret: whoever knows it can create users in your instance. Calling this again replaces it." }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ## Status `GET /v1/platform-users/inbound` ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users/inbound" \ -H "Authorization: Bearer YOUR_KEY" ``` ```json Response theme={null} { "success": true, "data": { "enabled": true, "last_event_at": "2026-10-26T07:58:02Z", "formats": ["csid", "privy", "dynamic", "generic"] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` The URL itself is never shown again. `last_event_at` is the time of the last event received. ## Disable `POST /v1/platform-users/inbound/disable` Switches the URL off. Returns `{"enabled": false}`. Events posted to it afterwards get `404 invalid_inbound_url`. ## Send events `POST https://api-id.cabalspy.xyz/v1/inbound/csin_...` Post one event per request as a JSON object. The event is read like this: * **User id**: the first of `external_id`, `user.id`, `data.userId`, `userId`, `data.user_id`, `user_id` and `data.id` that is set. It becomes the `external_id`. * **Event name**: `event`, `type` or `eventName`. * **Wallets**: the `wallets` array if the body has one (CabalSpy ID format, with `chains` and `source`). Otherwise every Solana or EVM address found anywhere in the body in a field named `address`, `wallet_address`, `walletAddress`, `publicKey` or `public_key`. Other values, such as e-mail addresses, are ignored. * **Profile**: `display_name` and `avatar_url` at the top level, if present. Then: | Event | Result | | - | - | | Name contains `delet` (and not `wallet`), for example `user.deleted` | The user is [deleted](/cabalspy-id/platform-users-delete). | | `wallet.removed` in the CabalSpy ID format, with `wallets` | Those wallets are [removed](/cabalspy-id/platform-users-wallets#remove-a-wallet): `wallets_removed`. The user's last wallet stays and is listed in `wallets_not_removed` with `last_wallet`. | | Any other name that contains `unlink`, `remov` or `delet`, for example Privy `user.unlinked_account` or Dynamic `wallet.unlinked` | Nothing changes: `ignored`. | | Unknown user, no wallet in the body, for example an e-mail sign-up before the embedded wallet exists | Nothing yet: `waiting_for_wallet`. The next event with a wallet creates the user. | | Anything else | The user is created, or updated with new wallets and profile fields. | > [!NOTE] > > Wallet removals from auth providers are not applied, because their payloads usually also carry the wallets the user keeps. To remove a wallet, send `{"event": "wallet.removed", "external_id": "...", "wallets": ["
"]}` to the inbound URL, or call [POST /v1/platform-users/wallets/delete](/cabalspy-id/platform-users-wallets#remove-a-wallet). ### CabalSpy ID format Use this from your own backend. ```json theme={null} { "event": "user.created", "external_id": "user_8412", "display_name": "Maze", "avatar_url": "https://cdn.example.com/avatars/8412.png", "wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "source": "embedded" }, { "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01", "chains": ["base"] } ] } ``` `event` is one of `user.created`, `user.updated`, `wallet.added` and `user.deleted`. `wallets` takes the same items as [Create or update a user](/cabalspy-id/platform-users-create#body). ### Privy Add the inbound URL as a webhook endpoint in the Privy dashboard and subscribe to the user created and wallet created events. The Privy user id (`user.id`, `did:privy:...`) becomes the `external_id`, and the wallet addresses in `linked_accounts` and `wallet` are added. ```json Privy user.created theme={null} { "type": "user.created", "user": { "id": "did:privy:cm3np4u9j001rc8b73seqmqqk", "linked_accounts": [ { "type": "email", "address": "maze@example.com" }, { "type": "wallet", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "chain_type": "solana" } ] } } ``` ### Dynamic Add the inbound URL as a webhook in the Dynamic dashboard and subscribe to user creation and wallet linking. The top-level `userId` becomes the `external_id`; every `address` or `publicKey` is added. ```json Dynamic user.created theme={null} { "eventName": "user.created", "userId": "8b1f2c4d-6e7a-4b9c-8d0e-1f2a3b4c5d6e", "data": { "id": "8b1f2c4d-6e7a-4b9c-8d0e-1f2a3b4c5d6e", "verifiedCredentials": [ { "format": "blockchain", "chain": "eip155", "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01" } ] } } ``` ### Any other provider Any JSON object works as long as it carries the user id in one of the fields above and the wallets in address-like fields. ```json Generic theme={null} { "type": "signup", "userId": "u_8412", "wallet": { "publicKey": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW" } } ``` ### Example ```bash theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/inbound/csin_r8Tq2..." \ -H "Content-Type: application/json" \ -d '{"event": "user.created", "external_id": "user_8412", "wallets": ["7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW"]}' ``` ## Response Every event that reaches your instance is answered with **200**, also when it is rejected for a business reason, such as a missing user id, an invalid address or your plan's user limit. Providers retry deliveries that are not answered with 2xx, so this keeps them from retrying events that would fail again. Check `accepted`. **accepted** `boolean` Whether the event was processed. **result** `string` `created`, `updated`, `deleted`, `wallets_removed`, `ignored` (a wallet removal from an auth provider), `unknown_user` (deletion or wallet removal for a user you do not have) or `waiting_for_wallet`. **external\_id** `string` The user id read from the event. **csid\_id** `string` created and updated: the user's CabalSpy ID account id. **wallets\_added** `array` created and updated: the wallets and chains that are new. **wallets\_removed, wallets\_not\_removed** `array` wallets\_removed: the addresses removed. wallets\_not\_removed: `{address, code}` for each one kept, for example `last_wallet` or `wallet_not_found`. **deleted, unlinked** `boolean` deleted: as in [Delete a user](/cabalspy-id/platform-users-delete#response). **error** `object` When accepted is false: code and message, the same codes as [Create or update a user](/cabalspy-id/platform-users-create#errors). ```json Created theme={null} { "success": true, "data": { "accepted": true, "result": "created", "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "wallets_added": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"], "source": null } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ```json Rejected theme={null} { "success": true, "data": { "accepted": false, "error": { "code": "plan_user_limit", "message": "Your Starter plan allows 200 users and all of them are taken (200 on example.com). Upgrade the plan to add more users." } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ## Rate limit and retries The inbound URL accepts **600 events per minute** per instance, counted in fixed one-minute windows. Above that, events are not processed and answered with **429** `rate_limited`. Your provider retries them on its own schedule (Privy and Dynamic retry failed deliveries with a backoff). Retries are safe: an event creates or updates the user, so a repeated event changes nothing. When you send events from your own backend, retry 429 answers after the seconds in their `Retry-After` header (the next full minute). Other non-2xx answers: | Status | Code | Meaning | | - | - | - | | 400 | invalid\_body | The body is not JSON. | | 404 | invalid\_inbound\_url | The URL is unknown, was replaced or is disabled. | | 429 | rate\_limited | More than 600 events in the current minute. | The inbound URL does not count towards your API key's request rate. To import an existing user base, use [Import](/cabalspy-id/platform-users-import) instead. # KOL badge Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-kol GET /v1/platform-users/kol, POST /kol/volume-check and POST /kol/apply: check a platform user's KOL badge eligibility, refresh their on-chain volume and apply for the badge. Platform users can earn the same reviewed KOL badge as every CabalSpy ID user. It needs a connected [X account](/cabalspy-id/platform-users-x), and the requirements described in the [overview](/cabalspy-id/overview#trust): at least 5,000 followers, an X account older than 90 days and at least \$25,000 on-chain volume in the last 7 days. Every application is reviewed manually. ## Status `GET /v1/platform-users/kol?external_id=` ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users/kol?external_id=user_8412" \ -H "Authorization: Bearer YOUR_KEY" ``` **external\_id** `string` Your id of the user. **badge** `boolean` Whether the user holds the KOL badge. **eligible** `boolean` Whether the user meets every criterion right now. **criteria** `array` The badge criteria and whether the user meets each of them. **volume\_7d\_usd** `number` The latest measured 7-day on-chain volume in USD. **volume\_check\_next\_at** `string` When the next volume check can be requested, or null. **application** `object` The latest application: status, applied\_at and reviewed\_at. Null when the user never applied. ## Volume check `POST /v1/platform-users/kol/volume-check` Queues a fresh measurement of the user's 7-day on-chain volume. Answers **202** with `"queued": true`; read the result with the status endpoint. Checks are rate limited per user, `volume_check_next_at` says when the next one is possible. **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. ## Apply `POST /v1/platform-users/kol/apply` Applies for the badge in the user's name. Answers **201** with `"application": "pending"`. The user must have X connected and meet every criterion, otherwise the answer is `kol_not_eligible` with the `criteria`. **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/kol/apply" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412"}' ``` ```python Python theme={null} import requests H = {"Authorization": "Bearer YOUR_KEY"} s = requests.get("https://api-id.cabalspy.xyz/v1/platform-users/kol", params={"external_id": "user_8412"}, headers=H).json()["data"] if s["eligible"] and not s["application"]: r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/kol/apply", json={"external_id": "user_8412"}, headers=H) print(r.status_code, r.json()) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/kol/volume-check", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412" }), }); console.log(res.status); // 202 ``` ```json Response theme={null} { "success": true, "data": { "external_id": "user_8412", "application": "pending" }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` The status endpoint and the user object show `badge: true` once the badge is granted. ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | external\_id missing. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | platform\_user\_not\_found | No user with this id in your instance. | | 409 | self\_managed | The person signs in to their CabalSpy ID themselves and manages it. | | 409 | volume\_check\_unavailable | Volume check: not possible right now. The message says why. | | 409 | x\_required | Apply: the user has no X account connected. | | 409 | kol\_not\_eligible | Apply: the application was refused, for example because a criterion is not met. The message says why, `criteria` lists the criteria. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Platform leaderboard Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-leaderboard GET /v1/platform-users/leaderboard: the wallets of your platform users ranked by PnL, volume, win rate or trades, with external_id and verification status. The wallets of your [platform users](/cabalspy-id/white-label) ranked for a period. Every entry carries your `external_id` of the owner and whether the wallet is payment-verified, so you can render the leaderboard with your own user data. Only wallets with trades in the period appear, and only users within your plan's user limit. Each wallet is its own entry, so a user with several wallets on a chain can appear more than once. > [!TIP] > > The leaderboard is cached for 30 seconds. To page through it, pass pagination.next\_cursor as cursor. An unknown or malformed cursor is answered with 400 invalid\_parameter. ## Which wallets are ranked By default every wallet that counts is ranked: verified wallets and unverified wallets your instance accepts. The `leaderboard_trust` [setting](/cabalspy-id/platform-users-settings) decides for the whole instance: with `verified_only` only payment-verified wallets are ranked. The `trust` parameter can narrow this further for one request, never widen it. ## Query Parameters **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh. **period** `string` (default: 7d) Ranking window, one of 6h, 1d, 7d or 30d. **sort** `string` (default: pnl\_usd) Ranking order, highest first. One of volume, pnl (native), pnl\_usd, win\_rate or trades, as on the [leaderboard](/cabalspy-id/leaderboard). **trust** `string` (default: all) `verified` ranks only payment-verified wallets. `all` follows the instance setting. **limit** `integer` (default: 100) Entries per page, 1 to 500. **cursor** `string` Cursor for the next page, the pagination.next\_cursor from the previous response. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users/leaderboard?blockchain=solana&period=7d&sort=pnl_usd&limit=25" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "period": "7d", "sort": "pnl_usd", "limit": 25, "trust": "verified"} r = requests.get("https://api-id.cabalspy.xyz/v1/platform-users/leaderboard", params=params, headers={"Authorization": "Bearer YOUR_KEY"}) for e in r.json()["data"]["leaderboard"]: print(e["rank"], e["external_id"], e["verified"], e["period_stats"]["realized_pnl_usd"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "base", period: "30d", sort: "volume", limit: "50" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/platform-users/leaderboard?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data, pagination } = await res.json(); data.leaderboard.forEach(e => console.log(e.rank, e.external_id, e.period_stats.total_volume_usd)); ``` ## Response **data** `object` **data** **blockchain** `string` Chain. **period** `string` The requested window. **sort** `string` The ranking order. **currency** `string` Native currency of the chain. **trust** `string` `verified` when only payment-verified wallets were ranked, otherwise `all`. **leaderboard** `array` The entries of the [leaderboard](/cabalspy-id/leaderboard#response): rank, wallet, profile, period\_stats, period\_win\_rate\_distribution and period\_history\_tokens, plus: **extra fields** **external\_id** `string` Your id of the wallet's owner. **verified** `boolean` Whether the wallet is payment-verified on this chain. `profile.profile_url` is always null, platform users have no public CabalSpy ID page. **pagination** `object` limit, total (ranked wallets), has\_more and next\_cursor (null means end). ```json Response theme={null} { "success": true, "data": { "blockchain": "solana", "period": "7d", "sort": "pnl_usd", "currency": "SOL", "trust": "all", "leaderboard": [ { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "profile": { "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "name": "Maze", "blockchain": "solana", "currency": "SOL", "profile_url": null, "...": "the profile fields of the leaderboard" }, "period_stats": { "period": "7d", "total_volume_usd": 33649.8, "realized_pnl": 48.2, "realized_pnl_usd": 3968.6, "total_txn": 40, "...": "the period_stats fields of the leaderboard" }, "period_win_rate_distribution": { "win_count": 14, "closed_count": 18, "win_rate_percentage": 77.78 }, "period_history_tokens": { "total_tokens": 21 }, "rank": 1, "external_id": "user_8412", "verified": false } ] }, "pagination": { "limit": 25, "total": 1, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": true, "cache_age_seconds": 12, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | blockchain is missing. | | 400 | invalid\_parameter | blockchain, period, sort, trust, limit or cursor invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Platform user profile Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-profile GET /v1/platform-users/profile: everything for a profile page of one of your users in one call: wallets, trading stats per chain, recent trades, theses, KOL status and callout stats. Everything you need for a profile page of one of your [platform users](/cabalspy-id/white-label), in one call: the [user object](/cabalspy-id/platform-users-get#response), trading stats for a period per chain and per wallet, the 20 most recent trades, the latest theses, Trade Feed counts, the KOL status, the callout stats when [callouts](/cabalspy-id/callouts) are switched on, and links to the detail endpoints of each wallet. Only wallets that count are included: verified wallets and unverified wallets your instance accepts (`wallet_trust`). ## Query Parameters **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. **period** `string` (default: 7d) Window for the trading stats, one of 6h, 1d, 7d or 30d. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users/profile?external_id=user_8412&period=7d" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/platform-users/profile", params={"external_id": "user_8412", "period": "30d"}, headers={"Authorization": "Bearer YOUR_KEY"}) p = r.json()["data"] for t in p["trading"]: print(t["blockchain"], t["realized_pnl_usd"], t["win_rate_percentage"], "%") ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ external_id: "user_8412", period: "7d" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/platform-users/profile?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.display_name, data.trading, data.recent_trades.length); ``` ## Response **data** `object` The [user object](/cabalspy-id/platform-users-get#response), plus: **profile fields** **period** `string` The requested window. **trading** `array` One entry per chain the user has counting wallets on. **chain** **blockchain** `string` Chain. **currency** `string` Native currency of the chain. **period** `string` The requested window. **total\_buy, total\_buy\_usd, total\_sell, total\_sell\_usd** `number` Bought and sold, native and USD, summed over the user's wallets on this chain. **total\_volume, total\_volume\_usd** `number` Buy plus sell volume. **realized\_pnl, realized\_pnl\_usd** `number` Realized PnL, native and USD. **total\_txn, buy\_txn, sell\_txn** `integer` Trades, buys and sells. **win\_count, closed\_count, win\_rate\_percentage** `number` Winning and closed positions, and the win rate over all wallets. **tokens** `integer` Tokens traded in the period. **wallets** `array` Per wallet with trades in the period: address, verified, the wallet's period stats (the period\_stats fields of the [leaderboard](/cabalspy-id/leaderboard)) and win\_rate\_percentage. **recent\_trades** `array` The 20 newest trades over all the user's counting wallets and chains, as in [Latest trades](/cabalspy-id/latest), without `trader`. **theses** `object` total (visible theses of the user) and latest (up to 5, as in [List theses](/cabalspy-id/theses-list#response)). **trade\_feed** `object` traders (how many traders are in the user's Trade Feed) and in\_trade\_feeds (how many people have the user in theirs). **kol** `object` badge and since, plus application: status, applied\_at and note of the user's KOL application, or null. See [KOL badge](/cabalspy-id/platform-users-kol). **callouts** `object` Only when [callouts](/cabalspy-id/callouts) are switched on for your instance: the user's callout record, as `data` of [Callout stats](/cabalspy-id/callouts-stats#response) without `user`, with `hit_x` 2: hit\_x, periods (6h, 1d, 7d and 30d, each with callouts, avg\_peak\_x, median\_peak\_x, best\_peak\_x, sum\_peak\_x, hits, hit\_rate in percent, avg\_now\_x and tracking) and callouts\_all\_time. Not affected by `period`. **links** `array` Per counting wallet and chain: blockchain, address and the ready-made paths of [tracker](/cabalspy-id/tracker), [history](/cabalspy-id/history), [holdings](/cabalspy-id/holdings) and [pnl\_calendar](/cabalspy-id/pnl-calendar) for it. ```json Response theme={null} { "success": true, "data": { "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "self_managed": false, "self_managed_at": null, "merged_from": null, "claimed": false, "claimed_at": null, "managed": true, "display_name": "Maze", "avatar_url": "https://cdn.example.com/avatars/8412.png", "limited": false, "x": null, "telegram": null, "kol": { "badge": false, "since": null, "application": null }, "wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"], "verified": false, "verified_chains": [], "status": "active", "counts": true, "source": "privy", "verified_at": null, "added_at": "2026-10-24T09:12:40Z" } ], "pending_verifications": [], "created_at": "2026-10-24T09:12:40Z", "period": "7d", "trading": [ { "blockchain": "solana", "currency": "SOL", "period": "7d", "total_buy": 180.25, "total_buy_usd": 14840.6, "total_sell": 228.45, "total_sell_usd": 18809.2, "total_volume": 408.7, "total_volume_usd": 33649.8, "realized_pnl": 48.2, "realized_pnl_usd": 3968.6, "total_txn": 40, "buy_txn": 22, "sell_txn": 18, "win_count": 14, "closed_count": 18, "win_rate_percentage": 77.78, "tokens": 21, "wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "verified": false, "period": "7d", "total_buy": 180.25, "total_buy_usd": 14840.6, "total_sell": 228.45, "total_sell_usd": 18809.2, "total_volume": 408.7, "total_volume_usd": 33649.8, "realized_pnl": 48.2, "realized_pnl_usd": 3968.6, "realized_pnl_percentage": 26.74, "avg_hold_time_minutes": 84.5, "total_txn": 40, "buy_txn": 22, "sell_txn": 18, "win_rate_percentage": 77.78 } ] } ], "recent_trades": [ { "signature": "5xr8abc...", "blockchain": "solana", "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "transaction_type": "buy", "token_symbol": "invisibull", "token_name": "invisibull", "token_logo": "https://...", "token_amount": 22113972.03, "value": 1.66, "value_usd": 137.44, "currency": "SOL", "timestamp": "2026-10-26T08:03:58Z" } ], "theses": { "total": 0, "latest": [] }, "trade_feed": { "traders": 3, "in_trade_feeds": 12 }, "links": [ { "blockchain": "solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "tracker": "/v1/wallets/tracker?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW&period=7d", "history": "/v1/wallets/history?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "holdings": "/v1/wallets/holdings?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "pnl_calendar": "/v1/wallets/pnl_calendar?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW" } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | external\_id missing. | | 400 | invalid\_parameter | period, external\_id or csid\_id invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | platform\_user\_not\_found | No user with this id in your instance. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Session Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-session POST /v1/platform-users/session: a 15-minute session token for one platform user, for the embeddable wallet verification UI. Creates a short-lived session for one of your [platform users](/cabalspy-id/white-label). It lets the embeddable wallet verification UI act for exactly this user without your API key ever reaching the browser. Create the session on your backend, pass `session` and `client_id` to your page, and create a new one when it expires. A session is valid for 15 minutes and only for your instance. On the page, the widget shows the amount, the address and a QR code and updates when the payment arrives: ```html theme={null}
``` Optional attributes: `data-theme` (`dark` or `light`), `data-accent` (a hex color), `data-radius` (0-24), `data-frameless`, `data-compact` and `data-height`. The widget only loads on your instance's sites, and on `localhost` while the instance is not live. You receive the [`wallet.verified`](/cabalspy-id/webhooks#white-label-events) webhook when the payment arrived. ## Body **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. ## Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/session" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/session", json={"external_id": "user_8412"}, headers={"Authorization": "Bearer YOUR_KEY"}) s = r.json()["data"] print(s["session"], s["expires_at"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/session", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412" }), }); const { data } = await res.json(); // hand data.session and data.client_id to the page ``` ## Response **external\_id** `string` Your id of the user. **client\_id** `string` Your Instance ID (`csid_...`), public. **session** `string` The session token, starts with `pvs_`. Treat it like a short-lived password for this user. **expires\_at** `string` When the session expires. **expires\_in** `integer` Lifetime in seconds, 900. ```json Response theme={null} { "success": true, "data": { "external_id": "user_8412", "client_id": "csid_4f8a2c1e9b", "session": "pvs_Q2x1c3RlcnMgb2YgdG9rZW5zIGdvIGhlcmU...", "expires_at": "2026-10-26T08:19:11Z", "expires_in": 900 }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | external\_id missing. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | platform\_user\_not\_found | No user with this id in your instance. | | 409 | self\_managed | The person signs in to their CabalSpy ID themselves and manages it. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Settings Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-settings GET and POST /v1/platform-users/settings: the White-Label settings of your instance: white_label, data_scope, wallet_trust, leaderboard_trust and telegram_alerts. Read and change the White-Label settings of your instance. A `POST` changes only the settings you pass and returns all of them. See [Settings](/cabalspy-id/white-label#settings) in the overview for what each one does. The same settings are on the instance's [White-label](/cabalspy-id/dashboard#white-label) tab in the dashboard. Saving them there always sends all of them. ## Read the settings `GET /v1/platform-users/settings` ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users/settings" \ -H "Authorization: Bearer YOUR_KEY" ``` ## Change the settings `POST /v1/platform-users/settings` **white\_label** `boolean` Dashboard: **No CabalSpy ID branding**. The verify widget, the embedded Theses and Trade Feed widgets and the Telegram messages your users get show your platform instead of CabalSpy ID. Default `false`. **data\_scope** `string` Dashboard: **Where your users' data is visible**. `csid` (default): your users are part of the CabalSpy ID network: profiles, leaderboard, Trade Feed and theses. `platform`: only your instance sees them, nothing appears on CabalSpy ID's public pages or other platforms. **wallet\_trust** `string` Dashboard: **Wallets that count**. `all`: unverified wallets you send count for data, profiles and leaderboards. `verified_only`: only payment-verified wallets count; unverified ones get the status `needs_verification`. **leaderboard\_trust** `string` Dashboard: **Leaderboard**. `all` or `verified_only`: which wallets the [platform leaderboard](/cabalspy-id/platform-users-leaderboard) ranks. `trust=verified` on the leaderboard request can only narrow it further. **telegram\_alerts** `boolean` Dashboard: **Telegram alerts for your users**. Trade Feed alerts through the CabalSpy ID Telegram bot for platform users who [linked Telegram](/cabalspy-id/platform-users-telegram). **network\_sharing** `boolean` Older form of data\_scope: true is `csid`, false is `platform`. Unknown settings are refused with `invalid_parameter`, which lists the allowed ones. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/settings" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"wallet_trust": "all", "leaderboard_trust": "verified_only"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/settings", json={"data_scope": "platform"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/settings", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ white_label: true }), }); const { data } = await res.json(); console.log(data.white_label, data.data_scope); ``` ## Response **name** `string` The instance's name. **white\_label** `boolean` White-label flag. **data\_scope** `string` `csid` or `platform`. **network\_sharing** `boolean` The same as data\_scope, as a boolean. **wallet\_trust** `string` `all` or `verified_only`. **leaderboard\_trust** `string` `all` or `verified_only`. **telegram\_alerts** `boolean` Telegram alerts on or off. **inbound** `object` enabled and last\_event\_at of the [inbound URL](/cabalspy-id/platform-users-inbound). ```json Response theme={null} { "success": true, "data": { "name": "Example Terminal", "white_label": true, "data_scope": "csid", "network_sharing": true, "wallet_trust": "all", "leaderboard_trust": "verified_only", "claim_links": false, "telegram_alerts": false, "inbound": { "enabled": true, "last_event_at": "2026-10-26T07:58:02Z" } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | Unknown setting, or a value that is not allowed. `allowed` lists the accepted values. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Telegram Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-telegram POST /v1/platform-users/telegram/link, GET /v1/platform-users/telegram and POST /telegram/unlink: link a platform user's Telegram account, check it, or remove it. A platform user can link their Telegram account through the CabalSpy ID Telegram bot. The linked account shows in the [user object](/cabalspy-id/platform-users-get#response) as `telegram`. ## Link `POST /v1/platform-users/telegram/link` Returns a `deep_link` to the bot with a one-time code. Show it to the user as a button or QR code. When they open it and start the bot, the account is linked. Check with the status endpoint below. If the Telegram account already belongs to a CabalSpy ID, the person just proved it is theirs: your user moves to that ID ([`platform_user.merged`](/cabalspy-id/webhooks#white-label-events), new `csid_id`, same `external_id`). If that ID is already your user under another `external_id`, the bot says so and nothing changes. Signing in to CabalSpy ID with this Telegram later opens the same account, which the person then manages themselves. **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/telegram/link" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/telegram/link", json={"external_id": "user_8412"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]["deep_link"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/telegram/link", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412" }), }); const { data } = await res.json(); console.log(data.deep_link, data.expires_at); ``` **external\_id** `string` Your id of the user. **code** `string` The one-time code inside the deep link. **deep\_link** `string` `https://t.me/...?start=`, the link to open. **expires\_at** `string` When the code expires. ## Status `GET /v1/platform-users/telegram?external_id=` ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users/telegram?external_id=user_8412" \ -H "Authorization: Bearer YOUR_KEY" ``` ```json Response theme={null} { "success": true, "data": { "external_id": "user_8412", "linked": true, "username": "maze_calls", "linked_at": "2026-10-26T08:06:40Z" }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:07:00Z" } } ``` `username` and `linked_at` are null while nothing is linked. ## Unlink `POST /v1/platform-users/telegram/unlink` Removes the linked Telegram account. Returns `external_id` and `"linked": false`. **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. ```bash theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/telegram/unlink" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412"}' ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | external\_id missing. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | platform\_user\_not\_found | No user with this id in your instance. | | 409 | self\_managed | Link or unlink: the person signs in to their CabalSpy ID themselves and manages Telegram. | | 503 | service\_unavailable | Link: Telegram linking is temporarily unavailable. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Verify a wallet Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-verification POST /v1/platform-users/wallets/verify: payment verification for a platform user's wallet, with status, QR code and cancel. Proves that a platform user owns a wallet, with the same on-chain payment verification as the CabalSpy ID website: the user sends a tiny, unique amount from the wallet, directly and not through an exchange or a contract. Once the payment is final, the wallet is **verified** on that chain. Verification is optional. Use it as a trust badge, or because your instance only counts verified wallets (`wallet_trust: verified_only`). Whoever verifies an address owns it: unverified copies of it on other accounts stop counting. > [!WARNING] > > The amount is a non-refundable verification fee. Show the user the `instructions` and make clear that the exact amount must be sent from that wallet before `expires_at`. ## Flow **1. Start** `POST /v1/platform-users/wallets/verify` with the user, the chain and the address. If the address is not yet one of the user's wallets, it is added. **2. Show the payment** Show `amount`, `currency`, `receiver` and `expires_at`, the `payment_uri` as a link for wallet apps, or the QR code from `GET /v1/platform-users/wallets/verification/qr`. **3. Wait for the payment** Poll `GET /v1/platform-users/wallets/verification` until `status` is `verified`. If the window passes without payment, the status turns `expired` and you receive the `verification.expired` [webhook](/cabalspy-id/webhooks#white-label-events). ## Start a verification `POST /v1/platform-users/wallets/verify` **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. **chain** `string` *required* The chain to verify on: solana, bnb, base, eth or rh. **address** `string` *required* The wallet. It must match the chain: a Solana address on solana, an EVM address on an EVM chain. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/wallets/verify" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412", "chain": "solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW"}' ``` ```python Python theme={null} import time, requests H = {"Authorization": "Bearer YOUR_KEY"} v = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/wallets/verify", json={ "external_id": "user_8412", "chain": "solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", }, headers=H).json()["data"] print(v["instructions"]) while v["status"] == "pending": time.sleep(10) v = requests.get("https://api-id.cabalspy.xyz/v1/platform-users/wallets/verification", params={"id": v["verification_id"]}, headers=H).json()["data"] print(v["status"], v["explorer_url"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/wallets/verify", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412", chain: "base", address: "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01", }), }); const { data } = await res.json(); console.log(data.payment_uri, data.expires_at); ``` Answers **201** with the verification object and `external_id`. ## Response The verification object, returned by every endpoint on this page. **verification\_id** `string` The verification's id. **status** `string` `pending`, `verified`, `expired` or `cancelled`. **chain** `string` Chain id, for example solana. **chain\_name** `string` Chain name, for example Solana. **address** `string` The wallet that must send the payment. **amount** `string` The exact amount to send, in the chain's currency. **amount\_base** `string` The same amount in base units (lamports, wei). **currency** `string` SOL, BNB or ETH. **decimals** `integer` Decimals of the currency. **receiver** `string` The address to send the payment to. **expires\_at** `string` End of the payment window. **seconds\_left** `integer` Seconds until expires\_at while pending, otherwise 0. **payment\_uri** `string` `solana:?amount=...` or `ethereum:@?value=...`, for wallet apps and QR codes. **evm\_chain\_id** `integer` EVM chain id (56, 8453, 1 or 4663), null on Solana. **instructions** `string` A ready-made sentence to show the user. **tx\_hash** `string` The payment transaction once seen, otherwise null. **explorer\_url** `string` Explorer link of the payment, or null. **created\_at** `string` When the verification was started. **external\_id** `string` Your id of the user. ```json Response theme={null} { "success": true, "data": { "verification_id": "c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f", "status": "pending", "chain": "solana", "chain_name": "Solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "amount": "0.001042", "amount_base": "1042000", "currency": "SOL", "decimals": 9, "receiver": "Hx7kQ...9vRp", "expires_at": "2026-10-26T08:34:11Z", "seconds_left": 1800, "payment_uri": "solana:Hx7kQ...9vRp?amount=0.001042", "evm_chain_id": null, "instructions": "Send exactly 0.001042 SOL on Solana from 7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW to Hx7kQ...9vRp before 2026-10-26T08:34:11Z. Send it directly from that wallet (a normal transfer, not through an exchange or a contract). The amount is a non-refundable verification fee.", "tx_hash": null, "explorer_url": null, "created_at": "2026-10-26T08:04:11Z", "external_id": "user_8412" }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ## Check the status `GET /v1/platform-users/wallets/verification?id=` Returns the verification object with `external_id`. Open verifications are also listed in the user's `pending_verifications`. ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users/wallets/verification?id=c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f" \ -H "Authorization: Bearer YOUR_KEY" ``` ## QR code `GET /v1/platform-users/wallets/verification/qr?id=` Returns the `payment_uri` as a QR code, an SVG image (`image/svg+xml`), not the JSON envelope. Fetch it from your backend and pass it on to your page; your API key must not reach the browser. ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users/wallets/verification/qr?id=c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f" \ -H "Authorization: Bearer YOUR_KEY" -o verify.svg ``` ## Cancel `POST /v1/platform-users/wallets/verification/cancel` Cancels an open verification, for example when the user closes the dialog. Returns the verification object with status `cancelled` and `external_id`. **id** `string` *required* The verification\_id. ```bash theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/wallets/verification/cancel" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"id": "c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f"}' ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | external\_id, chain, address or id missing. | | 400 | invalid\_parameter | Unknown or disabled chain, or id is not a verification id. | | 400 | invalid\_address | Not a valid address, or the address does not match the chain. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | plan\_user\_limit | The user is beyond your plan's user limit. | | 404 | platform\_user\_not\_found | No user with this id in your instance. | | 404 | verification\_not\_found | No verification with this id for your users. | | 409 | wallet\_already\_verified | Another account already verified this wallet. | | 409 | already\_verified | The wallet is already verified on this chain. | | 409 | too\_many\_wallets | The user would have more than 5 Solana or 5 EVM wallets. | | 429 | too\_many\_open\_verifications | Too many verifications are open at once. Wait or cancel one. | | 429 | rate\_limited | Verifications started too fast. | | 503 | service\_unavailable | Verification is temporarily unavailable. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Add and remove wallets Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-wallets POST /v1/platform-users/wallets/add and /wallets/delete: add a platform user's existing wallets without payment verification, or remove one. Add wallets your user already has, from Privy, Dynamic or any other provider, without a payment. They are unverified and count straight away unless your instance sets `wallet_trust` to `verified_only`, see [Unverified and verified wallets](/cabalspy-id/white-label#unverified-and-verified-wallets). To prove ownership with a payment, use [Verify a wallet](/cabalspy-id/platform-users-verification). ## Add wallets `POST /v1/platform-users/wallets/add` Adding a wallet that already exists only adds the chains that are new. A user can hold up to 5 Solana and 5 EVM wallets. ### Body **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. **wallets** `array` *required* 1 to 10 wallets, objects with address, chains and source, or plain addresses. See [Create or update a user](/cabalspy-id/platform-users-create#body). For a single wallet you can instead pass `address`, `chains` and `source` at the top level. ### Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/wallets/add" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "external_id": "user_8412", "wallets": [{"address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01", "chains": ["base", "eth"], "source": "dynamic"}] }' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/wallets/add", json={"external_id": "user_8412", "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.status_code, r.json()["data"]["wallets_added"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/wallets/add", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412", wallets: ["0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01"], }), }); const { data } = await res.json(); console.log(res.status, data.wallets_added, data.wallets.length); ``` ### Response **201** when something was added, **200** when every wallet and chain already existed. **data** `object` **data** **external\_id** `string` Your id of the user. **wallets\_added** `array` Wallets and chains that are new: address, family, chains and source. **wallets** `array` All the user's wallets with their status, as in the [user object](/cabalspy-id/platform-users-get#response). ```json Response theme={null} { "success": true, "data": { "external_id": "user_8412", "wallets_added": [ { "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01", "family": "evm", "chains": ["base", "eth"], "source": "dynamic" } ], "wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"], "verified": false, "verified_chains": [], "status": "active", "counts": true, "source": "privy", "verified_at": null, "added_at": "2026-10-24T09:12:40Z" }, { "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01", "family": "evm", "chains": ["base", "eth"], "verified": false, "verified_chains": [], "status": "active", "counts": true, "source": "dynamic", "verified_at": null, "added_at": "2026-10-26T08:04:11Z" } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` Each new wallet triggers the `wallet.added` [webhook](/cabalspy-id/webhooks#white-label-events). ## Remove a wallet `POST /v1/platform-users/wallets/delete` Removes one wallet, verified or not, from the user. Every user needs at least one wallet, so the last one cannot be removed: add another first, or [delete the user](/cabalspy-id/platform-users-delete). **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. **address** `string` *required* The wallet to remove. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/wallets/delete" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412", "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/wallets/delete", json={"external_id": "user_8412", "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/wallets/delete", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412", address: "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01" }), }); console.log((await res.json()).data.removed); ``` ```json Response theme={null} { "success": true, "data": { "external_id": "user_8412", "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01", "removed": true }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:10:02Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | external\_id or address missing. | | 400 | invalid\_parameter | A wallet's chains or source invalid, or more than 10 wallets. | | 400 | wallet\_required | Add: no wallets passed. | | 400 | invalid\_address | Not a valid Solana or EVM address. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | platform\_user\_not\_found | No user with this id in your instance. | | 404 | wallet\_not\_found | Remove: the user has no such wallet. | | 409 | too\_many\_wallets | The user would have more than 5 Solana or 5 EVM wallets. | | 409 | last\_wallet | Remove: this is the user's only wallet. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Connect X Source: https://docs.cabalspy.xyz/cabalspy-id/platform-users-x POST /v1/platform-users/x/connect and /x/disconnect: let a platform user connect their X account, or remove it. A platform user can connect their X account. It adds the X profile with follower counts to the [user object](/cabalspy-id/platform-users-get#response) and is required for the [KOL badge](/cabalspy-id/platform-users-kol). ## Connect `POST /v1/platform-users/x/connect` Returns an `authorize_url`. Send the user there, in a new tab or a redirect. They authorize with X and come back to your `return_url`. The URL is valid for 10 minutes and can be used once. When the connection succeeds, you receive the `platform_user.x_connected` [webhook](/cabalspy-id/webhooks#white-label-events) and the user object shows `x`. **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. **return\_url** `string` *required* Where the user goes back after X. Must be on one of your instance's verified domains, registered origins or redirect URIs (https), or `http://localhost`. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/x/connect" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412", "return_url": "https://app.example.com/profile"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/x/connect", json={"external_id": "user_8412", "return_url": "https://app.example.com/profile"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]["authorize_url"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/x/connect", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412", return_url: "https://app.example.com/profile" }), }); const { data } = await res.json(); // redirect the user to data.authorize_url ``` ```json Response theme={null} { "success": true, "data": { "external_id": "user_8412", "authorize_url": "https://id.cabalspy.xyz/p/x/Kq8vN2...", "expires_at": "2026-10-26T08:14:11Z" }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:04:11Z" } } ``` ### Back on your site After X the user returns to your `return_url` with these query parameters: | Parameter | Value | | - | - | | `external_id` | Your id of the user. | | `status` | `connected` or `error`. | | `x_username` | With `connected`: the X handle. | | `error` | With `error`: `cancelled` (the user cancelled at X), `expired` (the link was finished in another browser than the one that opened it, or took too long), `x_already_linked` (this X account belongs to another user of your platform), `x_failed` (X did not answer) or `user_not_found`. | Open `authorize_url` in the same browser the user finishes the sign-in with X in. The link is bound to that browser so nobody else can complete it. ### People who already have a CabalSpy ID If the X account already belongs to a CabalSpy ID, the person just proved it is theirs: your user moves to that ID ([`platform_user.merged`](/cabalspy-id/webhooks#white-label-events), new `csid_id`, same `external_id`) and `status=connected` comes back as usual. If that ID is already your user under another `external_id`, `error=x_already_linked` comes back and nothing changes. When the person later signs in to CabalSpy ID with this X account, they land in the same account and manage it themselves ([`platform_user.self_managed`](/cabalspy-id/webhooks#white-label-events)). Connecting X is then theirs to do: the API answers `self_managed`. ## Disconnect `POST /v1/platform-users/x/disconnect` Removes the user's X account. A user with the KOL badge cannot disconnect X, the badge belongs to the X account. **external\_id** `string` *required* Your id of the user. Alternatively pass csid\_id. ```bash theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/x/disconnect" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412"}' ``` ```json Response theme={null} { "success": true, "data": { "external_id": "user_8412", "disconnected": true }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-26T08:20:00Z" } } ``` `disconnected` is false when the user had no X account. ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | external\_id or return\_url missing. | | 400 | invalid\_return\_url | return\_url is not on one of your instance's sites. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | platform\_user\_not\_found | No user with this id in your instance. | | 409 | self\_managed | The person signs in to their CabalSpy ID themselves and manages it. | | 409 | kol\_badge | Disconnect: the user has the KOL badge. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # PnL calendar Source: https://docs.cabalspy.xyz/cabalspy-id/pnl-calendar GET /v1/wallets/pnl_calendar: realized PnL per UTC day of a wallet of your users, grouped by month, with trade counts and win and loss streaks. Realized PnL per UTC day of a wallet of your users, grouped by month, with buy and sell counts, volume, tokens traded and win and loss streaks. It covers the whole history of the wallet. Use it to render a green and red PnL heatmap on a profile page. > [!TIP] > > Months are ordered oldest first. The current month is also returned on its own as month, with its days in dates, so a calendar for this month needs no extra work. > [!NOTE] > > White-Label: unverified wallets of your platform users work here too, while `wallet_trust` is `all`. `profile.wallet_verified` tells you whether the wallet is payment-verified, so you can show a badge. With `wallet_trust: verified_only` only payment-verified wallets are answered. ## Query Parameters **blockchain** `string` *required* Chain of the wallet. One of solana, bnb, base, eth, rh. **address** `string` *required* A wallet of one of your users on this chain: payment-verified, or an unverified wallet of one of your [platform users](/cabalspy-id/white-label#unverified-and-verified-wallets) while your instance's `wallet_trust` is `all`. **scope** `string` (default: instance) `global` allows any CabalSpy ID wallet. Enterprise plan only. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/wallets/pnl_calendar?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW"} r = requests.get("https://api-id.cabalspy.xyz/v1/wallets/pnl_calendar", params=params, headers={"Authorization": "Bearer YOUR_KEY"}) for m in r.json()["data"]["months"]: print(m["year"], m["month"], m["realized_pnl"], "best streak", m["positive_streak"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/wallets/pnl_calendar?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); data.dates.forEach(d => console.log(d.date, d.realized_pnl)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **wallet** `string` The wallet address. **profile** `object` The owner's profile, the same fields as on the [tracker](/cabalspy-id/tracker). **months** `array` **month** **month** `integer` Month, 1 to 12. **year** `integer` Year. **dates** `array` Days with trades in this month, see day below. **realized\_pnl** `number` Realized PnL in the month (native). **realized\_pnl\_usd** `number` Realized PnL in USD. **volume** `number` Buy plus sell volume (native). **total\_buy** `number` Bought (native). **total\_buy\_usd** `number` Bought in USD. **total\_sell** `number` Sold (native). **total\_sell\_usd** `number` Sold in USD. **buy\_txn** `integer` Buys. **sell\_txn** `integer` Sells. **txn\_total** `integer` All trades. **tokens\_traded** `integer` Distinct tokens traded in the month. **positive\_streak** `integer` Longest run of consecutive trading days in profit. **negative\_streak** `integer` Longest run of consecutive trading days at a loss. **current\_positive\_streak** `integer` Current month only: the running profit streak. **current\_negative\_streak** `integer` Current month only: the running loss streak. **dates** `array` **day** **date** `string` UTC day as dd-mm-yy. **realized\_pnl** `number` Realized PnL of the day (native), sells minus buys. **realized\_pnl\_usd** `number` Realized PnL in USD. **buy\_txn** `integer` Buys. **sell\_txn** `integer` Sells. **txn\_total** `integer` All trades. **tokens\_traded** `integer` Distinct tokens traded. **volume** `number` Buy plus sell volume (native). **total\_buy** `number` Bought (native). **total\_sell** `number` Sold (native). **total\_buy\_usd** `number` Bought in USD. **total\_sell\_usd** `number` Sold in USD. **month** `object` The current month, the same shape as an entry of months, or null when the wallet has no trades this month. ```json Response theme={null} { "success": true, "data": { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "profile": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "csid", "kol": true, "active_hours": "", "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "months": [ { "month": 10, "year": 2026, "dates": [ { "date": "12-10-26", "realized_pnl": 4.12, "realized_pnl_usd": 339.21, "buy_txn": 6, "sell_txn": 5, "txn_total": 11, "tokens_traded": 4, "volume": 30.5, "total_buy": 13.19, "total_sell": 17.31, "total_buy_usd": 1086.1, "total_sell_usd": 1425.31 } ], "realized_pnl": 4.12, "realized_pnl_usd": 339.21, "volume": 30.5, "total_buy": 13.19, "total_buy_usd": 1086.1, "total_sell": 17.31, "total_sell_usd": 1425.31, "buy_txn": 6, "sell_txn": 5, "txn_total": 11, "tokens_traded": 4, "positive_streak": 1, "negative_streak": 0, "current_positive_streak": 1, "current_negative_streak": 0 } ], "dates": [ { "date": "12-10-26", "realized_pnl": 4.12, "realized_pnl_usd": 339.21, "buy_txn": 6, "sell_txn": 5, "txn_total": 11, "tokens_traded": 4, "volume": 30.5, "total_buy": 13.19, "total_sell": 17.31, "total_buy_usd": 1086.1, "total_sell_usd": 1425.31 } ], "month": { "month": 10, "year": 2026, "...": "same as months[-1]" } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | blockchain or address is missing. | | 400 | invalid\_parameter | blockchain or address invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | scope\_not\_allowed | scope=global needs the Enterprise plan. | | 404 | wallet\_not\_found | The wallet does not count on this chain for one of your users: not payment-verified, and not an unverified wallet of one of your platform users (or `wallet_trust` is `verified_only`). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # Profile Source: https://docs.cabalspy.xyz/cabalspy-id/profile GET /v1/profile: one CabalSpy ID user by X handle, csid_id (the sub of the ID token) or a verified wallet address. One user's profile: the X account, a verified Telegram account, the KOL badge and every verified wallet with the chains it is verified on. Find the user by their handle, by their `csid_id` (the `sub` of their ID token) or by one of their verified wallets. Users who signed in with Telegram or Google and have not connected X have `x` and `twitter` set to null, no bio and a handle like `tg.` or `id.<10 hex characters>`. See [Users without X](/cabalspy-id/openid-connect#users-without-x). > [!TIP] > > Pass exactly one of username, csid\_id or address. The user must be one of your users, within your plan's user limit, unless you use scope=global on the Enterprise plan. ## Query Parameters **username** `string` The user's handle, with or without the @: their X handle, or `tg.` / `id.` for users without X. **csid\_id** `string` The user's id, the `sub` claim of their ID token. **address** `string` A wallet verified by the user, on any chain. **scope** `string` (default: instance) `global` searches every CabalSpy ID user. Enterprise plan only. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/profile?username=MazeCCC" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/profile", params={"csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11"}, headers={"Authorization": "Bearer YOUR_KEY"}) p = r.json()["data"] print(p["username"], "KOL" if p["kol"]["badge"] else "", [w["address"] for w in p["wallets"]]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/profile?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.username, data.kol.badge, data.wallets); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **csid\_id** `string` The user's id, the `sub` of their ID token. **username** `string` X handle, or `tg.` / `id.<10 hex characters>` for users without X. **name** `string` Display name from X, Telegram or Google. **image\_url** `string` Avatar URL from X or Google, can be null. **bio** `string` X bio, null without X. **twitter** `string` X profile link, null without X. **telegram** `string` Link to the user's verified Telegram account (`https://t.me/`), or an empty string. **x** `object` X account, null when the user has no X account connected. **x** **id** `string` Numeric X user id. **followers** `integer` Followers. **following** `integer` Accounts followed. **verified** `boolean` X verification. **verified\_type** `string` X verification type. **kol** `object` **kol** **badge** `boolean` Whether the user holds the reviewed KOL badge. Requires X. **since** `string` When the badge was granted, or null. **profile\_url** `string` Public CabalSpy ID profile. **wallets** `array` **wallet** **address** `string` Wallet address. **family** `string` Address family, for example solana or evm. **chains** `array` Chains the wallet is verified on. **verified\_at** `string` When the wallet was verified. **joined\_at** `string` When the CabalSpy ID was created. ```json Response theme={null} { "success": true, "data": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "bio": "onchain since 2020", "twitter": "https://x.com/MazeCCC", "telegram": "https://t.me/maze_calls", "x": { "id": "1440000000000000000", "followers": 48210, "following": 812, "verified": true, "verified_type": "blue" }, "kol": { "badge": true, "since": "2026-10-10T12:00:00Z" }, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC", "wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"], "verified_at": "2026-10-09T14:21:07Z" }, { "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01", "family": "evm", "chains": ["base", "bnb"], "verified_at": "2026-10-11T08:40:12Z" } ], "joined_at": "2026-10-09T14:02:51Z" }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T08:04:11Z" } } ``` ```json Without X theme={null} { "success": true, "data": { "csid_id": "5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19", "username": "tg.degen_dan", "name": "Dan", "image_url": null, "bio": null, "twitter": null, "telegram": "https://t.me/degen_dan", "x": null, "kol": { "badge": false, "since": null }, "profile_url": "https://id.cabalspy.xyz/u/tg.degen_dan", "wallets": [], "joined_at": "2026-10-15T09:02:51Z" }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-15T10:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | Not exactly one of username, csid\_id, address. | | 400 | invalid\_parameter | csid\_id is not a valid id, or username too long. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | plan\_user\_limit | csid\_id is an anonymous id (anon\_...) of a user beyond your plan's limit. | | 403 | scope\_not\_allowed | scope=global needs the Enterprise plan. | | 404 | profile\_not\_found | No such user in your instance, or beyond your plan's user limit. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # SocialFi API quickstart Source: https://docs.cabalspy.xyz/cabalspy-id/quickstart Integrate the CabalSpy ID SocialFi API in five steps: create an instance, add the login button, verify the ID token and read your users' verified wallets and trading data. This guide walks through a complete SocialFi integration with the CabalSpy ID SocialFi API: from an empty dashboard to your first signed-in user and their live trading data, the base for leaderboards, trader profiles, activity feeds and every other social feature on your platform. It uses the login button in a browser app and a small backend that verifies the ID token and calls the Data API. **1. Create an instance** Open the [API Dashboard](https://apidashboard.cabalspy.xyz), go to the **CabalSpy ID** tab and create an instance. Start in **sandbox** or **development** mode. Copy the Instance ID, it is your `client_id` and starts with `csid_`. Add the page that shows the button as a redirect URI, for example `https://app.example.com/`, and add its origin as a web origin. Redirect URIs must match exactly. Two more settings before the first sign-in works: * **Scopes.** A new instance may only ask for `openid`, `profile` and `offline_access`. Switch on the others you request (`wallets`, `thesis`, `trade_feed`, ...) under **Settings**, **Scopes**. Otherwise sign-in stops with "This app is not allowed to request: ...". * **Testers.** Until you go live, only testers can sign in. Add their X handles under **Domains & testers**, including your own: your dashboard login is not a CabalSpy ID. **2. Add the login button** Paste the button where people should sign in. For a browser app the widget runs the whole PKCE flow itself. ```html theme={null}
``` After a successful sign-in the widget fires a `csid:login` event on `window`. ```javascript theme={null} window.addEventListener("csid:login", async (e) => { const { user, idToken } = e.detail; await fetch("/api/session", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ idToken }), }); }); ``` Server-side apps set `data-href` to their own login route instead and run the flow with their client secret, see [OpenID Connect](/cabalspy-id/openid-connect). **3. Verify the ID token on your backend** Never trust the user object from the browser on its own. Verify the ID token's signature with the public keys at `https://id.cabalspy.xyz/oauth/jwks`, and check the issuer and the audience. ```javascript Node.js theme={null} import { createRemoteJWKSet, jwtVerify } from "jose"; const JWKS = createRemoteJWKSet(new URL("https://id.cabalspy.xyz/oauth/jwks")); export async function verifyIdToken(idToken) { const { payload } = await jwtVerify(idToken, JWKS, { issuer: "https://id.cabalspy.xyz", audience: process.env.CSID_CLIENT_ID, // your csid_... Instance ID algorithms: ["ES256"], }); if (payload.limited) { // over your plan's user limit: anonymous sub, no profile data } return payload; // payload.sub is the stable user id } ``` ```python Python theme={null} import os import jwt jwks = jwt.PyJWKClient("https://id.cabalspy.xyz/oauth/jwks") def verify_id_token(id_token: str) -> dict: key = jwks.get_signing_key_from_jwt(id_token).key claims = jwt.decode( id_token, key, algorithms=["ES256"], issuer="https://id.cabalspy.xyz", audience=os.environ["CSID_CLIENT_ID"], # your csid_... Instance ID ) if claims.get("limited"): pass # over your plan's user limit: anonymous sub, no profile data return claims # claims["sub"] is the stable user id ``` Store `sub` as the user's id in your database. It never changes for that person and your instance. > [!TIP] > > **Handling users without X.** People can sign in with X, Telegram or Google. Users without X have `x: null`, a handle like `tg.` or `id.`, and possibly no `picture`. Show a fallback avatar, never key on the handle (it changes when they connect X later), and see [Users without X](/cabalspy-id/openid-connect#users-without-x). **4. Enable your API key for CabalSpy ID** The Data API uses the same API key as the CabalSpy API. On the **API keys** page of the dashboard, every key shows **Works with: CabalSpy API / CabalSpy ID API**; both are on by default. Then check it: ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/me" \ -H "Authorization: Bearer YOUR_KEY" ``` The response shows your instance, plan, request rate and how many users you receive data for. If your account has several instances, add `instance=csid_...` to every call. Development and sandbox instances allow **1 request per second**. Space your calls or retry after HTTP 429 with the `Retry-After` header; the [SDKs](/cabalspy-id/sdks) do both for you. **5. Call the Data API** Look up the signed-in user by the `sub` from the ID token (step 3), then load the trading profile of each of their verified wallets. ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/profile?csid_id=USER_SUB" \ -H "Authorization: Bearer YOUR_KEY" curl "https://api-id.cabalspy.xyz/v1/wallets/tracker?blockchain=solana&address=WALLET&period=7d" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import time import requests API = "https://api-id.cabalspy.xyz/v1" H = {"Authorization": "Bearer YOUR_KEY"} def get(path, **params): """GET with one retry after 429 (development instances: 1 request per second).""" for _ in range(3): r = requests.get(f"{API}{path}", params=params, headers=H) if r.status_code != 429: r.raise_for_status() return r.json()["data"] time.sleep(float(r.headers.get("Retry-After", 1))) r.raise_for_status() sub = claims["sub"] # from verify_id_token() in step 3 profile = get("/profile", csid_id=sub) for w in profile["wallets"]: for chain in w["chains"]: t = get("/wallets/tracker", blockchain=chain, address=w["address"], period="7d") print(chain, w["address"], t["period_stats"]["realized_pnl_usd"]) ``` ```javascript JavaScript theme={null} const API = "https://api-id.cabalspy.xyz/v1"; const H = { Authorization: "Bearer YOUR_KEY" }; // GET with retries after 429 (development instances: 1 request per second) async function get(path, params) { for (let i = 0; i < 3; i++) { const res = await fetch(`${API}${path}?${new URLSearchParams(params)}`, { headers: H }); if (res.status !== 429) { const body = await res.json(); if (!body.success) throw new Error(body.error.message); return body.data; } await new Promise((r) => setTimeout(r, 1000 * Number(res.headers.get("Retry-After") || 1))); } throw new Error("rate limited"); } const sub = payload.sub; // from verifyIdToken() in step 3 const profile = await get("/profile", { csid_id: sub }); for (const w of profile.wallets) { for (const chain of w.chains) { const t = await get("/wallets/tracker", { blockchain: chain, address: w.address, period: "7d" }); console.log(chain, w.address, t.period_stats.realized_pnl_usd); } } ``` > [!TIP] > > The official [SDKs](/cabalspy-id/sdks) do steps 3 to 5 in a few lines: `npm install cabalspy-id` (with a React button in `cabalspy-id/react`) or `pip install cabalspy-id`. ## Going live When everything works, switch the instance to **live** in the dashboard. Live instances need a verified domain, a logo, privacy policy and terms URLs and a support e-mail, and every redirect URI and web origin must be on a verified domain. If you request the `wallets` or `onchain` scope, the instance is reviewed first. ## Next steps > [card] [Webhooks](/cabalspy-id/webhooks) > > React when a user verifies a wallet or gets the KOL badge. > [card] [Plans and limits](/cabalspy-id/plans) > > How many users you receive data for and how fast you can call the API. # SocialFi SDK for JavaScript, React and Python Source: https://docs.cabalspy.xyz/cabalspy-id/sdks Official CabalSpy ID SocialFi SDK for JavaScript/TypeScript, React and Python: login with OpenID Connect, Data API client, live streams, token theses and webhook verification. CabalSpy publishes official, open-source SDKs for CabalSpy ID in TypeScript and Python. The `cabalspy-id` package covers everything: the OpenID Connect login with PKCE and ID token verification, a typed Data API client with pagination helpers and retries, the live streams, token theses, webhook verification and, in TypeScript, the login button and thesis widget for the browser and React. | Language | Install | Import | Source | | - | - | - | - | | TypeScript / JavaScript | `npm install cabalspy-id` | `cabalspy-id`, plus the entry points below | [cabalspy-id-js](https://github.com/CabalSpy/cabalspy-id-js) | | Python | `pip install cabalspy-id` | `cabalspy_id`, plus the modules below | [cabalspy-id-python](https://github.com/CabalSpy/cabalspy-id-python) | > [!NOTE] > > Install the latest `cabalspy-id` from [npm](https://www.npmjs.com/package/cabalspy-id) and [PyPI](https://pypi.org/project/cabalspy-id/); everything on this page needs 0.9.1 or later. New releases are published from GitHub, the changelog is in each repository. ## Packages Need only part of it? Three smaller packages re-export parts of `cabalspy-id`, with the same classes, behaviour and types. They have their own versions and do not include White-Label, competitions, callouts, Trade Feed or copy trading; use `cabalspy-id` for those. | Package | npm | PyPI | Contents | | - | - | - | - | | [cabalspy-id](https://github.com/CabalSpy/cabalspy-id-js) | `cabalspy-id` | `cabalspy-id` | Everything. | | [socialfi-api](https://github.com/CabalSpy/socialfi-api) | `socialfi-api` | `socialfi-api` | The SocialFi API: Data API, Login with CabalSpy ID (OpenID Connect), trade stream, webhooks. | | [socialfi-thesis](https://github.com/CabalSpy/socialfi-thesis) | `socialfi-thesis` | `socialfi-thesis` | Token theses: Data API thesis methods, `ThesisClient`, `ThesesStream`; React `` from `socialfi-thesis/react`. | | [socialfi-widget](https://github.com/CabalSpy/socialfi-widget) | `socialfi-widget` | – | Browser widgets: login button and thesis widget mount helpers, and React components from `socialfi-widget/react`. | ```bash theme={null} npm install socialfi-api # or socialfi-thesis, socialfi-widget pip install socialfi-api # or socialfi-thesis ``` ```ts theme={null} import { CabalSpyID } from 'socialfi-api'; // = cabalspy-id/api import { CabalSpyTheses } from 'socialfi-thesis/react'; // = cabalspy-id/react import { mountLoginButton, mountTheses } from 'socialfi-widget'; // = cabalspy-id/widget ``` ```python theme={null} from socialfi_api import CabalSpyID # = cabalspy_id.api ``` ## Entry points Inside `cabalspy-id`, import only what you use. Classes are shared between entry points. | TypeScript import | Contents | | - | - | | `cabalspy-id` | Everything. | | `cabalspy-id/api` | `CabalSpyID`, `CabalSpyIDStream`, `CabalSpyIDAuth`, `verifyWebhook`, errors and Data API types. | | `cabalspy-id/thesis` | `CabalSpyID` (thesis methods), `ThesisClient`, `ThesisLive`, `ThesesStream`, thesis types. | | `cabalspy-id/widget` | Browser only: `mountLoginButton`, `mountTheses`, `setThesisAccessToken`, `startLogin`, `onWidgetEvents`, `loadCabalSpyIDWidget`. | | `cabalspy-id/react` (= `cabalspy-id/widget/react`) | ``, ``, `useCabalSpyID()`. | | Python module | Contents | | - | - | | `cabalspy_id` | Everything. | | `cabalspy_id.api` | `CabalSpyID`, `AsyncCabalSpyID`, `CabalSpyIDStream`, `CabalSpyIDAuth`, `verify_webhook`, errors and Data API types. | | `cabalspy_id.thesis` | `CabalSpyID` (thesis methods), `ThesisClient`, `AsyncThesisClient`, `ThesisLive`, `ThesesStream`, thesis types. | ## Overview The TypeScript SDK has no runtime dependencies and runs on Node 18+, browsers, Deno, Bun and edge runtimes, as ESM and CommonJS. The Python SDK needs Python 3.10+, has sync and async clients, and types every response with `TypedDict`s. The live stream in Python needs one extra: `pip install "cabalspy-id[stream]"`. | | TypeScript | Python | | - | - | - | | Login (OpenID Connect) | `CabalSpyIDAuth` | `CabalSpyIDAuth`, `AsyncCabalSpyIDAuth` | | Data API and stream | `CabalSpyID` | `CabalSpyID`, `AsyncCabalSpyID` | | Webhooks | `verifyWebhook`, `signWebhook` | `verify_webhook`, `sign_webhook` | | React | `CabalSpyLogin`, `useCabalSpyID` from `cabalspy-id/react` | – | Both read the Data API key from `CABALSPY_ID_API_KEY`, then `CABALSPY_API_KEY`. It is the same key as the CabalSpy API with **CabalSpy ID** enabled, see [Authentication](/cabalspy-id/data-api#authentication). ## Data API ```ts TypeScript theme={null} import { CabalSpyID } from 'cabalspy-id'; const csid = new CabalSpyID({ apiKey: process.env.CABALSPY_API_KEY }); const me = await csid.me(); // instance, plan, rate limit, users with data // The person who just signed in: look them up by the sub of their ID token const profile = await csid.profile({ csid_id: claims.sub }); const wallet = profile.wallets.find((w) => w.chains.includes('solana'))!; // Full trading profile for a period, same numbers as the CabalSpy API const t = await csid.tracker({ blockchain: 'solana', address: wallet.address, period: '7d' }); console.log(t.period_stats.realized_pnl_usd); // Your users ranked by PnL const board = await csid.leaderboard({ blockchain: 'solana', period: '7d', sort: 'pnl_usd', limit: 25 }); ``` ```python Python theme={null} from cabalspy_id import CabalSpyID csid = CabalSpyID() # reads CABALSPY_ID_API_KEY, then CABALSPY_API_KEY me = csid.me() # instance, plan, rate limit, users with data # The person who just signed in: look them up by the sub of their ID token profile = csid.profile(csid_id=claims["sub"]) wallet = next(w for w in profile["wallets"] if "solana" in w["chains"]) # Full trading profile for a period, same numbers as the CabalSpy API t = csid.tracker(blockchain="solana", address=wallet["address"], period="7d") print(t["period_stats"]["realized_pnl_usd"]) # Your users ranked by PnL board = csid.leaderboard(blockchain="solana", period="7d", sort="pnl_usd", limit=25) ``` | Endpoint | TypeScript | Python | | - | - | - | | [GET /v1/health](/cabalspy-id/health) | `health()` | `health()` | | [GET /v1/me](/cabalspy-id/me) | `me()` | `me()` | | [GET /v1/users](/cabalspy-id/users) | `users({ limit, kol, cursor, scope })` | `users(limit=, kol=, cursor=, scope=)` | | [GET /v1/profile](/cabalspy-id/profile) | `profile({ username } \| { csid_id } \| { address })` | `profile(username= \| csid_id= \| address=)` | | [GET /v1/wallets/lookup](/cabalspy-id/wallet-lookup) | `walletLookup(address)` | `wallet_lookup(address)` | | [GET /v1/wallets/tracker](/cabalspy-id/tracker) | `tracker({ blockchain, address, period })` | `tracker(blockchain=, address=, period=)` | | [GET /v1/wallets/history](/cabalspy-id/history) | `history({ blockchain, address, limit, cursor })` | `history(blockchain=, address=, limit=, cursor=)` | | [GET /v1/wallets/holdings](/cabalspy-id/holdings) | `holdings({ blockchain, address })` | `holdings(blockchain=, address=)` | | [GET /v1/wallets/pnl\_calendar](/cabalspy-id/pnl-calendar) | `pnlCalendar({ blockchain, address })` | `pnl_calendar(blockchain=, address=)` | | [GET /v1/wallets/leaderboard](/cabalspy-id/leaderboard) | `leaderboard({ blockchain, period, sort, limit, cursor, scope })` | `leaderboard(blockchain=, period=, sort=, limit=, cursor=, scope=)` | | [GET /v1/transactions/latest](/cabalspy-id/latest) | `latestTransactions({ blockchain, limit })` | `latest_transactions(blockchain=, limit=)` | If your account has several CabalSpy ID instances, pass `instance` (the client\_id) to the constructor. The Python async client works the same way with `await`: ```python Python async theme={null} from cabalspy_id import AsyncCabalSpyID async with AsyncCabalSpyID() as csid: users = await csid.users(kol=True) ``` ### Pagination Iterators follow `next_cursor` for you. ```ts TypeScript theme={null} for await (const user of csid.iterUsers({ kol: true })) console.log(user.username); for await (const trade of csid.iterHistory({ blockchain: 'solana', address })) console.log(trade.tx_signature); for await (const entry of csid.iterLeaderboard({ blockchain: 'base', period: '30d' })) console.log(entry.rank); ``` ```python Python theme={null} for user in csid.iter_users(kol=True): print(user["username"]) for trade in csid.iter_history(blockchain="solana", address=address): print(trade["tx_signature"]) for entry in csid.iter_leaderboard(blockchain="base", period="30d"): print(entry["rank"]) ``` ### Errors Every failure is a subclass of `CabalSpyIDError` with the error `code`, the HTTP status, the request id, a `docs` link to the [error reference](/cabalspy-id/errors) and, for validation errors, `parameter` and `allowed`. `429`, `5xx` and network errors are retried with exponential backoff (2 retries by default), and `Retry-After` is respected. ```ts TypeScript theme={null} import { NotFoundError, PlanUserLimitError, RateLimitError } from 'cabalspy-id'; try { await csid.profile({ csid_id: claims.sub }); } catch (err) { if (err instanceof PlanUserLimitError) return showUpgradeNotice(); // anon_ sub: no data until you upgrade if (err instanceof NotFoundError) return null; // not one of your users if (err instanceof RateLimitError) console.log(err.retryAfter); throw err; } ``` ```python Python theme={null} from cabalspy_id import NotFoundError, PlanUserLimitError, RateLimitError try: csid.profile(csid_id=claims["sub"]) except PlanUserLimitError: show_upgrade_notice() # anon_ sub: no data until you upgrade except NotFoundError: pass # not one of your users except RateLimitError as err: print(err.retry_after) ``` | Class | Status | Codes | | - | - | - | | `BadRequestError` | 400 | missing\_parameter, invalid\_parameter, instance\_required | | `AuthenticationError` | 401 | missing\_api\_key | | `PermissionError` | 403 | invalid\_api\_key, product\_not\_enabled, no\_instance, scope\_not\_allowed | | `PlanUserLimitError` | 403 | plan\_user\_limit | | `NotFoundError` | 404 | profile\_not\_found, wallet\_not\_found, instance\_not\_found | | `RateLimitError` | 429 | rate\_limit\_exceeded | | `ServerError` | 5xx | internal\_error, service\_unavailable | | `ConnectionError` (TS), `APIConnectionError` (Python) | – | Network failure or timeout. | | `OAuthError` | 4xx | OAuth errors of the login endpoints. | | `TokenVerificationError` | – | An ID or access token failed verification. | | `WebhookVerificationError` | – | A webhook signature or timestamp is invalid. | ## Live stream Every trade of your users the moment it is indexed (Pro plan and up), see [Trades stream](/cabalspy-id/stream). The client reconnects with exponential backoff after a dropped connection or when heartbeats stop. Configuration errors (`invalid_api_key`, `plan_required`, `scope_not_allowed`) are fatal and stop reconnecting. ```ts TypeScript theme={null} const stream = csid.stream({ blockchain: 'solana' }); // omit blockchain for every chain stream.on('trade', (t) => console.log(t.trader?.username, t.transaction_type, t.token_symbol, t.value_usd)); stream.on('error', (e) => console.error(e.code, e.message)); await stream.connect(); // resolves once the server confirmed the subscription // or for await (const trade of csid.stream()) console.log(trade); ``` ```python Python theme={null} # async only, needs: pip install "cabalspy-id[stream]" from cabalspy_id import AsyncCabalSpyID async with AsyncCabalSpyID() as csid: stream = csid.stream(blockchain="solana") # omit blockchain for every chain @stream.on("trade") def on_trade(t): print(t["trader"]["username"], t["transaction_type"], t["token_symbol"], t["value_usd"]) await stream.connect() # returns once the server confirmed the subscription await stream.run_forever() # until stream.close() or a fatal error ``` Events: `trade`, `subscribed`, `heartbeat`, `open`, `close`, `reconnecting`, `error`. Browsers, Deno, Bun and Node 22+ have a global `WebSocket`. On Node 18 to 21, install `ws` and pass it as `csid.stream({ WebSocketImpl: WebSocket })`. ## Server-side login Authorization code flow with PKCE S256, state and nonce, see [OpenID Connect](/cabalspy-id/openid-connect). `handleCallback` checks the error, state and issuer, exchanges the code and verifies the ID token and its nonce. ```ts TypeScript theme={null} import { CabalSpyIDAuth, isLimited } from 'cabalspy-id'; const auth = new CabalSpyIDAuth({ clientId: process.env.CSID_CLIENT_ID!, // csid_... clientSecret: process.env.CSID_CLIENT_SECRET, // csid_sk_... (omit for public clients) redirectUri: 'https://your.app/callback', // registered in the dashboard }); // GET /login const login = await auth.createAuthorizationUrl({ scope: ['openid', 'profile', 'wallets', 'offline_access'] }); // keep login.state, login.nonce and login.codeVerifier (session or signed http-only cookie) redirect(login.url); // GET /callback const { tokens, claims } = await auth.handleCallback(request.url, stored); if (isLimited(claims)) { // over your plan's user limit: anonymous sub "anon_...", no profile or wallet data } else { const user = await auth.userinfo(tokens.access_token); // x profile, wallets, onchain } ``` ```python Python theme={null} import os from cabalspy_id import CabalSpyIDAuth, is_limited auth = CabalSpyIDAuth( "csid_...", # your instance's client_id client_secret=os.environ["CSID_CLIENT_SECRET"], # csid_sk_... (omit for public clients) redirect_uri="https://your.app/callback", # registered in the dashboard ) # GET /login req = auth.create_authorization_url(scope=["openid", "profile", "wallets", "offline_access"]) session["csid"] = req.to_dict() # state, nonce, code_verifier, redirect_uri return redirect(req.url) # GET /callback result = auth.handle_callback(request.url, **session.pop("csid")) if is_limited(result.claims): ... # over your plan's user limit: anonymous sub "anon_...", no profile or wallet data else: user = auth.userinfo(result.tokens["access_token"]) # x profile, wallets, onchain ``` | TypeScript | Python | | | - | - | - | | `discover()` | `discover()` | The discovery document (cached). | | `createAuthorizationUrl({ scope, prompt, redirectUri, state, nonce })` | `create_authorization_url(scope=, prompt=, redirect_uri=, state=, nonce=)` | Authorization URL plus state, nonce and code verifier to store. | | `handleCallback(url, { state, nonce, codeVerifier })` | `handle_callback(url, state=, nonce=, code_verifier=)` | Full callback handling, returns tokens and verified claims. | | `exchangeCode({ code, codeVerifier, redirectUri })` | `exchange_code(code=, code_verifier=, redirect_uri=)` | Code exchange at the token endpoint. | | `refresh(refreshToken)` | `refresh(refresh_token)` | Refresh. Tokens rotate, store the new one. | | `revoke(token)` | `revoke(token)` | Revoke a refresh token and its chain. | | `userinfo(accessToken)` | `userinfo(access_token)` | The user info claims. | | `verifyIdToken(idToken, { nonce, maxAge })` | `verify_id_token(id_token, nonce=, max_age=)` | ES256 signature via JWKS, iss, aud, azp, exp, nonce. | | `verifyAccessToken(accessToken)` | `verify_access_token(access_token)` | For access tokens your frontend sends to your API. | `AsyncCabalSpyIDAuth` in Python has the same methods as coroutines. > [!TIP] > > **Handling users without X.** Users who signed in with Telegram or Google have `x` set to null in the claims and in Data API profiles, `twitter` set to null, and a handle like `tg.` or `id.`. Check for `null` before reading X fields and key your users on `sub`. See [Users without X](/cabalspy-id/openid-connect#users-without-x). ## Verify an ID token Browser apps let the [login button](/cabalspy-id/login-button) run PKCE and receive an `idToken`. Send it to your backend and verify it there before you trust it. ```ts TypeScript theme={null} import { CabalSpyIDAuth, isLimited } from 'cabalspy-id'; const auth = new CabalSpyIDAuth({ clientId: 'csid_...' }); const claims = await auth.verifyIdToken(idToken); // ES256 via JWKS: iss, aud, azp, exp if (isLimited(claims)) { // anonymous sub, no profile data } ``` ```python Python theme={null} from cabalspy_id import CabalSpyIDAuth, is_limited auth = CabalSpyIDAuth("csid_...") claims = auth.verify_id_token(id_token_from_the_browser) if is_limited(claims): ... # anonymous sub, no profile data ``` ## React `cabalspy-id/react` wraps the [login button](/cabalspy-id/login-button). `` loads `widget.js` once and maps its props to the widget's `data-*` attributes. ```tsx React theme={null} import { CabalSpyLogin, useCabalSpyID } from 'cabalspy-id/react'; export function Header() { const { user, limited } = useCabalSpyID({ clientId: 'csid_...' }); return ( fetch('/api/session', { method: 'POST', body: JSON.stringify({ idToken }) })} onLogout={() => fetch('/api/session', { method: 'DELETE' })} /> ); } ``` | Prop | Attribute | | | - | - | - | | `clientId` | `data-client-id` | Your Instance ID. Required. | | `theme`, `color`, `textColor`, `shape`, `size`, `label`, `fullWidth`, `showLogo` | `data-theme` … `data-show-logo` | Override the design from the button builder. | | `href` | `data-href` | Server apps: your login route. | | `redirectUri`, `scope` | `data-redirect-uri`, `data-scope` | Browser apps: the widget runs PKCE itself. | | `user`, `logoutHref` | `data-user`, `data-logout-href` | Server apps: show the signed-in person's avatar menu. | | `onLogin`, `onLogout`, `onError` | `csid:login`, `csid:logout`, `csid:error` | Event callbacks. | `useCabalSpyID({ clientId })` returns `{ user, idToken, accessToken, limited, ready, login(), signOut() }`. ## Theses Both SDKs cover [token theses](/cabalspy-id/theses): the Data API endpoints, the [theses stream](/cabalspy-id/theses-stream) (`ThesesStream`, every plan, see the [chart markers cookbook](/thesis-markers-on-price-chart)), thesis events on the general stream, a client for the public browser API and, in TypeScript, the thesis widget. Writing needs the scope `thesis` in your login. ### Data API Reading works with any key. Writes happen in the name of one of your users, passed as `csid_id`. Writes are retried only after the API's own `rate_limit_exceeded`, never after a server or network error, so a post cannot be duplicated. ```ts TypeScript theme={null} const { can_post } = await csid.thesisEligibility({ blockchain: 'solana', mint, csid_id: claims.sub }); if (can_post) { const t = await csid.postThesis({ blockchain: 'solana', mint, body: 'Accumulating here.', stance: 'bull', csid_id: claims.sub }); } const list = await csid.listTheses({ blockchain: 'solana', mint, sort: 'new' }); ``` ```python Python theme={null} ok = csid.thesis_eligibility(blockchain="solana", mint=mint, csid_id=claims["sub"]) if ok["can_post"]: t = csid.post_thesis(blockchain="solana", mint=mint, body="Accumulating here.", stance="bull", csid_id=claims["sub"]) theses = csid.list_theses(blockchain="solana", mint=mint, sort="new") ``` | Endpoint | TypeScript | Python | | - | - | - | | [GET /v1/theses](/cabalspy-id/theses-list) | `listTheses()`, `iterTheses()` | `list_theses()`, `iter_theses()` | | [GET /v1/theses/summary](/cabalspy-id/theses-summary) | `thesisSummary()` | `thesis_summary()` | | [GET /v1/theses/item](/cabalspy-id/theses-item) | `thesis(id)` | `thesis(id)` | | [GET /v1/theses/replies](/cabalspy-id/theses-replies) | `thesisReplies()`, `iterThesisReplies()` | `thesis_replies()`, `iter_thesis_replies()` | | [GET /v1/theses/latest](/cabalspy-id/theses-latest) | `latestTheses()` | `latest_theses()` | | [GET /v1/theses/user](/cabalspy-id/theses-user) | `userTheses()` | `user_theses()` | | [GET /v1/theses/eligibility](/cabalspy-id/theses-eligibility) | `thesisEligibility()` | `thesis_eligibility()` | | [POST /v1/theses](/cabalspy-id/theses-post) | `postThesis()` | `post_thesis()` | | [POST /v1/theses/replies](/cabalspy-id/theses-reply) | `replyToThesis()` | `reply_to_thesis()` | | [POST /v1/theses/reactions](/cabalspy-id/theses-reactions) | `reactToThesis()` | `react_to_thesis()` | | [POST /v1/theses/report](/cabalspy-id/theses-report) | `reportThesis()` | `report_thesis()` | | [POST /v1/theses/delete](/cabalspy-id/theses-delete) | `deleteThesis()` | `delete_thesis()` | ### Stream Pass `events` and optionally `mint` to receive `thesis`, `thesis.reply`, `thesis.reaction` and `thesis.removed`, or iterate `stream.theses()`. ```ts TypeScript theme={null} const stream = csid.stream({ events: ['theses'], blockchain: 'solana', mint }); stream.on('thesis', (t) => console.log('new thesis', t.id)); await stream.connect(); ``` ```python Python theme={null} stream = csid.stream(events=["theses"], blockchain="solana", mint=mint) # AsyncCabalSpyID @stream.on("thesis") def on_thesis(t): print("new thesis", t["id"]) await stream.connect() ``` ### Public browser API: ThesisClient `ThesisClient` wraps the [browser API](/cabalspy-id/theses-browser-api) on id.cabalspy.xyz: no API key, open reads, writes with the user's access token (scope `thesis`), and `live()` for the public per-token websocket. Python also has `AsyncThesisClient`. Since 0.5.2 `ThesisClient` requires your instance's public client\_id: `clientId` in TypeScript, `client_id` in Python. It is sent with every call and on the websocket. It is not the API key, see [Client ID](/cabalspy-id/theses-browser-api#client-id). ```ts TypeScript theme={null} import { ThesisClient } from 'cabalspy-id'; const theses = new ThesisClient({ clientId: 'csid_...', accessToken }); // token from csid:login / useCabalSpyID() const { items, token, summary } = await theses.list('solana', mint, { sort: 'top' }); const me = await theses.me('solana', mint); // { can_post, can_reply, holder, paused, user } if (me.can_post) await theses.post('solana', mint, { body: 'Strong community, still early.', stance: 'bull' }); const live = theses.live('solana', mint); live.on('thesis', prepend).on('reply', addReply).on('reaction', updateCounts).on('removed', ({ id }) => drop(id)); await live.connect(); ``` ```python Python theme={null} from cabalspy_id import ThesisClient with ThesisClient(client_id="csid_...", access_token=result.tokens["access_token"]) as theses: page = theses.list("solana", mint, sort="top") # items, pagination, token, summary if theses.me("solana", mint)["can_post"]: theses.post("solana", mint, body="Strong community, still early.", stance="bull") ``` Methods: `list`, `iterate`, `summary`, `get`, `replies`, `byUser` / `by_user`, `me`, `post`, `reply`, `react`, `report`, `delete`, `live`, `setAccessToken` / `set_access_token`. ### React widget `` from `cabalspy-id/react` renders the [thesis widget](/cabalspy-id/theses#path-1-the-widget). Pass the signed-in user's access token so they can write right away. ```tsx React theme={null} import { CabalSpyTheses, useCabalSpyID } from 'cabalspy-id/react'; const { accessToken } = useCabalSpyID({ clientId: 'csid_...' }); ``` Props: `clientId` (required, your public client\_id), `chain`, `mint`, `theme`, `height`, `radius`, `accessToken`. ## Trade Feed Both SDKs (0.9.0 and later) cover the [Trade Feed](/cabalspy-id/trade-feed): the traders a user follows, their feed, alerts and the live stream. Calls act in the name of one of your users, passed as `external_id` (your own user id, for platform users) or `csid_id`; they need the user's consent with the scope `trade_feed`. Adding a trader is never retried automatically. ```ts TypeScript theme={null} await csid.addTradeFeedTrader({ external_id: 'user_1001', trader: '@MazeCCC', min_sol: 0.5, notify_sells: false }); for await (const item of csid.iterTradeFeed({ external_id: 'user_1001', filter: 'buys' })) { if (item.type === 'trade') console.log(item.trader.username, item.trade.side, item.trade.symbol); } ``` ```python Python theme={null} csid.add_trade_feed_trader("user_1001", trader="@MazeCCC", min_sol=0.5, notify_sells=False) for item in csid.iter_trade_feed("user_1001", filter="buys"): print(item["trader"]["username"], item["trade"]["side"], item["trade"]["symbol"]) ``` | Endpoint | TypeScript | Python | | - | - | - | | [GET /v1/trade-feed](/cabalspy-id/trade-feed-api) | `tradeFeed()`, `iterTradeFeed()` | `trade_feed()`, `iter_trade_feed()` | | [GET /v1/trade-feed/traders](/cabalspy-id/trade-feed-api) | `tradeFeedTraders()`, `iterTradeFeedTraders()` | `trade_feed_traders()`, `iter_trade_feed_traders()` | | [POST /v1/trade-feed/traders](/cabalspy-id/trade-feed-api) | `addTradeFeedTrader()` | `add_trade_feed_trader()` | | [POST /v1/trade-feed/traders/delete](/cabalspy-id/trade-feed-api) | `removeTradeFeedTrader()` | `remove_trade_feed_trader()` | | [GET /v1/trade-feed/notifications](/cabalspy-id/trade-feed-api) | `tradeFeedNotifications()`, `iterTradeFeedNotifications()` | `trade_feed_notifications()`, `iter_trade_feed_notifications()` | | [WS /v1/trade-feed/stream](/cabalspy-id/trade-feed-api) | `tradeFeedStream()` | `trade_feed_stream()` (async) | The webhooks `trade_feed.trade` and `trade_feed.thesis` are typed in both SDKs. ## Copy trading Both SDKs (0.8.0 and later) cover [copy trading](/cabalspy-id/copy-trading): copy settings per user and trader, the instructions, status reports and the copy trading stream. CabalSpy ID never executes trades: your app executes each instruction with the user's wallet and reports the result. Status reports are never retried after a server or network error. ```ts TypeScript theme={null} await csid.updateCopyTradingSettings({ external_id: 'user_1001', trader: 'MazeCCC', enabled: true, mode: 'fixed_usd', amount_usd: 25 }); const live = csid.copyTradingStream(); live.on('copy_trade.instruction', async (i) => { const sig = await execute(i.external_id ?? i.csid_id, i.action); // your swap, before i.expires_at await csid.reportCopyInstruction({ id: i.id, status: sig ? 'executed' : 'failed', tx_signature: sig }); }); await live.connect(); ``` ```python Python theme={null} csid.update_copy_trading_settings("user_1001", trader="MazeCCC", enabled=True, mode="fixed_usd", amount_usd=25) for i in csid.iter_copy_instructions("user_1001", status="pending"): sig = execute(i["csid_id"], i["action"]) # your swap, before i["expires_at"] csid.report_copy_instruction(i["id"], status="executed", tx_signature=sig) ``` | Endpoint | TypeScript | Python | | - | - | - | | [GET /v1/copy-trading/settings](/cabalspy-id/copy-trading-settings) | `copyTradingSettings()` | `copy_trading_settings()` | | [POST /v1/copy-trading/settings](/cabalspy-id/copy-trading-settings) | `updateCopyTradingSettings()` | `update_copy_trading_settings()` | | [GET /v1/copy-trading/instructions](/cabalspy-id/copy-trading-instructions) | `copyInstructions()`, `iterCopyInstructions()` | `copy_instructions()`, `iter_copy_instructions()` | | [GET /v1/copy-trading/instructions/item](/cabalspy-id/copy-trading-instructions) | `copyInstruction(id)` | `copy_instruction(id)` | | [POST /v1/copy-trading/instructions/status](/cabalspy-id/copy-trading-status) | `reportCopyInstruction()` | `report_copy_instruction()` | | [WS /v1/copy-trading/stream](/cabalspy-id/copy-trading-stream) | `copyTradingStream()` | `copy_trading_stream()` (async) | The webhook `copy_trade.instruction` is typed in both SDKs. ## Webhooks Pass the raw request body exactly as received. Deliveries older than 5 minutes are rejected, any signature of a secret roll is accepted, and the parsed event is returned. Deduplicate on the event `id`. See [Webhooks](/cabalspy-id/webhooks). ```ts TypeScript theme={null} import { verifyWebhook } from 'cabalspy-id'; const event = await verifyWebhook({ payload: rawBody, headers: req.headers, secret: process.env.CSID_WEBHOOK_SECRET! }); switch (event.type) { case 'wallet.verified': /* event.data.sub, event.data.address */ break; case 'consent.revoked': /* delete the user's data */ break; } ``` ```python Python theme={null} import os from cabalspy_id import verify_webhook event = verify_webhook(request.body, request.headers, os.environ["CSID_WEBHOOK_SECRET"]) if event["type"] == "consent.revoked": delete_user_data(event["data"]["sub"]) ``` `signWebhook()` / `sign_webhook()` build signed test requests for your receiver. > [!WARNING] > > Keep the API key and the client secret on your server. Never ship them to a browser. ## More > [card] [TypeScript SDK on GitHub](https://github.com/CabalSpy/cabalspy-id-js) > > Source, runnable examples for login, Data API, stream, webhooks and React. > [card] [Python SDK on GitHub](https://github.com/CabalSpy/cabalspy-id-python) > > Source and runnable examples, sync and async. For the CabalSpy API (KOL, Smart Money and Whale wallets) see the [CabalSpy SDKs](/sdks). # Live stream Source: https://docs.cabalspy.xyz/cabalspy-id/stream wss://api-id.cabalspy.xyz/v1/stream: every trade of your users' verified wallets and every new thesis, reply, reaction and removal, pushed live over a WebSocket. Pro plan and up. The live stream pushes two kinds of events over one WebSocket: * **Trades**: every trade of your users' verified wallets the moment it is indexed, with the trader's CabalSpy ID profile. It is the live version of [Latest trades](/cabalspy-id/latest) and sends the same trade objects. * **Theses**: every new [thesis](/cabalspy-id/theses), reply, reaction and removal, on all tokens or on one token. Theses are public, so these events are not limited to your users. The stream is included from the **Pro** plan. Instances in development or sandbox mode can use it for testing. > [!TIP] > > For theses only, use the dedicated [theses stream](/cabalspy-id/theses-stream): it is included on every plan, lets you subscribe to up to 200 tokens per connection and supports the instance reach. ## Connecting Open a WebSocket and pass your API key as the `api_key` or `apiKey` query parameter, or as an Authorization Bearer header. Choose what you receive with `events`. There is nothing else to subscribe to, the connection starts streaming right away. ```text theme={null} wss://api-id.cabalspy.xyz/v1/stream?apiKey=YOUR_KEY wss://api-id.cabalspy.xyz/v1/stream?apiKey=YOUR_KEY&events=theses&blockchain=solana&mint=TOKEN_MINT wss://api-id.cabalspy.xyz/v1/stream?apiKey=YOUR_KEY&events=trades,theses ``` **apiKey** `string` *required* Your API key. `api_key` works too, or an Authorization Bearer header. **events** `string` (default: trades) `trades`, `theses` or `trades,theses`. **blockchain** `string` Only events on this chain. One of solana, bnb, base, eth, rh. Empty means every chain. **mint** `string` Only thesis events of this token. Needs blockchain. Trades are not filtered by mint. **scope** `string` (default: instance) `global` streams trades of every CabalSpy ID user. Enterprise plan only. **instance** `string` Your Instance ID. Only needed when your account has several instances. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://api-id.cabalspy.xyz/v1/stream?apiKey=YOUR_KEY&events=trades,theses&blockchain=solana"); ws.onmessage = (e) => { const msg = JSON.parse(e.data); switch (msg.event) { case "trade": console.log(msg.data.trader?.username, msg.data.transaction_type, msg.data.token_symbol, msg.data.value_usd); break; case "thesis": console.log("new thesis on", msg.data.mint, "by", msg.data.author.username); break; case "error": console.error(msg.error.code, msg.error.message); break; } }; ``` ```python Python theme={null} import asyncio, json, websockets async def main(): url = "wss://api-id.cabalspy.xyz/v1/stream?apiKey=YOUR_KEY&events=trades,theses&blockchain=solana" async with websockets.connect(url) as ws: async for raw in ws: msg = json.loads(raw) if msg["event"] == "trade": t = msg["data"] print(t["trader"] and t["trader"]["username"], t["transaction_type"], t["token_symbol"]) elif msg["event"].startswith("thesis"): print(msg["event"], msg["data"]["mint"]) elif msg["event"] == "error": print("error", msg["error"]) asyncio.run(main()) ``` ## Messages Every message is a JSON object with an `event` field. | Event | When | Content | | - | - | - | | `subscribed` | Right after connecting. | `data.blockchain` (a chain or `all`), `data.events`, `data.mint` and `data.scope`. | | `trade` | A trade of one of your users. | `data`, a trade object as in [Latest trades](/cabalspy-id/latest). | | `thesis` | A new thesis. | `data`, the thesis. | | `thesis.reply` | A new reply. | `data`, the reply. | | `thesis.reaction` | Reactions on a post changed. | `data.id` and `data.reactions`, the new counts. | | `thesis.removed` | A post was deleted or hidden after reports. | `data.id`. | | `heartbeat` | After 30 seconds without a message from you. | `ts`, Unix time in seconds. | | `pong` | After you send `ping`. | Nothing else. | | `error` | The connection is refused. | `error.code` and `error.message`. The server then closes with code 4403. | ```json subscribed theme={null} { "event": "subscribed", "data": { "blockchain": "solana", "events": ["theses", "trades"], "mint": null, "scope": "instance" } } ``` ```json trade theme={null} { "event": "trade", "data": { "signature": "5xr8abc...", "blockchain": "solana", "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "transaction_type": "buy", "token_symbol": "invisibull", "token_name": "invisibull", "token_logo": "https://...", "token_amount": 22113972.03, "value": 1.66, "value_usd": 137.44, "currency": "SOL", "timestamp": "2026-10-13T08:03:58Z", "trader": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol": true } } } ``` ```json heartbeat theme={null} { "event": "heartbeat", "ts": 1791878575 } ``` ```json error theme={null} { "event": "error", "error": { "code": "plan_required", "message": "The live stream is included from the Pro plan. Your plan: starter." } } ``` ### Thesis events Thesis events carry `blockchain` and `mint` in `data` next to the fields of the post. `thesis` and `thesis.reply` contain the full object as in [List theses](/cabalspy-id/theses-list#response). ```json thesis theme={null} { "event": "thesis", "data": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "chain": "solana", "kind": "thesis", "parent_id": null, "body": "Strong community, still early.", "stance": "bull", "author": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol_badge": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "likes": 0, "replies": 0, "reactions": {}, "my_reactions": [], "via": "Example Terminal", "created_at": "2026-10-13T09:12:44.512113+00:00", "is_mine": false, "position": { "private": true } } } ``` ```json thesis.reaction theme={null} { "event": "thesis.reaction", "data": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "reactions": { "like": 5 } } } ``` ```json thesis.removed theme={null} { "event": "thesis.removed", "data": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60" } } ``` Client-side apps without an API key can follow one token's theses on the public websocket of the [browser API](/cabalspy-id/theses-browser-api#live-websocket). ## Staying connected Send the text `ping` at any time to check the connection, the server answers with `pong`. When you send nothing for 30 seconds, the server sends a `heartbeat`. At the same time it picks up users who joined or left your instance and checks that your key is still valid. A revoked or disabled key ends the connection. Reconnect with a short backoff when the connection drops, and use [Latest trades](/cabalspy-id/latest) or [List theses](/cabalspy-id/theses-list) to fill any gap. ## Limits and errors Each API key can hold at most 5 stream connections at once. | Code | Meaning | | - | - | | invalid\_api\_key | API key missing, invalid or not enabled for CabalSpy ID. | | plan\_required | The stream is included from the Pro plan. | | invalid\_parameter | blockchain, events or mint invalid. | | missing\_parameter | mint was passed without blockchain. | | scope\_not\_allowed | scope=global needs the Enterprise plan. | | too\_many\_connections | At most 5 stream connections per API key. | # Token theses — SocialFi widget & API Source: https://docs.cabalspy.xyz/cabalspy-id/theses Token theses: a SocialFi widget and API where only verified holders post opinions on a token, each shown with their real position and PnL, shared across platforms. Token theses are a SocialFi widget and API for any token page. A thesis is a short opinion on a token, written by someone who actually holds it. Every thesis shows the author's real position in the token, when they posted and live now, so your users can see who has skin in the game. Theses are shared across every platform that uses CabalSpy ID: a thesis posted on your platform also shows on others, and theirs on yours. You can also show only the theses written on your own platform, see [Reach](#reach). > [!TIP] > > Try it live at [id.cabalspy.xyz/try/thesis](https://id.cabalspy.xyz/try/thesis): a real login button and the thesis widget for any token. ## How theses work | Rule | Details | | - | - | | One token per thread | A thesis belongs to a token, identified by chain and mint (token address). | | Text | Up to 1,000 characters, optionally tagged `bull` or `bear`. At most two links. No all caps, no repeated-character spam, no duplicates of the author's own posts within a day. | | Only holders post | One of the author's verified wallets bought the token, seen by CabalSpy ID's trade tracking, and still holds it. | | Anyone signed in interacts | Every signed-in user can reply, react and report. Replies are one level deep. | | Reactions | `like` and 🔥 🚀 💎 👀 😂 🤝 💀 🐂 🐻 | | Real position | Each thesis carries the author's position at post time and now: invested, realized, holding value, PnL in USD and percent, and `sold` once the position is closed. Authors who keep their trading private show only that they hold the token. | | Moderation | Weighted reports hide a post until a moderator reviews it. The first hidden post in 30 days is a warning, the next one a 7-day pause from posting, replying and reacting. Authors are notified and can appeal. See [Moderation and appeals](/cabalspy-id/theses-moderation). | | Replies and reactions on every thesis | Each thesis carries its 3 newest replies (`latest_replies`) and who reacted (`reacted_by`, up to 20). | | Shared across platforms | Every thesis shows `via`, the name of the app it was posted from. | | Rate limits | Per user: 5 theses per hour and 1 per token every 10 minutes, 30 replies per hour, 120 reactions per hour, 20 reports per day. | Writing needs the user's permission: the OAuth scope `thesis` ("Post theses and replies, react and report in your name when you use the app"). Request it at sign-in together with the scopes you already use. ## Reach By default you see the theses of **all platforms** for a token. With the instance reach you see **only the theses written on your instance**: on all live apps of your registrable domain, or only on the app itself while it is in development or sandbox mode. Reach is the same on every plan. | Where | All platforms (default) | Only your instance | | - | - | - | | Widget | Saved design reach "all platforms", or `data-scope="global"` | Saved design reach "only this instance", or `data-scope="instance"` (needs `data-client-id`) | | Data API | `scope=global` | `scope=instance` on [/v1/theses](/cabalspy-id/theses-list), [/v1/theses/summary](/cabalspy-id/theses-summary) and [/v1/theses/latest](/cabalspy-id/theses-latest) | | Theses stream | `scope=global` | `scope=instance` on [/v1/theses/stream](/cabalspy-id/theses-stream) | | Browser API | `scope=global` | `scope=instance&client_id=csid_...` on the list, summary and websocket of the [browser API](/cabalspy-id/theses-browser-api) | ## Two ways to integrate | | Widget | Your own UI with the Data API | | - | - | - | | Effort | Two lines of HTML | You build the list, composer and live updates | | Look and feel | Designed in the dashboard, overridable per embed | Fully yours | | Reading | Built in | [GET /v1/theses](/cabalspy-id/theses-list) and friends, with your API key | | Writing | Users signed in on your page with scope `thesis` write directly. Everyone else gets a **Sign in to write** popup. | Your backend posts in the user's name with [POST /v1/theses](/cabalspy-id/theses-post) and their `csid_id` | | Who can write | Any CabalSpy ID user | Your users who granted scope `thesis` and are within your plan's user limit | | Live updates | Built in | [Theses stream](/cabalspy-id/theses-stream) (every plan) | | Webhook | – | `thesis.created`, `thesis.reply` and `thesis.reaction` for your users' activity | Client-side apps that do not want a backend can also call the [public browser API](/cabalspy-id/theses-browser-api) on id.cabalspy.xyz with your instance's public client\_id and the user's access token. ## Path 1: the widget ```html theme={null}
``` With `data-client-id` the widget uses the design you saved for your instance, and theses written in it are attributed to your app. > [!NOTE] > > `data-client-id` is required. It is your instance's public client\_id (Instance ID, `csid_...`), shown in the [API Dashboard](https://apidashboard.cabalspy.xyz) under **CabalSpy ID**, **Instances** next to the API key. It is not the API key and not a secret. If the attribute is missing, `widget.js` uses the client id of a `data-csid-login` button on the same page. The widget only loads on your instance's sites: the allowed origins, the origins of your redirect URIs and your verified domain including subdomains, plus `http://localhost:*` and `http://127.0.0.1:*` while the instance is not live. The `/embed/thesis` iframe behind the widget may only be framed by these sites. See [Client ID](/cabalspy-id/theses-browser-api#client-id). ### Design in the dashboard Design the widget in the [API Dashboard](https://apidashboard.cabalspy.xyz): **CabalSpy ID**, **Instances**, your instance, tab **Theses**. The designer shows a live preview and the embed code, and saves: * **Reach:** all platforms or only this instance. * **Theme:** dark or light, with the colours background, card, text, muted, border, accent, accent text, bull and bear. * **Font:** system, inter, mono or serif. * **Corner radius:** 0 to 24 px. * **Default sort:** new or top. * **Show header**, **show the bull/bear filter**, **compact** layout. The same tab shows thesis statistics for your instance, the most discussed tokens and the latest theses. ### Attributes Every attribute overrides the saved design for that one embed. | Attribute | Values | | - | - | | `data-chain` | Required. solana, bnb, base, eth or rh. | | `data-mint` | Required. Token address (Solana mint or 0x contract). | | `data-client-id` | Required. Your Instance ID (public client\_id). Loads the saved design. Also used for `data-scope="instance"`. Falls back to the client id of a `data-csid-login` button on the page. | | `data-scope` | `global` (all platforms) or `instance` (only your instance). | | `data-theme` | `dark` or `light`. Switching the theme resets colours that are not set on the embed. | | `data-sort` | `new` or `top`. | | `data-font` | `system`, `inter`, `mono` or `serif`. | | `data-radius` | Corner radius, 0 to 24. Default 12. | | `data-bg`, `data-card`, `data-text`, `data-muted`, `data-border`, `data-accent`, `data-accent-text`, `data-bull`, `data-bear` | Colours as hex, for example `#3ddc84`. | | `data-show-header` | `true` or `false`. | | `data-show-sentiment` | `true` or `false`, the bull/bear filter. | | `data-compact` | `true` or `false`. | | `data-height` | Starting height in pixels, default 520. The widget then grows with its content. | Invalid values fall back to the theme's defaults. ### Writing in the widget The same `widget.js` also renders the [login button](/cabalspy-id/login-button). How users write: * **Browser apps** using the login button: request the scope, for example `data-scope="openid profile thesis"` on the login button. After sign-in the widget hands the access token to every thesis widget on the page automatically. * **Server apps** or your own session: pass the user's CabalSpy ID access token yourself. It must carry the scope `thesis`. ```javascript theme={null} CSID.thesis.setAccessToken(accessToken); // after your sign-in, or when you refresh tokens CSID.thesis.clear(); // on sign-out ``` Without a token, a user who wants to write gets a **Sign in to write** popup and signs in with CabalSpy ID directly. ### Your own sign-in Platforms with their own sign-in can take over the widget's **Sign in to write** button with `CSID.thesis.setSignInHandler(fn)`. When a handler is set, the button calls `fn` instead of the page's login button or the popup. `fn` gets a token with the scope `thesis` for the person, for example your platform's own CabalSpy ID access token fetched from your backend, passes it to `CSID.thesis.setAccessToken(token)` and resolves `true`. Resolving `false` means the person is not signed in. ```javascript theme={null} CSID.thesis.setSignInHandler(async () => { const res = await fetch("/api/csid-token", { credentials: "include" }); // your backend if (!res.ok) return false; // not signed in on your platform const { access_token } = await res.json(); // CabalSpy ID access token with scope thesis CSID.thesis.setAccessToken(access_token); return true; }); ``` While a handler is set, the widget treats your page as the source of truth for sign-in: someone signed out on your page is signed out in the widget too. In the [SDK](/cabalspy-id/sdks) (`cabalspy-id` 0.5.2) the same is `setThesisSignInHandler(fn)` from `cabalspy-id/widget`, or the optional `onSignIn` prop on `` in React. ## Path 2: your own UI Read with your API key, write from your backend in the name of a user. A typical **Post thesis** button works like this: **1. Request the scope thesis at sign-in** Add `thesis` to the scopes of your [authorization request](/cabalspy-id/openid-connect#authorization-request) or the login button's `data-scope`. Store the user's `sub`, it is their `csid_id`. **2. Check eligibility** Before you show the composer, ask whether the user can post on this token. Show the button only when `can_post` is true, and a reply box when `can_reply` is true. ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/theses/eligibility?blockchain=solana&mint=TOKEN_MINT&csid_id=USER_SUB" \ -H "Authorization: Bearer YOUR_KEY" ``` ```json theme={null} { "success": true, "data": { "can_post": true, "can_reply": true, "holder": true, "paused": false } } ``` **3. Post from your backend** Your frontend sends the text to your backend, your backend posts it with your API key and the user's `csid_id`. Never trust a `csid_id` sent by the browser, take it from your own session. ```bash theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/theses" \ -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \ -d '{"blockchain":"solana","mint":"TOKEN_MINT","body":"Strong community, still early.","stance":"bull","csid_id":"USER_SUB"}' ``` The response is `201` with the new thesis, including the author's position. Errors such as `not_a_holder`, `invalid_body` or `rate_limited` carry a message you can show the user. **4. Render the list and go live** Load the token's theses with [GET /v1/theses](/cabalspy-id/theses-list) (pass the viewer's `csid_id` to get `my_reactions` and `is_mine`) and the counts with [GET /v1/theses/summary](/cabalspy-id/theses-summary). Then open the [theses stream](/cabalspy-id/theses-stream) and subscribe to the token to receive new posts, replies, reactions and removals: ```text theme={null} wss://api-id.cabalspy.xyz/v1/theses/stream?apiKey=YOUR_KEY → {"op": "subscribe", "tokens": [{"blockchain": "solana", "mint": "TOKEN_MINT"}]} ``` > [!TIP] > > The official [SDKs](/cabalspy-id/sdks#theses) cover every thesis endpoint, the stream events, the browser API (`ThesisClient`) and a React widget (``). ## Endpoints | Method | Path | Description | | - | - | - | | GET | [/v1/theses](/cabalspy-id/theses-list) | Theses of a token. | | GET | [/v1/theses/summary](/cabalspy-id/theses-summary) | Counts and token info. | | GET | [/v1/theses/item](/cabalspy-id/theses-item) | One thesis or reply. | | GET | [/v1/theses/replies](/cabalspy-id/theses-replies) | Replies to a thesis. | | GET | [/v1/theses/latest](/cabalspy-id/theses-latest) | Newest theses across all tokens. | | GET | [/v1/theses/user](/cabalspy-id/theses-user) | Theses of one user. | | GET | [/v1/theses/eligibility](/cabalspy-id/theses-eligibility) | Can a user post or reply. | | POST | [/v1/theses](/cabalspy-id/theses-post) | Post a thesis for a user. | | POST | [/v1/theses/replies](/cabalspy-id/theses-reply) | Reply for a user. | | POST | [/v1/theses/reactions](/cabalspy-id/theses-reactions) | React for a user. | | POST | [/v1/theses/report](/cabalspy-id/theses-report) | Report for a user. | | POST | [/v1/theses/delete](/cabalspy-id/theses-delete) | Delete a user's own post. | | GET | [/v1/theses/notifications](/cabalspy-id/theses-moderation#get-/v1/theses/notifications) | A user's moderation notifications. | | POST | [/v1/theses/appeal](/cabalspy-id/theses-moderation#post-/v1/theses/appeal) | Appeal a decision for a user. | | WS | [/v1/theses/stream](/cabalspy-id/theses-stream) | Live theses of the tokens you subscribe to. | Reading is open to any API key, theses are public and not limited to your instance. Writing works only for your users: they signed in to your app with the scope `thesis`, did not revoke it, are not blocked by you and are within your plan's user limit. Sandbox test users cannot write. # Browser API Source: https://docs.cabalspy.xyz/cabalspy-id/theses-browser-api The public thesis API on id.cabalspy.xyz for client-side apps: every call carries your instance's public client_id; public reads, writes with the user's access token (scope thesis) and a public live websocket per token. The thesis widget runs on a small public API on id.cabalspy.xyz. Client-side apps can use it directly, without a backend and without an API key. Every call carries your instance's public client\_id, see [Client ID](#client-id): * **Reading** is public: no user token is needed. Browser calls are answered from your instance's allowed origins (CORS). * **Writing** uses the signed-in user's CabalSpy ID access token as `Authorization: Bearer `. The token must carry the scope `thesis`, so request it at sign-in, for example with `data-scope="openid profile thesis"` on the [login button](/cabalspy-id/login-button). For server-to-server writing with your API key, use the [Data API](/cabalspy-id/theses-post) instead. ## Client ID Every call of the browser API carries your instance's **public client\_id** (the Instance ID, `csid_...`). This applies to every read and write, reactions, reports, `/me/notifications`, the session exchange and pickup the widget uses, and the [websocket](#live-websocket). Send it as a header or as a query parameter: ```text theme={null} X-CSID-Client-Id: csid_... https://id.cabalspy.xyz/thesis/v1/tokens/solana/TOKEN_MINT?client_id=csid_... ``` * **Where to find it:** in the [API Dashboard](https://apidashboard.cabalspy.xyz) under **CabalSpy ID**, **Instances**, shown next to the API key. * **It is public, not a secret.** The client\_id is not the API key. It is bound to the same dashboard account and plan, and is safe to ship in browser code. * **Allowed origins:** browser calls are only answered from your instance's sites: the registered allowed origins, the origins of your redirect URIs and your verified domain including its subdomains (https). Instances that are not in live mode also accept `http://localhost:*` and `http://127.0.0.1:*`. * **Servers:** calls without an `Origin` or `Referer` header, for example from your backend, only need a valid client\_id. * If you send the client\_id both as header and as query parameter, they must match. > [!WARNING] > > Never use your secret API key in a browser. For server-side data access use the [Data API](/cabalspy-id/data-api) on api-id.cabalspy.xyz with your API key, the same key as for the main CabalSpy API. The [playground](https://id.cabalspy.xyz/try/thesis) and the public profile pages keep working as before, and the OpenID Connect discovery document and JWKS stay public. ## Base URL ```text theme={null} https://id.cabalspy.xyz/thesis/v1 ``` ## Endpoints Path parameters: `{chain}` is one of solana, bnb, base, eth, rh, `{mint}` the token address, `{id}` a thesis or reply id. | Method | Path | Auth | Description | | - | - | - | - | | GET | `/tokens/{chain}/{mint}?sort=new\|top&stance=&limit=&cursor=` | – | Theses of a token. The response also carries `token` and `summary`. | | GET | `/tokens/{chain}/{mint}/summary` | – | Counts and token info. | | GET | `/tokens/{chain}/{mint}/me` | Bearer | Eligibility of the signed-in user plus their `user` (csid\_id, username, name, image\_url) and `notices` (unread, latest, url). | | POST | `/tokens/{chain}/{mint}` | Bearer | Post a thesis: `{"body": "...", "stance": "bull"}`. Holders only. | | GET | `/items/{id}` | – | One thesis or reply. | | GET | `/items/{id}/replies?limit=&cursor=` | – | Replies, oldest first. | | POST | `/items/{id}/replies` | Bearer | Reply: `{"body": "..."}`. | | POST | `/items/{id}/reactions` | Bearer | React: `{"emoji": "like", "on": true}`. | | POST | `/items/{id}/report` | Bearer | Report: `{"reason": "spam", "note": "..."}`. | | DELETE | `/items/{id}` | Bearer | Delete your own post. | | GET | `/users/{csid_id}?limit=&cursor=` | – | Theses of one user. | | GET | `/me/notifications` | Bearer | The user's moderation notifications, see [Moderation](/cabalspy-id/theses-moderation#browser-api). | | POST | `/me/notifications/read` | Bearer | Mark all notifications as read. | | POST | `/me/notifications/{id}/appeal` | Bearer | Appeal a decision: `{"message": "..."}`. | The theses list, the summary and the websocket show theses of all platforms. Add `scope=instance&client_id=csid_...` to show only the theses written on that instance, see [Reach](/cabalspy-id/theses#reach). With a Bearer token on read requests, `my_reactions` and `is_mine` are filled for the signed-in user. Thesis objects are the same as in the [Data API](/cabalspy-id/theses-list#response). ```javascript theme={null} const API = "https://id.cabalspy.xyz/thesis/v1"; const CLIENT_ID = "csid_..."; // your instance's public client_id // read, no user token needed const list = await (await fetch(`${API}/tokens/solana/${mint}?sort=top`, { headers: { "X-CSID-Client-Id": CLIENT_ID }, })).json(); console.log(list.summary, list.data); // write with the access token from the login button (scope thesis) const res = await fetch(`${API}/tokens/solana/${mint}`, { method: "POST", headers: { "X-CSID-Client-Id": CLIENT_ID, Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json", }, body: JSON.stringify({ body: "Strong community, still early.", stance: "bull" }), }); const out = await res.json(); if (!out.success) alert(out.error.message); ``` ## Responses Success: `{"success": true, "data": ...}`, plus `pagination` (limit, has\_more, next\_cursor) on lists. Errors: `{"success": false, "error": {"code": "...", "message": "...", "docs": "..."}}`, where `docs` links to the code on the [Errors](/cabalspy-id/errors) page. The messages are written for end users. Access tokens live 15 minutes. When a write returns `invalid_token`, refresh the token or let the user sign in again. | Status | Code | Meaning | | - | - | - | | 401 | [client\_id\_required](/cabalspy-id/errors#client_id_required) | No client\_id was sent. | | 401 | [invalid\_client](/cabalspy-id/errors#invalid_client) | Unknown, suspended or deleted instance, or header and query client\_id differ. | | 403 | [origin\_not\_allowed](/cabalspy-id/errors#origin_not_allowed) | The page's origin is not one of your instance's allowed origins. | | 401 | sign\_in\_required | No Bearer token was sent. | | 401 | invalid\_token | Token invalid or expired, access revoked, or account not active. | | 403 | scope\_missing | The token does not carry the scope thesis. | | 403 | plan\_user\_limit | The user signed in beyond the app's plan limit (anonymous sub). | | 403 | sandbox\_user | Sandbox test users cannot write. | | 403 | not\_a\_holder | Only holders can post a thesis. | | 403 | posting\_paused | The user is paused from writing. | | 400 | invalid\_body, duplicate, invalid\_parameter | See [Errors](/cabalspy-id/errors#thesis-errors). | | 404 | not\_found | The post does not exist, was hidden or deleted. | | 429 | [rate\_limited](/cabalspy-id/errors#rate_limited) | Too many requests from the user, the IP address or the client\_id. Comes with `Retry-After: 60`. | Requests are also limited per IP address: 120 reads, 30 writes and 120 reactions per minute. Each client\_id is limited too: about 600 reads and 300 writes per minute across all its visitors. Over a limit the API answers `429 rate_limited` with `Retry-After: 60`. ## Live websocket A public websocket per token pushes new theses, replies, reactions and removals. No API key or user token is needed, but the URL carries your client\_id as `?client_id=`. `scope=instance` uses the same client\_id. ```text theme={null} wss://id.cabalspy.xyz/thesis/v1/ws/{chain}/{mint}?client_id=csid_... wss://id.cabalspy.xyz/thesis/v1/ws/{chain}/{mint}?scope=instance&client_id=csid_... ``` ```javascript theme={null} const ws = new WebSocket(`wss://id.cabalspy.xyz/thesis/v1/ws/solana/${mint}?client_id=${CLIENT_ID}`); ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.type === "thesis") prependCard(msg.data); if (msg.type === "reply") addReply(msg.data); if (msg.type === "reaction") updateCounts(msg.data.id, msg.data.reactions); if (msg.type === "removed") removeCard(msg.data.id); }; ``` | type | data | | - | - | | `thesis` | The new thesis. | | `reply` | The new reply. | | `reaction` | `{ id, reactions }` with the new counts. | | `removed` | `{ id }` of a deleted or hidden post. | | `heartbeat` | Sent every 30 seconds, no data. | Every message also carries `chain` and `mint`. An invalid chain or token address closes the connection with code 1008, and each IP address can hold at most 20 connections. Client errors close the connection with these codes; the close reason is the error code: | Close code | Reason | Meaning | | - | - | - | | 4401 | [client\_id\_required](/cabalspy-id/errors#client_id_required), [invalid\_client](/cabalspy-id/errors#invalid_client) | No client\_id, or not a valid instance. | | 4403 | [origin\_not\_allowed](/cabalspy-id/errors#origin_not_allowed) | The page's origin is not allowed for the instance. | | 4429 | [rate\_limited](/cabalspy-id/errors#rate_limited) | Too many connections or requests for the client\_id or IP address. | # Delete Source: https://docs.cabalspy.xyz/cabalspy-id/theses-delete POST /v1/theses/delete: delete a thesis or reply in the name of its author. Deletes a thesis or reply in the name of its author, one of your users. Users can delete only their own posts. A `thesis.removed` event goes out on the [stream](/cabalspy-id/stream#thesis-events). ## Body **thesis\_id** `string` *required* The thesis or reply to delete. **csid\_id** `string` *required* The author, one of your users. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/theses/delete" \ -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \ -d '{"thesis_id":"8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60","csid_id":"0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/theses/delete", headers={"Authorization": "Bearer YOUR_KEY"}, json={"thesis_id": thesis_id, "csid_id": session_user_sub}) ``` ```javascript JavaScript theme={null} await fetch("https://api-id.cabalspy.xyz/v1/theses/delete", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ thesis_id: thesisId, csid_id: session.userSub }), }); ``` ## Response **success** `boolean` True on success. **data** `object` `{"deleted": true}` ```json Response theme={null} { "success": true, "data": { "deleted": true }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T09:40:00Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | thesis\_id or csid\_id is missing. | | 400 | invalid\_parameter | csid\_id invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | consent\_required | The user has not granted your app the scope thesis. | | 403 | plan\_user\_limit | The user is beyond your plan's user limit. | | 403 | sandbox\_user | Sandbox test users cannot write. | | 404 | not\_found | The post does not exist, is already deleted, or was written by someone else. | | 429 | rate\_limit\_exceeded | Your API key's request rate is exceeded. | # Eligibility Source: https://docs.cabalspy.xyz/cabalspy-id/theses-eligibility GET /v1/theses/eligibility: whether one of your users can post a thesis on a token or reply, before you show the composer. Whether one of your users can post a thesis on a token and whether they can reply. Call it before you show a **Post thesis** button: only holders can post, and users who did not grant the scope `thesis`, are beyond your plan's user limit or are paused cannot write. ## Query Parameters **blockchain** `string` *required* Chain of the token. One of solana, bnb, base, eth, rh. **mint** `string` *required* Token address: a Solana mint or a 0x contract address. **csid\_id** `string` *required* The user, the sub of their ID token. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/theses/eligibility?blockchain=solana&mint=3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump&csid_id=0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/theses/eligibility", params={"blockchain": "solana", "mint": mint, "csid_id": user_sub}, headers={"Authorization": "Bearer YOUR_KEY"}) e = r.json()["data"] show_post_button = e["can_post"] show_reply_box = e["can_reply"] ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", mint, csid_id: userSub }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/theses/eligibility?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); if (!data.can_post && data.reason === "consent_required") askForThesisScope(); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **can\_post** `boolean` The user can post a thesis on this token now. **can\_reply** `boolean` The user can reply and react (false while paused). **holder** `boolean` One of the user's verified wallets holds the token. Null when the user cannot write through your app at all. **paused** `boolean` The user is paused from writing by moderation. **reason** `string` Only when the user cannot write through your app: `consent_required` (no scope thesis), `plan_user_limit` or `sandbox_user`. ```json Can post theme={null} { "success": true, "data": { "can_post": true, "can_reply": true, "holder": true, "paused": false }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T10:04:11Z" } } ``` ```json No scope thesis theme={null} { "success": true, "data": { "can_post": false, "can_reply": false, "holder": null, "paused": false, "reason": "consent_required" }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T10:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | blockchain, mint or csid\_id is missing. | | 400 | invalid\_parameter | Unknown chain, invalid token address or csid\_id. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # Get thesis Source: https://docs.cabalspy.xyz/cabalspy-id/theses-item GET /v1/theses/item: one thesis or reply by id, with author, reactions and the author's position. One thesis or reply by its id, for a detail page or to refresh a single card after a live event. Hidden and deleted posts return `not_found`. ## Query Parameters **id** `string` *required* Thesis or reply id. **csid\_id** `string` The viewer, one of your users. Fills my\_reactions and is\_mine. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/theses/item?id=8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/theses/item", params={"id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "csid_id": viewer_sub}, headers={"Authorization": "Bearer YOUR_KEY"}) t = r.json()["data"] print(t["body"], t["replies"], t["my_reactions"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ id: "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/theses/item?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.body, data.likes); ``` ## Response **success** `boolean` True on success. **data** `object` One thesis or reply, the same object as in [List theses](/cabalspy-id/theses-list#response). Replies have kind `reply`, a parent\_id and no position. ```json Response theme={null} { "success": true, "data": { "id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "kind": "thesis", "parent_id": null, "body": "Strong community, dev still holding, chart just broke out. Still early.", "stance": "bull", "author": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol_badge": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "likes": 1, "replies": 1, "reactions": { "like": 1 }, "my_reactions": ["like"], "via": "Example Terminal", "created_at": "2026-10-13T09:12:44.512113+00:00", "is_mine": false, "position": { "private": true } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T10:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | id is missing. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | not\_found | No such post, or it was hidden or deleted. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # Latest theses Source: https://docs.cabalspy.xyz/cabalspy-id/theses-latest GET /v1/theses/latest: the newest theses across all tokens, from everyone or only from your users. The newest theses across all tokens, newest first. Use it for a social feed of what people are calling right now. With `users=instance` the feed contains only theses written by your own users. > [!TIP] > > The list is paginated. Read pagination.next\_cursor from the response and pass it back as cursor to fetch the next page. When next\_cursor is null you have reached the end. ## Query Parameters **users** `string` (default: all) `all` for every CabalSpy ID user, `instance` for your users only (within your plan's user limit). **blockchain** `string` Only theses on this chain. One of solana, bnb, base, eth, rh. Empty means every chain. **scope** `string` (default: global) `global` for theses written on all platforms, `instance` for only the theses written on your instance. Combines with users: `users=all&scope=instance` is everything posted on your platform, `users=instance&scope=global` is everything your users posted anywhere. See [Reach](/cabalspy-id/theses#reach). **limit** `integer` (default: 20) Theses per page, 1 to 50. **cursor** `string` Cursor for the next page, the pagination.next\_cursor from the previous response. **csid\_id** `string` The viewer, one of your users. Fills my\_reactions and is\_mine. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/theses/latest?users=instance&limit=20" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/theses/latest", params={"users": "instance", "limit": 20}, headers={"Authorization": "Bearer YOUR_KEY"}) for t in r.json()["data"]: print(t["chain"], t["mint"], t["author"]["username"], t["stance"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ users: "instance", limit: "20" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/theses/latest?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); data.forEach(t => console.log(t.mint, t.author.username, t.stance)); ``` ## Response **success** `boolean` True on success. **data** `array` Theses, the same object as in [List theses](/cabalspy-id/theses-list#response). **pagination** `object` limit, total (always null), has\_more and next\_cursor (null means end). ```json Response theme={null} { "success": true, "data": [ { "id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "kind": "thesis", "parent_id": null, "body": "Strong community, dev still holding, chart just broke out. Still early.", "stance": "bull", "author": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol_badge": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "likes": 4, "replies": 1, "reactions": { "like": 4 }, "my_reactions": [], "via": "Example Terminal", "created_at": "2026-10-13T09:12:44.512113+00:00", "is_mine": false, "position": { "private": true } } ], "pagination": { "limit": 20, "total": null, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T10:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | users, scope, blockchain or limit invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # List theses Source: https://docs.cabalspy.xyz/cabalspy-id/theses-list GET /v1/theses: the theses of a token, newest or top first, each with the author's real position and PnL. The theses of one token, newest first or by likes, optionally only bullish or bearish ones. Every thesis carries its author, reaction counts, the app it was posted from and the author's real position in the token. Theses are public: any API key can read them, for any token, including theses posted on other platforms. > [!TIP] > > The list is paginated. Read pagination.next\_cursor from the response and pass it back as cursor to fetch the next page. When next\_cursor is null you have reached the end. ## Query Parameters **blockchain** `string` *required* Chain of the token. One of solana, bnb, base, eth, rh. **mint** `string` *required* Token address: a Solana mint or a 0x contract address. **sort** `string` (default: new) `new` (newest first) or `top` (most likes first). **stance** `string` Only `bull` or only `bear` theses. Empty means all. **limit** `integer` (default: 20) Theses per page, 1 to 50. **cursor** `string` Cursor for the next page, the pagination.next\_cursor from the previous response. **csid\_id** `string` The viewer, one of your users. Fills my\_reactions and is\_mine. **scope** `string` (default: global) `global` for theses of all platforms, `instance` for only the theses written on your instance. See [Reach](/cabalspy-id/theses#reach). **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/theses?blockchain=solana&mint=3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump&sort=top" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "sort": "top"} r = requests.get("https://api-id.cabalspy.xyz/v1/theses", params=params, headers={"Authorization": "Bearer YOUR_KEY"}) for t in r.json()["data"]: pos = t["position"].get("now") or {} print(t["author"]["username"], t["stance"], t["likes"], pos.get("pnl_usd"), t["body"][:60]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", mint: "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", sort: "top", }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/theses?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); data.forEach(t => console.log(t.author.username, t.stance, t.position.now?.pnl_usd)); ``` ## Response **success** `boolean` True on success. **data** `array` **thesis** **id** `string` Thesis id. **chain** `string` Chain of the token. **mint** `string` Token address (EVM addresses in lower case). **kind** `string` `thesis` or `reply`. **parent\_id** `string` For replies, the thesis replied to. Null for theses. **body** `string` The text, up to 1,000 characters. Plain text, escape it when you render. **stance** `string` `bull`, `bear` or null. **author** `object` **author** **csid\_id** `string` The author's CabalSpy ID. **username** `string` X handle. **name** `string` Display name. **image\_url** `string` Avatar URL. **kol\_badge** `boolean` Whether the author holds the KOL badge. **profile\_url** `string` Public CabalSpy ID profile. **likes** `integer` Number of likes. **replies** `integer` Number of replies. **reactions** `object` Count per reaction, for example `{"like": 4, "🚀": 2}`. **reacted\_by** `array` Who reacted, newest first, up to 20 entries. **reaction** **emoji** `string` `like` or the emoji. **csid\_id** `string` The reacting user's CabalSpy ID. **username** `string` Their X handle. **at** `string` ISO timestamp of the reaction. **my\_reactions** `array` The viewer's own reactions. Empty without csid\_id. **is\_mine** `boolean` Whether the viewer wrote it. **via** `string` Name of the app it was posted from, or null when posted on CabalSpy ID itself. **created\_at** `string` ISO timestamp. **latest\_replies** `array` Theses only. The 3 newest replies, oldest of them first, as full reply objects. Load all replies with [List replies](/cabalspy-id/theses-replies). **position** `object` Theses only, not on replies. The author's position in the token. `{"private": true}` when the author keeps their trading private. **position** **at\_post** `object` The position when the thesis was posted: invested\_usd, realized\_usd, holding\_value\_usd (null), pnl\_usd (null while holding), pnl\_percent, tokens\_held and first\_buy (ISO timestamp of the first buy). **now** `object` The live position: invested\_usd, realized\_usd, holding\_value\_usd at the current price, pnl\_usd and pnl\_percent (realized plus holding value minus invested), tokens\_held and status (`holding` or `sold`). Values that need a price are null when no price is available. **pagination** `object` limit, total (always null), has\_more and next\_cursor (null means end). ```json Response theme={null} { "success": true, "data": [ { "id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "kind": "thesis", "parent_id": null, "body": "Strong community, dev still holding, chart just broke out. Still early.", "stance": "bull", "author": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol_badge": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "likes": 4, "replies": 1, "reactions": { "like": 4, "🚀": 2 }, "reacted_by": [ { "emoji": "🚀", "csid_id": "5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19", "username": "degen_dan", "at": "2026-10-13T09:31:10.204511+00:00" }, { "emoji": "like", "csid_id": "5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19", "username": "degen_dan", "at": "2026-10-13T09:30:58.917203+00:00" } ], "my_reactions": [], "via": "Example Terminal", "created_at": "2026-10-13T09:12:44.512113+00:00", "is_mine": false, "latest_replies": [ { "id": "2a9c7e10-4b3d-4f5e-8a6b-7c8d9e0f1a2b", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "kind": "reply", "parent_id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "body": "Nice call", "stance": null, "author": { "csid_id": "5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19", "username": "degen_dan", "name": "Dan", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol_badge": false, "profile_url": "https://id.cabalspy.xyz/u/degen_dan" }, "likes": 0, "replies": 0, "reactions": {}, "reacted_by": [], "my_reactions": [], "via": "Example Terminal", "created_at": "2026-10-13T09:20:02.118004+00:00", "is_mine": false } ], "position": { "at_post": { "invested_usd": 150.0, "realized_usd": 0.0, "holding_value_usd": null, "pnl_usd": null, "pnl_percent": null, "tokens_held": 5000.0, "first_buy": "2026-10-13T08:12:40+00:00" }, "now": { "invested_usd": 150.0, "realized_usd": 0.0, "holding_value_usd": 231.5, "pnl_usd": 81.5, "pnl_percent": 54.33, "tokens_held": 5000.0, "status": "holding" } } } ], "pagination": { "limit": 20, "total": null, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T10:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | blockchain or mint is missing. | | 400 | invalid\_parameter | Unknown chain, invalid token address, sort, stance, scope or limit. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # Moderation and appeals Source: https://docs.cabalspy.xyz/cabalspy-id/theses-moderation How reported theses are hidden, warnings and pauses, moderator decisions, notifications and appeals, and the APIs to show them in your own UI. Theses are moderated by the community and by CabalSpy moderators. Reports hide a post quickly, the author is told why and can appeal, and people who report in bad faith lose their influence. This page explains the rules and how to show notifications and appeals in your own UI. ## Reports Any signed-in user can [report](/cabalspy-id/theses-report) a thesis or reply as spam, scam, abuse, impersonation or other. Reports are weighted: | Reporter's record | Weight of a report | | - | - | | Normal, or fewer than 3 rejected reports, or more confirmed than rejected | 1 | | Most of their earlier reports were rejected by moderators | 0.5 | | A clear record of false reports | 0 | When the weights on a post add up to **3**, the post is hidden right away and waits for a moderator. A `thesis.removed` event goes out on the streams. People whose reports are rejected again and again cannot report for **30 days**. Their reports then fail with `reporting_paused`, and they get a `reporting_paused` notification. ## Warnings and pauses | When | Consequence | | - | - | | A post is hidden after reports for the first time in 30 days | A **warning**. Nothing else changes. | | Another post is hidden within those 30 days | A **7-day pause**: no posting, replying or reacting. Writes fail with `posting_paused`. | Both can be appealed. A warning or pause whose post is restored is taken back, and a pause it caused is lifted. ## Moderator decisions | Decision | Effect | | - | - | | Keep | The post is visible again and any warning or pause from the reports is taken back. The reports count as rejected for the reporters. | | Remove | The post stays hidden. The reports count as confirmed. | | Remove and pause | Removed, plus a 7-day pause. | | Remove and ban | Removed, and the author can no longer write theses. | ## Notifications The affected person gets a notification for every decision. Each has a `kind` and a ready-made English `text`. | kind | Meaning | Appealable | | - | - | - | | `post_hidden` | A post was hidden after reports. This is a warning, the next one within 30 days pauses writing for 7 days. | Yes | | `paused` | No posting, replying or reacting until `data.until`. | Yes | | `banned` | A moderator removed a post, no more theses. | Yes | | `post_removed` | A moderator removed a post. | Yes | | `post_restored` | A moderator reviewed the reports and the post is visible again. | No | | `appeal_accepted` | The appeal was accepted, with the moderator's note. | No | | `appeal_rejected` | The appeal was rejected, with the moderator's note. | No | | `reporting_paused` | No reports until `data.until`: too many reports were rejected. | No | People see their notifications at [id.cabalspy.xyz/me/notifications](https://id.cabalspy.xyz/me/notifications), and the [thesis widget](/cabalspy-id/theses#path-1-the-widget) shows a banner with a link there when something is unread. Platforms with their own UI read them through the APIs below. ### The notification object **id** `integer` Notification id, used to appeal. **kind** `string` One of the kinds above. **text** `string` Ready-made English text for the person. **data** `object` Details: thesis\_id, chain, mint and excerpt (the first 140 characters of the post) where a post is concerned, until for pauses, note for appeal decisions. **created\_at** `string` ISO timestamp. **read** `boolean` Whether the person has seen it. **appealable** `boolean` Whether the decision can be appealed. **appeal** `string` Status of an appeal against it: `pending`, `accepted`, `rejected`, or null when none was sent. ```json Notification theme={null} { "id": 1042, "kind": "post_hidden", "text": "Your post was hidden after several reports. This is a warning — the next one pauses posting for 7 days.", "data": { "thesis_id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "excerpt": "Strong community, still early.", "strike_id": 77, "until": null, "warning": true }, "created_at": "2026-10-13T12:40:03.511020+00:00", "read": false, "appealable": true, "appeal": null } ``` ## Appeals An appealable decision can be appealed within **30 days**, once per decision, with an explanation of 10 to 1,000 characters. A moderator reviews it. When an appeal is accepted, the post is visible again and the warning or pause is taken back. The person gets `appeal_accepted` or `appeal_rejected` with the moderator's note. | Error | When | | - | - | | `not_found` | No such notification for this person, or it cannot be appealed. | | `invalid_parameter` | The decision is older than 30 days. | | `invalid_body` | The explanation is shorter than 10 or longer than 1,000 characters. | | `duplicate` | This decision was already appealed. | ## Data API Read and appeal in the name of one of your users, with your API key. The user must have granted your app the scope `thesis` and be within your plan's user limit, as for every [thesis write](/cabalspy-id/theses-post). ### GET /v1/theses/notifications **csid\_id** `string` *required* The user. ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/theses/notifications?csid_id=USER_SUB" \ -H "Authorization: Bearer YOUR_KEY" ``` ```json Response theme={null} { "success": true, "data": { "unread": 1, "items": [ { "id": 1042, "kind": "post_hidden", "text": "...", "data": { }, "created_at": "...", "read": false, "appealable": true, "appeal": null } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-14T08:00:00Z" } } ``` `items` holds the 50 newest notifications, newest first. ### POST /v1/theses/appeal **csid\_id** `string` *required* The user. **notification\_id** `integer` *required* The notification to appeal. **message** `string` *required* The user's explanation, 10 to 1,000 characters. ```bash theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/theses/appeal" \ -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \ -d '{"csid_id":"USER_SUB","notification_id":1042,"message":"This is my honest view on the token, not spam."}' ``` The response is `201` with `{"appealed": true}`. Besides the appeal errors above, both endpoints return the usual write errors `missing_parameter`, `consent_required`, `plan_user_limit` and `sandbox_user`. ## Browser API With the signed-in user's access token (scope `thesis`) on the [browser API](/cabalspy-id/theses-browser-api). Like every browser API call, these carry your instance's public client\_id as `X-CSID-Client-Id` header or `?client_id=`, see [Client ID](/cabalspy-id/theses-browser-api#client-id): | Method | Path | Description | | - | - | - | | GET | `/thesis/v1/me/notifications` | `{ unread, items }`, the 50 newest notifications. | | POST | `/thesis/v1/me/notifications/read` | Marks all as read. Returns `{"read": true}`. | | POST | `/thesis/v1/me/notifications/{id}/appeal` | Body `{"message": "..."}`. Returns `201` with `{"appealed": true}`. | `GET /thesis/v1/tokens/{chain}/{mint}/me` also returns `notices`: `unread` (count), `latest` (the text of the newest notification, or null when nothing is unread) and `url` (`https://id.cabalspy.xyz/me/notifications`), so you can show the same banner as the widget. # Post thesis Source: https://docs.cabalspy.xyz/cabalspy-id/theses-post POST /v1/theses: post a thesis on a token in the name of one of your users. Holders only. Posts a thesis on a token in the name of one of your users, from your backend. The thesis appears everywhere theses are shown, in the widget and on every other platform, marked `via` your app's name. A `thesis` event goes out on the [stream](/cabalspy-id/stream#thesis-events) and apps whose users granted the scope `thesis` get a `thesis.created` [webhook](/cabalspy-id/webhooks). > [!TIP] > > Only holders can post. The user must hold the token in one of their verified wallets, granted your app the scope thesis, and be within your plan's user limit. Check with [eligibility](/cabalspy-id/theses-eligibility) before you show the composer. Take the `csid_id` from your own session, never from the browser request: whoever controls it posts in that user's name. ## Body Send JSON with `Content-Type: application/json`. **blockchain** `string` *required* Chain of the token. One of solana, bnb, base, eth, rh. **mint** `string` *required* Token address: a Solana mint or a 0x contract address. **body** `string` *required* The thesis, up to 1,000 characters. At most two links. No all caps and no repeated-character spam. **stance** `string` `bull` or `bear`. Leave it out for no stance. **csid\_id** `string` *required* The author, one of your users (the sub of their ID token). **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/theses" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"blockchain":"solana","mint":"3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump","body":"Strong community, still early.","stance":"bull","csid_id":"0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/theses", headers={"Authorization": "Bearer YOUR_KEY"}, json={"blockchain": "solana", "mint": mint, "body": text, "stance": "bull", "csid_id": session_user_sub}) body = r.json() if r.status_code == 201: thesis = body["data"] else: show_error(body["error"]["message"]) # e.g. not_a_holder, invalid_body, rate_limited ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/theses", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ blockchain: "solana", mint, body: text, stance: "bull", csid_id: session.userSub }), }); const out = await res.json(); if (!out.success) showError(out.error.message); ``` ## Response **success** `boolean` True on success. The status is 201. **data** `object` The new thesis, the same object as in [List theses](/cabalspy-id/theses-list#response), with the author's position at post time. ```json Response theme={null} { "success": true, "data": { "id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "kind": "thesis", "parent_id": null, "body": "Strong community, still early.", "stance": "bull", "author": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol_badge": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "likes": 0, "replies": 0, "reactions": {}, "my_reactions": [], "via": "Example Terminal", "created_at": "2026-10-13T09:12:44.512113+00:00", "is_mine": false, "position": { "at_post": { "invested_usd": 150.0, "realized_usd": 0.0, "holding_value_usd": null, "pnl_usd": null, "pnl_percent": null, "tokens_held": 5000.0, "first_buy": "2026-10-13T08:12:40+00:00" }, "now": { "invested_usd": 150.0, "realized_usd": 0.0, "holding_value_usd": 152.1, "pnl_usd": 2.1, "pnl_percent": 1.4, "tokens_held": 5000.0, "status": "holding" } } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T09:12:44Z" } } ``` ## Errors The messages of `not_a_holder`, `invalid_body`, `duplicate`, `rate_limited` and `posting_paused` are written for end users, you can show them as they are. | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | blockchain, mint, body or csid\_id is missing. | | 400 | invalid\_parameter | Unknown chain, invalid token address, stance or csid\_id. | | 400 | invalid\_body | Text empty, too long, too many links, all caps, spam or a blocked word. | | 400 | duplicate | The user posted the same text within the last day. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | consent\_required | The user has not granted your app the scope thesis, revoked it or is blocked by you. | | 403 | plan\_user\_limit | The user is beyond your plan's user limit. | | 403 | sandbox\_user | Sandbox test users cannot write. | | 403 | not\_a\_holder | The user does not hold the token in a verified wallet. | | 403 | posting\_paused | The user is paused from writing. | | 429 | rate\_limited | The user posts too fast: 5 theses per hour, 1 per token every 10 minutes. | | 429 | rate\_limit\_exceeded | Your API key's request rate is exceeded. | # React Source: https://docs.cabalspy.xyz/cabalspy-id/theses-reactions POST /v1/theses/reactions: add or remove a like or emoji reaction in the name of one of your users. Adds or removes a reaction on a thesis or reply in the name of one of your users. A `like` also counts towards the post's likes, which `sort=top` uses. A `thesis.reaction` event with the new counts goes out on the [stream](/cabalspy-id/stream#thesis-events). Reactions: `like`, 🔥, 🚀, 💎, 👀, 😂, 🤝, 💀, 🐂, 🐻. Each user can add each reaction once per post. ## Body **thesis\_id** `string` *required* The thesis or reply. **emoji** `string` *required* `like` or one of the emoji above. **on** `boolean` (default: true) `true` adds the reaction, `false` removes it. **csid\_id** `string` *required* The user, one of your users. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/theses/reactions" \ -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \ -d '{"thesis_id":"8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60","emoji":"like","on":true,"csid_id":"5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/theses/reactions", headers={"Authorization": "Bearer YOUR_KEY"}, json={"thesis_id": thesis_id, "emoji": "🚀", "on": True, "csid_id": session_user_sub}) print(r.json()["data"]["reactions"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/theses/reactions", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ thesis_id: thesisId, emoji: "like", on: false, csid_id: session.userSub }), }); const { data } = await res.json(); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **id** `string` The post. **reactions** `object` The new count per reaction. ```json Response theme={null} { "success": true, "data": { "id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "reactions": { "like": 5, "🚀": 2 } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T09:30:00Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | thesis\_id, emoji or csid\_id is missing. | | 400 | invalid\_parameter | Unknown reaction or invalid csid\_id. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | consent\_required | The user has not granted your app the scope thesis. | | 403 | plan\_user\_limit | The user is beyond your plan's user limit. | | 403 | sandbox\_user | Sandbox test users cannot write. | | 403 | posting\_paused | The user is paused from writing and reacting. | | 404 | not\_found | The post does not exist, was hidden or deleted. | | 429 | rate\_limited | The user reacts too fast: 120 reactions per hour. | | 429 | rate\_limit\_exceeded | Your API key's request rate is exceeded. | # List replies Source: https://docs.cabalspy.xyz/cabalspy-id/theses-replies GET /v1/theses/replies: the replies to a thesis, oldest first. All replies to one thesis, oldest first, so a thread reads top to bottom. Every thesis already carries its 3 newest replies in `latest_replies`; use this endpoint for the rest. Replies have the same shape as theses with kind `reply`, without position and latest\_replies. > [!TIP] > > The list is paginated. Read pagination.next\_cursor from the response and pass it back as cursor to fetch the next page. When next\_cursor is null you have reached the end. ## Query Parameters **id** `string` *required* The thesis id. **limit** `integer` (default: 50) Replies per page, 1 to 100. **cursor** `string` Cursor for the next page, the pagination.next\_cursor from the previous response. **csid\_id** `string` The viewer, one of your users. Fills my\_reactions and is\_mine. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/theses/replies?id=8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/theses/replies", params={"id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60"}, headers={"Authorization": "Bearer YOUR_KEY"}) for reply in r.json()["data"]: print(reply["author"]["username"], reply["body"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ id: "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/theses/replies?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); data.forEach(r => console.log(r.author.username, r.body)); ``` ## Response **success** `boolean` True on success. **data** `array` Replies, the same object as in [List theses](/cabalspy-id/theses-list#response) with kind `reply`, parent\_id set and no position. **pagination** `object` limit, total (always null), has\_more and next\_cursor (null means end). ```json Response theme={null} { "success": true, "data": [ { "id": "2a9c7e10-4b3d-4f5e-8a6b-7c8d9e0f1a2b", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "kind": "reply", "parent_id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "body": "Nice call", "stance": null, "author": { "csid_id": "5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19", "username": "degen_dan", "name": "Dan", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol_badge": false, "profile_url": "https://id.cabalspy.xyz/u/degen_dan" }, "likes": 0, "replies": 0, "reactions": {}, "my_reactions": [], "via": "Example Terminal", "created_at": "2026-10-13T09:20:02.118004+00:00", "is_mine": false } ], "pagination": { "limit": 50, "total": null, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T10:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | id is missing. | | 400 | invalid\_parameter | limit invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | not\_found | id is not a valid thesis id. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # Post reply Source: https://docs.cabalspy.xyz/cabalspy-id/theses-reply POST /v1/theses/replies: reply to a thesis in the name of one of your users. Replies to a thesis in the name of one of your users. Any of your users who granted the scope `thesis` can reply, holding the token is not required. Replies are one level deep: you reply to a thesis, not to a reply. A `thesis.reply` event goes out on the [stream](/cabalspy-id/stream#thesis-events). ## Body **thesis\_id** `string` *required* The thesis to reply to. **body** `string` *required* The reply, up to 1,000 characters, same text rules as theses. **csid\_id** `string` *required* The author, one of your users. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/theses/replies" \ -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \ -d '{"thesis_id":"8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60","body":"Nice call","csid_id":"5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/theses/replies", headers={"Authorization": "Bearer YOUR_KEY"}, json={"thesis_id": thesis_id, "body": text, "csid_id": session_user_sub}) reply = r.json()["data"] ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/theses/replies", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ thesis_id: thesisId, body: text, csid_id: session.userSub }), }); const { data } = await res.json(); ``` ## Response **success** `boolean` True on success. The status is 201. **data** `object` The new reply, the same object as in [List replies](/cabalspy-id/theses-replies#response). ```json Response theme={null} { "success": true, "data": { "id": "2a9c7e10-4b3d-4f5e-8a6b-7c8d9e0f1a2b", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "kind": "reply", "parent_id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "body": "Nice call", "stance": null, "author": { "csid_id": "5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19", "username": "degen_dan", "name": "Dan", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol_badge": false, "profile_url": "https://id.cabalspy.xyz/u/degen_dan" }, "likes": 0, "replies": 0, "reactions": {}, "my_reactions": [], "via": "Example Terminal", "created_at": "2026-10-13T09:20:02.118004+00:00", "is_mine": false }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T09:20:02Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | thesis\_id, body or csid\_id is missing. | | 400 | invalid\_parameter | csid\_id invalid. | | 400 | invalid\_body | Text empty, too long, too many links, all caps, spam or a blocked word. | | 400 | duplicate | The user posted the same text within the last day. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | consent\_required | The user has not granted your app the scope thesis. | | 403 | plan\_user\_limit | The user is beyond your plan's user limit. | | 403 | sandbox\_user | Sandbox test users cannot write. | | 403 | posting\_paused | The user is paused from writing. | | 404 | not\_found | The thesis does not exist, was hidden or deleted, or is itself a reply. | | 429 | rate\_limited | The user replies too fast: 30 replies per hour. | | 429 | rate\_limit\_exceeded | Your API key's request rate is exceeded. | # Report Source: https://docs.cabalspy.xyz/cabalspy-id/theses-report POST /v1/theses/report: report a thesis or reply in the name of one of your users. Reports a thesis or reply in the name of one of your users. Reports are weighted by the reporter's record; when the weights on a post reach 3 it is hidden until a moderator reviews it, and a `thesis.removed` event goes out on the streams. The author gets a warning, or a 7-day pause on a repeat, and can appeal. See [Moderation and appeals](/cabalspy-id/theses-moderation). Reporting the same post twice has no further effect, and users cannot report their own posts. ## Body **thesis\_id** `string` *required* The thesis or reply. **reason** `string` *required* One of `spam`, `scam`, `abuse`, `impersonation` or `other`. **note** `string` Optional details for the moderators, up to 300 characters. **csid\_id** `string` *required* The reporting user, one of your users. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/theses/report" \ -H "Authorization: Bearer YOUR_KEY" -H "Content-Type: application/json" \ -d '{"thesis_id":"8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60","reason":"scam","note":"Fake contract link","csid_id":"5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19"}' ``` ```python Python theme={null} import requests requests.post("https://api-id.cabalspy.xyz/v1/theses/report", headers={"Authorization": "Bearer YOUR_KEY"}, json={"thesis_id": thesis_id, "reason": "spam", "csid_id": session_user_sub}) ``` ```javascript JavaScript theme={null} await fetch("https://api-id.cabalspy.xyz/v1/theses/report", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ thesis_id: thesisId, reason: "abuse", csid_id: session.userSub }), }); ``` ## Response **success** `boolean` True on success. **data** `object` `{"reported": true}` ```json Response theme={null} { "success": true, "data": { "reported": true }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T09:30:00Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | thesis\_id, reason or csid\_id is missing. | | 400 | invalid\_parameter | Unknown reason, invalid csid\_id, or the user reports their own post. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | consent\_required | The user has not granted your app the scope thesis. | | 403 | plan\_user\_limit | The user is beyond your plan's user limit. | | 403 | sandbox\_user | Sandbox test users cannot write. | | 403 | reporting\_paused | Too many of the user's reports were rejected: no reports for 30 days. | | 404 | not\_found | The post does not exist or was deleted. | | 429 | rate\_limited | The user reports too often: 20 reports per day. | | 429 | rate\_limit\_exceeded | Your API key's request rate is exceeded. | # Theses stream Source: https://docs.cabalspy.xyz/cabalspy-id/theses-stream wss://api-id.cabalspy.xyz/v1/theses/stream: live theses, replies, reactions and removals for the tokens you subscribe to. Every plan. A dedicated WebSocket for theses. Subscribe to up to 200 tokens, or to all of them, and receive every new thesis, reply, reaction and removal the moment it happens. It is included on **every plan**, Free too. Use it to keep a thesis list up to date, to show a live feed, or to put theses as markers on a token's price chart. > [!NOTE] > > The general [live stream](/cabalspy-id/stream) can also carry thesis events with `events=theses`, together with your users' trades, but it needs the Pro plan. For theses only, use this stream. ## Connecting ```text theme={null} wss://api-id.cabalspy.xyz/v1/theses/stream?apiKey=YOUR_KEY ``` **apiKey** `string` *required* Your API key. `api_key` works too, or an Authorization Bearer header. **scope** `string` (default: global) `global` for theses of all platforms, `instance` for only the theses written on your instance (see [Reach](/cabalspy-id/theses#reach)). **instance** `string` Your Instance ID. Only needed when your account has several instances. Right after connecting the server sends `ready`. Then subscribe with JSON frames. ## Frames you send | Frame | Effect | | - | - | | `{"op": "subscribe", "tokens": [{"blockchain": "solana", "mint": "..."}]}` | Adds tokens. Up to 200 per connection in total. | | `{"op": "unsubscribe", "tokens": [{"blockchain": "solana", "mint": "..."}]}` | Removes tokens. | | `{"op": "subscribe", "all": true}` | Every token. | | `{"op": "unsubscribe", "all": true}` | Removes everything. | | `ping` | The server answers `pong`. | Every subscribe or unsubscribe is answered with `subscribed`, the complete current subscription. ## Events you receive | Event | Content | | - | - | | `ready` | `data.scope` and `data.max_tokens` (200). | | `subscribed` | `data.all` and `data.tokens`, your current subscription. | | `thesis` | A new thesis: `data` is the thesis object as in [List theses](/cabalspy-id/theses-list#response), plus `blockchain`. | | `thesis.reply` | A new reply, same shape. | | `thesis.reaction` | `data.id` and `data.reactions`, the new counts, plus `blockchain` and `mint`. | | `thesis.removed` | `data.id` of a deleted or hidden post, plus `blockchain` and `mint`. | | `heartbeat` | After 30 seconds without a frame from you, with `ts` (Unix time). | | `pong` | Answer to `ping`. | | `error` | `error.code` and `error.message`. | ```json ready theme={null} { "event": "ready", "data": { "scope": "global", "max_tokens": 200 } } ``` ```json subscribed theme={null} { "event": "subscribed", "data": { "all": false, "tokens": [{ "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump" }] } } ``` ```json thesis theme={null} { "event": "thesis", "data": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "chain": "solana", "kind": "thesis", "parent_id": null, "body": "Strong community, still early.", "stance": "bull", "author": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol_badge": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "likes": 0, "replies": 0, "reactions": {}, "my_reactions": [], "via": "Example Terminal", "created_at": "2026-10-13T09:12:44.512113+00:00", "is_mine": false, "position": { "private": true } } } ``` ## Example: theses as chart markers Subscribe to the tokens on screen and drop a marker at each thesis's `created_at`, coloured by `stance`, labelled with the author. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://api-id.cabalspy.xyz/v1/theses/stream?apiKey=YOUR_KEY"); ws.onopen = () => ws.send(JSON.stringify({ op: "subscribe", tokens: [{ blockchain: "solana", mint: "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump" }], })); ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === "thesis") { const t = msg.data; chart.addMarker({ time: Math.floor(new Date(t.created_at).getTime() / 1000), color: t.stance === "bear" ? "#ff5c6c" : t.stance === "bull" ? "#3ddc84" : "#8b96a3", text: `${t.author.kol_badge ? "KOL " : ""}@${t.author.username}`, id: t.id, }); } else if (msg.event === "thesis.removed") { chart.removeMarker(msg.data.id); } else if (msg.event === "error") { console.error(msg.error.code, msg.error.message); } }; ``` ```python Python theme={null} import asyncio, json, websockets async def main(): url = "wss://api-id.cabalspy.xyz/v1/theses/stream?apiKey=YOUR_KEY" async with websockets.connect(url) as ws: await ws.send(json.dumps({"op": "subscribe", "tokens": [ {"blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump"}]})) async for raw in ws: msg = json.loads(raw) if msg["event"] == "thesis": t = msg["data"] print(t["created_at"], t["stance"], t["author"]["username"], t["body"][:60]) asyncio.run(main()) ``` `chart.addMarker` and `chart.removeMarker` stand for your charting library. For markers of theses posted before the page opened, load them with [GET /v1/theses](/cabalspy-id/theses-list). ## Staying connected When you send nothing for 30 seconds the server sends a `heartbeat` and checks that your key is still valid; a revoked or disabled key ends the connection. Reconnect with a short backoff, send your subscribe frame again, and fill any gap with [GET /v1/theses](/cabalspy-id/theses-list). ## Limits and errors Each API key can hold at most 5 theses stream connections at once, each with up to 200 tokens. | Code | Meaning | Connection | | - | - | - | | invalid\_api\_key | API key missing, invalid or not enabled for CabalSpy ID. | Closed (4403) | | invalid\_parameter | scope invalid. | Closed (4403) | | too\_many\_connections | At most 5 theses stream connections per API key. | Closed (4403) | | too\_many\_tokens | More than 200 tokens on one connection. The frame is ignored. | Stays open | | invalid\_frame | The frame is not JSON or not a known op. | Stays open | | invalid\_parameter | A token in a frame has an unknown chain or an invalid address. | Stays open | # Thesis summary Source: https://docs.cabalspy.xyz/cabalspy-id/theses-summary GET /v1/theses/summary: number of theses, bull and bear counts and authors for a token, with token name, symbol, logo and price. Counts for a token's theses, how many there are, how many are bullish or bearish and how many people wrote them, plus the token's name, symbol, logo and USD price. Use it for a header above the thesis list or a sentiment badge next to a token. ## Query Parameters **blockchain** `string` *required* Chain of the token. One of solana, bnb, base, eth, rh. **mint** `string` *required* Token address: a Solana mint or a 0x contract address. **scope** `string` (default: global) `global` counts theses of all platforms, `instance` only the theses written on your instance. See [Reach](/cabalspy-id/theses#reach). **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/theses/summary?blockchain=solana&mint=3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/theses/summary", params={"blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump"}, headers={"Authorization": "Bearer YOUR_KEY"}) s = r.json()["data"] print(s["token"]["symbol"], s["theses"], "theses,", s["bull"], "bull /", s["bear"], "bear") ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", mint: "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/theses/summary?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.token.symbol, data.bull, data.bear); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **theses** `integer` Visible theses on the token (replies not counted). **bull** `integer` Theses tagged bull. **bear** `integer` Theses tagged bear. **authors** `integer` Different people who wrote a thesis. **token** `object` chain, mint, name, symbol, logo and price\_usd. Name, logo and price can be null when unknown. ```json Response theme={null} { "success": true, "data": { "theses": 12, "bull": 9, "bear": 2, "authors": 10, "token": { "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "name": "invisibull", "symbol": "invisibull", "logo": "https://...", "price_usd": 0.0463 } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T10:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | blockchain or mint is missing. | | 400 | invalid\_parameter | Unknown chain, invalid token address or scope. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # User theses Source: https://docs.cabalspy.xyz/cabalspy-id/theses-user GET /v1/theses/user: the theses one user wrote, newest first, by csid_id or X handle. The theses one person wrote, newest first, across all tokens. Use it on a trader profile to show their calls next to their trading stats. > [!TIP] > > Pass csid\_id or username. The list is paginated with cursor and pagination.next\_cursor. ## Query Parameters **csid\_id** `string` The author's CabalSpy ID. **username** `string` Or the author's X handle, with or without the @. **limit** `integer` (default: 20) Theses per page, 1 to 50. **cursor** `string` Cursor for the next page, the pagination.next\_cursor from the previous response. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/theses/user?username=MazeCCC" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/theses/user", params={"username": "MazeCCC"}, headers={"Authorization": "Bearer YOUR_KEY"}) for t in r.json()["data"]: print(t["created_at"], t["chain"], t["mint"], t["stance"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/theses/user?username=MazeCCC", { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); data.forEach(t => console.log(t.mint, t.stance, t.position.now?.pnl_usd)); ``` ## Response **success** `boolean` True on success. **data** `array` Theses, the same object as in [List theses](/cabalspy-id/theses-list#response). **pagination** `object` limit, total (always null), has\_more and next\_cursor (null means end). ```json Response theme={null} { "success": true, "data": [ { "id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "kind": "thesis", "parent_id": null, "body": "Strong community, dev still holding, chart just broke out. Still early.", "stance": "bull", "author": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "kol_badge": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "likes": 4, "replies": 1, "reactions": { "like": 4 }, "my_reactions": [], "via": "Example Terminal", "created_at": "2026-10-13T09:12:44.512113+00:00", "is_mine": false, "position": { "private": true } } ], "pagination": { "limit": 20, "total": null, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T10:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | Neither csid\_id nor username was passed. | | 400 | invalid\_parameter | csid\_id or limit invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 404 | profile\_not\_found | No CabalSpy ID user with this username. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # Tracker Source: https://docs.cabalspy.xyz/cabalspy-id/tracker GET /v1/wallets/tracker: the full trading profile of a wallet of your users for a period: stats, realized PnL, win rate distribution, traded tokens, PnL chart and trades. The deepest view of one wallet of your users. For a chosen period it returns the owner's profile, aggregate period statistics, a win rate distribution across profit buckets, the tokens traded, a cumulative realized PnL chart and the individual trades. The numbers are computed exactly like the CabalSpy API [tracker](/tracker), so a wallet shows the same figures on both APIs. Realized PnL is the cash flow inside the window, sells minus buys. > [!TIP] > > Choose the window with period, one of 6h, 1d, 7d or 30d. Windows are rolling, counted back from now. The PnL chart starts at 0 at the beginning of the period and ends at the period's realized PnL, with one point every 15 minutes. > [!NOTE] > > White-Label: unverified wallets of your platform users work here too, while `wallet_trust` is `all`. `profile.wallet_verified` tells you whether the wallet is payment-verified, so you can show a badge. With `wallet_trust: verified_only` only payment-verified wallets are answered. ## Query Parameters **blockchain** `string` *required* Chain of the wallet. One of solana, bnb, base, eth, rh. **address** `string` *required* A wallet of one of your users on this chain: payment-verified, or an unverified wallet of one of your [platform users](/cabalspy-id/white-label#unverified-and-verified-wallets) while your instance's `wallet_trust` is `all`. **period** `string` (default: 1d) Aggregation window, one of 6h, 1d, 7d or 30d. **scope** `string` (default: instance) `global` allows any CabalSpy ID wallet. Enterprise plan only. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/wallets/tracker?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW&period=7d" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "period": "7d", } r = requests.get("https://api-id.cabalspy.xyz/v1/wallets/tracker", params=params, headers={"Authorization": "Bearer YOUR_KEY"}) d = r.json()["data"] ps = d["period_stats"] print(d["profile"]["username"], "realized pnl", ps["realized_pnl"], d["profile"]["currency"]) print("win rate", d["period_win_rate_distribution"]["win_rate_percentage"], "%") ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", period: "7d", }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/wallets/tracker?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); console.log(data.profile.username, "pnl", data.period_stats.realized_pnl_usd); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **wallet** `string` The profiled wallet address. **profile** `object` **profile** **csid\_id** `string` The owner's CabalSpy ID. **username** `string` X handle, or `tg.` / `id.<10 hex characters>` for users without X. **name** `string` Display name. **image\_url** `string` Avatar URL. **twitter** `string` X profile link, null without X. **telegram** `string` Link to the owner's verified Telegram account (`https://t.me/`), or an empty string. **blockchain** `string` Chain. **currency** `string` Native currency. **type** `string` Always csid. **kol** `boolean` Whether the owner holds the KOL badge. **active\_hours** `string` The hours of the day (UTC) with most of the trades of the last 30 days, for example "13:00-21:00 UTC". Empty without trades. **profile\_url** `string` Public CabalSpy ID profile. Null for platform users. **wallet\_verified** `boolean` Whether this wallet is payment-verified. False for an unverified wallet of one of your platform users. **period\_stats** `object` **period\_stats** **period** `string` The requested window. **total\_buy** `number` Buy volume in the period (native). **total\_buy\_usd** `number` Buy volume in USD. **total\_sell** `number` Sell volume in the period (native). **total\_sell\_usd** `number` Sell volume in USD. **volume** `number` Buy plus sell volume (native). **volume\_usd** `number` Buy plus sell volume in USD. **realized\_pnl** `number` Realized PnL in the period (native), sells minus buys. **realized\_pnl\_usd** `number` Realized PnL in USD. **realized\_pnl\_percentage** `number` Realized PnL as a percentage of the buy volume. **buy\_txn** `integer` Number of buys. **sell\_txn** `integer` Number of sells. **largest\_buy** `number` Largest single buy in the period (native). **best\_trade\_pnl** `number` Best realized PnL on a single token. **worst\_trade\_pnl** `number` Worst realized PnL on a single token. **win\_count** `integer` Winning closed positions. **loss\_count** `integer` Losing closed positions. **avg\_hold\_time\_minutes** `number` Average time from first buy to first sell, in minutes. **period\_win\_rate\_distribution** `object` **period\_win\_rate\_distribution** **win\_count** `integer` Winning closed positions. A position is closed once at least 99 percent of the bought tokens are sold. **closed\_count** `integer` Closed positions. **win\_rate\_percentage** `number` Wins divided by closed positions, as a percentage. **above\_500** `integer` Tokens sold for at least 5x the buy. **above\_100\_to\_500** `integer` Tokens sold for 2x to 5x. **above\_zero\_to\_100** `integer` Tokens sold for more than 1x and less than 2x. **below\_zero** `integer` Tokens sold at a loss. **period\_active\_tokens** `object` **period\_active\_tokens** **active\_tokens\_count** `integer` Tokens with a remaining balance from the period's trades. **avg\_position\_size** `number` Average buy size (native). **still\_holding\_count** `integer` Tokens where less than 95 percent of the buy value was sold. **period\_history\_tokens** `array` **token** **mint** `string` Token mint or contract. **token\_name** `string` Token name. **token\_symbol** `string` Token symbol. **token\_logo** `string` Token logo URL. **buy\_value** `number` Total bought (native). **buy\_value\_usd** `number` Total bought in USD. **sell\_value** `number` Total sold (native). **sell\_value\_usd** `number` Total sold in USD. **buy\_tokens** `number` Tokens bought. **sell\_tokens** `number` Tokens sold. **remaining\_tokens** `number` Tokens bought minus tokens sold in the period. **realized\_pnl** `number` Realized PnL on this token (native). **realized\_pnl\_usd** `number` Realized PnL in USD. **realized\_pnl\_percentage** `number` Realized PnL percentage. **currency** `string` Native currency. **period\_realized\_pnl\_chart** `array` **chart point** **timestamp** `string` ISO timestamp, every 15 minutes from the start of the period to now. **realized\_pnl** `number` Cumulative realized PnL since the start of the period (native). **realized\_pnl\_usd** `number` Cumulative realized PnL in USD. **period\_trades** `array` **trade** **tx\_signature** `string` Transaction signature or hash. **mint** `string` Token mint or contract. **token\_name** `string` Token symbol or name. **token\_logo** `string` Token logo URL. **transaction\_type** `string` buy or sell. **buy\_value** `number` Trade value (native), on buys. Sells carry sell\_value instead. **buy\_value\_usd** `number` Trade value in USD, on buys. Sells carry sell\_value\_usd instead. **token\_amount** `number` Tokens bought or sold. **created\_at** `string` ISO timestamp of the trade. ```json Response theme={null} { "success": true, "data": { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "profile": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "csid", "kol": true, "active_hours": "13:00-21:00 UTC", "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "period_stats": { "period": "7d", "total_buy": 180.25, "total_buy_usd": 14840.6, "total_sell": 228.45, "total_sell_usd": 18809.2, "volume": 408.7, "volume_usd": 33649.8, "realized_pnl": 48.2, "realized_pnl_usd": 3968.6, "realized_pnl_percentage": 26.74, "buy_txn": 22, "sell_txn": 18, "largest_buy": 22.0, "best_trade_pnl": 31.4, "worst_trade_pnl": -8.9, "win_count": 14, "loss_count": 4, "avg_hold_time_minutes": 84.5 }, "period_win_rate_distribution": { "win_count": 14, "closed_count": 18, "win_rate_percentage": 77.78, "above_500": 1, "above_100_to_500": 4, "above_zero_to_100": 9, "below_zero": 4 }, "period_active_tokens": { "active_tokens_count": 3, "avg_position_size": 8.19, "still_holding_count": 3 }, "period_history_tokens": [ { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "token_symbol": "invisibull", "token_logo": "https://...", "buy_value": 1.66, "buy_value_usd": 137.44, "sell_value": 0.0, "sell_value_usd": 0.0, "buy_tokens": 22113972.03, "sell_tokens": 0.0, "realized_pnl": -1.66, "realized_pnl_usd": -137.44, "realized_pnl_percentage": -100.0, "currency": "SOL", "remaining_tokens": 22113972.03 } ], "period_realized_pnl_chart": [ { "timestamp": "2026-10-06T08:00:00Z", "realized_pnl": 0.0, "realized_pnl_usd": 0.0 }, { "timestamp": "2026-10-06T08:15:00Z", "realized_pnl": 0.0, "realized_pnl_usd": 0.0 }, { "timestamp": "2026-10-13T08:00:00Z", "realized_pnl": 48.2, "realized_pnl_usd": 3968.6 } ], "period_trades": [ { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "token_logo": "https://...", "transaction_type": "buy", "buy_token": null, "sell_token": null, "buy_value": 1.66, "buy_value_usd": 137.44, "token_amount": 22113972.03, "created_at": "2026-10-12T16:25:34Z", "tx_signature": "5xr8..." } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T08:00:00Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | blockchain or address is missing. | | 400 | invalid\_parameter | blockchain, period or address invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | scope\_not\_allowed | scope=global needs the Enterprise plan. | | 404 | wallet\_not\_found | The wallet does not count on this chain for one of your users: not payment-verified, and not an unverified wallet of one of your platform users (or `wallet_trust` is `verified_only`). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # Trade Feed Source: https://docs.cabalspy.xyz/cabalspy-id/trade-feed Your users add CabalSpy ID traders to their Trade Feed and get every trade and thesis of those traders, live: in your app through the Data API, webhooks and a stream, in embeddable widgets, and as Telegram alerts. The **Trade Feed** is a person's own timeline of traders. A user adds CabalSpy ID traders to it, and from then on sees every trade those traders make on their verified wallets, plus every thesis they post, newest first. Each trade is labeled (new position, added, sold x %, closed) and a sell carries its realized PnL when the entry is known. The Trade Feed is part of every CabalSpy ID account and works on every plan. Your platform can: * show and manage a user's Trade Feed from your backend with the [Data API](/cabalspy-id/trade-feed-api), * get every new trade and thesis for your users as a [webhook](/cabalspy-id/webhooks#trade-feed-events) or on the [Trade Feed stream](/cabalspy-id/trade-feed-api#live-stream), to send your own notifications, * drop a **+ Trade Feed** button and the feed itself into your pages with the [widgets](/cabalspy-id/trade-feed-widgets), * let users [copy](/cabalspy-id/copy-trading) the traders in their Trade Feed. ## Who has a Trade Feed Your app acts in the name of a user who: * signed in to your app with CabalSpy ID and granted the scope `trade_feed`, by `csid_id`, * or is one of your [platform users](/cabalspy-id/white-label), who always have the scope. The user must be within your plan's user limit. Others get 403 [consent\_required](/cabalspy-id/errors#consent_required). Request the scope at sign-in, for example with `data-scope="openid profile trade_feed"` on the [login button](/cabalspy-id/login-button). The consent screen shows it as "Add traders to your Trade Feed and get their trades". ## Who can be added * Any CabalSpy ID user whose **trading is public**. Traders who keep their trading private cannot be added ([trading\_private](/cabalspy-id/errors#trading_private)). * Your own platform users, on your platform. With network sharing switched on in your [settings](/cabalspy-id/platform-users-settings), on other platforms too. * Not the user themselves ([cannot\_add\_self](/cabalspy-id/errors#cannot_add_self)). A Trade Feed holds at most **300 traders** ([trade\_feed\_full](/cabalspy-id/errors#trade_feed_full)). A user can make at most 120 changes to their Trade Feed per hour ([rate\_limited](/cabalspy-id/errors#rate_limited)). When a trader switches their trading to private, they disappear from every Trade Feed (timeline, alerts, webhooks, copy trading) until they are public again. A trader's verified wallet addresses are public, so every trade carries the wallet and links to the explorer. Traders never see who added them, only in how many Trade Feeds they are. ## What appears in the feed | Item | Labels | | - | - | | A buy | `new`: nothing was held before (first buy, or the first buy after the position was closed). `add`: added to an open position. | | A sell | `partial`: sold part of the position, with `sold_percent`. `close`: the position is closed (at most 1 % of the bought tokens left). `sell`: the entry is unknown, for example tokens bought before the wallet was tracked. | | A thesis | The trader's [token thesis](/cabalspy-id/theses), with stance, text, likes and replies. | Trades on Solana, BNB Chain, Base, Ethereum and Robinhood Chain are included. The feed can be filtered to `buys`, `sells` or `theses`. ## Alerts and filters **Every trade is delivered.** Nothing is capped, sampled or merged away. Per trader, each user can narrow what they are alerted about: | Setting | Default | Effect | | - | - | - | | `notify_buys` | `true` | Alerts for buys. | | `notify_sells` | `true` | Alerts for sells. | | `notify_theses` | `true` | Alerts for theses. | | `min_sol`, `min_bnb`, `min_eth` | 0 | Only trades of at least this size in the chain's native coin: SOL on Solana, BNB on BNB Chain, ETH on Base, Ethereum and Robinhood Chain. 0 means every trade. Up to 1,000,000. | | `muted` | `false` | No alerts for this trader at all. | A newly added trader starts with the user's default alert settings from their CabalSpy ID settings. You can pass other values when you [add the trader](/cabalspy-id/trade-feed-api#add-a-trader). The filters decide which of your users are listed in a [webhook](/cabalspy-id/webhooks#trade-feed-events) or stream event, and what shows in [notifications](/cabalspy-id/trade-feed-api#notifications). The timeline itself always shows every trade. [Copy trading](/cabalspy-id/copy-trading) ignores the filters. **Telegram.** Users who linked Telegram get their alerts from the CabalSpy ID bot. When several trades wait for the same chat, they go out together in one message listing every trade. Your [platform users](/cabalspy-id/platform-users-telegram) only get Telegram alerts when **Telegram alerts for your users** is on in your [settings](/cabalspy-id/platform-users-settings). With **No CabalSpy ID branding** on, the alerts carry no CabalSpy ID wording or links. ## Endpoints | Method | Path | Description | | - | - | - | | GET | [/v1/trade-feed](/cabalspy-id/trade-feed-api#get-the-feed) | A user's Trade Feed, newest first. | | GET | [/v1/trade-feed/traders](/cabalspy-id/trade-feed-api#list-traders) | The traders in a user's Trade Feed, with their settings. | | POST | [/v1/trade-feed/traders](/cabalspy-id/trade-feed-api#add-a-trader) | Add a trader, or change the settings of one. | | POST | [/v1/trade-feed/traders/delete](/cabalspy-id/trade-feed-api#remove-a-trader) | Remove a trader. | | GET | [/v1/trade-feed/notifications](/cabalspy-id/trade-feed-api#notifications) | A user's recent alerts. | | WS | [/v1/trade-feed/stream](/cabalspy-id/trade-feed-api#live-stream) | Every new trade and thesis for your users, live. | | Webhook | [trade\_feed.trade, trade\_feed.thesis](/cabalspy-id/webhooks#trade-feed-events) | The same, pushed to your backend. | | Widget | [+ Trade Feed button and feed](/cabalspy-id/trade-feed-widgets) | Embeddable, no backend needed. | # Trade Feed API Source: https://docs.cabalspy.xyz/cabalspy-id/trade-feed-api GET /v1/trade-feed, the traders endpoints, notifications and the live stream: read and manage your users' Trade Feeds from your backend, and get every new trade and thesis for them. Server-side endpoints for the [Trade Feed](/cabalspy-id/trade-feed), on the Data API with your API key. Same base URL, authentication, envelope, rate limit and errors as the rest of the [Data API](/cabalspy-id/data-api). Every call acts in the name of one user: a person who signed in to your app with the scope `trade_feed`, or one of your [platform users](/cabalspy-id/white-label), within your plan's user limit. Every endpoint takes the user's `csid_id` or, for one of your platform users, your own `external_id`. `trader` is always a handle (with or without @) or a csid\_id. For one of your own platform users, pass `trader_external_id` instead. ## Get the feed `GET /v1/trade-feed` The user's Trade Feed, newest first: every trade and thesis of the traders in it. Traders who made their trading private are left out. ### Query Parameters **csid\_id** `string` The user's CabalSpy ID. Alternatively pass external\_id. **external\_id** `string` Your own user id, for one of your platform users. **filter** `string` (default: all) `all`, `buys`, `sells` or `theses`. **limit** `integer` (default: 30) Items per page, 1 to 100. **cursor** `string` Cursor for the next page, the pagination.next\_cursor from the previous response. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ### Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/trade-feed?csid_id=3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718&limit=30" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/trade-feed", params={"csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "filter": "buys"}, headers={"Authorization": "Bearer YOUR_KEY"}) for it in r.json()["data"]: t = it["trade"] print(it["trader"]["username"], t["side"], t["symbol"], t["amount_usd"], t["label"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ csid_id: "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", limit: "30" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/trade-feed?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data, pagination } = await res.json(); data.forEach(it => console.log(it.type, it.trader.username, it.timestamp)); ``` ### Response **data** `array` [Trade items](#the-trade-item) and [thesis items](#the-thesis-item), newest first. Each also carries `cursor`, its position in the feed. **pagination** `object` limit, has\_more and next\_cursor (pass it as cursor; null on the last page). ```json Response theme={null} { "success": true, "data": [ { "id": "t3b1f0c9e8d7a6b5c4d3e2f1a0b9c8d7e", "type": "trade", "timestamp": "2026-11-01T18:40:05Z", "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/1/maze_normal.jpg", "kol": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "trade": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "CPT", "name": "Copycat", "logo": "https://...", "side": "sell", "label": "partial", "sold_percent": 50.0, "amount_native": 1.5, "currency": "SOL", "amount_usd": 225.0, "token_amount": 500.0, "price_usd": 0.45, "pnl_usd": 150.0, "pnl_percent": 200.0, "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "wallet_url": "https://solscan.io/account/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "tx_signature": "2Bq7...", "tx_url": "https://solscan.io/tx/2Bq7..." }, "links": { "token": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "terminal": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "profile": "https://id.cabalspy.xyz/u/MazeCCC" }, "cursor": "MjAyNi0xMS0wMVQxODo0MDowNSswMDowMHx0M2Ix..." }, { "id": "h8a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d", "type": "thesis", "timestamp": "2026-11-01T18:21:44Z", "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/1/maze_normal.jpg", "kol": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "thesis": { "id": "8a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d", "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "CPT", "name": "Copycat", "logo": "https://...", "stance": "bull", "body": "Dev still holding, chart is coiling.", "likes": 12, "replies": 3, "url": "https://id.cabalspy.xyz/try/thesis?chain=solana&mint=3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump" }, "links": { "token": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "terminal": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "profile": "https://id.cabalspy.xyz/u/MazeCCC" }, "cursor": "MjAyNi0xMS0wMVQxODoyMTo0NCswMDowMHxoOGEx..." } ], "pagination": { "limit": 30, "next_cursor": null, "has_more": false }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:41:00Z" } } ``` ### Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | Neither csid\_id nor external\_id was sent. | | 404 | [platform\_user\_not\_found](/cabalspy-id/errors#platform_user_not_found) | No platform user with this external\_id. | | 400 | invalid\_parameter | csid\_id, filter, limit or cursor invalid. | | 403 | [consent\_required](/cabalspy-id/errors#consent_required) | The user has not granted your app the scope `trade_feed`, or is beyond your plan's user limit. | | 403 | [plan\_user\_limit](/cabalspy-id/errors#plan_user_limit) | The user signed in beyond your plan's user limit (an `anon_` id). | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | ## The trade item **id** `string` The trade's id, the same everywhere it appears (feed, webhook, stream, notifications). **type** `string` `trade`. **timestamp** `string` When the trade happened. **trader** `object` csid\_id, username, name, image\_url, kol and profile\_url. username and profile\_url are null for platform users. **trade** `object` **trade** **blockchain, mint** `string` The chain (solana, bnb, base, eth, rh) and token address. **symbol, name, logo** `string` Token info, any of them can be null. **side** `string` `buy` or `sell`. **label** `string` `new`, `add`, `partial`, `close` or `sell`. See [What appears in the feed](/cabalspy-id/trade-feed#what-appears-in-the-feed). **sold\_percent** `number` For `partial`: the share of the position sold, 0 to 100. Otherwise null. **amount\_native, currency** `number` Trade size in the chain's native coin (SOL, BNB or ETH). **amount\_usd** `number` Trade size in USD, or null when unknown. **token\_amount** `number` Tokens bought or sold. **price\_usd** `number` Price per token in USD, or null when unknown. **pnl\_usd, pnl\_percent** `number` Sells with a known entry: realized PnL of this sell against the average entry of the position. Otherwise null. **wallet, wallet\_url** `string` The trader's verified wallet and its explorer page. **tx\_signature, tx\_url** `string` The transaction and its explorer page. **links** `object` token (the CabalSpy Terminal on Solana and BNB Chain, otherwise the token's theses on CabalSpy ID), terminal (null outside Solana and BNB Chain) and profile. ## The thesis item **id** `string` `h` followed by the thesis id. **type** `string` `thesis`. **timestamp, trader, links** `object` As for a trade. **thesis** `object` id, blockchain, mint, symbol, name, logo, stance (`bull`, `bear` or null), body, likes, replies and url. See [Token theses](/cabalspy-id/theses). ## List traders `GET /v1/trade-feed/traders` The traders in the user's Trade Feed, most recently added first, with the user's alert and [copy](/cabalspy-id/copy-trading-settings) settings for each. ### Query Parameters **csid\_id** `string` The user's CabalSpy ID. Alternatively pass external\_id. **external\_id** `string` Your own user id, for one of your platform users. **limit** `integer` (default: 100) Traders per page, 1 to 300. **cursor** `string` Cursor for the next page. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/trade-feed/traders?csid_id=3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/trade-feed/traders", params={"csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718"}, headers={"Authorization": "Bearer YOUR_KEY"}).json() print(r["pagination"]["total"], "of", r["pagination"]["max"]) for t in r["data"]: print(t["trader"]["username"], t["settings"]["muted"], t["settings"]["copy"]["enabled"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/trade-feed/traders?csid_id=3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data } = await res.json(); data.forEach(t => console.log(t.trader.username, t.in_trade_feeds, t.trading_public)); ``` ### Response **data** `array` **entry** **trader** `object` csid\_id, username, name, image\_url, kol and profile\_url. **trading\_public** `boolean` `false` while the trader keeps their trading private. They stay in the list but nothing of them shows in the feed. **added\_at** `string` When the user added the trader. **in\_trade\_feeds** `integer` In how many Trade Feeds the trader is. **settings** `object` notify\_buys, notify\_sells, notify\_theses, min\_native (`{"SOL", "BNB", "ETH"}`), muted, and copy (the [copy settings](/cabalspy-id/copy-trading-settings)). **pagination** `object` limit, total (traders in the Trade Feed), max (300), has\_more and next\_cursor. ```json Response theme={null} { "success": true, "data": [ { "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/1/maze_normal.jpg", "kol": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "trading_public": true, "added_at": "2026-10-20T09:12:00+00:00", "in_trade_feeds": 128, "settings": { "notify_buys": true, "notify_sells": true, "notify_theses": true, "min_native": { "SOL": 0.5, "BNB": 0.0, "ETH": 0.0 }, "muted": false, "copy": { "enabled": true, "mode": "fixed_usd", "amount_usd": 25.0, "percent": 100.0, "max_usd": 20.0, "sides": "both", "slippage_bps": 300, "updated_at": "2026-11-01T17:58:40Z" } } } ], "pagination": { "limit": 100, "total": 1, "max": 300, "next_cursor": null, "has_more": false }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:00:00Z" } } ``` ## Add a trader `POST /v1/trade-feed/traders` Adds a trader to the user's Trade Feed, with the user's default alert settings unless you pass others. Answers **201** when the trader was added, **200** when they were already there; then the settings you pass are updated. ### Body **csid\_id** `string` The user's CabalSpy ID. Alternatively pass external\_id. **external\_id** `string` The user, by your own user id. **trader** `string` *required* Handle (with or without @) or csid\_id. Alternatively pass trader\_external\_id. **trader\_external\_id** `string` One of your own platform users, by your user id. **notify\_buys, notify\_sells, notify\_theses** `boolean` Alerts for buys, sells and theses of this trader. **min\_sol, min\_bnb, min\_eth** `number` Minimum trade size in the native coin for alerts, 0 to 1,000,000. 0 means every trade. **muted** `boolean` No alerts for this trader. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/trade-feed/traders" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412", "trader": "@MazeCCC", "min_sol": 0.5}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/trade-feed/traders", json={"csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "trader": "MazeCCC", "notify_sells": False}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.status_code, r.json()["data"]["created"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/trade-feed/traders", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412", trader_external_id: "user_77" }), }); console.log(res.status, (await res.json()).data.settings); ``` ```json Response theme={null} { "success": true, "data": { "in_trade_feed": true, "created": true, "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/1/maze_normal.jpg", "kol": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "settings": { "notify_buys": true, "notify_sells": true, "notify_theses": true, "min_native": { "SOL": 0.5, "BNB": 0.0, "ETH": 0.0 }, "muted": false, "copy": { "enabled": false, "mode": "fixed_usd", "amount_usd": 50.0, "percent": 100.0, "max_usd": null, "sides": "both", "slippage_bps": 300, "updated_at": null } } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:00:00Z" } } ``` ### Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | No user or no trader was sent. | | 400 | invalid\_parameter | A minimum trade size is not a number from 0 to 1,000,000. | | 400 | [cannot\_add\_self](/cabalspy-id/errors#cannot_add_self) | The user tried to add themselves. | | 403 | [consent\_required](/cabalspy-id/errors#consent_required) | The user has not granted your app the scope `trade_feed`, or is beyond your plan's user limit. | | 403 | [trading\_private](/cabalspy-id/errors#trading_private) | The trader keeps their trading private. | | 404 | [platform\_user\_not\_found](/cabalspy-id/errors#platform_user_not_found) | No platform user with this external\_id or trader\_external\_id. | | 404 | [trader\_not\_found](/cabalspy-id/errors#trader_not_found) | No CabalSpy ID trader with this handle or csid\_id. | | 409 | [trade\_feed\_full](/cabalspy-id/errors#trade_feed_full) | The Trade Feed already has 300 traders. | | 429 | [rate\_limited](/cabalspy-id/errors#rate_limited) | More than 120 Trade Feed changes for this user in an hour. | ## Remove a trader `POST /v1/trade-feed/traders/delete` Removes a trader from the user's Trade Feed. This also ends [copying](/cabalspy-id/copy-trading) of that trader. `removed` is `false` when the trader was not in the Trade Feed. ### Body **csid\_id** `string` The user's CabalSpy ID. Alternatively pass external\_id. **external\_id** `string` The user, by your own user id. **trader** `string` *required* Handle or csid\_id. Alternatively pass trader\_external\_id. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/trade-feed/traders/delete" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"external_id": "user_8412", "trader": "MazeCCC"}' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/trade-feed/traders/delete", json={"csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "trader": "MazeCCC"}, headers={"Authorization": "Bearer YOUR_KEY"}) print(r.json()["data"]["removed"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/trade-feed/traders/delete", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ external_id: "user_8412", trader: "MazeCCC" }), }); console.log((await res.json()).data); ``` ```json Response theme={null} { "success": true, "data": { "in_trade_feed": false, "removed": true }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:00:00Z" } } ``` ## Notifications `GET /v1/trade-feed/notifications` The user's recent Trade Feed alerts, newest first: every trade and thesis that passed the user's [filters](/cabalspy-id/trade-feed#alerts-and-filters) for that trader. Useful to show an alert inbox when you do not use webhooks. ### Query Parameters **csid\_id** `string` The user's CabalSpy ID. Alternatively pass external\_id. **external\_id** `string` Your own user id, for one of your platform users. **limit** `integer` (default: 50) Alerts per page, 1 to 100. **cursor** `string` Cursor for the next page. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/trade-feed/notifications?csid_id=3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718&limit=20" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/trade-feed/notifications", params={"csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718"}, headers={"Authorization": "Bearer YOUR_KEY"}) for n in r.json()["data"]: print(n["created_at"], n["text"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/trade-feed/notifications?csid_id=3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", { headers: { Authorization: "Bearer YOUR_KEY" }, }); (await res.json()).data.forEach(n => console.log(n.event, n.text)); ``` **data** `array` id (a number), event (`trade_feed.trade` or `trade_feed.thesis`), text (a ready-made line in plain text), created\_at and data (the [trade item](#the-trade-item) or [thesis item](#the-thesis-item)). ```json Response theme={null} { "success": true, "data": [ { "id": 48213, "event": "trade_feed.trade", "text": "Trade Feed: @MazeCCC sold $CPT — 1.5 SOL ($225) · sold 50% · PnL +$150 (+200%)", "created_at": "2026-11-01T18:40:06Z", "data": { "id": "t3b1f0c9e8d7a6b5c4d3e2f1a0b9c8d7e", "type": "trade", "...": "the trade item" } } ], "pagination": { "limit": 50, "next_cursor": null, "has_more": false }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-11-01T18:41:00Z" } } ``` ## Live stream `wss://api-id.cabalspy.xyz/v1/trade-feed/stream?api_key=YOUR_KEY` Every new trade and thesis that concerns your users, live, on every plan. Each event says which of your users to tell: `recipients` lists the `csid_id` of your users who have the trader in their Trade Feed and whose filters let the event through, and `recipients_external` your own ids of those who are platform users. Events nobody of yours should get are not sent. Pass the key as `api_key`, `apiKey` or an Authorization Bearer header, and `instance` when your account has several instances. | Event | When | Fields | | - | - | - | | `ready` | Right after connecting. | `data.events`: `["trade_feed.trade", "trade_feed.thesis"]`. | | `trade_feed.trade` | A trader in your users' Trade Feeds traded. | `id` (event id), `data`: the [trade item](#the-trade-item) plus `recipients` and `recipients_external`. | | `trade_feed.thesis` | A trader posted a thesis. | `id`, `data`: the [thesis item](#the-thesis-item) plus `recipients` and `recipients_external`. | | `heartbeat` | After 30 seconds without a message from you. | `ts`: Unix time in seconds. | | `pong` | After you send `ping`. | None. | | `error` | The connection is refused. | `error.code` and `error.message`, then the server closes with code 4403. | ```javascript JavaScript theme={null} const ws = new WebSocket("wss://api-id.cabalspy.xyz/v1/trade-feed/stream?api_key=YOUR_KEY"); ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === "trade_feed.trade") { const { trader, trade, recipients_external } = msg.data; recipients_external.forEach(uid => notify(uid, `${trader.username} ${trade.side === "buy" ? "bought" : "sold"} ${trade.symbol}`)); } }; ``` ```python Python theme={null} import asyncio, json, websockets async def main(): async with websockets.connect("wss://api-id.cabalspy.xyz/v1/trade-feed/stream?api_key=YOUR_KEY") as ws: async for raw in ws: msg = json.loads(raw) if msg["event"] in ("trade_feed.trade", "trade_feed.thesis"): print(msg["event"], msg["data"]["trader"]["username"], msg["data"]["recipients"]) asyncio.run(main()) ``` ```json trade_feed.trade theme={null} { "event": "trade_feed.trade", "id": "0f6c2a9e-3d1b-5c7e-9a2f-4b8d6e1c3a5f", "data": { "id": "t3b1f0c9e8d7a6b5c4d3e2f1a0b9c8d7e", "type": "trade", "timestamp": "2026-11-01T18:40:05Z", "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "...": "..." }, "trade": { "side": "sell", "label": "partial", "sold_percent": 50.0, "...": "the trade" }, "links": { "...": "..." }, "recipients": ["3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718"], "recipients_external": ["user_8412"] } } ``` Send `ping` at any time for a `pong`. After 30 seconds of silence the server sends a `heartbeat` and checks that your key is still valid. Each API key can hold at most 5 Trade Feed stream connections, counted separately from the other streams; more get `too_many_connections`. Events made while you were disconnected are not replayed; read [Notifications](#notifications) or the feed to catch up. The same events are available as [webhooks](/cabalspy-id/webhooks#trade-feed-events). # Trade Feed widgets Source: https://docs.cabalspy.xyz/cabalspy-id/trade-feed-widgets Embed a + Trade Feed button on trader profiles and the signed-in user's live Trade Feed on any page, with one script tag and your instance's public client_id. Includes the browser API behind them. Two widgets bring the [Trade Feed](/cabalspy-id/trade-feed) into your pages without a backend. Both come from the same `widget.js` as the [login button](/cabalspy-id/login-button) and the [thesis widget](/cabalspy-id/theses#path-1-the-widget): * **+ Trade Feed button** for one trader: adds the trader to the signed-in user's Trade Feed, or removes them. Shows in how many Trade Feeds the trader is. * **Trade Feed**: the signed-in user's feed, live, with filters for buys, sells and theses. ```html theme={null}
``` > [!NOTE] > > `data-client-id` is your instance's public client\_id (Instance ID, `csid_...`), shown in the [API Dashboard](https://apidashboard.cabalspy.xyz) under **CabalSpy ID**, **Instances**. It is not the API key and not a secret. If it is missing, `widget.js` uses the client id of a `data-csid-login` button on the same page. The widgets only load on your instance's sites, the same as the thesis widget, see [Client ID](/cabalspy-id/theses-browser-api#client-id). ## + Trade Feed button Put it next to a trader's name or on their profile page. ```html theme={null}
``` * Signed out, a click opens the sign-in (see [Sign-in](#sign-in)) and adds the trader right after. * In the Trade Feed, the button shows **In Trade Feed ✓**. A click asks **Remove from Trade Feed?** and a second click within 4 seconds removes the trader. * For traders who keep their trading private, and on the user's own profile, the button is disabled. * With `data-show-count`, it shows "in N Trade Feeds" next to the button. `data-trader` takes a handle (with or without @) or a csid\_id. ## Trade Feed ```html theme={null}
``` Shows the signed-in user's Trade Feed with the same items as the [Data API](/cabalspy-id/trade-feed-api#get-the-feed): trades with labels, amounts, PnL of sells, wallet and transaction links, and theses. New items appear at the top within a few seconds, and **Load more** pages back. Signed out, it shows **Sign in to see your Trade Feed**. The footer links to the user's Trade Feed settings on CabalSpy ID, where they manage traders and alert filters. Instances with **No CabalSpy ID branding** on do not show this link. ## Attributes The widgets use the design you saved for your instance's thesis widget on the [Theses](/cabalspy-id/dashboard#theses) tab. Every attribute overrides it for that one embed. | Attribute | Widget | Values | | - | - | - | | `data-client-id` | Both | Required. Your Instance ID. Falls back to the client id of a `data-csid-login` button on the page. | | `data-trader` | Button | Required. Handle (with or without @) or csid\_id. | | `data-size` | Button | `sm`, `md` (default) or `lg`. | | `data-show-count` | Button | `true` (default) or `false`. | | `data-width` | Button | Width in pixels. Default 290, or 170 without the count. | | `data-filter` | Feed | Starting filter: `all` (default), `buys`, `sells` or `theses`. | | `data-show-header` | Feed | `true` (default) or `false`. The header shows "Trade Feed" and the user's handle and number of traders. | | `data-show-filters` | Feed | `true` (default) or `false`, the All / Buys / Sells / Theses switch. | | `data-theme` | Both | `dark` or `light`. | | `data-font` | Both | `system`, `inter`, `mono` or `serif`. | | `data-radius` | Both | Corner radius, 0 to 24. | | `data-bg`, `data-card`, `data-text`, `data-muted`, `data-border`, `data-accent`, `data-accent-text`, `data-bull`, `data-bear` | Both | Colours as hex, for example `#3ddc84`. | | `data-frameless` | Both | `true`: no frame of its own, for use inside your own card. | | `data-height` | Both | Starting height in pixels. The widget then grows with its content. | | `data-max-height` | Feed | Height cap in pixels. Beyond it, the feed scrolls. | ## Sign-in The widgets share their sign-in with the thesis widget. Who is signed in comes from, in this order: * **The login button.** With the [login button](/cabalspy-id/login-button) on the page and the scope requested, for example `data-scope="openid profile trade_feed"`, the widgets are signed in right after the user signs in. The access token must carry the scope `trade_feed`. * **Your own token.** Server apps, or pages with their own session, pass the user's CabalSpy ID access token (scope `trade_feed`) themselves: ```javascript theme={null} CSID.tradeFeed.setAccessToken(accessToken); // after your sign-in, or when you refresh tokens CSID.tradeFeed.clear(); // on sign-out ``` * **Your own sign-in flow.** `CSID.tradeFeed.setSignInHandler(fn)` takes over the widgets' sign-in buttons, exactly as [for the thesis widget](/cabalspy-id/theses#your-own-sign-in): `fn` fetches a token for the user, calls `CSID.tradeFeed.setAccessToken(token)` and resolves `true`, or resolves `false` when nobody is signed in. * **The popup.** Without any of these, the user signs in with CabalSpy ID in a popup. `CSID.tradeFeed` and `CSID.thesis` are the same object, so one call signs in both kinds of widgets. A token without the scope `trade_feed` is refused with `scope_missing`. ## Browser API The widgets run on a small public API on id.cabalspy.xyz. Client-side apps can use it directly to build their own Trade Feed UI, without a backend and without an API key. It works like the thesis [browser API](/cabalspy-id/theses-browser-api): every call carries your public client\_id as the `X-CSID-Client-Id` header or the `client_id` query parameter, and browser calls are only answered from your instance's sites. ```text theme={null} https://id.cabalspy.xyz/trade-feed/v1 ``` Calls marked Bearer need the user's token as `Authorization: Bearer `: a CabalSpy ID access token of your instance with the scope `trade_feed`, or a widget token from the session exchange. | Method | Path | Auth | Description | | - | - | - | - | | GET | `/traders/{trader}` | Optional | `trader`, `trading_public`, `in_trade_feeds`, and with a token `signed_in`, `is_self` and `in_trade_feed`. | | POST | `/traders/{trader}` | Bearer | Add the trader to the user's Trade Feed. 201 when added, 200 when already there. Returns `in_trade_feed`, `created`, `trader` and `in_trade_feeds`. | | DELETE | `/traders/{trader}` | Bearer | Remove the trader. Returns `in_trade_feed: false`, `removed` and `in_trade_feeds`. | | GET | `/feed?filter=&limit=&cursor=&after=` | Bearer | The user's Trade Feed as in the [Data API](/cabalspy-id/trade-feed-api#get-the-feed). `next_cursor` is at the top level of the response. `after` (an item's `cursor`) returns only newer items, oldest first, for live updates. | | GET | `/me` | Bearer | `user` (csid\_id, username, name, image\_url), `traders` (Trade Feed size), `max_traders` and `manage_url`. | | POST | `/session/exchange` | Bearer | Swap an access token for a widget token valid for 2 hours: `token` and `expires_in`. | `{trader}` is a handle or csid\_id. Responses are `{"success": true, "data": ...}` or `{"success": false, "error": {"code", "message"}}`. ```javascript theme={null} const H = { "X-CSID-Client-Id": "csid_...", Authorization: "Bearer " + accessToken }; const base = "https://id.cabalspy.xyz/trade-feed/v1"; await fetch(`${base}/traders/MazeCCC`, { method: "POST", headers: H }); // + Trade Feed const feed = await (await fetch(`${base}/feed?limit=20&filter=buys`, { headers: H })).json(); feed.data.forEach(it => console.log(it.trader.username, it.trade.symbol, it.trade.label)); ``` | Code | Status | Meaning | | - | - | - | | [client\_id\_required](/cabalspy-id/errors#client_id_required) | 401 | No client\_id was sent. | | [invalid\_client](/cabalspy-id/errors#invalid_client) | 401 | Unknown, suspended or deleted instance. | | [origin\_not\_allowed](/cabalspy-id/errors#origin_not_allowed) | 403 | The page is not one of your instance's sites. | | [sign\_in\_required](/cabalspy-id/errors#sign_in_required) | 401 | No token was sent. | | [invalid\_token](/cabalspy-id/errors#invalid_token) | 401 | Token invalid or expired, access revoked, or the account is not active. | | [scope\_missing](/cabalspy-id/errors#scope_missing) | 403 | The access token lacks the scope `trade_feed`. | | [plan\_user\_limit](/cabalspy-id/errors#plan_user_limit) | 403 | The user signed in beyond your plan's user limit. | | [sandbox\_user](/cabalspy-id/errors#sandbox_user) | 403 | Sandbox test users have no Trade Feed. | | [trader\_not\_found](/cabalspy-id/errors#trader_not_found), [trading\_private](/cabalspy-id/errors#trading_private), [cannot\_add\_self](/cabalspy-id/errors#cannot_add_self), [trade\_feed\_full](/cabalspy-id/errors#trade_feed_full) | 404, 403, 400, 409 | As in the [Data API](/cabalspy-id/trade-feed-api#add-a-trader). | | [rate\_limited](/cabalspy-id/errors#rate_limited) | 429 | Too many Trade Feed changes for this user, or too many session requests from one IP address. | To manage Trade Feeds from your server with your API key, use the [Trade Feed API](/cabalspy-id/trade-feed-api) instead. # Users Source: https://docs.cabalspy.xyz/cabalspy-id/users GET /v1/users: the people who signed in to your platform with CabalSpy ID, newest first, with X profile, KOL badge and verified wallets. The people who signed in to your platform with CabalSpy ID, newest first. Each entry has the X profile, the KOL badge and the verified wallets. Only users within your plan's user limit are listed. Users who signed in with Telegram or Google and have no X account have `x` and `twitter` set to null, see [Users without X](/cabalspy-id/openid-connect#users-without-x). Use it to sync your user base, to build a directory of verified traders, or to find every KOL on your platform with `kol=true`. > [!TIP] > > The list is paginated. Read pagination.next\_cursor from the response and pass it back as cursor to fetch the next page. When next\_cursor is null you have reached the end. ## Query Parameters **limit** `integer` (default: 50) Users per page, 1 to 100. **kol** `string` `true` returns only users with the KOL badge. **cursor** `string` Cursor for the next page, the pagination.next\_cursor from the previous response. **scope** `string` (default: instance) `global` lists every CabalSpy ID user. Enterprise plan only. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/users?limit=50&kol=true" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests H = {"Authorization": "Bearer YOUR_KEY"} params = {"limit": 100} while True: r = requests.get("https://api-id.cabalspy.xyz/v1/users", params=params, headers=H).json() for u in r["data"]: print(u["username"], u["kol"]["badge"], len(u["wallets"]), "wallets") if not r["pagination"]["next_cursor"]: break params["cursor"] = r["pagination"]["next_cursor"] ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ limit: "50", kol: "true" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/users?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const { data, pagination } = await res.json(); data.forEach(u => console.log(u.username, u.wallets.length)); ``` ## Response **success** `boolean` True on success. **data** `array` **user** **csid\_id** `string` The user's id, the `sub` of their ID token. **username** `string` X handle, or `tg.` / `id.<10 hex characters>` for users without X. **name** `string` Display name. **image\_url** `string` Avatar URL. **bio** `string` X bio, null without X. **twitter** `string` X profile link, null without X. **telegram** `string` Link to the verified Telegram account (`https://t.me/`), or an empty string. **x** `object` X account: id, followers, following, verified, verified\_type. Null without X. **kol** `object` badge (boolean) and since (ISO timestamp the badge was granted, or null). **profile\_url** `string` Public CabalSpy ID profile. **wallets** `array` Verified wallets: address, family, chains, verified\_at. **joined\_at** `string` When the CabalSpy ID was created. **pagination** `object` **pagination** **limit** `integer` Users per page. **total** `integer` Total users matching the filter. **has\_more** `boolean` Whether more pages follow. **next\_cursor** `string` Cursor for the next page (null means end). ```json Response theme={null} { "success": true, "data": [ { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "bio": "onchain since 2020", "twitter": "https://x.com/MazeCCC", "telegram": "", "x": { "id": "1440000000000000000", "followers": 48210, "following": 812, "verified": true, "verified_type": "blue" }, "kol": { "badge": true, "since": "2026-10-10T12:00:00Z" }, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC", "wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"], "verified_at": "2026-10-09T14:21:07Z" } ], "joined_at": "2026-10-09T14:02:51Z" } ], "pagination": { "limit": 50, "total": 1, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | limit, cursor or scope invalid. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | scope\_not\_allowed | scope=global needs the Enterprise plan. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | See [Errors](/cabalspy-id/errors) for the full list. # Wallet lookup Source: https://docs.cabalspy.xyz/cabalspy-id/wallet-lookup GET /v1/wallets/lookup: which of your users verified a wallet, proven by an on-chain payment from it. Which of your users owns a wallet. A wallet belongs to a CabalSpy ID user once they proved it with an on-chain payment from that wallet, so the answer is verified, not self-reported. Use it to attach a name and an X profile to a wallet you see in a trade, a leaderboard or a holder list. The address is matched on every chain, EVM addresses case-insensitively. ## Query Parameters **address** `string` *required* The wallet address to look up. **scope** `string` (default: instance) `global` searches every CabalSpy ID user. Enterprise plan only. **instance** `string` Your Instance ID. Only needed when your account has several instances. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api-id.cabalspy.xyz/v1/wallets/lookup?address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW" \ -H "Authorization: Bearer YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api-id.cabalspy.xyz/v1/wallets/lookup", params={"address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW"}, headers={"Authorization": "Bearer YOUR_KEY"}) if r.status_code == 404: print("not a verified wallet of your users") else: d = r.json()["data"] print(d["owner"]["username"], d["wallet"]["chains"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW" }); const res = await fetch(`https://api-id.cabalspy.xyz/v1/wallets/lookup?${p}`, { headers: { Authorization: "Bearer YOUR_KEY" }, }); const body = await res.json(); if (body.success) console.log(body.data.owner.username, body.data.wallet.chains); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **address** `string` The address you asked for. **verified** `boolean` Always true on success. **wallet** `object` **wallet** **address** `string` Wallet address as verified. **family** `string` solana or evm. **chains** `array` Chains the wallet is verified on. **verified\_at** `string` When the wallet was verified. **owner** `object` The owner's profile, the same fields as [Profile](/cabalspy-id/profile) without the wallets list: csid\_id, username, name, image\_url, bio, twitter, telegram, x, kol, profile\_url, joined\_at. `twitter`, `bio` and `x` are null for users without X. ```json Response theme={null} { "success": true, "data": { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "verified": true, "wallet": { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"], "verified_at": "2026-10-09T14:21:07Z" }, "owner": { "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/.../photo.jpg", "bio": "onchain since 2020", "twitter": "https://x.com/MazeCCC", "telegram": "", "x": { "id": "1440000000000000000", "followers": 48210, "following": 812, "verified": true, "verified_type": "blue" }, "kol": { "badge": true, "since": "2026-10-10T12:00:00Z" }, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC", "joined_at": "2026-10-09T14:02:51Z" } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "v1", "timestamp": "2026-10-13T08:04:11Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | address is missing. | | 401 | missing\_api\_key | API key missing. | | 403 | invalid\_api\_key | API key invalid. | | 403 | product\_not\_enabled | The key is not enabled for the CabalSpy ID API (API keys page, Works with). | | 403 | scope\_not\_allowed | scope=global needs the Enterprise plan. | | 404 | profile\_not\_found | The wallet is not verified by one of your users. | | 429 | rate\_limit\_exceeded | Rate limit exceeded. | # Webhooks Source: https://docs.cabalspy.xyz/cabalspy-id/webhooks Get notified when your users verify or remove a wallet, update their profile, receive the KOL badge or revoke access, about Trade Feed trades and copy trading instructions, and about platform users, competitions and callouts. Signed with Standard Webhooks. Webhooks tell your backend when something changes for your users, so you do not have to poll. Set the webhook URL, choose the events and copy the signing secret in the dashboard on the instance's [Webhooks](/cabalspy-id/dashboard#webhooks) tab. There you can also send a test event, roll the signing secret, remove the webhook and see the recent deliveries. Deliveries follow the [Standard Webhooks](https://www.standardwebhooks.com) specification, so you can verify them with its libraries for any language. ## Events An event is sent to your instance when the user has signed in to it, your webhook subscribes to that event, and the user granted the scope the event needs. Events are only sent for users within your plan's user limit. | Event | Scope | When | | - | - | - | | `wallet.verified` | `wallets` | The user verified a wallet with an on-chain payment. | | `wallet.removed` | `wallets` | The user removed a verified wallet. | | `profile.updated` | `profile` | The user signed in again and their X profile was refreshed. | | `kol.granted` | `profile` | The user received the KOL badge. | | `kol.rejected` | `profile` | A KOL badge application was declined; `data.note` says why. | | `consent.revoked` | `openid` | The user no longer shares data with your app. | | `thesis.created` | `thesis` | The user posted a [thesis](/cabalspy-id/theses), on your platform or any other. | | `thesis.reply` | `thesis` | The user replied to a thesis. | | `thesis.reaction` | `thesis` | The user added or removed a reaction. | | `trade_feed.trade` | `trade_feed` | A trader in your users' [Trade Feeds](/cabalspy-id/trade-feed) traded. See [Trade Feed events](#trade-feed-events). | | `trade_feed.thesis` | `trade_feed` | A trader in your users' Trade Feeds posted a thesis. | | `copy_trade.instruction` | `trade_feed` | A copied trader traded: a ready-to-execute instruction for one user. See [Copy trading events](#copy-trading-events). | | `platform_user.created` | `openid` | You created a [platform user](/cabalspy-id/white-label). See [White-Label events](#white-label-events). | | `platform_user.merged` | `openid` | Your user proved an identity of their own CabalSpy ID; their `csid_id` changed. | | `platform_user.self_managed` | `openid` | Your user signed in to their CabalSpy ID themselves and manages it now. | | `platform_user.claimed` | `openid` | No longer sent (claim links are gone). | | `platform_user.x_connected` | `openid` | A platform user connected X. | | `platform_user.telegram_linked` | `openid` | A platform user linked Telegram. | | `wallet.added` | `wallets` | A wallet was added to a platform user without payment verification. | | `verification.expired` | `wallets` | A wallet verification you started for a platform user expired unpaid. | | `competition.started` | `openid` | A [competition](/cabalspy-id/competitions) started. See [Competition events](#competition-events). | | `competition.updated` | `openid` | A competition rule was changed. | | `competition.standings` | `openid` | New standings were computed. | | `competition.ended` | `openid` | A competition ended or was cancelled. | | `callout.created` | `openid` | A user made a [callout](/cabalspy-id/callouts). See [Callout events](#callout-events). | | `callout.milestone` | `openid` | A callout reached 2, 3, 5, 10, 20, 50 or 100x. | | `callout.scored` | `openid` | A callout's first 24 hours were scored. | | `callout.final` | `openid` | Tracking of a callout stopped. | | `webhook.test` | none | You sent a test event from the dashboard. | ## Payload Every delivery is a `POST` with a JSON body. **id** `string` Event id. The same on every retry, deduplicate on it. **type** `string` Event type, for example `wallet.verified`. **created\_at** `string` When the event happened (ISO 8601). **sandbox** `boolean` True for events of a sandbox instance. **data** `object` Event data. Always contains `sub`, the user's id, plus the fields below. ```json wallet.verified theme={null} { "id": "6f1d2c9e-8b0a-4f7e-9a51-3c2d1e0f4b7a", "type": "wallet.verified", "created_at": "2026-10-12T14:21:07.402113+00:00", "sandbox": false, "data": { "sub": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chain": "solana", "tx": "5xr8..." } } ``` ```json wallet.removed theme={null} { "id": "...", "type": "wallet.removed", "created_at": "...", "sandbox": false, "data": { "sub": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana" } } ``` ```json profile.updated theme={null} { "id": "...", "type": "profile.updated", "created_at": "...", "sandbox": false, "data": { "sub": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "preferred_username": "MazeCCC", "name": "Maze", "picture": "https://pbs.twimg.com/profile_images/.../photo.jpg", "followers": 48210, "following": 812, "posts": 15320 } } ``` ```json kol.granted theme={null} { "id": "...", "type": "kol.granted", "created_at": "...", "sandbox": false, "data": { "sub": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "preferred_username": "MazeCCC" } } ``` ```json consent.revoked theme={null} { "id": "...", "type": "consent.revoked", "created_at": "...", "sandbox": false, "data": { "sub": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "reason": "user_removed_access" } } ``` `thesis.created` carries the new thesis in `data.thesis`, the same object as in [List theses](/cabalspy-id/theses-list#response): ```json thesis.created theme={null} { "id": "...", "type": "thesis.created", "created_at": "...", "sandbox": false, "data": { "sub": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "thesis": { "id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "kind": "thesis", "body": "Strong community, still early.", "stance": "bull", "via": "Example Terminal", "...": "the full thesis object" } } } ``` Thesis events go to the apps of the person who acted: the author of a thesis or reply, or the person who reacted. `thesis.reply` carries the reply in `data.reply`. `thesis.reaction` carries the post and the change: ```json thesis.reply theme={null} { "id": "...", "type": "thesis.reply", "created_at": "...", "sandbox": false, "data": { "sub": "5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19", "reply": { "id": "2a9c7e10-4b3d-4f5e-8a6b-7c8d9e0f1a2b", "kind": "reply", "parent_id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "body": "Nice call", "...": "the full reply object" } } } ``` ```json thesis.reaction theme={null} { "id": "...", "type": "thesis.reaction", "created_at": "...", "sandbox": false, "data": { "sub": "5e2d8c41-7a9b-4c3e-b1f0-6d5e4c3b2a19", "thesis_id": "8d1f5a2e-6c4b-4e0f-9a7d-1b2c3d4e5f60", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "emoji": "🚀", "on": true, "reactions": { "like": 5, "🚀": 3 } } } ``` `thesis.reaction` is only sent when the reaction actually changed, `on` is `true` for added and `false` for removed. `consent.revoked` carries a `reason`: `user_removed_access` (the user removed your app), `blocked_by_platform` (you blocked the user in the dashboard) or `account_deleted` (the user deleted their CabalSpy ID). Delete the user's data you got from CabalSpy ID when you receive it. Their refresh tokens are already revoked. ## White-Label events These events concern your [platform users](/cabalspy-id/white-label) and are only sent to the instance the user belongs to. Besides `data.sub`, every event about one of your platform users carries `data.external_id` (your own user id) and `data.csid_id`, so you can match it to your user without a lookup. Platform users hold every scope these events need. ```json platform_user.created theme={null} { "id": "...", "type": "platform_user.created", "created_at": "...", "sandbox": false, "data": { "sub": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "wallets": [ { "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "family": "solana", "chains": ["solana"] } ] } } ``` ```json wallet.added theme={null} { "id": "...", "type": "wallet.added", "created_at": "...", "sandbox": false, "data": { "sub": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "address": "0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01", "family": "evm", "chains": ["base", "eth"], "source": "dynamic", "verified": false } } ``` ```json platform_user.merged theme={null} { "id": "...", "type": "platform_user.merged", "created_at": "...", "sandbox": false, "data": { "sub": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "external_id": "user_8412", "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "previous_csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "reason": "x_connected", "skipped_wallets": [] } } ``` ```json platform_user.self_managed theme={null} { "id": "...", "type": "platform_user.self_managed", "created_at": "...", "sandbox": false, "data": { "sub": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11", "external_id": "user_8412", "csid_id": "0b7c4a52-3f1e-4f43-9d0a-2b5e7c1d9a11" } } ``` ```json platform_user.x_connected theme={null} { "id": "...", "type": "platform_user.x_connected", "created_at": "...", "sandbox": false, "data": { "sub": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "x": { "id": "1440000000000000000", "username": "MazeCCC", "name": "Maze" } } } ``` ```json platform_user.telegram_linked theme={null} { "id": "...", "type": "platform_user.telegram_linked", "created_at": "...", "sandbox": false, "data": { "sub": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "telegram": { "username": "maze_trades" } } } ``` ```json verification.expired theme={null} { "id": "...", "type": "verification.expired", "created_at": "...", "sandbox": false, "data": { "sub": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "verification_id": "c4d5e6f7-8a9b-4c0d-9e1f-2a3b4c5d6e7f", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "chain": "solana", "family": "solana" } } ``` `wallet.added` is sent once per wallet that was added or got new chains, with only the new chains. In `platform_user.merged`, `sub` is the person's own CabalSpy ID, which is the user's `csid_id` from now on, `previous_csid_id` the account your platform had created, and `reason` the proof: `x_connected`, `telegram_linked` or `wallet_verified`. `skipped_wallets` lists wallets you reported that did not fit the person's limit of 5 Solana and 5 EVM wallets. `verification.expired` is not sent for verifications you cancelled. ## Competition events [Competition](/cabalspy-id/competitions) events concern your instance, not a single user. ```json competition.started theme={null} { "id": "...", "type": "competition.started", "created_at": "...", "sandbox": false, "data": { "competition_id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "name": "Weekend PnL Cup", "started_at": "2026-11-01T18:00:00Z", "ends_at": "2026-11-03T18:00:00Z", "participants": 214 } } ``` ```json competition.updated theme={null} { "id": "...", "type": "competition.updated", "created_at": "...", "sandbox": false, "data": { "competition_id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "rules_version": 2, "during": "running", "changes": { "duration_hours": { "from": 48.0, "to": 72.0 } }, "note": "Extended by one day after the outage." } } ``` ```json competition.standings theme={null} { "id": "...", "type": "competition.standings", "created_at": "...", "sandbox": false, "data": { "competition_id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "metric": "pnl_usd", "top": [ { "rank": 1, "ranked": true, "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "score": 3968.6, "...": "the standings entry" } ] } } ``` ```json competition.ended theme={null} { "id": "...", "type": "competition.ended", "created_at": "...", "sandbox": false, "data": { "competition_id": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "name": "Weekend PnL Cup", "cancelled": false, "ended_at": "2026-11-03T18:00:00Z", "metric": "pnl_usd", "results": [ { "rank": 1, "ranked": true, "external_id": "user_8412", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "score": 5120.3, "...": "the standings entry" } ] } } ``` `competition.standings` is sent after every computation, about every 5 minutes while a competition runs, with up to 20 ranked traders in `top`, as entries of [Standings](/cabalspy-id/competitions-standings#response). `competition.ended` carries up to 100 ranked traders in `results`; read the full results from Standings. A cancelled competition sends `competition.ended` with only `competition_id`, `"cancelled": true` and empty `results`. ## Callout events [Callout](/cabalspy-id/callouts) events concern your instance, not a single user, so `data` has no `sub`. They are only offered in the event list of instances with callouts switched on. Callouts are switched on per instance on request, contact us at [contact@cabalspy.xyz](mailto:contact@cabalspy.xyz). Each event carries the callout in `data.callout`, the same object as in [List callouts](/cabalspy-id/callouts-list#the-callout-object), with your `external_id` of the author in `data.callout.author`. | Event | When | Extra | | - | - | - | | `callout.created` | A user made a callout. | | | `callout.milestone` | The callout's peak multiple reached 2, 3, 5, 10, 20, 50 or 100x. Each milestone once per callout; when several are passed at once, only the highest. | `data.milestone_x` | | `callout.scored` | About five minutes after the first 24 hours, when they were scored on candles. The callout keeps being tracked while its token is active. | `data.callout.first_day` | | `callout.final` | Tracking stopped: the token's market cap stayed below \$10,000, or it had no price, for 24 hours in a row. The score no longer changes. | `data.callout.status` is `final`, `data.callout.tracking.stop_reason` is `inactive` or `no_price` | Price updates and removals are not sent as webhooks; follow them on the [callouts stream](/cabalspy-id/callouts-stream). ```json callout.created theme={null} { "id": "...", "type": "callout.created", "created_at": "...", "sandbox": false, "data": { "callout": { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token": { "name": "invisibull", "symbol": "invisibull", "logo": "https://..." }, "author": { "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "name": "Maze", "username": "MazeCCC", "avatar_url": "https://cdn.example.com/avatars/8412.png", "kol": false }, "note": "Dev still holding, chart is coiling.", "called_at": "2026-11-01T18:02:11Z", "window_ends_at": "2026-11-02T18:02:11Z", "status": "tracking", "at_call": { "price_usd": 0.0000412, "market_cap_usd": 41200.0 }, "now": { "price_usd": 0.0000412, "market_cap_usd": 41200.0, "x": 1.0, "at": "2026-11-01T18:02:11Z" }, "peak": { "price_usd": 0.0000412, "market_cap_usd": 41200.0, "x": 1.0, "at": "2026-11-01T18:02:11Z" }, "score_x": 1.0, "source": "mobula", "tracking": { "active": true, "phase": "first_day", "next_check_at": null, "below_10k_since": null, "daily_checks": 0, "stopped_at": null, "stop_reason": null } } } } ``` ```json callout.milestone theme={null} { "id": "...", "type": "callout.milestone", "created_at": "...", "sandbox": false, "data": { "callout": { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "chain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "status": "tracking", "peak": { "price_usd": 0.0000851, "market_cap_usd": 85100.0, "x": 2.0655, "at": "2026-11-01T18:47:00Z" }, "score_x": 2.0655, "...": "the full callout object" }, "milestone_x": 2 } } ``` ```json callout.scored theme={null} { "id": "...", "type": "callout.scored", "created_at": "...", "sandbox": false, "data": { "callout": { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "status": "tracking", "score_x": 3.2346, "tracking": { "active": true, "phase": "extended", "next_check_at": "2026-11-03T18:02:11Z", "below_10k_since": null, "daily_checks": 1, "stopped_at": null, "stop_reason": null }, "first_day": { "kind": "candles", "entry_price_usd": 0.0000405, "peak_x": 3.2346, "close_x": 1.8642, "minutes_to_peak": 98, "flags": [] }, "...": "the full callout object" } } } ``` ```json callout.final theme={null} { "id": "...", "type": "callout.final", "created_at": "...", "sandbox": false, "data": { "callout": { "id": "5b0e7c3a-2d4f-4a6b-9c8d-1e2f3a4b5c6d", "status": "final", "score_x": 3.2346, "tracking": { "active": false, "phase": "stopped", "next_check_at": null, "below_10k_since": null, "daily_checks": 9, "stopped_at": "2026-11-10T07:15:00Z", "stop_reason": "inactive" }, "...": "the full callout object" } } } ``` ## Trade Feed events [Trade Feed](/cabalspy-id/trade-feed) events tell you about new trades and theses of the traders your users have in their Trade Feed, so you can send your own notifications. Each event is sent **once per trade or thesis** to each of your apps, not once per user. `data` is the [trade item](/cabalspy-id/trade-feed-api#the-trade-item) or [thesis item](/cabalspy-id/trade-feed-api#the-thesis-item) as in the Trade Feed, plus: | Field | Meaning | | - | - | | `recipients` | The `csid_id` of your users who have the trader in their Trade Feed and whose [filters](/cabalspy-id/trade-feed#alerts-and-filters) for that trader let this event through. Only users who granted `trade_feed` and are within your plan's user limit. | | `recipients_external` | Your own user ids (`external_id`) of the recipients who are [platform users](/cabalspy-id/white-label). | An event without recipients of yours is not sent. `data` has no `sub`. The same events are on the [Trade Feed stream](/cabalspy-id/trade-feed-api#live-stream). ```json trade_feed.trade theme={null} { "id": "...", "type": "trade_feed.trade", "created_at": "...", "sandbox": false, "data": { "id": "t3b1f0c9e8d7a6b5c4d3e2f1a0b9c8d7e", "type": "trade", "timestamp": "2026-11-01T18:40:05Z", "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/1/maze_normal.jpg", "kol": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "trade": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "CPT", "side": "sell", "label": "partial", "sold_percent": 50.0, "amount_native": 1.5, "currency": "SOL", "amount_usd": 225.0, "pnl_usd": 150.0, "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "tx_signature": "2Bq7...", "...": "the full trade" }, "links": { "token": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "terminal": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "profile": "https://id.cabalspy.xyz/u/MazeCCC" }, "recipients": ["3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718"], "recipients_external": ["user_8412"] } } ``` ```json trade_feed.thesis theme={null} { "id": "...", "type": "trade_feed.thesis", "created_at": "...", "sandbox": false, "data": { "id": "h8a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d", "type": "thesis", "timestamp": "2026-11-01T18:21:44Z", "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "...": "..." }, "thesis": { "id": "8a1d2c3b-4e5f-4a6b-8c7d-9e0f1a2b3c4d", "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "stance": "bull", "body": "Dev still holding, chart is coiling.", "...": "..." }, "links": { "...": "..." }, "recipients": ["3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718"], "recipients_external": [] } } ``` ## Copy trading events `copy_trade.instruction` carries one ready-to-execute [copy instruction](/cabalspy-id/copy-trading#the-instruction): a trader one of your users copies has traded, and your app should execute the instruction with the user's wallet and [report the result](/cabalspy-id/copy-trading-status). * One event **per user and trade**. Deduplicate on `data.id`, the instruction id, which is also the same on the [copy trading stream](/cabalspy-id/copy-trading-stream). * Only sent to the apps of the instance that switched copying on for that user and trader. Other platforms of the same user get nothing, see [One platform at a time](/cabalspy-id/copy-trading#one-platform-at-a-time). * Needs the scope `trade_feed`. Platform users always have it. `data` is the instruction object plus `external_id`, your own id of the user when they are a platform user, otherwise null. `data` has no `sub`; the user is `data.csid_id`. Instructions are meant to be executed within 120 seconds (`data.expires_at`). Answer the webhook right away and execute afterwards: a retried delivery may arrive after the instruction expired. ```json copy_trade.instruction theme={null} { "id": "...", "type": "copy_trade.instruction", "created_at": "...", "sandbox": false, "data": { "id": "9d4b2f6e-1c3a-5e7f-8a9b-0c1d2e3f4a5b", "type": "copy_instruction", "status": "pending", "created_at": "2026-11-01T18:02:11Z", "expires_at": "2026-11-01T18:04:11Z", "csid_id": "3f9a1c2e-5b7d-4e8f-a1b2-c3d4e5f60718", "external_id": "user_8412", "trader": { "csid_id": "7c2e9a14-6b3d-4f81-9e0a-5d4c3b2a1f09", "username": "MazeCCC", "name": "Maze", "image_url": "https://pbs.twimg.com/profile_images/1/maze_normal.jpg", "kol": true, "profile_url": "https://id.cabalspy.xyz/u/MazeCCC" }, "action": { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "CPT", "name": "Copycat", "logo": "https://...", "side": "buy", "amount_usd": 20.0, "amount_native": 0.133333333, "currency": "SOL", "sell_percent": null, "price_usd": 0.15, "max_price_usd": 0.1545, "min_price_usd": null, "slippage_bps": 300 }, "source_trade": { "side": "buy", "label": "new", "amount_native": 1.0, "amount_usd": 150.0, "price_usd": 0.15, "...": "the trader's trade" }, "settings": { "enabled": true, "mode": "fixed_usd", "amount_usd": 25.0, "percent": 100.0, "max_usd": 20.0, "sides": "both", "slippage_bps": 300, "updated_at": "2026-11-01T17:58:40Z" }, "links": { "token": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "terminal": "https://app.cabalspy.xyz/token/3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "profile": "https://id.cabalspy.xyz/u/MazeCCC" } } } ``` ## Headers | Header | Value | | - | - | | `webhook-id` | The event id, the same on every retry. | | `webhook-timestamp` | Unix time in seconds when the delivery was sent. | | `webhook-signature` | `v1,`. During a secret roll, one signature per active secret, separated by spaces. | | `CSID-Event-Type` | The event type. | | `Content-Type` | `application/json` | | `User-Agent` | `CabalSpy-ID-Webhooks/1` | ## Verify the signature The signature is an HMAC-SHA256 over `..`, keyed with the base64-decoded part of your secret after `whsec_`. Always verify against the raw request body, and reject deliveries whose timestamp is more than 5 minutes off. ```javascript Node.js theme={null} import crypto from "node:crypto"; import express from "express"; const SECRET = process.env.CSID_WEBHOOK_SECRET; // whsec_... const app = express(); function verify(rawBody, headers) { const id = headers["webhook-id"]; const ts = headers["webhook-timestamp"]; const sigs = (headers["webhook-signature"] || "").split(" "); if (!id || !ts || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; const key = Buffer.from(SECRET.replace(/^whsec_/, ""), "base64"); const expected = crypto.createHmac("sha256", key) .update(`${id}.${ts}.`).update(rawBody).digest(); return sigs.some((s) => { const [version, value] = s.split(","); if (version !== "v1" || !value) return false; const given = Buffer.from(value, "base64"); return given.length === expected.length && crypto.timingSafeEqual(given, expected); }); } app.post("/webhooks/csid", express.raw({ type: "application/json" }), (req, res) => { if (!verify(req.body, req.headers)) return res.sendStatus(400); const event = JSON.parse(req.body); // dedupe on event.id, then handle event.type res.sendStatus(204); }); ``` ```python Python theme={null} import base64, hashlib, hmac, json, os, time from flask import Flask, request SECRET = os.environ["CSID_WEBHOOK_SECRET"] # whsec_... app = Flask(__name__) def verify(body: bytes, headers) -> bool: msg_id = headers.get("webhook-id", "") ts = headers.get("webhook-timestamp", "") if not msg_id or not ts.isdigit() or abs(time.time() - int(ts)) > 300: return False key = base64.b64decode(SECRET.removeprefix("whsec_")) expected = hmac.new(key, f"{msg_id}.{ts}.".encode() + body, hashlib.sha256).digest() for sig in headers.get("webhook-signature", "").split(): version, _, value = sig.partition(",") if version == "v1" and hmac.compare_digest(base64.b64decode(value), expected): return True return False @app.post("/webhooks/csid") def csid_webhook(): if not verify(request.get_data(), request.headers): return "", 400 event = json.loads(request.get_data()) # dedupe on event["id"], then handle event["type"] return "", 204 ``` ```python Standard Webhooks library theme={null} from standardwebhooks.webhooks import Webhook wh = Webhook(os.environ["CSID_WEBHOOK_SECRET"]) # whsec_... event = wh.verify(request.get_data(), dict(request.headers)) # raises on a bad signature ``` ## Delivery and retries Webhook URLs must use `https` and resolve to a public address. Answer with any `2xx` status within 10 seconds, ideally right away, and do the work afterwards. Redirects are not followed. Any other answer, a timeout or a connection error is retried after 30 seconds, 2 minutes, 10 minutes, 30 minutes, 1 hour, 3 hours, 6 hours, 12 hours and 24 hours, about two days in total. After the last attempt the delivery is marked failed. The dashboard shows the recent deliveries of your instance with their status. Deliveries can arrive more than once and out of order. Deduplicate on `webhook-id` and, when order matters, compare `created_at`. ## Rolling the secret When you roll the secret in the dashboard, the old secret stays valid for a while. During that time every delivery carries one signature per active secret in `webhook-signature`, separated by spaces, so both your old and new deployment accept it. # White-Label Source: https://docs.cabalspy.xyz/cabalspy-id/white-label Keep your own login and brand: import your users and their existing wallets from Privy, Dynamic or any provider, and get their trades, PnL, leaderboards and trading competitions through the CabalSpy ID Data API. With White-Label your platform keeps its **own login and its own brand**. Your users never see a CabalSpy ID sign-in. You tell CabalSpy ID who your users are and which wallets they have, by your own user id, and you get their trades, PnL, profiles, leaderboards and [trading competitions](/cabalspy-id/competitions) through the [Data API](/cabalspy-id/data-api). Your users can follow traders in their [Trade Feed](/cabalspy-id/trade-feed) and [copy](/cabalspy-id/copy-trading) them, with your platform executing the trades. You build the UI. It works with the wallets your users already have, from Privy, Dynamic, your own wallet infrastructure or any other provider. No wallet connect, no signatures and no payment are needed to start. > [card] [Quickstart](/cabalspy-id/white-label-quickstart) > > Import users, show a profile, rank them and start a competition. > [card] [Inbound URL](/cabalspy-id/platform-users-inbound) > > Let Privy, Dynamic or your backend send new sign-ups automatically. > [card] [Competitions](/cabalspy-id/competitions) > > Trading competitions between your users, ranked on real trades. ## How it works **1. Create an instance and an API key** Create a CabalSpy ID instance in the [API Dashboard](https://apidashboard.cabalspy.xyz) and enable CabalSpy ID for your API key, exactly as described in [Authentication](/cabalspy-id/data-api#authentication). White-Label uses the same key, envelope, errors and rate limit as the rest of the Data API. **2. Add your users** Send each user with your own user id and at least one wallet: one by one with [Create or update a user](/cabalspy-id/platform-users-create), up to 1,000 at a time with [Import](/cabalspy-id/platform-users-import), or automatically on sign-up through the [inbound URL](/cabalspy-id/platform-users-inbound). **3. Read their data** From then on every trade of their wallets is tracked. Read a complete [profile](/cabalspy-id/platform-users-profile) in one call, rank your users on the [platform leaderboard](/cabalspy-id/platform-users-leaderboard), and use every other Data API endpoint with your user id in place of `csid_id`. ## Concepts ### One person, one CabalSpy ID A user you add is a **platform user**. Every person has exactly one CabalSpy ID, whichever platforms they use, and your platform user points at it: * **New person:** you create their account. It is **managed**: created by your platform, no CabalSpy ID login yet, and not on CabalSpy ID's public pages unless `data_scope` is `csid`. `profile_url` is null. * **The person already has a CabalSpy ID:** when they connect [X](/cabalspy-id/platform-users-x) or [Telegram](/cabalspy-id/platform-users-telegram), or [verify a wallet](/cabalspy-id/platform-users-verification), that their own CabalSpy ID holds, your user moves to that ID by itself. Their `csid_id` changes, your `external_id` stays, and you receive [`platform_user.merged`](/cabalspy-id/webhooks#white-label-events). Nothing they only claim, such as a wallet you report, merges anything. * **The person signs in themselves:** once they sign in to CabalSpy ID with the X or Telegram connected through your platform, the account is theirs: `self_managed` turns true and you receive [`platform_user.self_managed`](/cabalspy-id/webhooks#white-label-events). They manage profile, X and Telegram from then on (`self_managed` error); you keep access and can still report wallets. * Consent and a plan seat for your instance are implied: your platform informs its users. Every person counts once against your plan's user limit, like a signed-in user. * The person sees your platform under connected apps in their CabalSpy ID and can remove it there. A person can be a user of one platform only once. Proving an identity that is already linked to you under another `external_id` is refused with `already_linked`. Every action you take for a platform user is recorded in an audit log with your instance. ### external\_id `external_id` is **your** id of the user, for example the id from your database, from Privy (`did:privy:...`) or from Dynamic. It is 1 to 128 printable ASCII characters without spaces, and unique within your instance. Each platform user also has a `csid_id`, the CabalSpy ID account id. Use `external_id` everywhere: on the `/v1/platform-users` endpoints, and on every other Data API endpoint in place of `csid_id`, see [external\_id in the Data API](/cabalspy-id/data-api#external-id). A key only ever reaches the platform users of its own instance. ### Every user has a wallet A platform user needs **at least one wallet**. Creating a user without one is refused with `wallet_required`, and the last wallet of a user cannot be removed (`last_wallet`). Delete the user instead. A wallet is an object with an `address` and optional `chains` and `source`, or just the address as a string: | Field | Meaning | | - | - | | `address` | A Solana or EVM address. | | `chains` | The chains to track it on. Default: `solana` for a Solana address, every supported EVM chain (`bnb`, `base`, `eth`, `rh`) for an EVM address. | | `source` | Optional label for where the wallet comes from, for example `privy` or `dynamic`. 1 to 40 characters `a-z 0-9 _ . -`. | A request can carry up to 10 wallets. A user can hold up to 5 Solana and 5 EVM wallets. ### Unverified and verified wallets Wallets you send are **unverified**: you vouch that they belong to the user. They are your report: other platforms the person uses do not see them. They are tracked and count for data, profiles and leaderboards straight away, unless you set `wallet_trust` to `verified_only`. A wallet becomes **verified** with the same on-chain payment verification as on the CabalSpy ID website: the user sends a tiny, unique amount from the wallet. You start it with [Verify a wallet](/cabalspy-id/platform-users-verification). Verification is optional and works as a trust badge. Whoever verifies an address owns it. If another account verifies an address that one of your users has as an unverified wallet, that copy stops counting. Every wallet in a user object carries a `status`: | status | Counts | Meaning | | - | - | - | | `verified` | Yes | Payment-verified, on the chains in `verified_chains`. | | `active` | Yes | Unverified, accepted by your instance. | | `needs_verification` | No | Unverified, and your instance only counts verified wallets (`wallet_trust: verified_only`). | | `verified_elsewhere` | No | Unverified, another account verified this address. | | `pending` | No | Only a verification was started for it, nothing counts yet. | `counts` is true for `verified` and `active`. The wallet endpoints [Tracker](/cabalspy-id/tracker), [History](/cabalspy-id/history), [Holdings](/cabalspy-id/holdings) and [PnL calendar](/cabalspy-id/pnl-calendar) answer for every wallet of your platform users that counts, so you can build a full portfolio view per wallet. `profile.wallet_verified` says whether the wallet is payment-verified. > [!NOTE] > > [Wallet lookup](/cabalspy-id/wallet-lookup) and the `address` parameter of [Profile](/cabalspy-id/profile) only find payment-verified wallets. Find a platform user by `external_id` instead. ### Settings Your instance has a few White-Label settings. Read and change them with [Settings](/cabalspy-id/platform-users-settings), or in the dashboard on the instance's [White-label](/cabalspy-id/dashboard#white-label) tab. | Setting | Dashboard | Values | Meaning | | - | - | - | - | | `white_label` | No CabalSpy ID branding | `true`, `false` (default) | The verify widget, the embedded Theses and Trade Feed widgets and the Telegram messages your users get show your platform instead of CabalSpy ID. | | `data_scope` | Where your users' data is visible | `csid` (default), `platform` | `csid` (default): your users are part of the CabalSpy ID network: profiles, leaderboard, Trade Feed and theses. `platform`: only your instance sees them. | | `wallet_trust` | Wallets that count | `all` (default), `verified_only` | `all`: unverified wallets you send count, for profiles, leaderboards and the wallet endpoints (tracker, history, holdings, PnL calendar). `verified_only`: only payment-verified wallets count. | | `leaderboard_trust` | Leaderboard | `all` (default), `verified_only` | Which wallets appear on the [platform leaderboard](/cabalspy-id/platform-users-leaderboard). | | `telegram_alerts` | Telegram alerts for your users | `true`, `false` (default) | Trade Feed alerts through the CabalSpy ID Telegram bot for platform users who [linked Telegram](/cabalspy-id/platform-users-telegram). | The dashboard always saves all of them together. ### Removing a user [Deleting a user](/cabalspy-id/platform-users-delete) removes your platform from the person: your link, the wallets only you reported, your consent. Their account is deleted too only while it is managed and no other platform holds it. A person's own CabalSpy ID always stays. Claim links are gone: `POST /v1/platform-users/claim-link` answers 410 `claim_removed`. ### Plan limits White-Label is available on every plan. The plan sets how many users you can have. * **Live instances** count platform users against the [user limit](/cabalspy-id/plans#the-user-limit) of your domain's plan, together with everyone who signed in with CabalSpy ID. When the limit is reached, new users are refused with `plan_user_limit` (existing users can still be updated). * **Sandbox and development instances** can hold 25 platform users. Go live with a verified domain for your plan's limit. | Limit | Value | | - | - | | Users per import call | 1,000 (request body up to 1 MB) | | Wallets per request | 10 | | Wallets per user | 5 Solana and 5 EVM | | New platform users per minute | 2,000 | | Inbound URL events per minute | 600 | | Open competitions | 5 per developer account (scheduled and running), on every plan | ## Webhooks Platform users trigger the regular [webhooks](/cabalspy-id/webhooks) of your instance, including the [Trade Feed](/cabalspy-id/webhooks#trade-feed-events) and [copy trading](/cabalspy-id/webhooks#copy-trading-events) events, plus `platform_user.created`, `platform_user.merged`, `platform_user.self_managed`, `platform_user.x_connected`, `platform_user.telegram_linked`, `wallet.added` and `verification.expired`. See [White-Label events](/cabalspy-id/webhooks#white-label-events). ## Endpoints | Method | Path | Description | | - | - | - | | POST | [/v1/platform-users](/cabalspy-id/platform-users-create) | Create or update a user. | | POST | [/v1/platform-users/import](/cabalspy-id/platform-users-import) | Create or update up to 1,000 users. | | GET | [/v1/platform-users](/cabalspy-id/platform-users-get) | One user by external\_id or csid\_id. | | GET | [/v1/platform-users/list](/cabalspy-id/platform-users-get#list-users) | All your users, newest first. | | POST, PATCH | [/v1/platform-users/update](/cabalspy-id/platform-users-create#update-a-user) | Change display name or avatar. | | POST | [/v1/platform-users/delete](/cabalspy-id/platform-users-delete) | Delete a user. | | POST | [/v1/platform-users/wallets/add](/cabalspy-id/platform-users-wallets) | Add wallets. | | POST | [/v1/platform-users/wallets/delete](/cabalspy-id/platform-users-wallets#remove-a-wallet) | Remove a wallet. | | POST, GET | [/v1/platform-users/wallets/verify](/cabalspy-id/platform-users-verification) | Payment verification: start, status, QR code, cancel. | | GET | [/v1/platform-users/profile](/cabalspy-id/platform-users-profile) | Everything for a profile page in one call. | | GET | [/v1/platform-users/leaderboard](/cabalspy-id/platform-users-leaderboard) | Your users ranked. | | GET, POST | [/v1/platform-users/settings](/cabalspy-id/platform-users-settings) | Instance settings. | | POST | [/v1/platform-users/session](/cabalspy-id/platform-users-session) | Short-lived session for the embeddable verification UI. | | POST | [/v1/platform-users/claim-link](/cabalspy-id/platform-users-claim) | Removed: answers 410 `claim_removed`. | | POST | [/v1/platform-users/x/connect](/cabalspy-id/platform-users-x) | Connect or disconnect X. | | POST, GET | [/v1/platform-users/telegram/link](/cabalspy-id/platform-users-telegram) | Link, check or unlink Telegram. | | GET, POST | [/v1/platform-users/kol](/cabalspy-id/platform-users-kol) | KOL badge status, volume check and application. | | GET, POST | [/v1/platform-users/inbound](/cabalspy-id/platform-users-inbound) | The inbound URL for sign-up events. | | GET, POST | [/v1/competitions](/cabalspy-id/competitions) | Trading competitions. | | GET, POST | [/v1/callouts](/cabalspy-id/callouts) | Callouts by your users, with stats, a leaderboard and callout competitions. An extra, switched on per instance on request. | | GET, POST | [/v1/trade-feed](/cabalspy-id/trade-feed) | Your users' Trade Feeds: the traders they follow and every trade of them. | | GET, POST | [/v1/copy-trading](/cabalspy-id/copy-trading) | Copy trading: ready-to-execute instructions for every trade of a trader your user copies. Your platform executes with the user's wallet. | # White-Label quickstart Source: https://docs.cabalspy.xyz/cabalspy-id/white-label-quickstart From your existing user base to profiles, a leaderboard and a trading competition: import users with their wallets, read a profile, rank your users and start a competition. This guide takes your existing users and their wallets, from Privy, Dynamic or your own database, to a profile page, a leaderboard and a running trading competition. All calls go from your backend to the Data API with your API key. **1. Get an API key for your instance** No dashboard account yet? [Create one and get your API key](/api-key). Then open the **CabalSpy ID** tab and create an instance: * **Type:** server-side web app. All White-Label calls come from your backend. * **Start in:** development. Your platform users have real wallets and real trades. * **Redirect URIs:** leave empty. They are only for Login with CabalSpy ID. Your API key works for CabalSpy ID by default (**Works with** on the **API keys** page), see [Authentication](/cabalspy-id/data-api#authentication). Check it with [GET /v1/me](/cabalspy-id/me). If your account has several instances, add `instance=csid_...` to every call; the [SDKs](/cabalspy-id/sdks) take it once in the constructor. A development instance holds up to 25 platform users and allows 1 request per second, enough to build and test. A live instance uses your plan's limits, see [Going live](#going-live). **2. Import your users** Send your users with your own user id as `external_id` and their existing wallets. Up to 1,000 users per call and 2,000 new users per minute. Each user is handled on its own, so one bad entry never undoes the others. While the instance is in development, try it with a few users (it holds 25) and import everyone after [going live](#going-live). ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/platform-users/import" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "users": [ {"external_id": "user_8412", "display_name": "Maze", "wallets": [{"address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "source": "privy"}]}, {"external_id": "user_8413", "wallets": ["0x4b1e9c0d2a7f3e5b8c6d1a9f0e2b7c4d5a6e8f01"]} ] }' ``` ```python Python theme={null} import requests H = {"Authorization": "Bearer YOUR_KEY"} users = [ {"external_id": u.id, "display_name": u.name, "wallets": [{"address": w, "source": "privy"} for w in u.wallets]} for u in my_users # your own user objects ] for i in range(0, len(users), 1000): r = requests.post("https://api-id.cabalspy.xyz/v1/platform-users/import", json={"users": users[i:i + 1000]}, headers=H).json() print(r["data"]["summary"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/platform-users/import", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ users: [ { external_id: "user_8412", wallets: [{ address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", source: "privy" }] }, ], }), }); const { data } = await res.json(); console.log(data.summary); // { created, updated, unchanged, rejected } ``` For users who sign up later, call [Create or update a user](/cabalspy-id/platform-users-create) from your sign-up flow, or let Privy, Dynamic or your backend post sign-ups to your [inbound URL](/cabalspy-id/platform-users-inbound). **3. Show a profile** One call returns everything for a profile page: the user, their wallets, trading stats per chain for a period, the 20 most recent trades, theses and the KOL status. ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users/profile?external_id=user_8412&period=7d" \ -H "Authorization: Bearer YOUR_KEY" ``` For charts and detail pages, every other Data API endpoint accepts `external_id` in place of `csid_id`, for example [tracker](/cabalspy-id/tracker), [holdings](/cabalspy-id/holdings), [history](/cabalspy-id/history) and the [PnL calendar](/cabalspy-id/pnl-calendar). The profile's `links` field has the ready-made paths for each wallet. See [Platform user profile](/cabalspy-id/platform-users-profile). **4. Rank your users** The platform leaderboard ranks the wallets of your users and tells you whose wallet each entry is, by `external_id`. ```bash theme={null} curl "https://api-id.cabalspy.xyz/v1/platform-users/leaderboard?blockchain=solana&period=7d&sort=pnl_usd&limit=25" \ -H "Authorization: Bearer YOUR_KEY" ``` To rank only payment-verified wallets, add `trust=verified` or set `leaderboard_trust` to `verified_only` in the [settings](/cabalspy-id/platform-users-settings). See [Platform leaderboard](/cabalspy-id/platform-users-leaderboard). **5. Start a competition** Create a 48-hour PnL competition on Solana that enters every user automatically. ```bash cURL theme={null} curl -X POST "https://api-id.cabalspy.xyz/v1/competitions" \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Weekend PnL Cup", "chain": "solana", "metric": "pnl_usd", "duration_hours": 48, "starts_at": "2027-01-15T18:00:00Z", "enrollment": "all_users", "min_trades": 3 }' ``` ```python Python theme={null} import requests r = requests.post("https://api-id.cabalspy.xyz/v1/competitions", json={ "name": "Weekend PnL Cup", "chain": "solana", "metric": "pnl_usd", "duration_hours": 48, "starts_at": "2027-01-15T18:00:00Z", "enrollment": "all_users", "min_trades": 3, }, headers={"Authorization": "Bearer YOUR_KEY"}) comp = r.json()["data"] print(comp["id"], comp["status"]) ``` ```javascript JavaScript theme={null} const res = await fetch("https://api-id.cabalspy.xyz/v1/competitions", { method: "POST", headers: { Authorization: "Bearer YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ name: "Weekend PnL Cup", chain: "solana", metric: "pnl_usd", duration_hours: 48, starts_at: "2027-01-15T18:00:00Z", enrollment: "all_users", min_trades: 3, }), }); const { data } = await res.json(); console.log(data.id, data.status); ``` Once it runs, read the [standings](/cabalspy-id/competitions-standings), recomputed every 5 minutes, or subscribe to the `competition.standings` and `competition.ended` [webhooks](/cabalspy-id/webhooks#competition-events). See [Competitions](/cabalspy-id/competitions). ## What to build where You build your own UI. Everything works through the Data API with `external_id`; one widget is ready to embed. | Feature | How | | - | - | | Profile page | [Platform user profile](/cabalspy-id/platform-users-profile), one call | | Portfolio tracker per wallet | [Tracker](/cabalspy-id/tracker), [History](/cabalspy-id/history) (with `mint` for one token), [Holdings](/cabalspy-id/holdings), [PnL calendar](/cabalspy-id/pnl-calendar). Imported wallets work while `wallet_trust` is `all`; `profile.wallet_verified` says whether a wallet is payment-verified. | | Theses on a token | Read with [GET /v1/theses](/cabalspy-id/theses-list), write, reply and react in the user's name with [POST /v1/theses](/cabalspy-id/theses-post). Only holders can post. The [thesis widget](/cabalspy-id/theses) shows a token's theses read-only. | | Markers on your price chart | [Callouts](/cabalspy-id/callouts-list) with price at the call, theses with their time, and the user's own buys and sells from [History](/cabalspy-id/history) with `mint`. The price data itself comes from your chart provider. | | Leaderboard and competitions | [Platform leaderboard](/cabalspy-id/platform-users-leaderboard), [competitions](/cabalspy-id/competitions) | | Trade Feed and copy trading | [Trade Feed API](/cabalspy-id/trade-feed-api), [copy trading](/cabalspy-id/copy-trading). Your users can follow each other (`trader_external_id`). | | Wallet verification | Embed the verification widget with a [session](/cabalspy-id/platform-users-session), see below. | ### Embed the wallet verification widget Create a [session](/cabalspy-id/platform-users-session) for the user on your backend and pass `session` and `client_id` to the page. The widget shows the amount, the address and a QR code, and updates when the payment arrives. ```html theme={null}
``` Optional attributes: `data-theme` (`dark` or `light`), `data-accent` (a hex color), `data-radius` (0-24), `data-frameless`, `data-compact` and `data-height`. A session lasts 15 minutes; create a new one when the user reloads the page. The widget only loads on your instance's sites and on `localhost` while the instance is not live. ## Going live A live instance uses your [plan](/cabalspy-id/plans) instead of the development limits (25 users, 1 request per second). In the dashboard, the instance's **Overview** shows what is still missing. For White-Label you need: 1. A verified domain (**Domains & testers**, DNS TXT record or a file on your website). It also carries your plan. 2. Website, privacy policy and terms URLs on your verified domain and a support e-mail (**Settings**, **Branding**), and a logo (**Settings**, **Logo**: square PNG, JPEG or WebP, at most 256 KB). 3. **Go live** on the Overview tab. Redirect URIs, testers and the login button are only needed for Login with CabalSpy ID. If you also request the scopes `wallets` or `onchain` for a login, explain why in Settings; those need a short review. ## Next steps * Choose how much you trust the wallets you send: [settings](/cabalspy-id/platform-users-settings) `wallet_trust` and `leaderboard_trust`. * Offer payment verification as a trust badge: [Verify a wallet](/cabalspy-id/platform-users-verification). * Let users connect [X](/cabalspy-id/platform-users-x) and [Telegram](/cabalspy-id/platform-users-telegram), and apply for the [KOL badge](/cabalspy-id/platform-users-kol). * Subscribe to the [White-Label webhooks](/cabalspy-id/webhooks#white-label-events). # Call Stream Source: https://docs.cabalspy.xyz/call Live WebSocket stream of the curated CabalSpy calls (Gambles, Moderate Gamble, Good Token, Big Token, Whales) the moment they are posted. Our curated calls, live. Every call that goes to the CabalSpy Discord arrives on this stream at the same moment, with the token, the market cap at the call, the wallets that triggered it and trading links. Calls follow fixed rules per tier, so you do not configure thresholds, you only pick chains and tiers. If you want your own cluster rules, use the [Signal Stream](/signal). For past calls and their performance, use [Calls](/calls) and [Call Stats](/calls-stats). ## Endpoint Connect to `wss://stream.cabalspy.xyz`. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => { ws.send(JSON.stringify({ op: "subscribe", channel: "call.solana", tiers: ["good", "moderate"] })); }; ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === "call") { const c = msg.data; console.log(c.tier_label, c.token.symbol, "MC", c.market_cap_at_call, c.links.terminal); } }; ``` ```python Python theme={null} import json, websocket def on_open(ws): ws.send(json.dumps({"op": "subscribe", "channel": "call.*"})) def on_message(ws, message): msg = json.loads(message) if msg.get("event") == "call": c = msg["data"] print(c["blockchain"], c["tier_label"], c["token"]["symbol"], c["market_cap_at_call"]) ws = websocket.WebSocketApp( "wss://stream.cabalspy.xyz?apiKey=YOUR_KEY", on_open=on_open, on_message=on_message, ) ws.run_forever() ``` ## Authentication Provide your API key as a query parameter, wss\://stream.cabalspy.xyz?apiKey=YOUR\_KEY, or as a header, Authorization: Bearer YOUR\_KEY. Invalid keys are closed with code 1008. With the public demo key, calls arrive 15 minutes late. ## Chains and tiers | tier | Label | Chains | | - | - | - | | gamble | Gambles | solana, bnb, eth, rh | | moderate | Moderate Gamble | solana, bnb, eth, rh | | good | Good Token | solana, bnb, eth, rh | | big | Big Token | solana | | whale | Whales Call | solana | ## Subscribe Send a subscribe message after the connection opens. The channel is call. followed by a chain, or call.\* for every chain. tiers is optional, without it you get every tier. ```json One chain, two tiers theme={null} { "op": "subscribe", "channel": "call.solana", "tiers": ["good", "moderate"] } ``` ```json Every chain, every tier theme={null} { "op": "subscribe", "channel": "call.*" } ``` ```json The same with separate fields theme={null} { "op": "subscribe", "stream": "call", "blockchain": "bnb", "tiers": ["gamble"] } ``` **op** `string` *required* subscribe, unsubscribe or subscriptions. **channel** `string` call.solana, call.bnb, call.eth, call.rh or call.\*. Alternatively send stream call with a blockchain field. **tiers** `array` Any of gamble, moderate, good, big, whale. Omit for every tier. One subscription per channel: subscribing to the same channel again replaces its tiers. The reply confirms the channel and the tiers it parsed. ```json Reply theme={null} { "success": true, "type": "subscribed", "stream": "call", "channel": "call.solana", "tiers": ["good", "moderate"] } ``` ## Unsubscribe and other operations ```json Unsubscribe theme={null} { "op": "unsubscribe", "channel": "call.solana" } ``` ```json List your call subscriptions theme={null} { "op": "subscriptions", "stream": "call" } ``` The call stream runs next to every other stream on the same connection, so you can combine it with tx, count or signal subscriptions. ## Event Each call delivers a call event. The data object is the same call object that [Calls](/calls) returns, without the performance block, because performance is only known 24 hours later. **event** `string` call. **channel** `string` call. followed by the chain of the call, for example call.solana. **data** `object` **data** **call\_id** `string` Stable id of the call. Look it up later in Calls to see its performance. **blockchain** `string` solana, bnb, eth or rh. **tier** `string` gamble, moderate, good, big or whale. **tier\_label** `string` The tier as shown in Discord. **called\_at** `string` When the call was made, ISO 8601 UTC. **token** `object` mint, symbol, name and logo. **market\_cap\_at\_call** `number` Market cap in USD at the time of the call. **trigger** `object` kol\_count, smart\_count, native\_symbol, total\_native and wallets. Each wallet has address, type (kol or smart), name, amount\_native and bought\_at. Big Token calls carry counts only, without wallets. **links** `object` Trading and chart links for the token. Solana calls include terminal, the token page in the CabalSpy Terminal. ```json call theme={null} { "success": true, "channel": "call.solana", "event": "call", "data": { "call_id": "c_0123456789ab", "blockchain": "solana", "tier": "gamble", "tier_label": "Gambles", "called_at": "2026-10-01T12:00:00Z", "token": { "mint": "ExampLeTokenMint1111111111111111111111pump", "symbol": "EXAMPLE", "name": "Example Token", "logo": "https://example.com/token-logo.webp" }, "market_cap_at_call": 25000.0, "trigger": { "kol_count": 3, "smart_count": 1, "native_symbol": "SOL", "total_native": 12.5, "wallets": [ { "address": "ExampLeKoLWa11et111111111111111111111111111", "type": "kol", "name": "Example KOL", "amount_native": 6.0, "bought_at": "2026-10-01T11:59:40Z" }, { "address": "ExampLeSmartWa11et11111111111111111111111111", "type": "smart", "name": "", "amount_native": 3.5, "bought_at": "2026-10-01T12:00:00Z" } ] }, "links": { "axiom": "https://axiom.trade/t/ExampLeTokenMint1111111111111111111111pump/@cabalspy1", "gmgn": "https://gmgn.ai/sol/token/ExampLeTokenMint1111111111111111111111pump", "dexscreener": "https://dexscreener.com/solana/ExampLeTokenMint1111111111111111111111pump", "terminal": "https://app.cabalspy.xyz/token/ExampLeTokenMint1111111111111111111111pump" } } } ``` ## Billing Like signals, every delivered call deducts a fixed number of credits and is logged. Subscribing is free. ## Heartbeat The server sends WebSocket pings and expects pong, which standard clients answer automatically. You can also send op ping at any time. # Calls Source: https://docs.cabalspy.xyz/calls The curated CabalSpy calls from Discord (Gambles, Moderate Gamble, Good Token, Big Token, Whales) with trigger wallets and 24 hour performance. Our curated calls, the same ones posted in the CabalSpy Discord, as an API. Each call carries the token, the market cap at the time of the call, the KOL and Smart Money wallets that triggered it, trading links, and its performance over the 24 hours after the call. Calls are a finished product: we pick them with fixed rules per tier. If you want to define your own thresholds instead, use [Signals](/signals). For calls as they happen, subscribe to the [Call Stream](/call). ## Tiers | tier | Label | Chains | | - | - | - | | gamble | Gambles | solana, bnb, eth, rh | | moderate | Moderate Gamble | solana, bnb, eth, rh | | good | Good Token | solana, bnb, eth, rh | | big | Big Token | solana | | whale | Whales Call | solana | Calls are kept for 90 days. ## Query Parameters **blockchain** `string` Comma separated chains. Any of solana, bnb, eth, rh. Omit for all chains. **tier** `string` Comma separated tiers. Any of gamble, moderate, good, big, whale. Omit for all tiers. **since** `string` Only calls at or after this time. ISO 8601 or a Unix timestamp in seconds or milliseconds. **until** `string` Only calls at or before this time. Same formats as since. **limit** `integer` (default: 50) Calls per page, 1 to 200. Newest first. **cursor** `string` The next\_cursor from the previous page. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/calls?blockchain=solana&tier=good,moderate&limit=20&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "tier": "good,moderate", "limit": 20, "api_key": "YOUR_KEY"} r = requests.get("https://api.cabalspy.xyz/v1/calls", params=params) for c in r.json()["data"]: p = c["performance"] print(c["called_at"], c["tier_label"], c["token"]["symbol"], p["status"], p["peak_multiple"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", tier: "good,moderate", limit: "20", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/calls?${p}`); const { data, pagination } = await res.json(); data.forEach(c => console.log(c.called_at, c.tier_label, c.token.symbol, c.performance.peak_multiple)); // next page: add cursor=pagination.next_cursor ``` ## Response **success** `boolean` True on success. **data** `array` **call** **call\_id** `string` Stable id of the call. The same id is used in the Call Stream. **blockchain** `string` solana, bnb, eth or rh. **tier** `string` gamble, moderate, good, big or whale. **tier\_label** `string` The tier as shown in Discord, for example Moderate Gamble. **called\_at** `string` When the call was made, ISO 8601 UTC. **timestamp** `string` Same as called\_at. **token** `object` mint, symbol, name and logo. **market\_cap\_at\_call** `number` Market cap in USD at the time of the call. **trigger** `object` **trigger** **kol\_count** `integer` KOL wallets behind the call. **smart\_count** `integer` Smart Money wallets behind the call. **native\_symbol** `string` SOL, BNB or ETH. **total\_native** `number` Total bought by these wallets in the native currency. **wallets** `array` Each wallet with address, type (kol or smart), name, amount\_native and bought\_at. Big Token calls carry counts only, without wallets. **performance** `object` **performance** **status** `string` pending (not measured yet), ok, no\_data (no price data after the call) or not\_evaluated (not measured, currently Big Token and Whales). **peak\_multiple** `number` Highest price within 24 hours after the call, divided by the price at the call. **peak\_market\_cap** `number` Market cap at that peak, in USD. **minutes\_to\_peak** `integer` Minutes from the call to the peak. **close\_24h\_multiple** `number` Price 24 hours after the call, divided by the price at the call. **evaluated\_at** `string` When the call was measured. **links** `object` Trading and chart links for the token, for example axiom, gmgn, dexscreener. Solana calls include terminal, the token page in the CabalSpy Terminal. **pagination** `object` limit, total (null when a tier filter or several chains are set), has\_more and next\_cursor. > [!NOTE] > > Calls are measured once a day, so calls from the last one to two days show performance status pending. ```json Response theme={null} { "success": true, "data": [ { "call_id": "c_0123456789ab", "blockchain": "solana", "tier": "gamble", "tier_label": "Gambles", "called_at": "2026-10-01T12:00:00Z", "timestamp": "2026-10-01T12:00:00Z", "token": { "mint": "ExampLeTokenMint1111111111111111111111pump", "symbol": "EXAMPLE", "name": "Example Token", "logo": "https://example.com/token-logo.webp" }, "market_cap_at_call": 25000.0, "trigger": { "kol_count": 3, "smart_count": 1, "native_symbol": "SOL", "total_native": 12.5, "wallets": [ { "address": "ExampLeKoLWa11et111111111111111111111111111", "type": "kol", "name": "Example KOL", "amount_native": 6.0, "bought_at": "2026-10-01T11:59:40Z" } ] }, "performance": { "status": "ok", "peak_multiple": 3.2, "peak_market_cap": 80000.0, "minutes_to_peak": 18, "close_24h_multiple": 1.4, "evaluated_at": "2026-10-03T00:20:00+00:00" }, "links": { "axiom": "https://axiom.trade/t/ExampLeTokenMint1111111111111111111111pump/@cabalspy1", "gmgn": "https://gmgn.ai/sol/token/ExampLeTokenMint1111111111111111111111pump", "dexscreener": "https://dexscreener.com/solana/ExampLeTokenMint1111111111111111111111pump", "terminal": "https://app.cabalspy.xyz/token/ExampLeTokenMint1111111111111111111111pump" } } ], "pagination": { "limit": 1, "total": 1250, "has_more": true, "next_cursor": "MTc1OTMyMDAwMDAwMA==" }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-10-03T10:00:00Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | Unknown blockchain or tier, or an invalid since, until, limit or cursor. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Call Stats Source: https://docs.cabalspy.xyz/calls-stats Hit rates and performance of the CabalSpy calls per chain and tier: how many reached 2x, 5x and 10x within 24 hours. How well our calls performed. For a period you choose, you get per chain and per tier how many calls there were, how many reached 2x, 5x and 10x within 24 hours, the median peak and how fast it came, plus the best calls of the period. ## How calls are measured * Every call is watched for exactly 24 hours from the moment of the call. * The entry is the last price before the call. The peak is the highest price after it. * Per chain, tier, token and UTC day only the first call counts, so a token called twice in a day is counted once. * Calls without price data after the call are listed as no\_data and are not part of the hit rate. * Calls are measured once a day, so calls from the last one to two days count as pending. * Big Token and Whales calls are not measured yet and count as not\_evaluated. ## Query Parameters **period** `string` (default: 7d) One of 1d, 7d, 30d, 90d. **blockchain** `string` Comma separated chains. Any of solana, bnb, eth, rh. Omit for all chains. **tier** `string` Comma separated tiers. Any of gamble, moderate, good, big, whale. Omit for all tiers. **api\_key** `string` *required* Your API key. Alternatively pass it as an Authorization Bearer header. ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/calls/stats?period=30d&blockchain=solana&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests r = requests.get("https://api.cabalspy.xyz/v1/calls/stats", params={"period": "30d", "api_key": "YOUR_KEY"}) d = r.json()["data"] for chain, s in d["chains"].items(): print(chain, s["calls"], "calls,", s["hit_rate"]["2x"], "% reached 2x") ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ period: "30d", api_key: "YOUR_KEY" }); const res = await fetch(`https://api.cabalspy.xyz/v1/calls/stats?${p}`); const { data } = await res.json(); for (const [chain, s] of Object.entries(data.chains)) { console.log(chain, s.calls, "calls,", s.hit_rate["2x"], "% reached 2x"); } ``` ## Response **success** `boolean` True on success. **data** `object` **data** **period** `string` The requested period. **window** `object` from and to of the period, ISO 8601 UTC. **method** `string` A short description of how calls are measured. **totals** `object` **stats block** **calls** `integer` Calls in the period, after removing repeats of the same token on the same day. **evaluated** `integer` Calls with a measured result. **pending** `integer` Calls not measured yet. **no\_data** `integer` Calls without price data after the call. **not\_evaluated** `integer` Calls that are not measured. **hit\_rate** `object` Percent of evaluated calls whose peak reached 2x, 5x and 10x. null when nothing was evaluated. **median\_peak\_multiple** `number` Median peak multiple of the evaluated calls. **median\_minutes\_to\_peak** `number` Median minutes from call to peak. **chains** `object` One stats block per chain, each with an extra tiers object holding one stats block per tier. **best\_calls** `array` The five evaluated calls with the highest peak in the period, with call\_id, blockchain, tier, symbol, mint, called\_at, market\_cap\_at\_call and peak\_multiple. ```json Response theme={null} { "success": true, "data": { "period": "7d", "window": { "from": "2026-09-24T10:00:00Z", "to": "2026-10-01T10:00:00Z" }, "method": "Each call is measured for 24 hours from the call. ...", "totals": { "calls": 120, "evaluated": 112, "pending": 6, "no_data": 2, "not_evaluated": 0, "hit_rate": { "2x": 45.5, "5x": 14.3, "10x": 4.5 }, "median_peak_multiple": 1.9, "median_minutes_to_peak": 12 }, "chains": { "solana": { "calls": 120, "evaluated": 112, "pending": 6, "no_data": 2, "not_evaluated": 0, "hit_rate": { "2x": 45.5, "5x": 14.3, "10x": 4.5 }, "median_peak_multiple": 1.9, "median_minutes_to_peak": 12, "tiers": { "gamble": { "calls": 120, "evaluated": 112, "hit_rate": { "2x": 45.5, "5x": 14.3, "10x": 4.5 } } } } }, "best_calls": [ { "call_id": "c_0123456789ab", "blockchain": "solana", "tier": "gamble", "symbol": "EXAMPLE", "mint": "ExampLeTokenMint1111111111111111111111pump", "called_at": "2026-09-28T12:00:00Z", "market_cap_at_call": 25000.0, "peak_multiple": 12.0 } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-10-01T10:00:00Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | Unknown blockchain, tier or period. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Changelog Source: https://docs.cabalspy.xyz/changelog New features, improvements and fixes in CabalSpy and CabalSpy ID. **November 9, 2026** ### White-Label endpoints in the CabalSpy ID sandbox `Dashboard` · Improved The CabalSpy ID sandbox now lets you try the White-Label read endpoints live: your platform users, one user, their profile, the platform leaderboard and your White-Label settings. ### Manage White-Label users in the dashboard `Dashboard` · New The White-label tab now lists your platform users with their wallets and status, lets you search by your user id, CabalSpy ID or wallet and remove a user. It also shows the wallet verification widget code, and new instances ask whether your users sign in with your own login or with CabalSpy ID. [Read more](https://docs.cabalspy.xyz/cabalspy-id/dashboard) **November 8, 2026** ### SDK 0.10.0 for JavaScript and Python: one CabalSpy ID per person `MCP & SDK` · New The JavaScript and Python SDKs know the new platform\_user.merged and platform\_user.self\_managed webhooks and the user fields self\_managed, self\_managed\_at and merged\_from. The claim-link call is deprecated because claim links are retired. [Read more](https://docs.cabalspy.xyz/cabalspy-id/webhooks) ### One CabalSpy ID per person across all white-label platforms `CabalSpy ID` · Improved A user your platform creates moves to their own CabalSpy ID automatically when they connect X or Telegram or verify a wallet it holds, so nobody needs two accounts. You get the new platform\_user.merged and platform\_user.self\_managed webhooks, wallets you report stay visible only to your platform, and claim links are retired. [Read more](https://docs.cabalspy.xyz/cabalspy-id/white-label) ### Easier instance setup for White-Label `Dashboard` · Improved Instances no longer need a redirect URI, so White-Label projects without a login can start right away. The create form keeps your input after an error, and the checklist now covers scopes, testers and adding users through the API. [Read more](https://docs.cabalspy.xyz/cabalspy-id/dashboard) ### SDK 0.9.1: theses for platform users, history by token `MCP & SDK` · Fixed The JavaScript and Python SDKs post, reply and react to theses with your own user id (external\_id), as the API already allowed. History takes a token filter and returns amount and price per trade. [Read more](https://docs.cabalspy.xyz/cabalspy-id/sdks) ### Platform users can connect X and Telegram they already use `CabalSpy ID` · Improved People who already have a CabalSpy ID can connect the same X and Telegram account to their account on a white-label platform. Signing in to CabalSpy ID still opens their own ID, and a failed X connect now returns to the platform with an error. [Read more](https://docs.cabalspy.xyz/cabalspy-id/platform-users-x) ### Trade Feed alerts and copy instructions for white-label traders `CabalSpy ID` · Fixed When a trader is a platform user with imported wallets, their trades now trigger Trade Feed alerts, webhooks and copy trading instructions for their followers, as long as the instance counts unverified wallets. Before, only payment-verified wallets did. [Read more](https://docs.cabalspy.xyz/cabalspy-id/copy-trading) **November 4, 2026** ### Market cap on every chain and on every token trade `API` · Improved The token block of transactions, stats and holders now carries market cap and price on Solana, BNB Chain, Base, Ethereum and Robinhood Chain, also for tokens that are no longer actively trading. market\_cap\_source says whether the value is live or from the last tracked trade. Every trade now includes the market cap at the moment it happened. [Read more](https://docs.cabalspy.xyz/transactions) ### Poll token transactions with since, empty polls are free `API` · New GET /v1/tokens/transactions takes a since parameter (Unix seconds, milliseconds or ISO 8601) and returns only trades from that time on. A poll that finds no new trade costs 0 credits, and the X-Credits-Charged header shows what each request cost. Cursor pagination on transactions and holders is now documented. [Read more](https://docs.cabalspy.xyz/transactions) **November 2, 2026** ### Wallet tracker for white-label users with unverified wallets `CabalSpy ID` · Improved Tracker, history, holdings and PnL calendar now work for the wallets platforms import for their own users, without payment verification, while the instance counts unverified wallets. Responses show whether a wallet is verified, and history can be filtered by token with price and amount per trade for chart markers. [Read more](https://docs.cabalspy.xyz/cabalspy-id/white-label) **November 1, 2026** ### Trade Feed in the Python and TypeScript SDKs `MCP & SDK` · New SDK 0.9.0 adds the Trade Feed: read a user's feed, list, add and remove traders, read their notifications and follow the live stream, by your own user id or csid\_id. The trade\_feed.trade and trade\_feed.thesis webhooks are typed. [Read more](https://docs.cabalspy.xyz/cabalspy-id/sdks) ### Trade Feed reads work with your own user ids `CabalSpy ID` · Improved The Trade Feed feed, trader list and notifications now accept your own user id (external\_id) for platform users, like adding and removing traders already did. You no longer need to look up the csid\_id first. [Read more](https://docs.cabalspy.xyz/cabalspy-id/trade-feed-api) ### Copy trading tool in the MCP server `MCP & SDK` · New The new csid\_copy\_trading tool shows the copy instructions sent to your platform, filtered by status or user, and the copy settings of one user. The MCP server now has 38 tools. [Read more](https://docs.cabalspy.xyz/cabalspy-id/copy-trading) ### Copy trading for your users `CabalSpy ID` · New Your users can copy traders from their Trade Feed with their own settings: fixed amount or a percentage of the trader's buy, a maximum per trade, buys only or buys and sells. Every trade arrives as a ready-to-execute instruction by webhook, stream or API; your app executes it with the user's wallet and reports back, and the dashboard has a new Copy trading tab. [Read more](https://docs.cabalspy.xyz/cabalspy-id/copy-trading) ### Copy trading in the TypeScript SDK `MCP & SDK` · New cabalspy-id 0.8.0 on npm adds copy trading: updateCopyTradingSettings, copyInstructions, reportCopyInstruction and a live copyTradingStream(). Instructions, settings and the copy\_trade.instruction webhook are fully typed. [Read more](https://docs.cabalspy.xyz/cabalspy-id/copy-trading) ### Copy trading in the Python SDK `MCP & SDK` · New cabalspy-id 0.8.0 for Python adds copy trading: set how a user copies a trader, list and fetch copy instructions, report them executed, failed or skipped, and receive new instructions live with CopyTradingStream. Sync and async, fully typed, including the copy\_trade.instruction webhook. [Read more](https://docs.cabalspy.xyz/cabalspy-id/copy-trading) ### Trade Feed and copy trading documentation `Docs` · New New guides for the CabalSpy ID Trade Feed (Data API, live stream, webhooks and the embeddable + Trade Feed widgets) and for copy trading: copy settings per user and trader, ready-to-execute instructions, status reports, the copy trading stream and the dashboard tab. [Read more](https://docs.cabalspy.xyz/cabalspy-id/copy-trading) **October 31, 2026** ### Callouts and callout competitions in the TypeScript SDK `MCP & SDK` · New cabalspy-id 0.7.0 on npm adds callouts (create, list, stats, callers leaderboard, settings), a live callouts stream, typed callout webhooks and callout competitions. Callouts are switched on per platform on request. [Read more](https://docs.cabalspy.xyz/cabalspy-id/callouts) ### Callouts: your users call tokens, tracked like our own calls `CabalSpy ID` · New Users can call a token; the market cap at the call is stamped and every call is tracked: live multiples, peak since the call, stats per period, a callers leaderboard, a live stream, webhooks and callout competitions. Switched on per platform on request, with a Callouts tab in the dashboard. [Read more](https://docs.cabalspy.xyz/cabalspy-id/callouts) ### Callouts and callout competitions in the Python SDK `MCP & SDK` · New cabalspy-id 0.7.0 for Python adds Callouts: create and remove callouts, list them, read stats per period and the callers leaderboard, change the settings, and follow every callout live on a stream. Competitions can now be callout competitions. Callouts are switched on per instance on request. [Read more](https://docs.cabalspy.xyz/cabalspy-id) ### Callouts and callout competitions documentation `Docs` · New New docs for CabalSpy ID Callouts: how calls are tracked and scored, the endpoints to make, list and remove callouts, per-user stats, the leaderboard, settings, the live stream, webhooks and callout competitions. Callouts are switched on per instance on request. [Read more](https://docs.cabalspy.xyz/cabalspy-id/callouts) ### Callouts tools in the MCP server `MCP & SDK` · New The MCP server (2.6.0) can read callouts on your CabalSpy ID instance: the latest callouts, who called a token and how it did, a callers leaderboard per period and one user's track record. Callout competitions now show their kind and rules. Callouts are an extra that is switched on per instance on request. [Read more](https://docs.cabalspy.xyz/cabalspy-id) ### Cleaner errors and paging in the white-label and competitions API `CabalSpy ID` · Fixed Competition lists now return next\_cursor for the next page, invalid numbers such as Infinity get a 400 instead of a server error, malformed cursors are rejected, rate-limited answers carry Retry-After, and imports report updated only when something actually changed. [Read more](https://docs.cabalspy.xyz/cabalspy-id/competitions-list) ### Inbound wallet removals and all-users competitions behave correctly `CabalSpy ID` · Fixed Wallet removal events from auth providers no longer add the wallet back; send wallet.removed in our format to remove one. Competitions that enter all users now respect the participant limit, and users who leave stay out. [Read more](https://docs.cabalspy.xyz/cabalspy-id/platform-users-inbound) ### Dashboard settings guide for CabalSpy ID `Docs` · New A new docs page explains every CabalSpy ID setting in the API dashboard, tab by tab, with the matching API names and links to the detailed reference. [Read more](https://docs.cabalspy.xyz/cabalspy-id/dashboard) ### White-label tools in the MCP server `MCP & SDK` · New Three new read-only tools for platforms that import their own users: look up one of your users by your own user id, rank your platform's users on a chain, and read your trading competitions with their standings. [Read more](https://docs.cabalspy.xyz/cabalspy-id/white-label) ### White-label and trading competitions in the CabalSpy ID SDKs `MCP & SDK` · New cabalspy-id 0.6.0 for Python and TypeScript adds platform users and trading competitions: import any number of users and their wallets with automatic chunking and retries, profiles, PnL and leaderboards of your users, settings, wallet verification, and typed webhooks for the new events. [Read more](https://docs.cabalspy.xyz/cabalspy-id/white-label) **October 28, 2026** ### White-Label and trading competitions documentation `Docs` · New New docs for CabalSpy ID White-Label: keep your own login, import your users with their existing Privy, Dynamic or other wallets, and get their profiles, PnL and leaderboards by your own user id. Trading competitions between your users, with standings every 5 minutes and webhooks, are documented too. [Read more](https://docs.cabalspy.xyz/cabalspy-id/white-label) **October 26, 2026** ### 126 more KOL wallets across Solana and EVM chains `API` · Improved We added 126 KOL wallets with names, X profiles and profile pictures: 60 on Solana and 66 EVM wallets that are now tracked on BNB Chain, Base, Ethereum and Robinhood Chain. They are available in wallet lookups, leaderboards, trade feeds and live streams. [Read more](https://docs.cabalspy.xyz/) ### Calls in the TypeScript, Python and Rust SDKs `MCP & SDK` · New cabalspy 0.4.0 for TypeScript and Python and 0.3.0 for Rust add calls.list() and calls.stats() for our curated calls and their hit rates. TypeScript and Python also support the new call stream on the realtime client. [Read more](https://docs.cabalspy.xyz/sdks) ### Calls in the MCP server `MCP & SDK` · New The CabalSpy MCP server has two new tools, get\_calls and get\_call\_stats. AI assistants can now look up our curated calls with their trigger wallets and 24 hour performance, and check hit rates per chain and tier. [Read more](https://docs.cabalspy.xyz/mcp-server) ### Calls via REST and WebSocket `API` · New Our curated calls (Gambles, Moderate Gamble, Good Token, Big Token, Whales) are now available outside Discord: subscribe to the call channel on the realtime gateway, or use /v1/calls and /v1/calls/stats for history, 24h performance per call and hit rates. Covers Solana, BNB, Ethereum and Robinhood Chain; demo keys get calls 15 minutes late. ### Solana calls are back on Discord and the call feed `Streams` · Fixed Solana Gamble, Moderate Gamble and Good Token calls stopped from October 22 because our previous token data source blocked requests. Market cap, name and logo now come from Mobula, and calls are flowing again on Discord and the live call feed. **October 23, 2026** ### CabalSpy ID tools in the MCP server `MCP & SDK` · New The MCP server now includes CabalSpy ID tools: look up verified trader profiles and wallet owners, browse verified KOLs and read token theses from holders together with their live position and PnL. [Read more](https://docs.cabalspy.xyz/mcp-server) **October 15, 2026** ### Theses widget and browser API `CabalSpy ID` · New Show token theses from verified holders on your own site with the theses widget, or build your own interface with the browser API. Both work with your public client\_id. [Read more](https://docs.cabalspy.xyz/cabalspy-id/theses-browser-api) ### Official SDKs for TypeScript, Python and Rust `MCP & SDK` · New Install with npm install cabalspy or pip install cabalspy, or add the cabalspy crate in Rust. You get typed responses, pagination helpers and, in TypeScript and Python, the WebSocket streams. Every SDK also runs on the public demo without a key. [Read more](https://docs.cabalspy.xyz/sdks) **October 13, 2026** ### CabalSpy ID: SocialFi for trading terminals and bots `CabalSpy ID` · New CabalSpy ID is a SocialFi extension you can run white-label or under your own brand in a trading terminal or bot: login with verified trader profiles, token theses from real holders with their live position, and a wallet tracker for your users. Integrate it with the Data API and SDK. [Read more](https://docs.cabalspy.xyz/cabalspy-id/overview) # Connections Source: https://docs.cabalspy.xyz/connections GET /v1/wallets/connections Find wallets connected to a given wallet by shared token activity, ranked by how many tokens they traded in common over the last 30 days. Discover which other tracked wallets trade the same tokens as a given wallet. CabalSpy compares the tokens the wallet traded over the last 30 days against every other tracked wallet of the same type and returns those with overlap, ranked by how many tokens they share. Use it to map clusters of wallets that move together, spot wallets that shadow a known KOL, or surface a network of related traders around one address. > [!TIP] > > overlap\_score is the share of the source wallet tokens that the other wallet also traded, from 0 to 1. A higher shared\_tokens count and a higher overlap\_score mean a stronger connection. Results are sorted by shared\_tokens, highest first. ## Query Parameters **blockchain** `string` *required* Chain of the wallet. One of solana, bnb, base, eth, rh (Robinhood Chain). **address** `string` *required* The source wallet address to find connections for. **limit** `integer` Maximum number of connections to return. Omit to return all. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/wallets/connections?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW&limit=20&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "limit": 20, "api_key": "YOUR_KEY", } r = requests.get("https://api.cabalspy.xyz/v1/wallets/connections", params=params) for c in r.json()["data"]["connections"]: print(c["name"] or c["wallet_address"], "shared", c["shared_tokens"], "score", c["overlap_score"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", limit: "20", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/wallets/connections?${p}`); const { data } = await res.json(); data.connections.forEach(c => console.log(c.name || c.wallet_address, "shared", c.shared_tokens)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **wallet\_address** `string` The source wallet the connections were computed for. **blockchain** `string` Requested chain. **connections** `array` **connection, sorted by shared\_tokens highest first** **wallet\_address** `string` Address of the connected wallet. **name** `string` Display name of the connected wallet (may be empty). **image\_url** `string` Avatar URL. **twitter** `string` Twitter or X link. **type** `string` Wallet type kol, smart or whale. **shared\_tokens** `integer` Number of tokens both wallets traded in the last 30 days. **overlap\_score** `number` Share of the source wallet tokens that the connected wallet also traded, from 0 to 1. ```json Response theme={null} { "success": true, "data": { "wallet_address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "blockchain": "solana", "connections": [ { "wallet_address": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin", "name": "Cupsey", "image_url": "https://cabalspy.xyz/images/9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin.png", "twitter": "https://x.com/cupseyy", "type": "kol", "shared_tokens": 18, "overlap_score": 0.375 }, { "wallet_address": "3Cx7Wm8yQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZbXX", "name": "", "image_url": "", "twitter": "", "type": "kol", "shared_tokens": 9, "overlap_score": 0.187 } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": true, "cache_age_seconds": 120, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | address is missing. | | 400 | invalid\_parameter | blockchain missing or invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Count Source: https://docs.cabalspy.xyz/count GET /v1/transactions/count Count how many transactions tracked wallets made within a time window, up to 24 hours back, optionally filtered to a single token. A lightweight counter. Returns how many transactions tracked wallets made within a time window, up to 24 hours back. Optionally filter to a single token with mint. Use it for activity indicators and sparklines, for example how many KOL trades happened in the last hour, without pulling the full transaction list. > [!TIP] > > The window is built from seconds, minutes and hours, summed, up to a maximum of 24 hours. Without a window you get the full available window. This endpoint returns only the count, not the transactions, so it is fast and cheap. ## Query Parameters **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh (Robinhood Chain). **type** `string` *required* Wallet category kol, smart or whale. **seconds** `integer` Seconds to look back. Combined with minutes and hours. **minutes** `integer` Minutes to look back. **hours** `integer` Hours to look back. Maximum total window is 24 hours. **mint** `string` Optional token mint to count only that token transactions. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/transactions/count?blockchain=solana&type=kol&hours=1&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "type": "kol", "hours": 1, "api_key": "YOUR_KEY"} r = requests.get("https://api.cabalspy.xyz/v1/transactions/count", params=params) d = r.json()["data"] print("count", d["count"], "over", d["time_window_seconds"], "seconds") ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", type: "kol", hours: "1", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/transactions/count?${p}`); const { data } = await res.json(); console.log("count", data.count); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **blockchain** `string` Requested chain. **type** `string` Requested wallet type. **mode** `string` count. **count** `integer` Number of transactions in the window. **time\_window\_seconds** `integer` The effective window in seconds, after capping. **mint** `string` Present only when a mint filter was passed. **warnings** `array` Present only if the requested window exceeded the 24 hour maximum and was capped. ```json Response theme={null} { "success": true, "data": { "blockchain": "solana", "type": "kol", "mode": "count", "count": 128, "time_window_seconds": 3600 }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | blockchain or type missing or invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Live Wallet Count Badge Source: https://docs.cabalspy.xyz/count-1 Show how many tracked KOL wallets are in a token as a live badge or heat indicator, with a REST poll for a number on demand or a WebSocket for live updates. Learn how to show a simple, powerful number next to any token, how many tracked KOL wallets are in it. It makes a great activity badge, a heat indicator, or a cheap trigger before you pull heavier data. This guide covers both ways to get it in TypeScript, with no CSS, so you can style the badge yourself. ## Two numbers, two sources Before any code, know which number you want, because the two sources answer slightly different questions. | Source | What it counts | Best for | | - | - | - | | REST /v1/transactions/count | How many trades tracked wallets made in a time window | Activity over the last hour, a quick on-demand number | | WSS count stream | How many distinct KOL wallets hold the token right now | A live holder count badge that updates as wallets buy | If your badge says how many KOLs are in this token, you want the stream and its kol\_count. If it says how active has this token been lately, you want the REST count. ## Option A, a number on demand over REST The REST counter is one call. You give it a chain, a wallet type and a time window built from seconds, minutes and hours, up to 24 hours back, and it returns just the count. No transactions, so it is fast and cheap. ### Step 1, the fetch ```typescript src/count-rest.ts theme={null} const API_BASE = 'https://api.cabalspy.xyz/v1'; export async function fetchTradeCount(mint: string, hours = 1): Promise { const params = new URLSearchParams({ blockchain: 'solana', type: 'kol', hours: String(hours), mint, api_key: import.meta.env.VITE_CABALSPY_KEY as string, }); const res = await fetch(`${API_BASE}/transactions/count?${params}`); const body = await res.json(); if (!body.success) throw new Error(body.error?.message || 'count failed'); return body.data.count as number; } ``` ### Step 2, show it, and refresh on an interval Since REST gives you a snapshot, poll it on a timer if you want it to stay current. A 30 second interval is plenty for an activity badge. ```typescript src/badge-rest.ts theme={null} import { fetchTradeCount } from './count-rest'; export function mountRestBadge(el: HTMLElement, mint: string): () => void { const update = async () => { try { el.textContent = `${await fetchTradeCount(mint)} trades (1h)`; } catch { el.textContent = '-'; } }; update(); const timer = setInterval(update, 30_000); return () => clearInterval(timer); // call to stop polling } ``` That is the whole REST path. One call, one number, refreshed on a timer. ## Option B, a live badge over WebSocket The stream is better when you want the badge to update the moment a KOL buys. You subscribe once, and every time the KOL wallet count for a token changes, you get the new number pushed to you. ### Step 1, connect and subscribe Subscribe with the wildcard to watch every token, or pass a single mint to watch one. The stream always reports the KOL wallet count, it is not split by wallet type. ```typescript src/count-stream.ts theme={null} export interface CountUpdate { mint: string; kol_count: number; } export function connectCountStream( onUpdate: (u: CountUpdate) => void, token: string = '*', ): () => void { const key = import.meta.env.VITE_CABALSPY_KEY as string; const ws = new WebSocket(`wss://stream.cabalspy.xyz?apiKey=${encodeURIComponent(key)}`); ws.onopen = () => { ws.send(JSON.stringify({ op: 'subscribe', stream: 'count', blockchain: 'solana', token })); }; ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === 'wallet_count') { onUpdate({ mint: msg.data.mint, kol_count: msg.data.kol_count }); } }; return () => { try { ws.close(); } catch { /* already closing */ } }; } ``` ### Step 2, keep a count per token and render Hold the latest count per mint in a Map, and update the matching badge whenever an event arrives. This scales to a whole list of tokens on one connection. ```typescript src/badges-live.ts theme={null} import { connectCountStream } from './count-stream'; const counts = new Map(); export function startLiveBadges(): () => void { return connectCountStream(({ mint, kol_count }) => { counts.set(mint, kol_count); // Update the badge for this token if it is on the page. const badge = document.querySelector(`[data-mint="${mint}"] .kol-badge`); if (badge) badge.textContent = `${kol_count} KOLs`; }); } ``` Your markup just needs the mint on each row and a badge element to fill in. ```html index.html theme={null}
invisibull 0 KOLs
``` ## Which one should you use A simple rule. If you are decorating a static list and a number that is a little stale is fine, poll the REST count, it is one call and needs no connection. If the freshness is the point, a live count that ticks up as KOLs pile in, use the stream. You can also combine them. Seed each badge with a REST count on first paint so it is never empty, then let the stream take over for live updates. ## Billing note The REST count is one request per call, cheap because it returns only a number. On the stream, each delivered wallet\_count event counts against your plan, so a wildcard subscription on a busy chain can add up, filter to the tokens you actually show. ## Reference > [card] [GET /v1/transactions/count](/api-reference/transactions-count) > > The REST counter over a time window. > [card] [WSS count stream](/websockets/count) > > The live KOL wallet count per token. # Try the API without a key Source: https://docs.cabalspy.xyz/demo Call every CabalSpy REST endpoint and WebSocket stream without signing up, on the public demo: 20 requests per IP per day, data delayed 15 minutes. Every endpoint and every stream can be tried without an account or API key. The public demo is meant for reading the docs, testing a request and letting AI agents explore the API. It is not meant for production. > [!WARNING] > > The demo is only for trying CabalSpy out. To build on it you need an API key, passed as shown on [API Key](/api-key) and in every endpoint's examples. [Get a free key](https://apidashboard.cabalspy.xyz/register). The **Try it** button on every endpoint page uses the demo automatically: leave the `api_key` field empty and press Send. ## Two ways in ```bash No key at all theme={null} curl "https://demo-api.cabalspy.xyz/v1/wallets?blockchain=solana&type=kol" ``` ```bash Demo key on the normal API theme={null} curl "https://api.cabalspy.xyz/v1/wallets?blockchain=solana&type=kol&api_key=demo" ``` Both are the same demo with the same limits. `demo-api.cabalspy.xyz` adds the demo key for you, so a link or an example request works as it is. The key `demo` works anywhere a normal key does: in the SDKs, the MCP server and WebSocket connections. ## Limits | | Demo | Free test key | | - | - | - | | Requests | 20 per IP per day | 1,000 per month | | Data | Delayed 15 minutes | Real time | | Rows per list | At most 5 | Full | | WebSocket | 1 connection per IP, 3 subscriptions, 30 minutes | Full | | Signup | None | Free account | The 20 requests are shared between REST and WebSocket; opening a WebSocket connection counts as one request. The counter resets at 00:00 UTC. IPv6 addresses are counted per /64 network. Events younger than 15 minutes are left out of every answer, so the newest trade you see is about 15 minutes old. Totals and profiles are current, but lists stop at 5 rows and pagination always reports `has_more: false`. ## How a demo answer looks Every demo answer carries a `demo` block and the header `X-CabalSpy-Demo: true`, so you, your code and an AI agent can always tell demo data from live data. ```json theme={null} { "success": true, "data": { "...": "..." }, "demo": { "notice": "Public demo: events delayed 15 minutes, at most 5 rows, 20 requests per IP per day.", "remaining_today": 19, "upgrade": { "test_key": "https://apidashboard.cabalspy.xyz/", "pay_per_call": "https://www.cabalspy.xyz/x402/", "docs": "https://docs.cabalspy.xyz" } } } ``` The header `X-Demo-Remaining` carries the same count as `remaining_today`. When the 20 requests are used up, the API answers with HTTP 429: ```json theme={null} { "success": false, "error": { "code": "demo_limit_reached", "message": "The demo allows 20 requests per IP per day. Get a free test key for 1,000 real-time requests a month.", "resets_in_seconds": 42753 }, "demo": true } ``` ## WebSocket ```javascript theme={null} const ws = new WebSocket("wss://demo-api.cabalspy.xyz/ws"); // or: new WebSocket("wss://stream.cabalspy.xyz?apiKey=demo") ws.onopen = () => { ws.send(JSON.stringify({ op: "subscribe", stream: "tx", blockchain: "solana", type: "kol", token: "*" })); }; ws.onmessage = (e) => console.log(JSON.parse(e.data)); ``` The welcome message carries a `demo` block. Replies such as `subscribed` arrive at once; trade and stream events arrive 15 minutes after they happened. The connection closes after 30 minutes. A second demo connection from the same IP is refused while the first is open. ## SDKs and the MCP server ```ts TypeScript theme={null} import { CabalSpy } from 'cabalspy'; // 0.3.0 or later const client = CabalSpy.demo(); const board = await client.wallets.leaderboard({ blockchain: 'solana', type: 'kol', period: '7d' }); console.log(client.lastDemo?.remaining_today); ``` ```python Python theme={null} from cabalspy import CabalSpy # 0.3.0 or later client = CabalSpy.demo() board = client.wallets.leaderboard(blockchain="solana", type="kol", period="7d") print(client.last_demo["remaining_today"]) ``` ```rust Rust theme={null} use cabalspy::CabalSpy; // 0.2 or later let client = CabalSpy::demo()?; ``` The SDKs raise a dedicated error when the demo budget is spent (`DemoLimitError` in TypeScript and Python, `Error::DemoLimit` in Rust) and do not retry it, because the budget only resets the next day. The [MCP server](/mcp-server) uses the demo automatically when you connect without a key, so an assistant can answer its first questions before anyone signs up. ## When the demo is not enough > [card] [Free test key](/api-key) > > 1,000 real-time requests a month, full lists, every stream. Free account, no credit card. > [card] [Pay per request](/x402) > > AI agents pay per call in USDC with x402. No account, no key. # Introduction Source: https://docs.cabalspy.xyz/get CabalSpy is a real-time KOL and Smart Money wallet API: 3,000+ labeled wallets on Solana, BNB Chain, Base, Ethereum and Robinhood Chain via REST, WebSocket, SDKs and an MCP server. #### **CabalSpy is a real-time multi-chain data layer for labeled wallets.**\\ > [card] REST/Websocket API > > 30+ endpoints & 6 websockets for labeled wallet data > [card] KOL's, Smart Money and Whale's > > 3,000+ tracked wallets on Solana, BNB Chain, Base, Ethereum and Robinhood Chain \ Try it right now, without signing up, on the [**public demo**](/demo): ```bash theme={null} curl "https://demo-api.cabalspy.xyz/v1/wallets/leaderboard?blockchain=solana&type=kol&period=7d" ``` The demo covers every endpoint and stream with 20 requests per IP per day and data delayed 15 minutes. For real-time data, create a [**free API key**](https://apidashboard.cabalspy.xyz/) to explore and test the system with limited access. When you're ready for production usage, upgrade your API plan inside the dashboard to unlock full data access and higher rate limits. Have questions, feature requests, feedback or integration needs?\ Reach out to our team, we typically respond quickly. ### Need help? Can't find what you looking for? Reach out to us, we will be answer you ASAP > [card] [Support](https://t.me/+EAr6mh7ar083MmJi) > > Telegram > [card] [Support](https://discord.gg/9CZTBzdrxU) > > Discord > [card] [Support](mailto:contact@cabalspy.xyz) > > E-Mail # Get Started Source: https://docs.cabalspy.xyz/get-started Real-time WebSocket streams for trades, holder positions, wallet balances, cluster signals and KOL bundle detection across Solana, BNB Chain, Base, Ethereum and Robinhood Chain. CabalSpy provides real-time WebSocket streams for tracked KOL, Smart Money and Whale activity, delivered the moment it happens. Where the REST API returns a snapshot when you ask, the streams push updates to you continuously, live trades, changing positions, moving balances, and freshly detected signals and bundles. Everything runs over a single connection. You open one WebSocket, authenticate once, then subscribe to as many channels as you need. Each channel is independent, and you can subscribe and unsubscribe at any time without reconnecting. ## Connecting Connect to the endpoint and pass your API key, either as a query parameter or as a Bearer header. A connection without a valid key is closed immediately. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => { ws.send(JSON.stringify({ op: "subscribe", stream: "tx", blockchain: "solana", type: "kol", token: "*", })); }; ws.onmessage = (e) => { const msg = JSON.parse(e.data); console.log(msg.event, msg.data); }; ``` ```python Python theme={null} import json, websocket def on_open(ws): ws.send(json.dumps({ "op": "subscribe", "stream": "tx", "blockchain": "solana", "type": "kol", "token": "*", })) def on_message(ws, message): msg = json.loads(message) print(msg.get("event")) ws = websocket.WebSocketApp( "wss://stream.cabalspy.xyz?apiKey=YOUR_KEY", on_open=on_open, on_message=on_message, ) ws.run_forever() ``` On connect you receive a welcome message that lists the available streams and shows example subscriptions, so you can confirm the connection works before subscribing. > [!TIP] > > No key yet? Connect to `wss://demo-api.cabalspy.xyz/ws` (or use `apiKey=demo`) to try every stream on the [public demo](/demo). Events arrive 15 minutes late, with 3 subscriptions per connection, one connection per IP and a 30-minute session. ## How subscriptions work You drive everything with small JSON messages. Every message has an op field that says what to do, and a stream field that says which stream it applies to. **op** `string` *required* The operation. One of subscribe, unsubscribe, subscriptions (list your active channels) or ping (check the connection, you get a pong back). **stream** `string` *required* Which stream the message applies to. One of tx, count, holder, balance, signal, bundle, call. A subscribe message adds a channel, an unsubscribe message removes it. Each stream page shows the exact fields for that stream, but the shape is always the same. ```json Subscribe theme={null} { "op": "subscribe", "stream": "holder", "token": "3Pkrq...pump" } ``` ```json Unsubscribe theme={null} { "op": "unsubscribe", "stream": "holder", "token": "3Pkrq...pump" } ``` Most streams accept a token or wallet filter. Use a specific mint, contract or wallet address to follow one thing, or the value "\*" to follow everything of that kind. Following a single token or wallet usually also returns a starting snapshot. ## Available streams > [card] [Transactions](https://docs.cabalspy.xyz/transactions-1) > > Every buy and sell from tracked wallets, with the running position after each trade. > [card] [Count](https://docs.cabalspy.xyz/Count) > > The live KOL wallet count per token, a lightweight activity indicator. > [card] [Holder](https://docs.cabalspy.xyz/holder) > > All holders of a token with live position, bag percentage, unrealized PnL and remaining value. > [card] [Balance](https://docs.cabalspy.xyz/balance-1) > > The native SOL balance of tracked wallets, updated on every trade. > [card] [Signal](https://docs.cabalspy.xyz/signal) > > Entry and exit signals when clusters of KOL or Smart Money wallets buy or sell together. > [card] [Bundle](https://docs.cabalspy.xyz/bundle-1) > > Coordinated KOL bundles on a token, the side wallets buying alongside a KOL, with proof. > [card] [Call](https://docs.cabalspy.xyz/call) > > Our curated calls, the same ones posted in Discord, the moment they go out. ## Stream categories The seven streams fall into three groups by what they describe. Holdings and position, what wallets hold right now. The holder stream covers all holders of a token, the balance stream covers a wallet native SOL balance. Signals and detection, derived alerts rather than raw activity. The signal stream fires on buy and sell clusters, the bundle stream surfaces coordinated KOL bundles as they form, the call stream delivers our curated calls. Trades and activity, the raw event flow. The transactions stream carries individual trades, the count stream carries the live wallet count per token. ## Modes and cost Each delivered message counts against your plan, the same way a REST request does. A wildcard subscription on a busy chain can produce a lot of messages, so filter to a specific token or wallet when you can. The holder and bundle streams add a mode control. In full mode you also get live position updates every time the market cap moves, in events mode you get only real trades and detections. With full mode, an optional mc\_interval caps those price updates to at most once every N seconds. Each of those pages explains the trade-off in detail. ## Staying connected The server sends periodic pings and expects your client to answer with pong, which browsers and standard WebSocket libraries do automatically. A connection that stops answering is dropped. You can also send op ping yourself at any time to confirm the connection is alive. # Widget Pricing Source: https://docs.cabalspy.xyz/get-started-1 CabalSpy embeddable widget plans, a live wallet bubble map you drop in with one iframe. Starter, Pro and Enterprise pricing by domains and daily users. The CabalSpy widget is a live bubble map of wallet activity for any address, embedded with a single iframe. CabalSpy handles the data, styling and live updates, you just pick a plan, whitelist your domain, and drop it in. It supports Solana, BNB, Base, ETH and RobinHood. ## Plans Pick a plan by how many sites you embed on and how many daily users you expect. > [card] Widget Starter - \$199 / mo > > About 250 daily users. One domain. Ideal for community sites and single app launches. > > Embeddable widget. KOL, Smart Money and Whale labels. Solana, BNB, Base and ETH support. > > [Get Starter](https://apidashboard.cabalspy.xyz/register) > [card] Widget Pro - \$499 / mo > > About 1,000 daily users. Up to 3 domains in the same project. For multi product trading platforms scaling past 1k DAU. > > Everything in Starter, plus priority support. > > [Get Pro](https://apidashboard.cabalspy.xyz/register) > [card] Enterprise - Custom > > 1,000+ daily users. Unlimited domains and custom user limits. For exchanges and terminals serving 10k+ users across products. > > SLA backed uptime, dedicated support and early feature access. > > [Contact sales](mailto:hello@cabalspy.xyz) > [!TIP] > > Widget Pro is the most popular plan, picked by trading terminals scaling to 1k+ daily users. ## Compare plans | Feature | Starter | Pro | Enterprise | | - | - | - | - | | Price | \$199 / mo | \$499 / mo | Custom | | Daily users | about 250 | about 1,000 | 1,000+ | | Domains | 1 | 3 (same project) | Unlimited | | Embeddable widget | Yes | Yes | Yes | | KOL, Smart Money, Whale labels | Yes | Yes | Yes | | Solana, BNB, Base, ETH | Yes | Yes | Yes | | Priority support | No | Yes | Yes | | Dedicated support | No | No | Yes | | SLA backed uptime | No | No | Yes | | Early feature access | No | No | Yes | | Custom user limits | No | No | Yes | ## How it works The whole integration is one iframe, and everything else is handled for you. **1. Pick a plan and register** Start on Starter or Pro from the [dashboard](https://apidashboard.cabalspy.xyz/register), or contact sales for Enterprise. **2. Send us your domain** The widget only renders on approved domains. Send the hostnames you will embed on and we add them to the allow list. All subdomains are covered automatically. **3. Embed the iframe** Drop one iframe into your page with the wallet address and chain. It connects to CabalSpy, loads the bubble map, and keeps itself live over a WebSocket. For the embed code and all iframe options, see the widget integration guide. ## Frequently asked questions > [accordion] What counts as a daily user > > A unique visitor who loads the widget on your site in a day. The daily user figures are guidance for picking a plan, contact us if your traffic sits between tiers. > [accordion] Can I embed on more than one domain > > Starter covers one domain. Pro covers up to three domains in the same project. Enterprise is unlimited. All subdomains of an approved domain are included. > [accordion] Which chains does the widget support > > Solana, BNB, Base and ETH. Solana shows KOL, Smart Money and Whale rings. The EVM chains show KOL and Smart Money. > [accordion] How do I upgrade or contact sales > > Upgrade from the dashboard at any time. For Enterprise, custom limits or SLA terms, reach us at [hello@cabalspy.xyz](mailto:hello@cabalspy.xyz). # KOL Chart Events Source: https://docs.cabalspy.xyz/guides/chart-events Drop live buy and sell bubbles onto a price chart at the moment a KOL trades. Endpoints, chains, first steps and a reference. Drop a small bubble onto a price chart at the exact moment a KOL buys or sells. Green for a buy, red for a sell, placed on the candle where it happened. It turns a plain chart into a live map of smart money activity. ## What it shows When KOLs enter and exit, right on the chart. A trader can read a buy bubble as a possible entry and a sell bubble as an exit, or study the pattern to understand how KOLs time their trades. It is one of the most intuitive ways to show wallet activity, because it sits on the chart people already watch. ## Blockchains Solana, BNB, Base, ETH and Robinhood. ## Endpoints The transactions stream pushes each buy and sell as it happens, with the value and time to place the bubble. > [card] [WSS transactions stream](https://docs.cabalspy.xyz/transactions-1) > > Live buy and sell events per token, with the trade value and timestamp. ## First steps **1. Get an API key** Register at [apidashboard.cabalspy.xyz](https://apidashboard.cabalspy.xyz) and create a key. **2. Have a chart ready** You need a chart you can add markers to, for example TradingView Lightweight Charts or the full Charting Library. **3. Subscribe to the token** Open the transactions stream, subscribe to the token mint, and for each trade add a marker at its timestamp, green for a buy and red for a sell. ```javascript Subscribe theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => ws.send(JSON.stringify({ op: "subscribe", stream: "tx", blockchain: "solana", type: "kol", token: "YOUR_MINT", })); ``` ## Build it > [card] [Reference, transactions stream](https://docs.cabalspy.xyz/transactions-1) > > Full field-by-field reference for the buy and sell events. # KOL Bundle Source: https://docs.cabalspy.xyz/guides/kol-bundle Detect coordinated bundles where a KOL and side wallets buy a token together, with a confidence score and proof. Endpoints, chains, first steps. Detect bundles, the coordinated groups where a KOL and a set of side wallets buy a token together. It surfaces hidden coordination that is almost impossible to spot by hand, with a confidence score and the proof behind each detection. ## What it shows The KOL at the center of a bundle, the side wallets that entered alongside it, and how confident the detection is. For anyone building alpha tools, this turns a wall of anonymous coordinated buys into a clear, labeled event you can alert on or display. ## Blockchains Solana only. ## Endpoints Get bundles live as they are detected, or as a snapshot over REST. > [card] [WSS bundle stream](https://docs.cabalspy.xyz/bundle-1) > > Live bundle detections, each with the KOL, side wallets, confidence and proof. > [card] [Bundle REST API](https://docs.cabalspy.xyz/bundle) > > A snapshot of the current bundles for a token. ## First steps **1. Get an API key** Register at [apidashboard.cabalspy.xyz](https://apidashboard.cabalspy.xyz) and create a key. **2. Pick a Solana token** You need the token mint. Bundle detection is Solana only. **3. Subscribe or call** Open the bundle stream for live detections, or call the bundle REST API for a snapshot. ```javascript Subscribe theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => ws.send(JSON.stringify({ op: "subscribe", stream: "bundle", token: "YOUR_MINT", mode: "full", })); ``` ## Build it > [card] [Cookbook, Holder Table (Advanced)](https://docs.cabalspy.xyz/realtime-holder-table) > > Bundle detection is merged into the live holder table here. # KOL Wallet Tracking Source: https://docs.cabalspy.xyz/guides/kol-wallet-tracking Turn a wallet address into a full profile with stats, realized PnL, holdings and a PnL calendar. Endpoints, chains, first steps and a cookbook. Turn a single wallet address into a full profile, the trader stats, realized PnL, the tokens they traded, live holdings and a month by month PnL calendar. It is the detail page behind every KOL you follow, everything one wallet has done over a period in one view. ## What it shows A trader name and labels, their realized PnL and win rate, average hold time, the tokens they are in and the trades they made. Use it as a KOL profile card, a copytrade research page, or the wallet detail view in a terminal. ## Blockchains Solana, BNB, Base, ETH and Robinhood. ## Endpoints The tracking call carries the whole profile. Two more calls add live holdings and the calendar. > [card] [GET /v1/wallets/tracker](https://docs.cabalspy.xyz/tracker) > > Profile, period stats, win rate, traded tokens, the realized PnL series and recent trades. > [card] [GET /v1/wallets/holdings](https://docs.cabalspy.xyz/holdings) > > Current on-chain token balances. > [card] [GET /v1/wallet/pnl\_calendar](https://docs.cabalspy.xyz/pnl-calender) > > Day by day realized PnL, grouped by month. ## First steps **1. Get an API key** Register at [apidashboard.cabalspy.xyz](https://apidashboard.cabalspy.xyz) and create a key. The free tier is enough to start. **2. Pick a wallet and chain** You need a wallet address and its chain, one of solana, bnb, base, eth or rh (Robinhood Chain). **3. Call the tracking endpoint** Pass blockchain, address, period and your api\_key. The response carries the full profile in one call. ```bash Quick test theme={null} curl "https://api.cabalspy.xyz/v1/wallets/tracker?blockchain=solana&address=YOUR_WALLET&period=30d&api_key=YOUR_KEY" ``` ## Build it > [card] [Cookbook, Wallet Tracker](https://docs.cabalspy.xyz/build-a-wallet-tracker-like-axiom) > > Build the full profile page and PnL calendar step by step. > [card] [GitHub demo](https://github.com/CabalSpy/Wallet-Tracker-Demo) > > Open-source, run in minutes. # KOL Leaderboard Source: https://docs.cabalspy.xyz/guides/leaderboard Rank the best tracked wallets by PnL, win rate, trades or volume on any chain. Endpoints, chains, first steps and a cookbook. Rank the best tracked wallets on any chain, by PnL, win rate, trades or volume. Show the top traders as a podium and the rest in a sortable table. It answers a simple question, who is winning right now. ## What it shows A ranked list of KOL, Smart Money or Whale wallets for a chosen period, each with PnL, win rate, trade count and volume. Use it as a discovery page for the best wallets to follow or copy. ## Blockchains Solana, BNB, Base, ETH and Robinhood. Solana has KOL, Smart Money and Whale. BNB, Base and Robinhood have KOL and Smart Money. ETH has KOL only. ## Endpoints One call returns the whole ranked list. > [card] [GET /v1/wallet/leaderboard](https://docs.cabalspy.xyz/leaderboard) > > Ranked wallets for a chain, wallet type and period, each with a profile, period stats and win rate. ## First steps **1. Get an API key** Register at [apidashboard.cabalspy.xyz](https://apidashboard.cabalspy.xyz) and create a key. **2. Choose chain, type and period** Pick a chain, a wallet type (kol, smart or whale, where the chain supports it) and a period of 6h, 1d, 7d or 30d. **3. Call the leaderboard endpoint** Pass blockchain, type, period and api\_key. The response carries the ranked list. ```bash Quick test theme={null} curl "https://api.cabalspy.xyz/v1/wallet/leaderboard?blockchain=solana&type=kol&period=1d&api_key=YOUR_KEY" ``` ## Build it > [card] [Cookbook, Leaderboard](https://docs.cabalspy.xyz/build-a-leaderboard-like-axiom-vision) > > Build the ranked, searchable leaderboard step by step. > [card] [GitHub demo](https://github.com/CabalSpy/Leaderboard-Demo) > > Open-source, run in minutes. # PnL Calendar Source: https://docs.cabalspy.xyz/guides/pnl-calendar A month by month calendar of a wallet realized PnL, one colored cell per day. Endpoints, chains, first steps and a cookbook. A month by month calendar of a wallet realized PnL, one colored cell per day, green for a winning day and red for a losing one. It is the clearest way to show a trader consistency over time. ## What it shows Daily results across each month, with a summary per month and full detail per day. It reveals streaks and consistency at a glance, a wall of green is a steady winner, a scattered calendar is a gambler. ## Blockchains Solana, BNB, Base, ETH and Robinhood. ## Endpoints One call returns the day by day results grouped by month. > [card] [GET /v1/wallet/pnl\_calendar](https://docs.cabalspy.xyz/pnl-calender) > > Day by day realized PnL, with a monthly summary and per day detail. ## First steps **1. Get an API key** Register at [apidashboard.cabalspy.xyz](https://apidashboard.cabalspy.xyz) and create a key. **2. Pick a wallet and chain** You need a wallet address and its chain. **3. Call the calendar endpoint** Pass blockchain, address and api\_key. The response groups days under months, ready to render as a grid. ```bash Quick test theme={null} curl "https://api.cabalspy.xyz/v1/wallet/pnl_calendar?blockchain=solana&address=YOUR_WALLET&api_key=YOUR_KEY" ``` ## Build it > [card] [Cookbook, Wallet Tracker](https://docs.cabalspy.xyz/build-a-wallet-tracker-like-axiom) > > The PnL calendar is built as its own step in the wallet tracker cookbook. # KOL Real-Time Holding Table Source: https://docs.cabalspy.xyz/guides/realtime-holding-table A live table of everyone holding a token, merging holder positions, native balance and bundle flags. Endpoints, chains, first steps and a cookbook. A live table of everyone holding a token, updating as they trade and as the market cap moves. Each holder shows their position, bag percentage, unrealized PnL, native balance, and whether they entered through a coordinated bundle. This is the full Axiom style holders tab. ## What it shows Who holds the token and how they are doing, live. It merges three streams, the holder position, the wallet native balance, and bundle detection, into one row per wallet, so you see the position, the wallet size and the bundle flag together. ## Blockchains Solana only. The holder position uses live market cap, the balance is native SOL, and bundle detection is Solana based. ## Endpoints Three streams, merged into one table keyed by wallet. > [card] [WSS holder stream](https://docs.cabalspy.xyz/holder) > > Positions, bag percentage and unrealized PnL. This stream owns which rows exist. > [card] [WSS balance stream](https://docs.cabalspy.xyz/balance-1) > > Native SOL balance per wallet. > [card] [WSS bundle stream](https://docs.cabalspy.xyz/bundle-1) > > Flags the wallets that entered through a coordinated bundle. ## First steps **1. Get an API key** Register at [apidashboard.cabalspy.xyz](https://apidashboard.cabalspy.xyz) and create a key. **2. Pick a Solana token** You need the token mint. This feature is Solana only. **3. Subscribe to all three streams** Open one WebSocket, subscribe to the holder, balance and bundle streams for the token, and merge each event into a row keyed by wallet address. ```javascript Subscribe to all three theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => { ws.send(JSON.stringify({ op: "subscribe", stream: "holder", token: "YOUR_MINT", mode: "full" })); ws.send(JSON.stringify({ op: "subscribe", stream: "balance", wallet: "*" })); ws.send(JSON.stringify({ op: "subscribe", stream: "bundle", token: "YOUR_MINT", mode: "full" })); }; ``` ## Build it > [card] [Cookbook, Holder Table (Advanced)](https://docs.cabalspy.xyz/Real-Time-Holders-tab-with-balance-and-bundle) > > Merge holder, balance and bundle into one live table, step by step. > [card] [GitHub demo](https://github.com/CabalSpy/kol-realtime-holder-table) > > Open-source, run in minutes. # KOL Signal Service Source: https://docs.cabalspy.xyz/guides/signal-service Surface tokens where several tracked wallets buy together, and stream live entry and exit alerts. Endpoints, chains, first steps and a cookbook. Surface tokens where several tracked wallets are buying at once, a cluster, and stream live entry and exit alerts as they form. It is the engine behind an alerts feed, a Telegram bot or a trading agent. ## What it shows Coordinated buying. When a group of KOLs or Smart Money wallets pile into the same token inside a short window, that is a cluster, and it is a strong early signal. You set the rules, how many wallets, what win rate, which types, and the service tells you the moment they are met. ## Blockchains The core cluster and entry logic runs on Solana, BNB, Base, ETH and Robinhood. The live market cap attached to a signal is Solana only. ## Endpoints Get signals live as they form, or as a snapshot on a schedule. > [card] [WSS signal stream](https://docs.cabalspy.xyz/signal) > > Live entry and exit signals with your own per type thresholds. > [card] [GET /v1/signals](https://docs.cabalspy.xyz/signals) > > A snapshot of current clusters, with cluster, entry and exit modes. ## First steps **1. Get an API key** Register at [apidashboard.cabalspy.xyz](https://apidashboard.cabalspy.xyz) and create a key. **2. Decide your rules** Choose how many wallets make a cluster, an optional minimum win rate, and which wallet types must agree. **3. Subscribe or poll** Open the signal stream with your thresholds for live alerts, or poll the signals endpoint in cluster mode for a snapshot. ```bash Quick test, cluster snapshot theme={null} curl "https://api.cabalspy.xyz/v1/signals?blockchain=solana&type=kol&mode=cluster&min_wallets=3&hours=6&api_key=YOUR_KEY" ``` ## Build it > [card] [Cookbook, Signal Service](https://docs.cabalspy.xyz/build-a-signal-for-wallet-cluster-buying) > > Build cluster scanning and live alerts step by step. # KOL Supply Holding Source: https://docs.cabalspy.xyz/guides/supply-holding Show how much of a token supply tracked wallets hold, updating live from the trade stream. Endpoints, chains, first steps and a cookbook. Show how much of a token supply the tracked wallets hold, updating live as they trade. It answers how much of this token is in smart hands, a concentration signal traders watch. ## What it shows The combined percent of supply held by tracked wallets, and how it moves as they buy and sell. A high or rising number means the token is concentrating in wallets you follow. Because it updates from the live trade stream, the number moves in real time rather than on a refresh. ## Blockchains Solana, BNB, Base, ETH and Robinhood. ## Endpoints The transactions stream pushes the trades you aggregate into the held supply. > [card] [WSS transactions stream](https://docs.cabalspy.xyz/transactions-1) > > Live buy and sell events at wss\://stream.cabalspy.xyz, aggregated into held supply. ## First steps **1. Get an API key** Register at [apidashboard.cabalspy.xyz](https://apidashboard.cabalspy.xyz) and create a key. **2. Pick a token** You need the token mint you want to measure. **3. Subscribe and aggregate** Open the transactions stream, subscribe to the mint, and keep a running total of how much supply the tracked wallets hold as trades arrive. ```javascript Subscribe theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => ws.send(JSON.stringify({ op: "subscribe", stream: "tx", blockchain: "solana", type: "kol", token: "YOUR_MINT", })); ``` ## Build it > [card] [Cookbook, Supply Holding](https://docs.cabalspy.xyz/build-a-supply-and-bag-holdings-badge) > > Aggregate held supply, per wallet and combined, step by step. # KOL Wallet Count Source: https://docs.cabalspy.xyz/guides/wallet-count Show how many tracked KOL wallets are in a token as a live badge or activity signal. Endpoints, chains, first steps and a cookbook. Show a simple number next to a token, how many tracked KOL wallets are in it right now. It drops into a token overview or a pulse page as an activity badge. ## What it shows A live count of KOLs in a token. This number is a signal in itself. KOLs are experienced traders who avoid rugs and tend to pile into the same tokens, whether through insider knowledge or a trending narrative. The more KOLs are in a token, the more people treat it as worth trading, so a rising count is an early sign of attention. ## Blockchains Solana, BNB, Base, ETH and Robinhood. ## Endpoints Get it live as it changes, or on demand as a snapshot. > [card] [WSS count stream](https://docs.cabalspy.xyz/Count) > > Live KOL wallet count per token, pushed as wallets buy. > [card] [GET /v1/transactions/count](https://docs.cabalspy.xyz/count) > > A count over a time window, on demand. ## First steps **1. Get an API key** Register at [apidashboard.cabalspy.xyz](https://apidashboard.cabalspy.xyz) and create a key. **2. Decide live or on demand** Use the WebSocket count stream for a badge that updates itself, or the REST count for a number you pull on a timer. **3. Subscribe or call** For live, open the stream and subscribe to a token or to all tokens. For on demand, call the count endpoint with a time window. ```bash Quick test, on demand theme={null} curl "https://api.cabalspy.xyz/v1/transactions/count?blockchain=solana&type=kol&hours=1&mint=YOUR_MINT&api_key=YOUR_KEY" ``` ## Build it > [card] [Cookbook, Wallet Count](https://docs.cabalspy.xyz/count-1) > > Build a live count badge, REST or WebSocket, step by step. # KOL Widget Source: https://docs.cabalspy.xyz/guides/widget An embeddable widget that renders a live bubble map of wallet activity for any address, added with one iframe. Chains, first steps and the guide. An embeddable widget that renders a live bubble map of wallet activity for any address. You add it with a single iframe, and CabalSpy handles the data, styling and live updates. It is the fastest way to show labeled activity with no frontend work. ## What it shows A live bubble map of the KOL and Smart Money wallets active on an address, animating as new buys and sells arrive. It drops straight into a trading terminal, a token page or a dashboard. ## Blockchains Solana, Base, BNB and Robinhood. Solana shows KOL, Smart Money and Whale rings, the others show KOL and Smart Money. ## Endpoints No API calls to wire up. The widget is a single iframe that reads its configuration from the URL and connects to CabalSpy for live data on its own. > [card] [Widget guide](https://docs.cabalspy.xyz/widget-i-frame) > > The full iframe embed, parameters and options. ## First steps **1. Pick a plan** Choose a widget plan from the [pricing page](https://www.cabalspy.xyz/pricing.html), or contact sales for Enterprise. **2. Whitelist your domain** The widget only renders on approved domains. Send us the hostnames you will embed on and we add them to the allow list. **3. Embed the iframe** Drop one iframe into your page with the wallet address and chain. It loads the bubble map and keeps itself live. ```html Embed theme={null} ``` ## Build it > [card] [Widget guide](https://docs.cabalspy.xyz/widget-i-frame) > > Every parameter, chain option and troubleshooting tip. # History Source: https://docs.cabalspy.xyz/history GET /v1/wallets/history Complete lifetime trading history of a wallet, with lifetime stats, win rate distribution, a per token overview and a paginated trade log. The full lifetime record of a wallet. Returns aggregate lifetime statistics, a win rate distribution across profit buckets, a per token overview of everything the wallet has traded, and a paginated log of individual trades newest first. Where the tracker focuses on a single period, history covers the entire life of the wallet. Use it for a complete profile page, tax style trade exports, or deep research on a trader. > [!TIP] > > The trade log is paginated. Read pagination.next\_cursor from the response and pass it back as cursor to fetch the next page. When next\_cursor is null you have reached the end. ## Query Parameters **blockchain** `string` *required* Chain of the wallet. One of solana, bnb, base, eth, rh (Robinhood Chain). **type** `string` *required* Wallet category kol, smart or whale. Availability per chain. Solana has kol, smart, whale. BNB, Base and Robinhood Chain (rh) have kol, smart. ETH has kol. **address** `string` *required* The wallet address whose history you want. **limit** `integer` (default: 50) Number of trades per page in the trade log. **cursor** `string` Cursor for the next page of trades, the pagination.next\_cursor from the previous response. Empty means from the newest trade. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/wallets/history?blockchain=solana&type=kol&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW&limit=50&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "type": "kol", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "limit": 50, "api_key": "YOUR_KEY", } r = requests.get("https://api.cabalspy.xyz/v1/wallets/history", params=params) d = r.json()["data"] print("lifetime pnl", d["lifetime_stats"]["realized_pnl"], d["lifetime_stats"]["currency"]) for t in d["trades"]: print(t["created_at"], t["transaction_type"], t["token_name"], t["value"]) nxt = d["pagination"]["next_cursor"] if nxt: params["cursor"] = nxt ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", type: "kol", address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", limit: "50", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/wallets/history?${p}`); const { data } = await res.json(); data.trades.forEach(t => console.log(t.created_at, t.transaction_type, t.token_name)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **profile** `object` **profile** **wallet\_address** `string` Wallet address. **name** `string` Display name (may be empty). **image\_url** `string` Avatar URL. **twitter** `string` Twitter or X link. **telegram** `string` Telegram link. **blockchain** `string` Chain. **type** `string` Wallet type. **currency** `string` Native currency. **lifetime\_stats** `object` **lifetime\_stats** **currency** `string` Native currency. **buy** `number` Total bought over the wallet lifetime (native). **sell** `number` Total sold over the wallet lifetime (native). **realized\_pnl** `number` Lifetime realized PnL (native). **realized\_pnl\_percentage** `number` Lifetime realized PnL percentage. **buy\_txn** `integer` Total buys. **sell\_txn** `integer` Total sells. **total\_tx\_count** `integer` Total transactions. **win\_rate** `number` Win rate as a percentage. **win\_count** `integer` Number of winning positions. **total\_sold** `integer` Number of closed positions. **active\_tokens\_count** `integer` Number of tokens with any activity. **largest\_buy** `number` Largest single buy (native). **best\_trade\_pnl** `number` Best single trade realized PnL. **worst\_trade\_pnl** `number` Worst single trade realized PnL. **still\_holding\_count** `integer` Number of positions still open. **win\_rate\_distribution** `object` **win\_rate\_distribution** **above\_500** `integer` Positions with more than 500 percent gain. **above\_100\_to\_500** `integer` Positions with 100 to 500 percent gain. **above\_zero\_to\_100** `integer` Positions with 0 to 100 percent gain. **below\_zero** `integer` Losing positions. **token\_overview** `array` **token** **mint** `string` Token mint. **token\_name** `string` Token name. **invested** `number` Total invested in this token (native). **sold** `number` Total sold value of this token (native). **realized\_pnl** `number` Realized PnL on this token (native). **realized\_pnl\_percentage** `number` Realized PnL percentage. **currency** `string` Native currency. **buy\_txn** `integer` Buys on this token. **sell\_txn** `integer` Sells on this token. **first\_seen** `string` ISO timestamp of the first trade on this token. **last\_seen** `string` ISO timestamp of the most recent trade on this token. **still\_holding** `boolean` Whether the wallet still holds a meaningful position. **trades** `array` **trade** **tx\_signature** `string` Transaction signature. **mint** `string` Token mint. **token\_name** `string` Token name or symbol. **transaction\_type** `string` buy or sell. **value** `number` Trade value (native). **currency** `string` Native currency (may be null on some historical rows). **created\_at** `string` ISO timestamp of the trade. **pagination** `object` **pagination** **limit** `integer` Trades per page. **next\_cursor** `string` Cursor for the next page (null means end). **has\_more** `boolean` Whether more pages follow. ```json Response theme={null} { "success": true, "data": { "profile": { "wallet_address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "type": "kol", "currency": "SOL" }, "lifetime_stats": { "currency": "SOL", "buy": 1840.5, "sell": 2010.75, "realized_pnl": 170.25, "realized_pnl_percentage": 9.25, "buy_txn": 412, "sell_txn": 388, "total_tx_count": 800, "win_rate": 61.34, "win_count": 138, "total_sold": 225, "active_tokens_count": 240, "largest_buy": 42.0, "best_trade_pnl": 88.6, "worst_trade_pnl": -19.4, "still_holding_count": 15 }, "win_rate_distribution": { "above_500": 6, "above_100_to_500": 28, "above_zero_to_100": 104, "below_zero": 87 }, "token_overview": [ { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "invested": 1.66, "sold": 0.0, "realized_pnl": -1.66, "realized_pnl_percentage": -100.0, "currency": "SOL", "buy_txn": 1, "sell_txn": 0, "first_seen": "2026-07-04T16:25:34Z", "last_seen": "2026-07-04T16:25:34Z", "still_holding": true } ], "trades": [ { "tx_signature": "5xr8abc...", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "transaction_type": "buy", "value": 1.66, "currency": "SOL", "created_at": "2026-07-04T16:25:34Z" } ], "pagination": { "limit": 50, "next_cursor": "MjAyNi0wNy0wNFQxNjoyNTozNFp8NXhyOGFiYw==", "has_more": true } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | address is missing. | | 400 | invalid\_parameter | blockchain or type missing or invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Holder Stream Source: https://docs.cabalspy.xyz/holder Live WebSocket stream of all tracked holders of a token with position, bag percentage, unrealized PnL, remaining value and entry market cap. Solana, BNB, Base, Ethereum and Robinhood. The live holder table for a token. On subscribe you get a snapshot of every tracked holder with a full position, then live updates as they trade and as the market cap moves. Positions carry bag percentage, unrealized PnL, remaining value and the market cap at entry. When you subscribe to a specific token, CabalSpy first seeds its history from the database so the initial snapshot is complete, then streams live. This stream runs on **Solana, BNB, Base, Ethereum and Robinhood**. The event shape is identical on every chain, only the native currency changes. ## Endpoint Connect to `wss://stream.cabalspy.xyz`. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => { ws.send(JSON.stringify({ op: "subscribe", stream: "holder", blockchain: "solana", token: "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", wallet_types: ["kol", "smart", "whale"], mode: "full", })); }; ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === "init") { console.log("holders", msg.data.holder_count); } else if (msg.event === "holder_update") { const h = msg.data.holder; console.log(h.profile.name, h.position.bag_pct, h.position.unrealized_pnl_usd); } }; ``` ```python Python theme={null} import json, websocket def on_open(ws): ws.send(json.dumps({ "op": "subscribe", "stream": "holder", "blockchain": "solana", "token": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "wallet_types": ["kol", "smart", "whale"], "mode": "full", })) def on_message(ws, message): msg = json.loads(message) print(msg.get("event")) ws = websocket.WebSocketApp( "wss://stream.cabalspy.xyz?apiKey=YOUR_KEY", on_open=on_open, on_message=on_message, ) ws.run_forever() ``` ## Authentication Provide your API key as a query parameter, wss\://stream.cabalspy.xyz?apiKey=YOUR\_KEY, or as a header, Authorization: Bearer YOUR\_KEY. Invalid keys are closed with code 1008. ## Chains and wallet types Each chain tracks a different set of holder types, and reports values in its own native currency. | blockchain | wallet\_types | Native currency | | - | - | - | | solana | kol, smart, whale | SOL | | bnb | kol, smart | BNB | | base | kol, smart | ETH | | eth | kol | ETH | | rh | kol, smart | ETH | Leaving wallet\_types out subscribes you to every type that chain supports. Asking for a type a chain does not track is rejected with an error naming the types it does track, so ETH accepts only kol. Leaving blockchain out defaults to solana, which keeps existing integrations working unchanged. On EVM chains, contract and wallet addresses are matched case-insensitively and are returned lowercased. ## Subscribe To start receiving data, send a subscribe message after the connection opens. At a minimum you choose a token to watch and which holder types you care about. ```json Subscribe to one token on Solana theme={null} { "op": "subscribe", "stream": "holder", "blockchain": "solana", "token": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "wallet_types": ["kol", "smart", "whale"], "mode": "full" } ``` ```json Subscribe to one token on BNB theme={null} { "op": "subscribe", "stream": "holder", "blockchain": "bnb", "token": "0xYourTokenContractAddress", "wallet_types": ["kol", "smart"], "mode": "full" } ``` The token field decides what you watch. Use a token mint address (Solana) or contract address (EVM) to follow one token, or the value "\*" to follow every tracked token at once. Following one token also gives you an initial snapshot of its current holders, "\*" does not. ```json Follow every token theme={null} { "op": "subscribe", "stream": "holder", "blockchain": "base", "token": "*", "wallet_types": ["kol"] } ``` **op** `string` *required* The operation. Use subscribe to start. **stream** `string` *required* Set to holder for this stream. **blockchain** `string` Chain. One of solana, bnb, base, eth, rh. Defaults to solana. **token** `string` *required* Which token to watch. Either a token mint or contract address for one token, or "\*" for all tracked tokens. A single address also returns a starting snapshot of its holders. **wallet\_types** `array` Which holder types to include. See the table above. Defaults to every type the chain supports. **mode** `string` (default: full) How much you want to receive. See the modes below. **mc\_interval** `integer` Optional. Only used with mode full. See the modes below. ### Choosing a mode The mode decides whether you also receive live price driven updates, not just trades. This is the main control over how many messages, and how many credits, you use. | mode | What you receive | Can you set mc\_interval | | - | - | - | | full | Trades plus live position updates every time the market cap moves. This is the default. | Yes | | events | Only real trade events. No market cap updates, so unrealized PnL and remaining value do not tick between trades. Cheapest option. | No, it is ignored | With mode full you can slow down the market cap updates to save credits. Set mc\_interval to a number of seconds from 1 to 30, and you get at most one price update per token in that window. Leave mc\_interval out to get every update live. ```json Full, but at most one price update every 5 seconds theme={null} { "op": "subscribe", "stream": "holder", "blockchain": "solana", "token": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "mode": "full", "mc_interval": 5 } ``` ```json Events only, no price updates at all theme={null} { "op": "subscribe", "stream": "holder", "blockchain": "solana", "token": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "mode": "events" } ``` Setting mc\_interval together with mode events does nothing, because events never sends price updates in the first place. ## Unsubscribe and other operations To stop receiving a token, send the same chain and token with op unsubscribe. ```json Unsubscribe theme={null} { "op": "unsubscribe", "stream": "holder", "blockchain": "solana", "token": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump" } ``` To see what you are currently subscribed to, send op subscriptions. To check the connection is alive, send op ping and you get a pong back. ```json List your subscriptions theme={null} { "op": "subscriptions", "stream": "holder" } ``` ## Events The stream emits three event types. init on subscribe, holder\_update on each trade, and position\_update when the market cap moves (subject to mode and mc\_interval). **event** `string` init, holder\_update or position\_update. **data** `object` **data** **blockchain** `string` The chain. solana, bnb, base, eth or rh. **mint** `string` The token mint or contract address. **token** `object` Token block. See the token fields below. **holder** `object` Present on holder\_update. The single holder that traded, with profile and position. See the position fields below. **holders** `array` Present on init and position\_update. The list of holders, each with wallet, wallet\_type, win\_rate, profile and position. **holder\_count** `integer` Present on init and position\_update. Number of holders in the list. **transaction** `object` Present on holder\_update. The trade that triggered the update, with signature, slot, action, created\_at, token\_amount and a value object. ### token **mint** `string` Token mint or contract address. **blockchain** `string` The chain this token lives on. **symbol** `string` Token symbol. **name** `string` Token name. **supply** `number` Total supply, or null. **decimals** `integer` Token decimals, or null. **market\_cap** `number` Market cap in the chain native currency, or null when no price is known yet. **market\_cap\_usd** `number` Market cap in USD. **market\_cap\_currency** `string` The native currency the market cap is denominated in. SOL, BNB or ETH. **price** `number` Token price in the native currency. **price\_usd** `number` Token price in USD. **native\_price\_usd** `number` Price of the chain native currency in USD, used for every conversion in this payload. **sol\_price\_usd** `number` Same value as native\_price\_usd. Kept for backwards compatibility, despite the name it carries BNB or ETH on those chains. Prefer native\_price\_usd. **pool** `string` Pool or bonding curve address, or null. **on\_curve** `boolean` True while the token still trades on a bonding curve, false once it has migrated to a regular AMM. Null when the launchpad is not recognised. Bonding curves exist on every chain, for example pump.fun on Solana, four.meme on BNB and moonshot on Base. **bonding\_curve\_progress** `number` Bonding curve completion percentage. Solana only, null on EVM chains. ### position Every holder carries a position with these fields. The fields ending in \_sol are named for historical reasons and carry the **chain native currency**, so BNB on BNB Chain and ETH on Base, Ethereum and Robinhood. Use market\_cap\_currency from the token block to label them. **held** `number` Tokens currently held. **peak** `number` Peak tokens held. **bought\_tokens** `number` Total tokens bought. **sold\_tokens** `number` Total tokens sold. **bag\_pct** `number` Percent of peak holding still held. **supply\_pct** `number` Percent of supply held. **remaining\_sol** `number` Current value of the remaining bag in the native currency. **remaining\_usd** `number` Current value of the remaining bag in USD. **invested** `number` Total invested in the native currency. **invested\_usd** `number` Total invested in USD. **max\_single\_buy** `number` Largest single buy in the native currency. **buy\_txn** `integer` Number of buys. **sell\_txn** `integer` Number of sells. **sold\_value** `number` Total sold value in the native currency. **sold\_value\_usd** `number` Total sold value in USD. **sold** `boolean` Whether the wallet has sold any amount. **realized\_pnl\_sol** `number` Realized PnL in the native currency, total sold minus total bought. **realized\_pnl\_usd** `number` Realized PnL in USD. **entry\_market\_cap** `number` Market cap in the native currency when the wallet first bought, frozen. **entry\_market\_cap\_usd** `number` Entry market cap in USD, frozen. **unrealized\_pnl\_sol** `number` Unrealized PnL on the remaining bag in the native currency. **unrealized\_pnl\_usd** `number` Unrealized PnL in USD. **unrealized\_pnl\_pct** `number` Unrealized PnL percentage. **first\_buy\_at** `string` Timestamp of the first buy. **last\_activity\_at** `string` ISO timestamp of the last activity. > [!NOTE] > > unrealized\_pnl and remaining are only filled while a current market cap for the token is known. If a token has not traded since the stream started, these stay null until its first price arrives. ```json holder_update theme={null} { "success": true, "channel": "holder.solana", "event": "holder_update", "data": { "trigger": "transaction", "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token": { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "blockchain": "solana", "symbol": "invisibull", "name": "invisibull", "supply": 1000000000, "decimals": 6, "market_cap": 40.08, "market_cap_usd": 3301.2, "market_cap_currency": "SOL", "price": 4.008e-8, "price_usd": 3.3e-6, "sol_price_usd": 82.36, "native_price_usd": 82.36, "pool": "pump", "on_curve": true, "bonding_curve_progress": 42.5 }, "transaction": { "signature": "5xr8abc...", "slot": 301948220, "action": "buy", "transaction_type": "buy", "created_at": "2026-07-04T16:25:34Z", "token_amount": 22113972.03, "value": { "currency": "SOL", "amount": 1.66, "amount_usd": 137.44 } }, "holder": { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "wallet_type": "kol", "win_rate": 61.34, "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "position": { "held": 22113972.03, "peak": 22113972.03, "bought_tokens": 22113972.03, "sold_tokens": 0.0, "bag_pct": 100.0, "supply_pct": 2.2114, "remaining_sol": 0.886537, "remaining_usd": 73.02, "invested": 1.66, "invested_usd": 137.44, "max_single_buy": 1.66, "buy_txn": 1, "sell_txn": 0, "sold_value": 0.0, "sold_value_usd": 0.0, "sold": false, "realized_pnl_sol": -1.66, "realized_pnl_usd": -137.44, "entry_market_cap": 44.6, "entry_market_cap_usd": 3673.2, "unrealized_pnl_sol": -0.099817, "unrealized_pnl_usd": -8.22, "unrealized_pnl_pct": -10.12, "first_buy_at": "2026-07-04T16:25:34Z", "last_activity_at": "2026-07-04T16:40:10Z" } } }, "meta": { "request_id": "req_5162c7cf7f87", "version": "2.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ```json holder_update on BNB theme={null} { "success": true, "channel": "holder.bnb", "event": "holder_update", "data": { "trigger": "transaction", "blockchain": "bnb", "mint": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef12", "token": { "mint": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef12", "blockchain": "bnb", "symbol": "FOUR", "name": "Four Token", "supply": 1000000000, "decimals": 18, "market_cap": 1250.5, "market_cap_usd": 750300.0, "market_cap_currency": "BNB", "price": 0.00000125, "price_usd": 0.00075, "sol_price_usd": 600.0, "native_price_usd": 600.0, "pool": "0xpool1234567890abcdef1234567890abcdef1234", "on_curve": true, "bonding_curve_progress": null }, "transaction": { "signature": "0xabc123...", "slot": 41255903, "action": "buy", "transaction_type": "buy", "created_at": "2026-07-17T09:12:04Z", "token_amount": 400000.0, "value": { "currency": "BNB", "amount": 0.5, "amount_usd": 300.0 } }, "holder": { "wallet": "0x7a16ff8270133f063aab6c9977183d9e72835428", "wallet_type": "kol", "win_rate": 58.2, "profile": { "name": "BNB Whale", "image_url": null, "twitter": "", "telegram": "", "blockchain": "bnb", "currency": "BNB", "type": "kol" }, "position": { "held": 400000.0, "peak": 400000.0, "bought_tokens": 400000.0, "sold_tokens": 0.0, "bag_pct": 100.0, "supply_pct": 0.04, "remaining_sol": 0.5, "remaining_usd": 300.0, "invested": 0.5, "invested_usd": 300.0, "max_single_buy": 0.5, "buy_txn": 1, "sell_txn": 0, "sold_value": 0.0, "sold_value_usd": 0.0, "sold": false, "realized_pnl_sol": -0.5, "realized_pnl_usd": -300.0, "entry_market_cap": 1250.5, "entry_market_cap_usd": 750300.0, "unrealized_pnl_sol": 0.0, "unrealized_pnl_usd": 0.0, "unrealized_pnl_pct": 0.0, "first_buy_at": "2026-07-17T09:12:04Z", "last_activity_at": "2026-07-17T09:12:04Z" } } }, "meta": { "request_id": "req_9a1b2c3d4e5f", "version": "2.0.0", "timestamp": "2026-07-17T09:12:05Z" } } ``` ## Billing Each delivered event counts against your plan. In mode full a busy token can produce frequent position\_update events as the market cap moves, use mc\_interval to throttle them or mode events to receive only trades. ## Heartbeat The server sends WebSocket pings and expects pong, which standard clients answer automatically. You can also send op ping at any time. # Holdings Source: https://docs.cabalspy.xyz/holdings GET /v1/wallets/holdings Current on-chain token balances of a wallet, read live from the chain via Moralis. Period independent, no cost basis. Return a wallet current on-chain token balances, read live from the blockchain through Moralis. Unlike the tracker and leaderboard, which are built from the trades CabalSpy observes, this endpoint reflects what the wallet actually holds on chain right now, including the native coin. Because it reads raw balances from the chain, it has no cost basis and therefore no PnL. It answers one question only, what does this wallet hold at this moment. > [!TIP] > > This endpoint is period independent. It may return loading true for a brief moment while the balance cache warms up, in that case simply call it again. The wallet must be tracked by CabalSpy, otherwise you get a wallet not found error. ## Query Parameters **blockchain** `string` *required* Chain of the wallet. One of solana, bnb, base, eth, rh (Robinhood Chain). **address** `string` *required* The wallet address whose balances you want. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/wallets/holdings?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "api_key": "YOUR_KEY", } r = requests.get("https://api.cabalspy.xyz/v1/wallets/holdings", params=params) h = r.json()["data"]["active_holdings"] if h["loading"]: print("cache warming, retry") else: for t in h["tokens"]: print(t["symbol"], t["amount_formatted"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/wallets/holdings?${p}`); const h = (await res.json()).data.active_holdings; h.tokens.forEach(t => console.log(t.symbol, t.amount_formatted)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **active\_holdings** `object` **active\_holdings** **tokens** `array` **token** **token\_address** `string` Token contract or mint address. The native coin uses a pseudo address. **token\_name** `string` Token name (may be empty). **symbol** `string` Token symbol. **amount** `string` Raw balance as a string in the smallest unit. **amount\_formatted** `string` Human readable balance adjusted for decimals. **decimals** `integer` Token decimals. **verified\_contract** `boolean` Whether the token contract is verified (EVM chains). **count** `integer` Number of tokens held. **last\_updated** `string` ISO timestamp of the last balance refresh (null if unknown). **stale** `boolean` Whether the cached balance is considered stale. **loading** `boolean` True while the balance cache is still warming up. Call again shortly. ```json Response theme={null} { "success": true, "data": { "active_holdings": { "tokens": [ { "token_address": "native", "token_name": "Solana", "symbol": "SOL", "amount": "12480000000", "amount_formatted": "12.48", "decimals": 9, "verified_contract": true }, { "token_address": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "symbol": "invisibull", "amount": "22113972037624", "amount_formatted": "22113972.03", "decimals": 6, "verified_contract": false } ], "count": 2, "last_updated": "2026-07-06T11:00:12Z", "stale": false, "loading": false } }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ```json Loading theme={null} { "success": true, "data": { "active_holdings": { "tokens": [], "count": 0, "last_updated": null, "stale": false, "loading": true } }, "meta": { "request_id": "req_9aa1917e433b", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:02:10Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | address is missing. | | 400 | invalid\_parameter | blockchain missing or invalid. | | 404 | not\_found | The wallet is not tracked by CabalSpy. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Latest Source: https://docs.cabalspy.xyz/latest GET /v1/transactions/latest The most recent transactions of tracked wallets on a chain and wallet type, newest first, each with trader profile and position after the trade. The live trade feed. Returns the most recent transactions of tracked wallets for a chain and wallet type, newest first. Each entry carries the token, the trade value, the trader profile and the holder position right after the trade. Use it to power a global live tape across all tracked wallets, or narrow it to a single token with the mint filter to get that token feed. > [!TIP] > > Optionally filter by a single token with mint. When you pass mint, the response also includes a token block. This is a live event feed, so entries do not carry unrealized PnL, but each includes holdings\_after. ## Query Parameters **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh (Robinhood Chain). **type** `string` *required* Wallet category kol, smart or whale. Availability per chain. Solana has kol, smart, whale. BNB, Base and Robinhood Chain (rh) have kol, smart. ETH has kol. **mint** `string` Optional token mint to filter the feed to a single token. Adds a token block. **limit** `integer` Maximum number of transactions to return. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/transactions/latest?blockchain=solana&type=kol&limit=50&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "type": "kol", "limit": 50, "api_key": "YOUR_KEY"} r = requests.get("https://api.cabalspy.xyz/v1/transactions/latest", params=params) for tx in r.json()["data"]["transactions"]: print(tx["created_at"], tx["transaction_type"], tx["profile"]["name"], tx["token_name"], tx["value"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", type: "kol", limit: "50", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/transactions/latest?${p}`); const { data } = await res.json(); data.transactions.forEach(tx => console.log(tx.created_at, tx.transaction_type, tx.value)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **blockchain** `string` Requested chain. **type** `string` Requested wallet type. **mode** `string` latest. **currency** `string` Native currency. **count** `integer` Number of transactions returned. **token** `object` Only present when mint is passed. Token block with mint, token\_name, blockchain, currency, token\_supply, token\_decimals. **transactions** `array` **transaction, newest first** **tx\_signature** `string` Transaction signature. **mint** `string` Token mint. **token\_name** `string` Token name or symbol. **token\_supply** `number` Total supply. **token\_decimals** `integer` Token decimals. **transaction\_type** `string` buy or sell. **value** `number` Trade value (native). **value\_usd** `number` Trade value in USD. **currency** `string` Native currency. **token\_amount** `number` Number of tokens in the trade. **price\_per\_token** `number` Price per token (native). **price\_per\_token\_usd** `number` Price per token in USD. **created\_at** `string` Timestamp of the trade. **profile** `object` Wallet profile of the trader. **holdings\_after** `object` Holder position after this trade (token\_amount, token\_amount\_peak, supply\_pct, supply\_pct\_peak, bag\_pct, still\_holding). **pagination** `object` Standard pagination object (limit, total, has\_more, next\_cursor). ```json Response theme={null} { "success": true, "data": { "blockchain": "solana", "type": "kol", "mode": "latest", "currency": "SOL", "count": 1, "transactions": [ { "tx_signature": "5xr8abc...", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "token_supply": 1000000000, "token_decimals": 6, "transaction_type": "buy", "value": 1.66, "value_usd": 137.44, "currency": "SOL", "token_amount": 22113972.03, "price_per_token": 7.5e-8, "price_per_token_usd": 6.2e-6, "created_at": "2026-07-04 16:25:34", "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "holdings_after": { "token_amount": 22113972.03, "token_amount_peak": 22113972.03, "supply_pct": 2.211397, "supply_pct_peak": 2.211397, "bag_pct": 100.0, "still_holding": true } } ] }, "pagination": { "limit": 50, "total": 1, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | blockchain or type missing or invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Leaderboard Source: https://docs.cabalspy.xyz/leaderboard GET /v1/wallets/leaderboard Rank tracked KOL, Smart Money and Whale wallets by trading volume for a period, with realized PnL, win rate and trade counts. Rank the wallets CabalSpy tracks by trading volume over a chosen period, each enriched with period statistics such as buy and sell volume, realized PnL, average hold time and a win rate breakdown (how many closed positions were winners). Use it to surface the hottest traders right now, build a Top KOLs this week board, spot who is rotating capital, or seed a copytrade shortlist. The leaderboard is served from a permanently cached, WebSocket driven store, so reads are fast and consistent (meta.cached tells you the cache age). > [!TIP] > > Pick the window with period, one of 6h, 1d, 7d or 30d. Without a limit you get the full ranking, set limit and page with cursor (the cursor is a wallet address) for large boards. ## Query Parameters **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh (Robinhood Chain). **type** `string` (default: kol) Wallet category kol, smart or whale. Availability per chain. Solana has kol, smart, whale. BNB, Base and Robinhood Chain (rh) have kol, smart. ETH has kol. **period** `string` (default: 1d) Ranking window, one of 6h, 1d, 7d or 30d. **limit** `integer` Maximum wallets per page. Omit to return the full ranking. **cursor** `string` Cursor for the next page, the pagination.next\_cursor (a wallet address) from the previous response. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/wallets/leaderboard?blockchain=solana&type=kol&period=7d&limit=20&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "type": "kol", "period": "7d", "limit": 20, "api_key": "YOUR_KEY"} r = requests.get("https://api.cabalspy.xyz/v1/wallets/leaderboard", params=params) for i, w in enumerate(r.json()["data"]["leaderboard"], 1): ps = w["period_stats"] wr = w["period_win_rate_distribution"]["win_rate_percentage"] print(f'{i:>2}. {w["profile"]["name"] or w["wallet"]:<16} vol {ps["total_volume"]:>8.1f} win {wr:.0f}%') ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", type: "kol", period: "7d", limit: "20", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/wallets/leaderboard?${p}`); const { data } = await res.json(); data.leaderboard.forEach((w, i) => console.log(`${i + 1}. ${w.profile.name || w.wallet} vol ${w.period_stats.total_volume}`)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **blockchain** `string` Requested chain. **type** `string` Requested wallet type. **period** `string` Ranking window 6h, 1d, 7d or 30d. **currency** `string` Native currency of the chain. **pagination** `object` **pagination** **total** `integer` Total ranked wallets. **limit** `integer` Requested limit (null means all). **next\_cursor** `string` Wallet address to start the next page (null means end). **has\_more** `boolean` Whether more pages follow. **leaderboard** `array` **entry, sorted by volume highest first** **wallet** `string` Wallet address. **profile** `object` **profile** **name** `string` Display name (may be empty). **image\_url** `string` Avatar URL. **twitter** `string` Twitter or X link. **telegram** `string` Telegram link. **blockchain** `string` Chain. **currency** `string` Native currency. **wallet\_type** `string` kol, smart or whale. **period\_stats** `object` **period\_stats** **period** `string` The requested window. **total\_buy** `number` Buy volume in the period (native). **total\_buy\_usd** `number` Buy volume in USD. **total\_sell** `number` Sell volume in the period (native). **total\_sell\_usd** `number` Sell volume in USD. **total\_volume** `number` Buy plus sell volume (native). This is the ranking key. **total\_volume\_usd** `number` Buy plus sell volume in USD. **realized\_pnl** `number` Realized PnL in the period (native). **realized\_pnl\_usd** `number` Realized PnL in USD. **realized\_pnl\_percentage** `number` Realized PnL as a percentage of buy volume. **avg\_hold\_time\_minutes** `number` Average holding time in minutes. **total\_txn** `integer` Total transactions (buys plus sells). **buy\_txn** `integer` Number of buys. **sell\_txn** `integer` Number of sells. **period\_win\_rate\_distribution** `object` **period\_win\_rate\_distribution** **win\_count** `integer` Closed positions that ended in profit. **closed\_count** `integer` Total closed positions in the period. **win\_rate\_percentage** `number` win\_count divided by closed\_count times 100. **period\_history\_tokens** `object` **period\_history\_tokens** **total\_tokens** `integer` Distinct tokens traded in the period. ```json Response theme={null} { "success": true, "data": { "blockchain": "solana", "type": "kol", "period": "7d", "currency": "SOL", "pagination": { "total": 342, "limit": 20, "next_cursor": "8CvFWU1Hfmy7HkS7eWG2x8EMtQxAzCr7KcukKwspGFwB", "has_more": true }, "leaderboard": [ { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "wallet_type": "kol" }, "period_stats": { "period": "7d", "total_buy": 180.25, "total_buy_usd": 14840.6, "total_sell": 132.25, "total_sell_usd": 10890.65, "total_volume": 312.5, "total_volume_usd": 25731.25, "realized_pnl": 48.2, "realized_pnl_usd": 3968.6, "realized_pnl_percentage": 26.74, "avg_hold_time_minutes": 84.5, "total_txn": 40, "buy_txn": 22, "sell_txn": 18 }, "period_win_rate_distribution": { "win_count": 14, "closed_count": 18, "win_rate_percentage": 77.78 }, "period_history_tokens": { "total_tokens": 23 } } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": true, "cache_age_seconds": 42, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | blockchain, type or period missing or invalid (for example an unknown period, or eth with whale). | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # List Source: https://docs.cabalspy.xyz/list GET /v1/wallets Fetch all tracked KOL, Smart Money and Whale wallets on Solana, BNB Chain, Base, Ethereum and Robinhood Chain with name, avatar, socials and copytrade link. Return every wallet CabalSpy tracks for a given chain and wallet type. Each entry carries the public profile (display name, avatar, Twitter/Telegram and the copytrade link) so you can label wallets across your terminal. This is the starting point of most integrations: fetch the list once, cache the profiles, then resolve those addresses against the token and transaction endpoints. > [!TIP] > > Without a limit you get all wallets in a single response. For paged loading, set limit and walk through pages using the next\_cursor from the previous response. Addresses are sorted alphabetically, so pagination stays deterministic. ## Query Parameters **blockchain** `string` *required* Chain of the wallets. One of solana, bnb, base, eth, rh (Robinhood Chain). **type** `string` *required* Wallet category kol, smart or whale. Availability per chain. Solana has kol, smart, whale. BNB, Base and Robinhood Chain (rh) have kol, smart. ETH has kol. **limit** `integer` Maximum number of wallets per page. Omit to return all wallets in one response. **cursor** `string` Cursor for the next page, the pagination.next\_cursor value from the previous response. Empty means from the start. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/wallets?blockchain=solana&type=kol&limit=50&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "type": "kol", "limit": 50, "api_key": "YOUR_KEY"} r = requests.get("https://api.cabalspy.xyz/v1/wallets", params=params) for w in r.json()["data"]["wallets"]: print(w["name"] or w["wallet_address"], "->", w["twitter"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", type: "kol", limit: "50", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/wallets?${p}`); const { data } = await res.json(); data.wallets.forEach(w => console.log(w.name || w.wallet_address, "->", w.twitter)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **blockchain** `string` Requested chain. **type** `string` Requested wallet type. **currency** `string` Native currency of the chain (SOL, BNB, ETH). **wallets** `array` **wallet** **wallet\_address** `string` Wallet address. **name** `string` Display name (may be empty). **image\_url** `string` Avatar URL. **twitter** `string` Twitter or X link. **telegram** `string` Telegram link. **copytrade\_link** `string` Copytrade link. **blockchain** `string` Chain of the wallet. **type** `string` Wallet type. **currency** `string` Native currency. **pagination** `object` **pagination** **total** `integer` Total number of wallets. **limit** `integer` Requested limit (null means all). **next\_cursor** `string` Cursor for the next page (null means end). **has\_more** `boolean` Whether more pages follow. ```json Response theme={null} { "success": true, "data": { "blockchain": "solana", "type": "kol", "currency": "SOL", "pagination": { "total": 342, "limit": 50, "next_cursor": "8CvFWU1Hfmy7HkS7eWG2x8EMtQxAzCr7KcukKwspGFwB", "has_more": true }, "wallets": [ { "wallet_address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "copytrade_link": "https://t.me/WizGandalfBot?start=r-U7TSHAWUWN-7j7AA", "blockchain": "solana", "type": "kol", "currency": "SOL" } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | blockchain or type missing, or the combination does not exist (for example eth with whale). | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Lookup Source: https://docs.cabalspy.xyz/lookup GET /v1/wallets/lookup Look up any wallet address across all chains and wallet types to check if CabalSpy tracks it and return its KOL, Smart or Whale profile. Given just an address, this finds out whether CabalSpy tracks it and, if so, returns its profile plus which chain and category (kol, smart, whale) it belongs to. Use it to label an arbitrary address in your UI, for example to show a name and avatar next to a wallet that appears in a transaction feed. > [!TIP] > > You do not pass a blockchain or type. The lookup searches all chains and types for you and returns the first match. Always check the found field, it is false when the address is not tracked. ## Query Parameters **address** `string` *required* The wallet address to look up. Searched across every tracked chain and wallet type. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/wallets/lookup?address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = {"address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "api_key": "YOUR_KEY"} r = requests.get("https://api.cabalspy.xyz/v1/wallets/lookup", params=params) data = r.json()["data"] if data["found"]: print(data["name"], "-", data["type"], "on", data["blockchain"]) else: print("Not tracked") ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/wallets/lookup?${p}`); const { data } = await res.json(); console.log(data.found ? `${data.name} (${data.type})` : "Not tracked"); ``` ## Response **success** `boolean` True on success. The request worked, regardless of whether the wallet was found. **data** `object` **data** **found** `boolean` Whether the address is tracked by CabalSpy. When false, only found and wallet\_address are returned. **wallet\_address** `string` The looked up address. **name** `string` Display name (may be empty). **image\_url** `string` Avatar URL. **twitter** `string` Twitter or X link. **telegram** `string` Telegram link. **copytrade\_link** `string` Copytrade link. **type** `string` Wallet type where it was found kol, smart or whale. **blockchain** `string` Chain where it was found. **currency** `string` Native currency of that chain. ```json Found theme={null} { "success": true, "data": { "found": true, "wallet_address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "copytrade_link": "https://t.me/WizGandalfBot?start=r-U7TSHAWUWN-7j7AA", "type": "kol", "blockchain": "solana", "currency": "SOL" }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ```json Not found theme={null} { "success": true, "data": { "found": false, "wallet_address": "SomeUntrackedAddress1111111111111111111111" }, "meta": { "request_id": "req_9aa1917e433b", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:02:10Z" } } ``` ## Errors A wallet not found is not an error, you get 200 with found false. The errors below concern the request itself. | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | The address query parameter is missing. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # MCP Server Source: https://docs.cabalspy.xyz/mcp-server Connect Claude, Cursor, VS Code and other AI clients to CabalSpy wallet data and CabalSpy ID. Remote MCP server with 38 read-only tools for KOL, Smart Money and Whale wallets, curated calls, verified traders and token theses. The CabalSpy MCP server gives AI assistants live access to labeled wallet data. It exposes the v1 API and [CabalSpy ID](/cabalspy-id/overview) as 38 read-only tools, so an assistant can look up a wallet, see what KOLs are buying, check token holders, read cluster signals, look up our curated calls and how they performed, detect bundled launches, check who owns a wallet and read what verified holders think about a token, and answer in plain language. It is a remote server. There is nothing to install or run, and it never signs transactions or touches funds. | | | | - | - | | Server URL | `https://mcp.cabalspy.xyz/mcp` | | Transport | Streamable HTTP | | Auth | Header `X-CabalSpy-Key: YOUR_KEY`, or `?api_key=YOUR_KEY` on the URL. Optional: without a key the server uses the public demo | | Source | [CabalSpy/CabalSpy-MCP-Server](https://github.com/CabalSpy/CabalSpy-MCP-Server) | Get a free key in the [API Dashboard](https://apidashboard.cabalspy.xyz/register). ## Try it without a key Connect to `https://mcp.cabalspy.xyz/mcp` with no key and every tool still works, on the [public demo](/demo): 20 requests per IP per day, data delayed 15 minutes, at most 5 rows per list. Demo results carry a `demo` block, and the assistant is told the data is not live. When the 20 requests are used up, tools return `demo_limit_reached` with the link to a free key. ```bash Claude Code, no key theme={null} claude mcp add --transport http cabalspy https://mcp.cabalspy.xyz/mcp ``` ## Connect ```bash Claude Code theme={null} claude mcp add --transport http cabalspy https://mcp.cabalspy.xyz/mcp \ --header "X-CabalSpy-Key: YOUR_KEY" ``` ```json Cursor (~/.cursor/mcp.json) theme={null} { "mcpServers": { "cabalspy": { "url": "https://mcp.cabalspy.xyz/mcp", "headers": { "X-CabalSpy-Key": "YOUR_KEY" } } } } ``` ```json VS Code (.vscode/mcp.json) theme={null} { "servers": { "cabalspy": { "type": "http", "url": "https://mcp.cabalspy.xyz/mcp", "headers": { "X-CabalSpy-Key": "YOUR_KEY" } } } } ``` ```text URL only (claude.ai connectors) theme={null} https://mcp.cabalspy.xyz/mcp?api_key=YOUR_KEY ``` Where a client lets you set headers, prefer the header. It keeps the key out of logs. ## Things to ask * Who are the best performing Solana KOLs this week? * What are KOLs buying right now? * What did CabalSpy call today, and how did the calls do? * Was this token launch bundled? * Who is still holding this token and who already sold? * What do verified holders think about \$BONK? * Who owns this wallet? * Is @handle a verified trader, and which wallets does he use? ## Tools | Group | Tools | | - | - | | Wallets | `list_wallets`, `lookup_wallet`, `get_leaderboard`, `get_wallet_tracker`, `get_wallet_holdings`, `get_wallet_history`, `get_pnl_calendar`, `get_wallet_connections`, `compare_wallets` | | Tokens | `get_token_stats`, `get_token_holders`, `get_token_transactions`, `detect_bundles`, `compare_tokens` | | Feed and signals | `get_recent_trades`, `get_signals`, `get_signal_history`, `get_activity_metrics`, `get_analytics` | | Calls | `get_calls`, `get_call_stats` | | CabalSpy ID | `csid_profile`, `csid_wallet_owner`, `csid_kols`, `csid_token_theses`, `csid_latest_theses`, `csid_user_theses`, `csid_thesis`, `csid_leaderboard`, `csid_callouts`, `csid_callout_stats`, `csid_callout_leaderboard`, `csid_competitions`, `csid_copy_trading`, `csid_platform_user`, `csid_platform_leaderboard` | | Service | `get_api_status`, `get_started` | Results for a single Solana token include a `trade_url`, the token page in the [CabalSpy Terminal](https://app.cabalspy.xyz/). ## CabalSpy ID tools [CabalSpy ID](/cabalspy-id/overview) is the SocialFi layer for trading platforms: traders sign in, verify their wallets with an on-chain payment, and their trades feed profiles, KOL badges, leaderboards and token theses. The `csid_` tools bring that into the assistant. | Tool | What it returns | Without a key | | - | - | - | | `csid_profile` | Identity by X handle, `csid_id`, X user id or wallet: X account, Telegram, KOL badge, verified wallets per chain, 7-day activity | Sandbox identities | | `csid_wallet_owner` | The CabalSpy ID user who verified a wallet (1 to 100 addresses), or `verified: false` | Sandbox identities | | `csid_kols` | KOLs with a reviewed badge, per chain, with cursor | Sandbox identities | | `csid_token_theses` | Bull/bear summary and theses for one token, each with the author's live position and PnL. `sort` new or top, `stance` bull or bear, `scope` global or instance | Needs a key | | `csid_latest_theses` | Newest theses across all tokens | Needs a key | | `csid_user_theses` | Every thesis one person posted | Needs a key | | `csid_thesis` | One thesis with its replies | Needs a key | | `csid_leaderboard` | Verified traders of your instance ranked by volume, PnL, win rate or trades (all CabalSpy ID users on Enterprise) | Needs a key | | `csid_callouts` | Callouts on your instance, newest first, with price and market cap at the call, now and at the peak | Needs a key, callouts enabled | | `csid_callout_stats` | One user's callout record per period: callouts, average, median and best peak multiple, hit rate | Needs a key, callouts enabled | | `csid_callout_leaderboard` | The best callers of your instance for 6h, 1d, 7d or 30d | Needs a key, callouts enabled | | `csid_competitions` | Your platform's trading competitions, or one competition with its standings | Needs a key | | `csid_copy_trading` | Copy trading on your instance: copy settings of a user and the recent copy instructions | Needs a key | | `csid_platform_user` | One of your White-Label users by your own user id: wallets, X, Telegram, KOL status and trading stats | Needs a key | | `csid_platform_leaderboard` | Your White-Label users ranked by their trades on one chain | Needs a key | The identity tools call `/v1/csid/*` on the CabalSpy API (`api.cabalspy.xyz`). Without a key they answer from sandbox identities only (marked `sandbox: true`), so the demo never shows real people. The theses and leaderboard tools call the [CabalSpy ID Data API](/cabalspy-id/data-api) with the same key. That key needs CabalSpy ID enabled and a CabalSpy ID instance on its account: create one in the [dashboard](https://apidashboard.cabalspy.xyz/csid) (free plan available). Otherwise the tools return `csid_setup_required`, `no_instance` or `product_not_enabled` with that link. Theses are global for every plan; the leaderboard covers your instance's users. If your account has several instances, pass `instance` (the client\_id) or send an `X-CSID-Instance` header with the connection. All `csid_` tools are read-only. Posting theses on behalf of a user is not part of the MCP server; platforms do that through the [Theses API](/cabalspy-id/theses-post). ## Coverage Solana has KOL, Smart Money and Whale wallets. BNB Chain, Base, Ethereum and Robinhood Chain (`rh`) have KOL and Smart Money. Market cap and price in USD are returned for Solana tokens only. ## Credits The server uses your API key, so tool calls count against your plan like REST requests. See [Pricing](/pricing). Without a key, tool calls count against the demo's 20 requests per IP per day instead. # PnL Calendar Source: https://docs.cabalspy.xyz/pnl-calender GET /v1/wallet/pnl_calendar Day by day realized PnL calendar for a wallet, grouped by month, with per day profit and loss, volume, trade counts and win loss streaks. A day by day realized PnL calendar for a wallet, grouped by month. Each day carries the realized PnL, volume, buy and sell counts and how many distinct tokens were traded. Each month adds a summary with totals and the longest winning and losing day streaks. Use it to render a heatmap style trading calendar on a wallet profile, the kind that shows green and red days at a glance. Months are returned oldest first, and the current month updates continuously. > [!TIP] > > The response includes months, an array of all months oldest first, plus dates and month for the current month at the top level for convenience. Each day date uses the format DD-MM-YY, for example 04-07-26. ## Query Parameters **blockchain** `string` *required* Chain of the wallet. One of solana, bnb, base, eth, rh (Robinhood Chain). **address** `string` *required* The wallet address whose calendar you want. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/wallet/pnl_calendar?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "api_key": "YOUR_KEY", } r = requests.get("https://api.cabalspy.xyz/v1/wallet/pnl_calendar", params=params) d = r.json()["data"] for month in d["months"]: m = month["month"] print(m["year"], m["month"], "pnl", m["realized_pnl"], "streak", m["positive_streak"]) for day in month["dates"]: print(" ", day["date"], day["realized_pnl"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/wallet/pnl_calendar?${p}`); const { data } = await res.json(); data.months.forEach(month => month.dates.forEach(day => console.log(day.date, day.realized_pnl))); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **wallet** `string` The wallet address. **profile** `object` Wallet profile (name, image\_url, twitter, telegram, blockchain, currency, type). **months** `array` **month** **dates** `array` **day** **date** `string` Day in the format DD-MM-YY, for example 04-07-26. **realized\_pnl** `number` Realized PnL for the day (native). Positive is a green day, negative a red day. **realized\_pnl\_usd** `number` Realized PnL for the day in USD. **buy\_txn** `integer` Number of buys that day. **sell\_txn** `integer` Number of sells that day. **txn\_total** `integer` Total transactions that day. **tokens\_traded** `integer` Distinct tokens traded that day. **volume** `number` Buy plus sell volume that day (native). **total\_buy** `number` Total bought that day (native). **total\_buy\_usd** `number` Total bought that day in USD. **total\_sell** `number` Total sold that day (native). **total\_sell\_usd** `number` Total sold that day in USD. **month** `object` **month summary** **month** `integer` Month number 1 to 12. **year** `integer` Year. **positive\_streak** `integer` Longest run of consecutive profitable days in the month. **negative\_streak** `integer` Longest run of consecutive losing days in the month. **realized\_pnl** `number` Total realized PnL for the month (native). **realized\_pnl\_usd** `number` Total realized PnL for the month in USD. **volume** `number` Total volume for the month (native). **buy\_txn** `integer` Total buys in the month. **sell\_txn** `integer` Total sells in the month. **txn\_total** `integer` Total transactions in the month. **tokens\_traded** `integer` Distinct tokens traded in the month. **total\_buy** `number` Total bought in the month (native). **total\_buy\_usd** `number` Total bought in the month in USD. **total\_sell** `number` Total sold in the month (native). **total\_sell\_usd** `number` Total sold in the month in USD. **dates** `array` Convenience copy of the current month dates array (same shape as months dates). **month** `object` Convenience copy of the current month summary (same shape as months month). ```json Response theme={null} { "success": true, "data": { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "months": [ { "dates": [ { "date": "04-07-26", "realized_pnl": 12.4, "realized_pnl_usd": 1020.6, "buy_txn": 6, "sell_txn": 5, "txn_total": 11, "tokens_traded": 4, "volume": 88.5, "total_buy": 50.25, "total_buy_usd": 4137.6, "total_sell": 38.25, "total_sell_usd": 3150.4 } ], "month": { "month": 7, "year": 2026, "positive_streak": 3, "negative_streak": 1, "realized_pnl": 48.2, "realized_pnl_usd": 3968.6, "volume": 312.5, "buy_txn": 22, "sell_txn": 18, "txn_total": 40, "tokens_traded": 23, "total_buy": 180.25, "total_buy_usd": 14840.6, "total_sell": 132.25, "total_sell_usd": 10890.65 } } ], "dates": [], "month": {} }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | address is missing. | | 400 | invalid\_parameter | blockchain missing or invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Pricing Source: https://docs.cabalspy.xyz/pricing CabalSpy API pricing from a free tier to enterprise, with monthly credits, rate limits and REST plus WebSocket access across Solana, BNB Chain, Base, Ethereum and Robinhood Chain. CabalSpy API plans run from a free tier for testing up to enterprise. Every plan includes both REST API access and WebSocket streams across all supported chains and wallet categories. You pay by credits, not by endpoint, so you can mix REST and streaming however you like. Start on the free tier with 10,000 credits every month and no credit card. Upgrade from the [API Dashboard](https://apidashboard.cabalspy.xyz) when you outgrow it. ## How credits work A credit is the unit you spend per call. The cost is the same on every plan, only the monthly allowance and rate limit change. A REST request costs 10 credits. A WebSocket event received costs 1 credit. A [token transactions](/transactions) poll with `since` that finds no new trade costs 0 credits. Credits reset on the first of every month. Because streams bill per delivered event, a wildcard subscription on a busy channel can use credits quickly, filter to a specific token or wallet when you can. ## Plans > [card] Free — \$0 / mo > > 10,000 credits per month. REST and WebSocket access. 5 requests per second. 1 API key. No credit card. > [card] Starter — \$49 / mo > > 100,000 credits per month. REST and WebSocket access. 20 requests per second. 1 API key. > [card] Pro — \$249 / mo > > 1,000,000 credits per month. 50 requests per second. Up to 3 API keys. Priority support. The most popular plan. > [card] Business — \$499 / mo > > 2,000,000 credits per month. 100 requests per second. Up to 5 API keys. Widget Starter included. Early feature access and dedicated support. Yearly billing saves 20 percent compared to monthly. Need more than 2,000,000 credits? The enterprise plan adds custom throughput, dedicated infrastructure, SLA-backed uptime and the embeddable widget, built for trading terminals and AI agents at scale. Contact sales at [contact@cabalspy.xyz](mailto:contact@cabalspy.xyz) or Telegram [@Tokiogaijin](https://t.me/Tokiogaijin). ## Compare plans | Feature | Free | Starter | Pro | Business | | - | - | - | - | - | | Monthly credits | 10,000 | 100,000 | 1,000,000 | 2,000,000 | | Credits per REST request | 10 | 10 | 10 | 10 | | Credits per WebSocket event | 1 | 1 | 1 | 1 | | Requests per second | 5 | 20 | 50 | 100 | | REST API access | Yes | Yes | Yes | Yes | | WebSocket streams | Yes | Yes | Yes | Yes | | Historical data since Feb 2025 | Yes | Yes | Yes | Yes | | KOL, Smart Money, Whale | Yes | Yes | Yes | Yes | | Solana, BNB, Base, ETH, Robinhood | Yes | Yes | Yes | Yes | | API keys | 1 | 1 | 3 | 5 | | Priority support | No | No | Yes | Yes | | Dedicated support | No | No | No | Yes | | Early feature access | No | No | No | Yes | | Widget Starter included | No | No | No | Yes | ## Rate limits Each plan has a requests-per-second limit, from 5 on Free up to 100 on Business. If you exceed it, requests return a 429 rate limited error, wait and retry. The limit is about burst speed, the monthly credit allowance is about total volume, the two are separate. ## Payment and billing Plans are billed monthly or yearly. You can pay with crypto (Solana, USDC, USDT) or by credit card through the payment provider. Upgrades take effect immediately and are pro-rated for the current cycle, downgrades apply on your next billing date. You can cancel anytime from the dashboard, your plan stays active until the end of the current period. There are no setup fees. ## Frequently asked questions > [accordion] What is included in the free plan > > 10,000 credits per month, full REST API access, all chains and all wallet categories. Ideal for testing the API and small personal projects. > [accordion] How do credits work > > Each REST request costs 10 credits. Each WebSocket event received costs 1 credit. Credits reset on the first of every month. > [accordion] Can I upgrade or downgrade my plan > > Yes, change your plan anytime from the API Dashboard. Upgrades take effect immediately and are pro-rated for the current cycle. Downgrades apply on your next billing date. > [accordion] Which chains are supported > > Solana, BNB Chain, Base, Ethereum and Robinhood Chain are live, with historical data since February 2025. Solana has KOL, Smart Money and Whale wallets, BNB Chain, Base and Robinhood Chain have KOL and Smart Money, Ethereum has KOL. New chains are included in current plans automatically when they ship. > [accordion] What payment methods do you accept > > Crypto payments in Solana, USDC and USDT, and credit cards through the payment provider. > [accordion] Is there a trial for paid plans > > The free tier with 10,000 credits per month is your trial. Test the entire API for as long as you need before upgrading. > [accordion] Can I cancel anytime > > Yes, cancel anytime from the API Dashboard. Your plan stays active until the end of the current billing period. Partial months are not refunded. # Build a Real-Time Holders Tab like Axiom Source: https://docs.cabalspy.xyz/realtime-holder-table Learn how to build a real-time token holder table, a live view of who holds a token, with each holder position, bag percentage and unrealized PnL updating as trades happen. This guide walks the frontend logic end to end in TypeScript, with no CSS, so you can drop it into any framework and style it yourself. > [card] [CabalSpy/kol-realtime-holder-table](https://github.com/CabalSpy/kol-realtime-holder-table) > > The full styled demo is open source. This guide rebuilds its core logic from scratch. ## What you will build By the end you will have a holder table with an initial snapshot fetched over the holder stream, live updates as wallets trade, live price driven updates as the market cap moves, and a small store that keeps it all in sync. ## How CabalSpy differs from a raw swap feed If you have built a holder table on a raw swap feed before, you had to track each wallet balance yourself, apply every buy and sell, and guard against drift. The CabalSpy holder stream does that work server side. It sends you a full position per holder, already computed, then keeps sending the updated position. You never add up trades by hand, you just replace a holder position with the latest one you receive. That makes the whole thing simpler. The three events you handle are init for the starting snapshot, holder\_update when a single holder trades, and position\_update when the market cap moves and the unrealized numbers change. ## Architecture overview One WebSocket connection carries everything. A small store holds the holder list keyed by wallet, and three event handlers write into it. ```text theme={null} holder stream (wss://stream.cabalspy.xyz) | | init -> replace the whole list with the snapshot | holder_update -> upsert one holder (they just traded) | position_update -> refresh the list (market cap moved) v HolderStore (Map keyed by wallet address) | v renderTable(holders[]) your UI, styled however you like ``` ## Step 1, project setup Any bundler works. Starting from scratch with Vite and TypeScript is enough, there are no dependencies beyond the browser WebSocket. ```bash Terminal theme={null} npm create vite@latest holder-table -- --template vanilla-ts cd holder-table npm install ``` Get your API key at [apidashboard.cabalspy.xyz](https://apidashboard.cabalspy.xyz). The key is passed when you open the connection, so keep it out of source control and load it from an environment variable in production. ## Step 2, type the data Type the two shapes you receive, a holder and the position it carries. These mirror the fields the holder stream sends. ```typescript src/types.ts theme={null} export interface Profile { name: string; image_url: string; twitter: string; telegram: string; type: string; } export interface Position { held: number; bag_pct: number; supply_pct: number; invested: number; invested_usd: number; remaining_sol: number; remaining_usd: number; realized_pnl_usd: number; unrealized_pnl_usd: number; unrealized_pnl_pct: number; entry_market_cap_usd: number; first_buy_at: string; last_activity_at: string; } export interface Holder { wallet: string; wallet_type: string; win_rate: number | null; profile: Profile; position: Position; } ``` ## Step 3, the holder store The store keeps holders in a Map keyed by wallet address, so an update is a single replace. Keeping a Map, rather than an array, means an update from a trade is O(1) and never duplicates a wallet. ```typescript src/store.ts theme={null} import type { Holder } from './types'; export class HolderStore { private byWallet = new Map(); /** Replace the whole set from an init snapshot. */ setAll(holders: Holder[]): void { this.byWallet.clear(); for (const h of holders) this.byWallet.set(h.wallet, h); } /** Insert or replace a single holder (they just traded). */ upsert(holder: Holder): void { this.byWallet.set(holder.wallet, holder); } /** Current holders as an array, sorted by remaining value. */ list(): Holder[] { return [...this.byWallet.values()].sort( (a, b) => b.position.remaining_usd - a.position.remaining_usd, ); } get count(): number { return this.byWallet.size; } } ``` ## Step 4, connect and subscribe Open one WebSocket, authenticate with the key in the query string, and subscribe to a token. Subscribing to a single mint returns a starting snapshot, so you get the whole table on connect and live updates after. ```typescript src/stream.ts theme={null} export interface SubscribeOptions { apiKey: string; mint: string; walletTypes?: string[]; mode?: 'full' | 'events'; mcInterval?: number; onMessage: (msg: any) => void; onStatus?: (status: 'open' | 'closed') => void; } export function connectHolderStream(opts: SubscribeOptions): () => void { const ws = new WebSocket(`wss://stream.cabalspy.xyz?apiKey=${encodeURIComponent(opts.apiKey)}`); ws.onopen = () => { opts.onStatus?.('open'); ws.send(JSON.stringify({ op: 'subscribe', stream: 'holder', token: opts.mint, wallet_types: opts.walletTypes ?? ['kol', 'smart', 'whale'], mode: opts.mode ?? 'full', ...(opts.mcInterval ? { mc_interval: opts.mcInterval } : {}), })); }; ws.onmessage = (e) => { try { opts.onMessage(JSON.parse(e.data)); } catch { /* ignore malformed frames */ } }; ws.onclose = () => opts.onStatus?.('closed'); // Return an unsubscribe/close function for cleanup. return () => { try { ws.close(); } catch { /* already closing */ } }; } ``` ## Step 5, handle the three events This is the heart of it. Route each event to the store. init replaces the list, holder\_update upserts the one holder that traded, and position\_update refreshes the list when the market cap moves. ```typescript src/holders.ts theme={null} import { HolderStore } from './store'; import { connectHolderStream } from './stream'; import type { Holder } from './types'; export function startHolderTable( apiKey: string, mint: string, render: (holders: Holder[], count: number) => void, ): () => void { const store = new HolderStore(); const close = connectHolderStream({ apiKey, mint, mode: 'full', onMessage: (msg) => { switch (msg.event) { case 'init': // Full snapshot of every tracked holder. store.setAll(msg.data.holders ?? []); break; case 'holder_update': // One holder traded, replace just that holder. if (msg.data.holder) store.upsert(msg.data.holder); break; case 'position_update': // Market cap moved, the server resends the current holders with fresh // unrealized numbers. Replace the set so PnL stays accurate. if (Array.isArray(msg.data.holders)) store.setAll(msg.data.holders); break; default: return; // welcome / subscribed / pong frames, nothing to render } render(store.list(), store.count); }, }); return close; } ``` ## Step 6, render the table The store hands you a plain array, so rendering is up to you and your framework. Here is a dependency free version that writes rows into a table body. No CSS, style it later. ```typescript src/render.ts theme={null} import type { Holder } from './types'; const usd = (v: number) => '$' + (Number(v) || 0).toLocaleString('en-US', { maximumFractionDigits: 2 }); const pct = (v: number) => (Number(v) || 0).toFixed(2) + '%'; export function renderTable(holders: Holder[], count: number): void { const countEl = document.querySelector('#holder-count'); if (countEl) countEl.textContent = String(count); const body = document.querySelector('#holder-body'); if (!body) return; body.innerHTML = holders.map((h) => { const p = h.position; const pnlUp = p.unrealized_pnl_usd >= 0; return ` ${h.profile.name || h.wallet.slice(0, 4)} ${h.wallet_type} ${usd(p.remaining_usd)} ${pct(p.bag_pct)} ${pct(p.supply_pct)} ${usd(p.unrealized_pnl_usd)} (${pct(p.unrealized_pnl_pct)}) `; }).join(''); } ``` ## Step 7, wire it together A minimal entry point. Give it an API key and a mint, and the table fills in and stays live. The returned function closes the connection when you are done, for example on a route change. ```typescript src/main.ts theme={null} import { startHolderTable } from './holders'; import { renderTable } from './render'; const API_KEY = import.meta.env.VITE_CABALSPY_KEY as string; const MINT = '3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump'; const stop = startHolderTable(API_KEY, MINT, renderTable); // Later, when leaving the page: // stop(); ``` And the markup it writes into, the only HTML you need. ```html index.html theme={null}

Holders (0)

TraderTypeValueBagSupplyUnrealized PnL
``` ## Choosing a mode The mode you pass on subscribe controls how much you receive, and how many credits you spend. | mode | What you receive | mc\_interval | | - | - | - | | full | Trades plus live position updates every time the market cap moves. Default. | Supported | | events | Only real trade events. Unrealized PnL will not tick between trades. Cheapest. | Ignored | With mode full you can pass mc\_interval, a number of seconds from 1 to 30, to receive at most one market cap update per token in that window. It is the simplest way to keep a busy token from using credits quickly while still staying live. ## Lessons worth knowing A few things that save you time. The snapshot arrives for free. Because you subscribe to a single mint, the init event gives you the whole current table before any live update, so there is no separate REST call to seed the list. You never compute balances. Unlike a raw swap feed, every holder\_update and position\_update carries the full, server computed position. Always replace, never add up trades yourself, and you cannot drift. Reconnect cleanly. If the socket closes, reopen and resubscribe. The next init gives you a fresh snapshot, so you recover the correct state automatically without patching up missed messages. ## Reference > [card] [WSS holder stream](/websockets/holder) > > The full holder stream reference, every field on init, holder\_update and position\_update. # SDKs Source: https://docs.cabalspy.xyz/sdks Official CabalSpy SDKs for TypeScript, Python and Rust: typed access to KOL, Smart Money and Whale wallet data, leaderboards, signals and real-time streams. CabalSpy publishes official, open-source SDKs for TypeScript, Python and Rust. They wrap the v1 REST API with typed responses and pagination helpers, and reject impossible chain and wallet-type combinations before a request is sent, so a mistake costs no credits. | Language | Install | REST | WebSocket | Source | | - | - | - | - | - | | TypeScript / JavaScript | `npm install cabalspy` | Full v1 | 7 streams | [cabalspy-js](https://github.com/CabalSpy/cabalspy-js) | | Python | `pip install cabalspy` | Full v1, sync and async | 7 streams | [cabalspy-python](https://github.com/CabalSpy/cabalspy-python) | | Rust | `cabalspy = "0.3"` | Full v1 | Not wrapped yet | [cabalspy-rust](https://github.com/CabalSpy/cabalspy-rust) | All SDKs read your key from the `CABALSPY_API_KEY` environment variable. Get a free key in the [API Dashboard](https://apidashboard.cabalspy.xyz/register). ## Try without a key Since TypeScript and Python 0.3.0 and Rust 0.2.0, every SDK can run on the [public demo](/demo): 20 requests per IP per day, data delayed 15 minutes, at most 5 rows per list. Each SDK raises a dedicated error when the daily budget is used up (`DemoLimitError`, `Error::DemoLimit`) and does not retry it. ```ts TypeScript theme={null} const client = CabalSpy.demo(); const board = await client.wallets.leaderboard({ blockchain: 'solana', type: 'kol', period: '7d' }); console.log(client.lastDemo?.remaining_today); ``` ```python Python theme={null} client = CabalSpy.demo() board = client.wallets.leaderboard(blockchain="solana", type="kol", period="7d") print(client.last_demo) ``` ```rust Rust theme={null} let client = CabalSpy::demo()?; ``` ## Quick start ```ts TypeScript theme={null} import { 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, }); // Our curated calls and how they performed (0.4.0 or later) const calls = await client.calls.list({ blockchain: 'solana', tier: ['good', 'moderate'] }); const stats = await client.calls.stats({ period: '30d' }); ``` ```python Python theme={null} from 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 ) # Our curated calls and how they performed (0.4.0 or later) calls = client.calls.list(blockchain="solana", tier=["good", "moderate"]) stats = client.calls.stats(period="30d") ``` ```rust Rust theme={null} 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 board = client.wallets().leaderboard(Chain::Solana, LeaderboardOpts { wallet_type: Some(WalletType::Kol), period: Some(Period::D7), limit: Some(25), ..Default::default() }).await?; Ok(()) } ``` ## Real-time streams The TypeScript and Python SDKs carry every stream over one socket and re-send your subscriptions after a reconnect. The Python SDK needs the extra `pip install "cabalspy[realtime]"`. ```ts TypeScript theme={null} const rt = client.realtime(); rt.on('position_update', (msg) => console.log('trade', msg.data)); rt.on('signal', (msg) => console.log('signal', msg.data)); rt.on('call', (msg) => console.log('call', msg.data.tier_label, msg.data.token.symbol)); await rt.connect(); rt.subscribe({ stream: 'tx', blockchain: 'solana', type: 'kol', token: '*' }); rt.subscribe({ stream: 'call', tiers: ['good'] }); // every chain ``` ## More ways to integrate > [card] [MCP server](/mcp-server) > > KOL and Smart Money data inside Claude, Cursor and VS Code. > [card] [x402 for AI agents](/x402) > > Pay per request in USDC, no account or API key. # Signal Stream Source: https://docs.cabalspy.xyz/signal Live WebSocket stream of entry and exit signals when clusters of tracked KOL or Smart Money wallets buy or sell the same token together. Live trade signals as they form. When enough tracked wallets of a type buy the same token, an entry signal fires. When enough of them exit, an exit signal fires. Each signal carries the cluster of wallets, the token with live market cap, per wallet positions with unrealized PnL, and the trigger trade. You define the thresholds when you subscribe, per wallet type, so the same stream can drive a simple two KOL alert or a gated KOL plus Smart Money strategy with win rate and token age filters. ## Endpoint Connect to `wss://stream.cabalspy.xyz`. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => { ws.send(JSON.stringify({ op: "subscribe", stream: "signal", blockchain: "solana", token: "*", kol: { min_buy: 0.5, entry_at: [3, 5], exit_at: [1] }, min_win_rate: 50, })); }; ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === "signal") { const d = msg.data; console.log(d.signal_kind, d.token.symbol, "wallets", d.cluster.qualifying_total); } }; ``` ```python Python theme={null} import json, websocket def on_open(ws): ws.send(json.dumps({ "op": "subscribe", "stream": "signal", "blockchain": "solana", "token": "*", "kol": {"min_buy": 0.5, "entry_at": [3, 5], "exit_at": [1]}, "min_win_rate": 50, })) def on_message(ws, message): msg = json.loads(message) if msg.get("event") == "signal": d = msg["data"] print(d["signal_kind"], d["token"]["symbol"]) ws = websocket.WebSocketApp( "wss://stream.cabalspy.xyz?apiKey=YOUR_KEY", on_open=on_open, on_message=on_message, ) ws.run_forever() ``` ## Authentication Provide your API key as a query parameter, wss\://stream.cabalspy.xyz?apiKey=YOUR\_KEY, or as a header, Authorization: Bearer YOUR\_KEY. Invalid keys are closed with code 1008. ## Chains and wallet types | blockchain | Wallet types | Native currency | | - | - | - | | solana | kol, smart, whale | SOL | | bnb | kol, smart | BNB | | base | kol, smart | ETH | | eth | kol | ETH | | rh | kol, smart | ETH | Smart Money is not available on eth, so a smart block on that chain has no effect. min\_buy and every value in the payload are denominated in the chain native currency, so a min\_buy of 0.5 means 0.5 SOL on Solana and 0.5 BNB on BNB Chain. Live market cap, entry market cap and unrealized PnL are now delivered on **every chain**. On BNB, Base, Ethereum and Robinhood these fields used to be null and are now filled. ## Subscribe To start receiving signals, send a subscribe message after the connection opens. You pick a chain, a token to watch, and the rules that decide when a signal fires. The simplest subscription fires an entry when three or more KOL wallets buy the same token, and an exit when only one is left holding. ```json Simple KOL cluster theme={null} { "op": "subscribe", "stream": "signal", "blockchain": "solana", "token": "*", "kol": { "entry_at": [3], "exit_at": [1] } } ``` The token field is "\*" for all tokens, or a single token mint or contract address to watch one token. The rules live in a kol block and, if you want Smart Money too, a smart block. Each block has the same shape. Inside a block, entry\_at is a list of wallet counts that each fire an entry signal. For example entry\_at of \[3, 5] fires once when the third qualifying wallet buys, and again when the fifth does. exit\_at is a list of remaining holder counts that fire an exit, so \[1] fires when only one qualifying wallet is still holding. min\_buy is the smallest buy, in native currency, for a wallet to count. max\_wallet\_buy is an optional upper limit per wallet. ```json KOL and Smart Money together, with filters theme={null} { "op": "subscribe", "stream": "signal", "blockchain": "solana", "token": "*", "kol": { "min_buy": 0.5, "entry_at": [3, 5], "exit_at": [1] }, "smart": { "min_buy": 1.0, "entry_at": [2] }, "min_win_rate": 50, "min_token_age": 1, "max_token_age": 48 } ``` ```json The same cluster on BNB, min_buy is in BNB theme={null} { "op": "subscribe", "stream": "signal", "blockchain": "bnb", "token": "*", "kol": { "min_buy": 0.2, "entry_at": [3], "exit_at": [1] }, "smart": { "min_buy": 0.5, "entry_at": [2] } } ``` When you provide both a kol and a smart block, the entry gate is an AND. Every configured type must reach its own entry\_at minimum before an entry signal fires. **op** `string` *required* The operation. Use subscribe to start. **stream** `string` *required* Set to signal for this stream. **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh. Smart Money is not available on eth. **token** `string` Which token to watch. Either "\*" for all tokens, or a single token mint or contract address. **kol** `object` KOL rules. Fields: min\_buy (minimum buy per wallet, native currency), entry\_at (list of wallet counts that fire an entry, up to 3 values), exit\_at (list of remaining holder counts that fire an exit, up to 2 values), max\_wallet\_buy (optional per wallet cap). **smart** `object` Smart Money rules, same shape as kol. Only where Smart Money is supported. **min\_win\_rate** `number` Only count wallets whose lifetime win rate is at least this percentage. **include\_wallets** `array` Whitelist. Only these wallet addresses count toward a cluster. **exclude\_wallets** `array` Blacklist. These wallet addresses never count. **min\_token\_age** `number` Only fire for tokens at least this many hours old, measured from the first tracked buy. **max\_token\_age** `number` Only fire for tokens at most this many hours old. If you send threshold fields at the top level without a kol or smart block, they are treated as the KOL block, so older integrations keep working. The subscribe reply echoes back the rules it parsed and any warnings, for example an unknown field, or a win rate filter you asked for while win rate data is temporarily unavailable. ## Unsubscribe and other operations To stop, send op unsubscribe with the same chain and token. This removes the subscription for that token regardless of which types you configured. ```json Unsubscribe theme={null} { "op": "unsubscribe", "stream": "signal", "blockchain": "solana", "token": "*" } ``` To see your active subscriptions, send op subscriptions. To check the connection is alive, send op ping and you get a pong back. ```json List your subscriptions theme={null} { "op": "subscriptions", "stream": "signal" } ``` ## Event Each fired signal delivers a signal event. **event** `string` signal. **data** `object` **data** **signal\_kind** `string` entry or exit. **blockchain** `string` The chain. **wallet\_types** `array` The wallet types the signal covers. **mint** `string` The token mint or contract address. **token** `object` Token block with mint, symbol, name, supply, decimals, and live market\_cap, market\_cap\_usd, market\_cap\_currency, pool, on\_curve and bonding\_curve\_progress. Delivered on every chain. bonding\_curve\_progress is Solana only and null elsewhere. **threshold** `object` What fired, with fired\_on, exit\_type and exit\_remaining for exits, and the per type thresholds that were configured. **cluster** `object` **cluster** **qualifying\_total** `integer` Total qualifying wallets across all configured types. **total\_invested** `number` Total invested by the cluster in native currency. **total\_invested\_usd** `number` Total invested in USD. **unrealized\_pnl\_sol** `number` Sum of the cluster wallet unrealized PnL in the chain native currency. Despite the field name this carries BNB or ETH on those chains, read currency to label it. **unrealized\_pnl\_usd** `number` Cluster unrealized PnL in USD. **unrealized\_pnl\_pct** `number` Portfolio weighted unrealized PnL percentage. **currency** `string` Native currency. SOL, BNB or ETH. Each configured type also appears here as an object with qualifying, sold and holding counts. **trigger** `object` The trade that fired the signal, with wallet, action, value, signature and created\_at. **wallets** `array` **wallet in the cluster** **wallet** `string` Wallet address. **wallet\_type** `string` kol or smart. **win\_rate** `number` Lifetime win rate, or null. **profile** `object` Wallet profile. **invested** `number` Invested in native currency. **invested\_usd** `number` Invested in USD. **max\_single\_buy** `number` Largest single buy. **buy\_txn** `integer` Number of buys. **sell\_txn** `integer` Number of sells. **sold\_value** `number` Total sold value. **sold** `boolean` Whether the wallet has sold. **bag\_pct** `number` Percent of peak holding still held, or null. **first\_buy\_at** `string` Timestamp of the first buy. **entry\_market\_cap** `number` Market cap in the chain native currency when the wallet first bought, frozen. Delivered on every chain. **entry\_market\_cap\_usd** `number` Entry market cap in USD. **unrealized\_pnl\_sol** `number` Unrealized PnL on the held bag in the chain native currency. **unrealized\_pnl\_pct** `number` Unrealized PnL percentage. > [!NOTE] > > Market cap, entry\_market\_cap and unrealized PnL are only filled while a current market cap for the token is known. If a token has not traded since the stream started, these stay null until its first price arrives. ```json signal theme={null} { "success": true, "channel": "signal.solana", "event": "signal", "data": { "signal_kind": "entry", "blockchain": "solana", "wallet_types": ["kol"], "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token": { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "invisibull", "name": "invisibull", "supply": 1000000000, "decimals": 6, "market_cap": 40.08, "market_cap_usd": 3301.2, "market_cap_currency": "SOL", "pool": "pump", "on_curve": true, "bonding_curve_progress": 42.5 }, "threshold": { "fired_on": "entry", "exit_type": null, "exit_remaining": null, "currency": "SOL", "kol": { "min_buy": 0.5, "entry_at": [3, 5], "exit_at": [1], "max_wallet_buy": null } }, "cluster": { "kol": { "qualifying": 5, "sold": 0, "holding": 5 }, "qualifying_total": 5, "total_invested": 12.4, "total_invested_usd": 1021.4, "unrealized_pnl_sol": -0.4, "unrealized_pnl_usd": -32.9, "unrealized_pnl_pct": -3.2, "currency": "SOL" }, "trigger": { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "action": "buy", "value": 3.2, "signature": "5xr8abc...", "created_at": "2026-07-06T10:52:00Z" }, "wallets": [ { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "wallet_type": "kol", "win_rate": 61.34, "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "invested": 3.2, "invested_usd": 263.6, "max_single_buy": 3.2, "buy_txn": 1, "sell_txn": 0, "sold_value": 0.0, "sold": false, "bag_pct": 100.0, "first_buy_at": "2026-07-06T10:20:00Z", "entry_market_cap": 44.6, "entry_market_cap_usd": 3673.2, "unrealized_pnl_sol": -0.1, "unrealized_pnl_pct": -3.2 } ] }, "meta": { "request_id": "req_5162c7cf7f87", "version": "2.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ```json signal on BNB, every value in BNB theme={null} { "success": true, "channel": "signal.bnb", "event": "signal", "data": { "signal_kind": "entry", "blockchain": "bnb", "wallet_types": ["kol"], "mint": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef12", "token": { "mint": "0x1a2b3c4d5e6f7890abcdef1234567890abcdef12", "symbol": "FOUR", "name": "Four Token", "supply": 1000000000, "decimals": 18, "market_cap": 1250.5, "market_cap_usd": 750300.0, "market_cap_currency": "BNB", "pool": "0xpool1234567890abcdef1234567890abcdef1234", "on_curve": true, "bonding_curve_progress": null }, "threshold": { "fired_on": "entry", "exit_type": null, "exit_remaining": null, "currency": "BNB", "kol": { "min_buy": 0.2, "entry_at": [3], "exit_at": [1], "max_wallet_buy": null } }, "cluster": { "kol": { "qualifying": 3, "sold": 0, "holding": 3 }, "qualifying_total": 3, "total_invested": 2.1, "total_invested_usd": 1260.0, "unrealized_pnl_sol": 0.35, "unrealized_pnl_usd": 210.0, "unrealized_pnl_pct": 16.6, "currency": "BNB" }, "trigger": { "wallet": "0x7a16ff8270133f063aab6c9977183d9e72835428", "action": "buy", "value": 0.5, "signature": "0xabc123...", "created_at": "2026-07-17T09:12:04Z" }, "wallets": [ { "wallet": "0x7a16ff8270133f063aab6c9977183d9e72835428", "wallet_type": "kol", "win_rate": 58.2, "profile": { "name": "BNB Whale", "image_url": null, "twitter": "", "telegram": "", "blockchain": "bnb", "currency": "BNB", "type": "kol" }, "invested": 0.5, "invested_usd": 300.0, "max_single_buy": 0.5, "buy_txn": 1, "sell_txn": 0, "sold_value": 0.0, "sold": false, "bag_pct": 100.0, "first_buy_at": "2026-07-17T09:12:04Z", "entry_market_cap": 1070.0, "entry_market_cap_usd": 642000.0, "unrealized_pnl_sol": 0.084, "unrealized_pnl_pct": 16.8 } ] }, "meta": { "request_id": "req_9a1b2c3d4e5f", "version": "2.0.0", "timestamp": "2026-07-17T09:12:05Z" } } ``` ## Billing Signals are billed more heavily than a single event because each one aggregates a whole cluster. Every delivered signal deducts a fixed number of credits and is logged. ## Heartbeat The server sends WebSocket pings and expects pong, which standard clients answer automatically. You can also send op ping at any time. # Signals Source: https://docs.cabalspy.xyz/signals GET /v1/signals Live trade signals derived from tracked wallet activity, including token clusters where several wallets buy the same token within a time window. Live trade signals derived from tracked wallet activity in a recent time window. The main mode, cluster, surfaces tokens where several tracked wallets are buying at once, a strong early signal. Two more modes, entry and exit, return individual buy and sell signals in the feed format. Use it to drive alerts, for example notify me when three or more KOLs buy the same token within an hour. Signals are derived live from the feed, so they reflect the current window every time. > [!TIP] > > Choose the mode with mode. cluster groups wallets buying the same token, entry and exit return single buy or sell events. Tune clusters with min\_wallets, min\_value and hours. An advanced gated mode is available by passing per type filters like kol\_min\_wallets and smart\_min\_wallets. ## Query Parameters **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh (Robinhood Chain). **type** `string` *required* Wallet category kol, smart or whale. **mode** `string` *required* Signal mode. One of cluster, entry, exit. **min\_wallets** `integer` (default: 3) cluster mode. Minimum number of wallets buying the same token to form a cluster. **min\_value** `number` (default: 0) Minimum trade value to consider (native). **hours** `number` (default: 1) Time window in hours to look back for signals. **limit** `integer` Maximum number of signals to return. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/signals?blockchain=solana&type=kol&mode=cluster&min_wallets=3&hours=1&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "type": "kol", "mode": "cluster", "min_wallets": 3, "hours": 1, "api_key": "YOUR_KEY", } r = requests.get("https://api.cabalspy.xyz/v1/signals", params=params) for s in r.json()["data"]["signals"]: w = s["window"] print(s["token"]["token_name"], "wallets", w["wallet_count"], "invested", w["total_invested"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", type: "kol", mode: "cluster", min_wallets: "3", hours: "1", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/signals?${p}`); const { data } = await res.json(); data.signals.forEach(s => console.log(s.token.token_name, s.window.wallet_count)); ``` ## Response The response shape depends on mode. Below is the cluster mode, the most detailed. entry and exit return individual transactions in the same shape as the transactions feed (with holdings\_after). **success** `boolean` True on success. **data** `object` **data** **blockchain** `string` Requested chain. **wallet\_types** `array` The wallet types included. **currency** `string` Native currency. **filters** `object` The applied filters (min\_win\_rate, include\_wallets, exclude\_wallets, min\_token\_age\_hours, max\_token\_age\_hours). **signals** `array` **signal (cluster)** **token** `object` Token block (mint, token\_name, blockchain, currency, token\_supply, token\_decimals). **signal\_type** `string` cluster. **signal\_strength** `string` strong or medium, based on how many wallets qualified. **currency** `string` Native currency. **gate** `object` Whether the gate was met and the thresholds used. **window** `object` **window** **hours** `number` The window in hours. **wallet\_count** `integer` How many wallets bought in the window. **by\_type** `object` Wallet counts split by type. **total\_invested** `number` Total invested in the window (native). **total\_invested\_usd** `number` Total invested in USD. **first\_buy\_at** `string` Timestamp of the first buy in the cluster. **latest\_buy\_at** `string` Timestamp of the latest buy in the cluster. **time\_span\_minutes** `number` Minutes between first and latest buy. **token\_stats** `object` Whole history token stats (total\_buyers, still\_holding\_count, active\_count, total\_volume, total\_volume\_usd, net\_flow, holders\_by\_type, first\_entry\_time). **wallets** `array` **wallet in the cluster** **profile** `object` Wallet profile. **wallet\_type** `string` kol, smart or whale. **win\_rate** `number` Lifetime win rate, only when min\_win\_rate was requested, otherwise null. **window\_invested** `number` Invested in the window (native). **window\_invested\_usd** `number` Invested in the window in USD. **window\_buy\_txn** `integer` Buys in the window. **window\_sell\_txn** `integer` Sells in the window. **sold\_in\_window** `boolean` Whether the wallet also sold in the window. **bought\_at** `string` When the wallet bought. **realized\_pnl** `number` Lifetime realized PnL on this token (native). Present when trader data exists. **realized\_pnl\_usd** `number` Realized PnL in USD. **realized\_pnl\_percentage** `number` Realized PnL percentage. **bag\_pct** `number` Percent of peak holding still held. **supply\_pct** `number` Percent of supply held. **still\_holding** `boolean` Whether the wallet still holds. **is\_active** `boolean` True when bag\_pct is above 1 percent. **pagination** `object` Standard pagination object. ```json Response (cluster) theme={null} { "success": true, "data": { "blockchain": "solana", "wallet_types": ["kol"], "currency": "SOL", "filters": { "min_win_rate": null, "include_wallets": null, "exclude_wallets": null, "min_token_age_hours": null, "max_token_age_hours": null }, "signals": [ { "token": { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "blockchain": "solana", "currency": "SOL", "token_supply": 1000000000, "token_decimals": 6 }, "signal_type": "cluster", "signal_strength": "strong", "currency": "SOL", "gate": { "met": true, "wallet_types": ["kol"], "thresholds": { "kol": 3 } }, "window": { "hours": 1, "wallet_count": 5, "by_type": { "kol": 5 }, "total_invested": 12.4, "total_invested_usd": 1021.4, "first_buy_at": "2026-07-06T10:20:00Z", "latest_buy_at": "2026-07-06T10:52:00Z", "time_span_minutes": 32.0 }, "token_stats": { "total_buyers": 12, "still_holding_count": 8, "active_count": 7, "total_volume": 44.6, "total_volume_usd": 3673.2, "net_flow": 30.1, "holders_by_type": { "kol_count": 5, "smart_count": 0, "whale_count": 0 }, "first_entry_time": "2026-07-06T09:58:00Z" }, "wallets": [ { "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "wallet_type": "kol", "win_rate": null, "window_invested": 3.2, "window_invested_usd": 263.6, "window_buy_txn": 1, "window_sell_txn": 0, "sold_in_window": false, "bought_at": "2026-07-06T10:20:00Z", "realized_pnl": 0.0, "realized_pnl_usd": 0.0, "realized_pnl_percentage": 0.0, "bag_pct": 100.0, "supply_pct": 0.32, "still_holding": true, "is_active": true } ] } ] }, "pagination": { "limit": 50, "total": 1, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | blockchain, type or mode missing or invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Signals History Source: https://docs.cabalspy.xyz/signals-history GET /v1/signals/history Historical cluster signals that would have fired on past days, useful for backtesting a KOL cluster strategy against real outcomes. The historical counterpart to Signals. Returns cluster signals that would have fired on past days, so you can backtest a strategy. Each entry marks the token, how many wallets clustered, how much they invested, and when the signal triggered. Use it to answer questions like how often did a three KOL cluster precede a move, or to replay signals for a given day. > [!TIP] > > Look back with days. Each signal carries would\_have\_fired and the day it belongs to, along with triggered\_at, so you can line signals up against price history from your own source. ## Query Parameters **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh (Robinhood Chain). **type** `string` *required* Wallet category kol, smart or whale. **days** `integer` How many past days to include. **min\_wallets** `integer` (default: 3) Minimum wallets that must have clustered for a historical signal. **limit** `integer` Maximum number of signals to return. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/signals/history?blockchain=solana&type=kol&days=7&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "type": "kol", "days": 7, "api_key": "YOUR_KEY"} r = requests.get("https://api.cabalspy.xyz/v1/signals/history", params=params) for s in r.json()["data"]["signals"]: print(s["day"], s["token_name"], "wallets", s["wallet_count"], "invested", s["total_invested"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", type: "kol", days: "7", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/signals/history?${p}`); const { data } = await res.json(); data.signals.forEach(s => console.log(s.day, s.token_name, s.wallet_count)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **blockchain** `string` Requested chain. **wallet\_types** `array` The wallet types included. **days** `integer` The number of past days included. **filters** `object` Applied filters (min\_win\_rate, include\_wallets, exclude\_wallets). **signals** `array` **historical signal** **mint** `string` Token mint. **token\_name** `string` Token name. **token\_supply** `number` Total supply. **signal\_type** `string` cluster. **signal\_strength** `string` strong or medium. **wallet\_count** `integer` How many wallets clustered. **by\_type** `object` Wallet counts split by type. **total\_invested** `number` Total invested in the cluster (native). **total\_invested\_usd** `number` Total invested in USD, or null if no price was available. **currency** `string` Native currency. **triggered\_at** `string` When the first buy of the cluster happened. **day** `string` The day this signal belongs to. **window** `string` The aggregation window, 1d. **would\_have\_fired** `boolean` Whether the signal would have fired under the thresholds. ```json Response theme={null} { "success": true, "data": { "blockchain": "solana", "wallet_types": ["kol"], "days": 7, "filters": { "min_win_rate": null, "include_wallets": null, "exclude_wallets": null }, "signals": [ { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "token_supply": 1000000000, "signal_type": "cluster", "signal_strength": "strong", "wallet_count": 5, "by_type": { "kol": 5 }, "total_invested": 12.4, "total_invested_usd": 1021.4, "currency": "SOL", "triggered_at": "2026-07-04T16:25:34Z", "day": "2026-07-04", "window": "1d", "would_have_fired": true } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | blockchain or type missing or invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Stats Source: https://docs.cabalspy.xyz/stats GET /v1/tokens/stats Aggregate trading statistics for one token across tracked wallets, with current market cap, holder totals, flow stats and a per trader breakdown. Everything CabalSpy knows about how tracked wallets trade one token. Returns the token block with its current market cap, holder totals by wallet type, aggregate flow statistics, and a per trader breakdown with each trader stats and live position. Use it to build a token detail page that shows which KOLs and smart money are in a token, how much they hold, and whether they are buying or selling right now. > [!TIP] > > Market cap, price and the live position fields (unrealized PnL, remaining value) are only present on Solana. On other chains those fields are null. Pass a single type to narrow to one wallet category, or omit type to aggregate all categories. ## Query Parameters **blockchain** `string` *required* Chain of the token. One of solana, bnb, base, eth, rh (Robinhood Chain). **mint** `string` *required* The token mint or contract address. **type** `string` Optional wallet category to narrow the breakdown kol, smart or whale. Omit to aggregate across all categories available on the chain. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/tokens/stats?blockchain=solana&mint=3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "api_key": "YOUR_KEY", } r = requests.get("https://api.cabalspy.xyz/v1/tokens/stats", params=params) d = r.json()["data"] print("market cap", d["token"]["market_cap"], d["token"]["market_cap_currency"]) for t in d["traders"]: h = t["trader_holdings"] print(t["profile"]["name"], "bag", h["bag_pct"], "uPNL", h.get("unrealized_pnl_sol")) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", mint: "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/tokens/stats?${p}`); const { data } = await res.json(); console.log("market cap", data.token.market_cap); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **token** `object` **token** **mint** `string` Token mint or contract address. **token\_name** `string` Token name. **blockchain** `string` Chain. **currency** `string` Native currency. **token\_supply** `number` Total supply. **token\_decimals** `integer` Token decimals. **market\_cap** `number` Market cap in native currency, on every chain. See `market_cap_source` for where it comes from. Null when neither a live value nor a tracked trade is available. **market\_cap\_usd** `number` Market cap in USD. **market\_cap\_currency** `string` Currency of the market cap value (SOL, BNB or ETH), or null. **price** `number` Token price in native currency. **price\_usd** `number` Token price in USD. **market\_cap\_source** `string` `live` for the current market value of a token that is actively trading, `last_trade` when there is no live value and the market cap is the price of the newest tracked trade times supply, or null. **market\_cap\_updated\_at** `integer` Unix seconds of the market cap value: the time of the live update, or of the trade for `last_trade`. **native\_price\_usd** `number` USD price of the chain's native currency (SOL, BNB or ETH). **sol\_price\_usd** `number` SOL price in USD. Solana only, kept for compatibility; use `native_price_usd`. **total\_holders** `object` **total\_holders** **kol\_count** `integer` Number of KOL holders. **smart\_count** `integer` Number of smart money holders. **whale\_count** `integer` Number of whale holders. **still\_holding\_count** `integer` How many still hold a position. **total\_holdings** `object` **total\_holdings** **token\_amount** `number` Total tokens currently held across tracked wallets. **token\_amount\_peak** `number` Peak total tokens held. **supply\_pct** `number` Percent of supply currently held. **supply\_pct\_peak** `number` Peak percent of supply held. **total\_statistics** `object` **total\_statistics** **total\_buy** `number` Total bought (native). **total\_buy\_usd** `number` Total bought in USD. **total\_sell** `number` Total sold (native). **total\_sell\_usd** `number` Total sold in USD. **net\_flow** `number` Buy minus sell (native). Positive means net accumulation. **net\_flow\_usd** `number` Net flow in USD. **total\_volume** `number` Buy plus sell volume (native). **total\_volume\_usd** `number` Buy plus sell volume in USD. **avg\_position\_size** `number` Average position size (native). **largest\_position** `number` Largest single position (native). **buying\_pressure** `number` Buy share of total volume, an indicator of pressure. **first\_entry\_time** `string` When the first tracked wallet entered. **first\_entry\_type** `string` buy or sell of the first entry. **first\_entry\_wallet\_address** `string` Address of the first entrant. **latest\_entry\_time** `string` When the most recent tracked wallet entered. **latest\_entry\_type** `string` buy or sell of the latest entry. **latest\_entry\_wallet\_address** `string` Address of the latest entrant. **time\_since\_first\_entry\_hours** `number` Hours since the first entry. **traders** `array` **trader, sorted by buy volume highest first** **profile** `object` Wallet profile (name, image\_url, twitter, telegram, blockchain, currency, type). **trader\_stats** `object` **trader\_stats** **buy** `number` Total bought (native). **buy\_usd** `number` Total bought in USD. **sell** `number` Total sold (native). **sell\_usd** `number` Total sold in USD. **volume\_buy** `number` Buy volume (native). **volume\_buy\_usd** `number` Buy volume in USD. **volume\_sell** `number` Sell volume (native). **volume\_sell\_usd** `number` Sell volume in USD. **realized\_pnl** `number` Realized PnL on this token (native). **realized\_pnl\_usd** `number` Realized PnL in USD. **realized\_pnl\_percentage** `number` Realized PnL percentage. **buy\_count** `integer` Number of buys. **sell\_count** `integer` Number of sells. **buy\_tokens** `number` Tokens bought. **sell\_tokens** `number` Tokens sold. **avg\_buy\_price** `number` Average buy price. **first\_trade\_at** `string` ISO timestamp of the first trade. **last\_trade\_at** `string` ISO timestamp of the last trade. **trader\_holdings** `object` **trader\_holdings** **token\_amount** `number` Tokens currently held. **token\_amount\_peak** `number` Peak tokens held. **supply\_pct** `number` Percent of supply held. **supply\_pct\_peak** `number` Peak percent of supply held. **bag\_pct** `number` Percent of peak holding still held. **still\_holding** `boolean` Whether the trader still holds. **unrealized\_pnl\_sol** `number` Unrealized PnL on the remaining bag (native). Solana only. Frozen to 0 once fully sold. **unrealized\_pnl\_usd** `number` Unrealized PnL in USD. Solana only. **unrealized\_pnl\_pct** `number` Unrealized PnL percentage. Solana only. **remaining\_sol** `number` Current value of the remaining bag (native). Solana only. **remaining\_usd** `number` Current value of the remaining bag in USD. Solana only. **entry\_market\_cap** `number` Market cap in SOL when the wallet first bought, frozen. Solana only, null for older positions. **entry\_market\_cap\_usd** `number` Entry market cap in USD, frozen at buy time. Solana only, null for older positions. ```json Response theme={null} { "success": true, "data": { "token": { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "blockchain": "solana", "currency": "SOL", "token_supply": 1000000000, "token_decimals": 6, "market_cap": 40.08, "market_cap_usd": 3301.2, "market_cap_currency": "SOL", "price": 4.008e-8, "price_usd": 3.3e-6, "market_cap_source": "live", "market_cap_updated_at": 1783340510, "native_price_usd": 82.36, "sol_price_usd": 82.36 }, "total_holders": { "kol_count": 1, "smart_count": 0, "whale_count": 0, "still_holding_count": 1 }, "total_holdings": { "token_amount": 22113972.03, "token_amount_peak": 22113972.03, "supply_pct": 2.211397, "supply_pct_peak": 2.211397 }, "total_statistics": { "total_buy": 1.66, "total_buy_usd": 137.44, "total_sell": 0.0, "total_sell_usd": 0.0, "net_flow": 1.66, "net_flow_usd": 137.44, "total_volume": 1.66, "total_volume_usd": 137.44, "avg_position_size": 1.66, "largest_position": 1.66, "buying_pressure": 100.0, "first_entry_time": "2026-07-04T16:25:34Z", "first_entry_type": "buy", "first_entry_wallet_address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "latest_entry_time": "2026-07-04T16:25:34Z", "latest_entry_type": "buy", "latest_entry_wallet_address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "time_since_first_entry_hours": 42.6 }, "traders": [ { "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "trader_stats": { "buy": 1.66, "buy_usd": 137.44, "sell": 0.0, "sell_usd": 0.0, "volume_buy": 1.66, "volume_buy_usd": 137.44, "volume_sell": 0.0, "volume_sell_usd": 0.0, "realized_pnl": 0.0, "realized_pnl_usd": 0.0, "realized_pnl_percentage": 0.0, "buy_count": 1, "sell_count": 0, "buy_tokens": 22113972.03, "sell_tokens": 0.0, "avg_buy_price": 7.5e-8, "first_trade_at": "2026-07-04T16:25:34Z", "last_trade_at": "2026-07-04T16:25:34Z" }, "trader_holdings": { "token_amount": 22113972.03, "token_amount_peak": 22113972.03, "supply_pct": 2.211397, "supply_pct_peak": 2.211397, "bag_pct": 100.0, "still_holding": true, "unrealized_pnl_sol": -0.099817, "unrealized_pnl_usd": -8.22, "unrealized_pnl_pct": -10.12, "remaining_sol": 0.886537, "remaining_usd": 73.02, "entry_market_cap": 44.6, "entry_market_cap_usd": 3673.2 } } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | mint is missing. | | 400 | invalid\_parameter | blockchain or type invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Thesis Markers on Your Price Chart Source: https://docs.cabalspy.xyz/thesis-markers-on-price-chart Put token theses from verified holders on your price chart as live markers, colored by bull or bear, labelled with the author and their real PnL. Plain JavaScript with TradingView Lightweight Charts and a tiny Node relay. Learn how to put [token theses](/cabalspy-id/theses) on your price chart. Every thesis is written by a verified holder of the token, so a marker on the chart shows when a real holder called it, whether they were bullish or bearish, and how their position is doing now. Hover a marker to read the thesis. This recipe loads the existing theses once, then keeps the chart live with the [theses stream](/cabalspy-id/theses-stream). It targets **TradingView Lightweight Charts 5.0.8** (`createSeriesMarkers`), in plain JavaScript. ## What you will build A candlestick chart with one marker per thesis: green arrow below the bar for `bull`, red arrow above the bar for `bear`, grey circle without a stance. The label reads `@author +54%`, the author's live PnL on the token. New theses appear the moment they are posted, deleted or hidden ones disappear. ## How it fits together Your API key must never reach the browser. A tiny relay on your server holds the key, loads the history and keeps one connection to the theses stream. The browser only talks to the relay. ```text theme={null} browser ──GET /theses──────▶ relay ──GET /v1/theses──────────▶ api-id.cabalspy.xyz browser ◀──ws /live───────── relay ◀──wss /v1/theses/stream── api-id.cabalspy.xyz ``` The endpoints used: > [card] [GET /v1/theses](/cabalspy-id/theses-list) > > The theses of a token, with author, stance, created\_at and position. > [card] [Theses stream](/cabalspy-id/theses-stream) > > Live thesis events for up to 200 tokens per connection. Every plan. ## Step 1, the relay Node 22 or newer (global `fetch` and `WebSocket`), plus the `ws` package for the browser-facing socket: `npm install ws`. Set `CABALSPY_API_KEY` to your key with CabalSpy ID enabled. The relay keeps one upstream connection, subscribes to every token a browser is watching, and forwards each thesis event only to the browsers watching that token. ```javascript relay.mjs theme={null} import http from 'node:http'; import { WebSocketServer } from 'ws'; const KEY = process.env.CABALSPY_API_KEY; const API = 'https://api-id.cabalspy.xyz/v1'; const STREAM = `wss://api-id.cabalspy.xyz/v1/theses/stream?apiKey=${KEY}`; const ORIGIN = process.env.ALLOWED_ORIGIN || '*'; // your site, e.g. https://app.example.com const CHAINS = new Set(['solana', 'bnb', 'base', 'eth', 'rh']); // solana mints are case sensitive, EVM addresses are not const keyOf = (chain, mint) => `${chain}:${chain === 'solana' ? mint : mint.toLowerCase()}`; const tokenOf = (k) => { const [blockchain, mint] = k.split(':'); return { blockchain, mint }; }; function readToken(url) { const chain = url.searchParams.get('blockchain') || ''; const mint = (url.searchParams.get('mint') || '').trim(); return CHAINS.has(chain) && /^[0-9A-Za-z]{32,44}$/.test(mint) ? keyOf(chain, mint) : null; } // ── upstream: one connection to the theses stream ── const watchers = new Map(); // token key -> Set of browser sockets let up = null; function connectUpstream() { up = new WebSocket(STREAM); up.onopen = () => { const tokens = [...watchers.keys()].map(tokenOf); if (tokens.length) up.send(JSON.stringify({ op: 'subscribe', tokens })); // again after every reconnect }; up.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === 'error') return console.error('theses stream:', msg.error.code, msg.error.message); if (!msg.event.startsWith('thesis')) return; // ready, subscribed, heartbeat, pong const sockets = watchers.get(keyOf(msg.data.blockchain, msg.data.mint)); for (const ws of sockets ?? []) if (ws.readyState === 1) ws.send(e.data); }; up.onclose = () => setTimeout(connectUpstream, 2000); } connectUpstream(); function upstream(op, k) { if (up?.readyState === WebSocket.OPEN) up.send(JSON.stringify({ op, tokens: [tokenOf(k)] })); } // ── HTTP: the history of a token ── const server = http.createServer(async (req, res) => { const url = new URL(req.url, 'http://relay'); const k = url.pathname === '/theses' && readToken(url); if (!k) { res.writeHead(404).end(); return; } const { blockchain, mint } = tokenOf(k); const r = await fetch(`${API}/theses?` + new URLSearchParams({ blockchain, mint, sort: 'new', limit: '50' }), { headers: { Authorization: `Bearer ${KEY}` }, }); res.writeHead(r.status, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': ORIGIN }); res.end(await r.text()); }); // ── WebSocket: live events of one token per browser socket ── const wss = new WebSocketServer({ server, path: '/live' }); wss.on('connection', (ws, req) => { const k = readToken(new URL(req.url, 'http://relay')); if (!k) return ws.close(1008, 'blockchain and mint required'); if (!watchers.has(k)) { watchers.set(k, new Set()); upstream('subscribe', k); } watchers.get(k).add(ws); ws.on('close', () => { const set = watchers.get(k); set?.delete(ws); if (set && set.size === 0) { watchers.delete(k); upstream('unsubscribe', k); } }); }); server.listen(8787, () => console.log('relay on http://localhost:8787')); ``` The relay only accepts known chains and address-shaped mints, so nobody can use it to call other endpoints with your key. One upstream connection carries up to 200 tokens; open a second one if you show more. ## Step 2, the chart Load Lightweight Charts 5.0.8 and give the chart a container and a tooltip element. ```html index.html theme={null}
``` ## Step 3, theses to markers A marker needs a time, a position, a shape, a color and a text. The time must be a Unix timestamp in seconds, and markers must be sorted by time. Round `created_at` down to the bar interval so the marker sits on the right candle. ```javascript markers.js (part 1) theme={null} const RELAY = 'http://localhost:8787'; const RELAY_WS = 'ws://localhost:8787'; const BAR_SECONDS = 60; // match the interval of your candles const theses = new Map(); // id -> thesis function pnlLabel(t) { const pos = t.position; if (!pos || pos.private) return ''; if (pos.now?.status === 'sold') return ' sold'; const p = pos.now?.pnl_percent; return p == null ? '' : ` ${p >= 0 ? '+' : ''}${p.toFixed(0)}%`; } function toMarker(t) { const time = Math.floor(Date.parse(t.created_at) / 1000 / BAR_SECONDS) * BAR_SECONDS; const base = { id: t.id, time, text: `@${t.author.username}${pnlLabel(t)}` }; if (t.stance === 'bull') return { ...base, position: 'belowBar', shape: 'arrowUp', color: '#3ddc84' }; if (t.stance === 'bear') return { ...base, position: 'aboveBar', shape: 'arrowDown', color: '#ff5c6c' }; return { ...base, position: 'aboveBar', shape: 'circle', color: '#8b96a3' }; } function allMarkers() { return [...theses.values()].map(toMarker).sort((a, b) => a.time - b.time); } ``` ## Step 4, draw, load and go live Create the chart and the marker plugin, load the history from the relay, then apply live events. `thesis` adds a marker, `thesis.removed` deletes one. Hovering a marker shows the thesis body, using the marker id that Lightweight Charts reports as `hoveredObjectId`. ```javascript markers.js (part 2) theme={null} const { createChart, CandlestickSeries, createSeriesMarkers } = LightweightCharts; export async function showTheses(blockchain, mint, candles) { const el = document.getElementById('chart'); const tip = document.getElementById('tip'); const chart = createChart(el, { autoSize: true, layout: { background: { color: '#0b0e12' }, textColor: '#8b96a3' } }); const series = chart.addSeries(CandlestickSeries); series.setData(candles); // your OHLC data: [{ time, open, high, low, close }, ...] const markers = createSeriesMarkers(series, []); const redraw = () => markers.setMarkers(allMarkers()); // 1. history const q = new URLSearchParams({ blockchain, mint }); const body = await (await fetch(`${RELAY}/theses?${q}`)).json(); for (const t of body.data ?? []) theses.set(t.id, t); redraw(); // 2. live const ws = new WebSocket(`${RELAY_WS}/live?${q}`); ws.onmessage = (e) => { const { event, data } = JSON.parse(e.data); if (event === 'thesis') { theses.set(data.id, data); redraw(); } if (event === 'thesis.removed' && theses.delete(data.id)) redraw(); }; // 3. tooltip with the thesis body chart.subscribeCrosshairMove((param) => { const t = param.hoveredObjectId && theses.get(param.hoveredObjectId); if (!t || !param.point) { tip.style.display = 'none'; return; } tip.textContent = `@${t.author.username}${t.author.kol_badge ? ' (KOL)' : ''}: ${t.body}`; tip.style.left = `${param.point.x + 12}px`; tip.style.top = `${param.point.y + 12}px`; tip.style.display = 'block'; }); } ``` Call it with your own candles: ```javascript theme={null} import { showTheses } from './markers.js'; showTheses('solana', '3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump', await loadCandles()); ``` `textContent` keeps the thesis text as plain text: never insert it as HTML. ## The same relay with the SDK The [JavaScript SDK](/cabalspy-id/sdks#theses) (`npm install cabalspy-id ws`) wraps the stream in `ThesesStream`: it reconnects on its own, watches the heartbeat and sends your subscriptions again after every reconnect. Replace the upstream part and the history call of the relay with this: ```javascript relay-sdk.mjs theme={null} import http from 'node:http'; import { WebSocketServer, WebSocket } from 'ws'; import { CabalSpyID } from 'cabalspy-id/thesis'; const csid = new CabalSpyID({ apiKey: process.env.CABALSPY_API_KEY }); const stream = csid.thesesStream({ WebSocketImpl: WebSocket }); // WebSocketImpl only needed on Node < 22 const CHAINS = new Set(['solana', 'bnb', 'base', 'eth', 'rh']); const keyOf = (chain, mint) => `${chain}:${chain === 'solana' ? mint : mint.toLowerCase()}`; const watchers = new Map(); // token key -> Set of browser sockets function forward(event) { stream.on(event, (data) => { const msg = JSON.stringify({ event, data }); for (const ws of watchers.get(keyOf(data.blockchain, data.mint)) ?? []) if (ws.readyState === 1) ws.send(msg); }); } ['thesis', 'thesis.reply', 'thesis.reaction', 'thesis.removed'].forEach(forward); stream.on('error', (err) => console.error('theses stream:', err.code, err.message)); await stream.connect(); function readToken(url) { const blockchain = url.searchParams.get('blockchain') || ''; const mint = (url.searchParams.get('mint') || '').trim(); return CHAINS.has(blockchain) && /^[0-9A-Za-z]{32,44}$/.test(mint) ? { blockchain, mint } : null; } const server = http.createServer(async (req, res) => { const url = new URL(req.url, 'http://relay'); const token = url.pathname === '/theses' && readToken(url); if (!token) { res.writeHead(404).end(); return; } const data = await csid.listTheses({ ...token, sort: 'new', limit: 50 }); res.writeHead(200, { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': process.env.ALLOWED_ORIGIN || '*' }); res.end(JSON.stringify({ data })); }); new WebSocketServer({ server, path: '/live' }).on('connection', (ws, req) => { const token = readToken(new URL(req.url, 'http://relay')); if (!token) return ws.close(1008, 'blockchain and mint required'); const k = keyOf(token.blockchain, token.mint); if (!watchers.has(k)) { watchers.set(k, new Set()); stream.subscribe([token]); } watchers.get(k).add(ws); ws.on('close', () => { const set = watchers.get(k); set?.delete(ws); if (set && set.size === 0) { watchers.delete(k); stream.unsubscribe([token]); } }); }); server.listen(8787, () => console.log('relay on http://localhost:8787')); ``` The browser code from steps 2 to 4 stays the same: `/theses` answers `{ data: [...] }` and `/live` sends `{ event, data }` messages in both versions. ## Lessons worth knowing Keep the key on the server. The relay is a few dozen lines and is the only thing that ever sees your API key. Validate the chain and mint it accepts. Load once, then stay live. The history comes from one request, everything after that from the stream. After a relay restart or a dropped browser socket, load the history again to fill the gap. Snap times to your bars. Markers sit on bar times, so round `created_at` down to your candle interval and keep the marker list sorted. Only theses from your platform? Open the stream with `scope=instance` and call `/v1/theses` with `scope=instance` (`csid.thesesStream({ scope: 'instance' })` and `listTheses({ scope: 'instance' })` in the SDK). See [Reach](/cabalspy-id/theses#reach). ## Reference > [card] [Token theses](/cabalspy-id/theses) > > How theses work, the widget and the API. > [card] [Theses stream](/cabalspy-id/theses-stream) > > Frames, events and limits of the live stream. # Timerange Source: https://docs.cabalspy.xyz/timerange GET /v1/transactions/timerange Transactions of tracked wallets within a recent time window, up to 60 minutes back, newest first, each with trader profile and position. The same trade feed as Latest, but bounded to a recent time window instead of a count. Specify how far back to look with seconds and minutes, and get every tracked transaction in that window, newest first. Use it to fetch all trades in the last N minutes for polling style updates, for example every 30 seconds pull the last 30 seconds of activity. > [!TIP] > > The window is built from seconds and minutes, summed. The maximum window is 60 minutes, larger requests are capped and a warning is added. Optionally filter by mint to bound the window to a single token. ## Query Parameters **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh (Robinhood Chain). **type** `string` *required* Wallet category kol, smart or whale. **seconds** `integer` Seconds to look back. Combined with minutes. **minutes** `integer` Minutes to look back. Combined with seconds. Maximum total window is 60 minutes. **mint** `string` Optional token mint to filter the window to a single token. Adds a token block. **limit** `integer` Maximum number of transactions to return. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/transactions/timerange?blockchain=solana&type=kol&minutes=5&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "type": "kol", "minutes": 5, "api_key": "YOUR_KEY"} r = requests.get("https://api.cabalspy.xyz/v1/transactions/timerange", params=params) d = r.json()["data"] print("window seconds", d["time_window_seconds"], "count", d["count"]) for tx in d["transactions"]: print(tx["created_at"], tx["transaction_type"], tx["value"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", type: "kol", minutes: "5", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/transactions/timerange?${p}`); const { data } = await res.json(); console.log("window", data.time_window_seconds, "count", data.count); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **blockchain** `string` Requested chain. **type** `string` Requested wallet type. **mode** `string` timerange. **currency** `string` Native currency. **time\_window\_seconds** `integer` The effective window in seconds, after capping. **count** `integer` Number of transactions in the window. **token** `object` Only present when mint is passed. Token block with mint, token\_name, blockchain, currency, token\_supply, token\_decimals. **transactions** `array` Same transaction shape as the Latest endpoint (tx\_signature, mint, token\_name, transaction\_type, value, value\_usd, token\_amount, price\_per\_token, created\_at, profile, holdings\_after). **warnings** `array` Present only if the requested window exceeded the 60 minute maximum and was capped. **pagination** `object` Standard pagination object. ```json Response theme={null} { "success": true, "data": { "blockchain": "solana", "type": "kol", "mode": "timerange", "currency": "SOL", "time_window_seconds": 300, "count": 1, "transactions": [ { "tx_signature": "5xr8abc...", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "token_supply": 1000000000, "token_decimals": 6, "transaction_type": "buy", "value": 1.66, "value_usd": 137.44, "currency": "SOL", "token_amount": 22113972.03, "price_per_token": 7.5e-8, "price_per_token_usd": 6.2e-6, "created_at": "2026-07-04 16:25:34", "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "holdings_after": { "token_amount": 22113972.03, "token_amount_peak": 22113972.03, "supply_pct": 2.211397, "supply_pct_peak": 2.211397, "bag_pct": 100.0, "still_holding": true } } ] }, "pagination": { "limit": 50, "total": 1, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | blockchain or type missing or invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Tracker Source: https://docs.cabalspy.xyz/tracker GET /v1/wallets/tracker Full trading profile for one wallet over a period, with period stats, win rate distribution, active and historical tokens, a realized PnL chart and recent trades. The deepest view of a single wallet. For a chosen period it returns the wallet profile, aggregate period statistics, a win rate distribution across profit buckets, the tokens it is actively holding, the tokens it fully traded through, a realized PnL chart over time, and the most recent individual trades. Use it to build a wallet detail page in your terminal, a KOL profile card, or a copytrade research view. All data is served from a permanently cached, WebSocket driven store. > [!TIP] > > Choose the window with period, one of 6h, 1d, 7d or 30d. The profile aggregates only trades inside that window, while lifetime figures where present cover the whole history. ## Query Parameters **blockchain** `string` *required* Chain of the wallet. One of solana, bnb, base, eth, rh (Robinhood Chain). **address** `string` *required* The wallet address to profile. **period** `string` (default: 1d) Aggregation window, one of 6h, 1d, 7d or 30d. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/wallets/tracker?blockchain=solana&address=7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW&period=7d&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "address": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "period": "7d", "api_key": "YOUR_KEY", } r = requests.get("https://api.cabalspy.xyz/v1/wallets/tracker", params=params) d = r.json()["data"] ps = d["period_stats"] print(d["profile"]["name"], "realized pnl", ps["realized_pnl"], d["profile"]["currency"]) print("active tokens", d["period_active_tokens"]["active_tokens_count"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", address: "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", period: "7d", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/wallets/tracker?${p}`); const { data } = await res.json(); console.log(data.profile.name, "pnl", data.period_stats.realized_pnl); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **wallet** `string` The profiled wallet address. **profile** `object` **profile** **name** `string` Display name (may be empty). **image\_url** `string` Avatar URL. **twitter** `string` Twitter or X link. **telegram** `string` Telegram link. **blockchain** `string` Chain. **currency** `string` Native currency. **type** `string` Wallet type kol, smart or whale. **active\_hours** `array` Hours of day when the wallet is most active. **period\_stats** `object` **period\_stats** **period** `string` The requested window. **total\_buy** `number` Buy volume in the period (native). **total\_buy\_usd** `number` Buy volume in USD. **total\_sell** `number` Sell volume in the period (native). **total\_sell\_usd** `number` Sell volume in USD. **volume** `number` Buy plus sell volume (native). **volume\_usd** `number` Buy plus sell volume in USD. **realized\_pnl** `number` Realized PnL in the period (native). **realized\_pnl\_usd** `number` Realized PnL in USD. **realized\_pnl\_percentage** `number` Realized PnL as a percentage. **buy\_txn** `integer` Number of buys. **sell\_txn** `integer` Number of sells. **largest\_buy** `number` Largest single buy in the period (native). **best\_trade\_pnl** `number` Best single trade realized PnL. **worst\_trade\_pnl** `number` Worst single trade realized PnL. **win\_count** `integer` Winning closed positions. **loss\_count** `integer` Losing closed positions. **avg\_hold\_time\_minutes** `number` Average holding time in minutes. **period\_win\_rate\_distribution** `object` **period\_win\_rate\_distribution** **win\_rate** `integer` Number of winning positions. **win\_rate\_percentage** `number` Win rate as a percentage. **above\_500** `integer` Positions with more than 500 percent gain. **above\_100\_to\_500** `integer` Positions with 100 to 500 percent gain. **above\_zero\_to\_100** `integer` Positions with 0 to 100 percent gain. **below\_zero** `integer` Losing positions. **period\_active\_tokens** `object` **period\_active\_tokens** **active\_tokens\_count** `integer` Number of tokens still held. **avg\_position\_size** `number` Average position size (native). **still\_holding\_count** `integer` Number of positions still open. **period\_active\_tokens\_list** `array` **active token** **token\_name** `string` Token name. **buy\_value** `number` Total bought (native). **buy\_value\_usd** `number` Total bought in USD. **sell\_value** `number` Total sold (native). **sell\_value\_usd** `number` Total sold in USD. **buy\_tokens** `number` Tokens bought. **sell\_tokens** `number` Tokens sold. **remaining\_tokens** `number` Tokens still held. **realized\_pnl** `number` Realized PnL on this token (native). **realized\_pnl\_usd** `number` Realized PnL in USD. **realized\_pnl\_percentage** `number` Realized PnL percentage. **bag\_pct** `number` Percent of peak holding still held. **supply\_pct** `number` Percent of total supply held. **period\_history\_tokens** `array` **history token** **token\_name** `string` Token name. **buy\_value** `number` Total bought (native). **buy\_value\_usd** `number` Total bought in USD. **sell\_value** `number` Total sold (native). **sell\_value\_usd** `number` Total sold in USD. **buy\_tokens** `number` Tokens bought. **sell\_tokens** `number` Tokens sold. **realized\_pnl** `number` Realized PnL on this token (native). **realized\_pnl\_usd** `number` Realized PnL in USD. **realized\_pnl\_percentage** `number` Realized PnL percentage. **period\_realized\_pnl\_chart** `array` **chart point** **timestamp** `string` ISO timestamp of the snapshot. **realized\_pnl** `number` Cumulative realized PnL at that point (native). **realized\_pnl\_usd** `number` Cumulative realized PnL in USD. **period\_trades** `array` **trade** **signature** `string` Transaction signature. **mint** `string` Token mint. **token\_symbol** `string` Token symbol. **transaction\_type** `string` buy or sell. **value** `number` Trade value (native). **currency** `string` Native currency. **wallet\_type** `string` kol, smart or whale. **created\_at** `string` ISO timestamp of the trade. ```json Response theme={null} { "success": true, "data": { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol", "active_hours": [13, 14, 15, 20, 21] }, "period_stats": { "period": "7d", "total_buy": 180.25, "total_buy_usd": 14840.6, "total_sell": 132.25, "total_sell_usd": 10890.65, "volume": 312.5, "volume_usd": 25731.25, "realized_pnl": 48.2, "realized_pnl_usd": 3968.6, "realized_pnl_percentage": 26.74, "buy_txn": 22, "sell_txn": 18, "largest_buy": 22.0, "best_trade_pnl": 31.4, "worst_trade_pnl": -8.9, "win_count": 14, "loss_count": 4, "avg_hold_time_minutes": 84.5 }, "period_win_rate_distribution": { "win_rate": 14, "win_rate_percentage": 77.78, "above_500": 1, "above_100_to_500": 4, "above_zero_to_100": 9, "below_zero": 4 }, "period_active_tokens": { "active_tokens_count": 3, "avg_position_size": 4.12, "still_holding_count": 3 }, "period_active_tokens_list": [ { "token_name": "invisibull", "buy_value": 1.66, "buy_value_usd": 137.44, "sell_value": 0.0, "sell_value_usd": 0.0, "buy_tokens": 22113972.03, "sell_tokens": 0.0, "remaining_tokens": 22113972.03, "realized_pnl": -1.66, "realized_pnl_usd": -137.44, "realized_pnl_percentage": -100.0, "bag_pct": 100.0, "supply_pct": 2.21 } ], "period_history_tokens": [ { "token_name": "Pengu", "buy_value": 1.48, "buy_value_usd": 121.98, "sell_value": 1.15, "sell_value_usd": 95.46, "buy_tokens": 266294.3, "sell_tokens": 266294.3, "realized_pnl": -0.32, "realized_pnl_usd": -26.52, "realized_pnl_percentage": -21.62 } ], "period_realized_pnl_chart": [ { "timestamp": "2026-07-01T00:00:00Z", "realized_pnl": 12.4, "realized_pnl_usd": 1020.6 }, { "timestamp": "2026-07-04T00:00:00Z", "realized_pnl": 48.2, "realized_pnl_usd": 3968.6 } ], "period_trades": [ { "signature": "5xr8...", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_symbol": "invisibull", "transaction_type": "buy", "value": 1.66, "currency": "SOL", "wallet_type": "kol", "created_at": "2026-07-04T16:25:34Z" } ] }, "meta": { "request_id": "req_5162c7cf7f87", "cached": true, "cache_age_seconds": 42, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | address is missing. | | 400 | invalid\_parameter | blockchain or period invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Transactions Source: https://docs.cabalspy.xyz/transactions GET /v1/tokens/transactions The individual buy and sell transactions of tracked wallets on one token, newest first, each with the holder position after the trade. The individual buy and sell transactions of tracked wallets on one token, newest first. Each entry carries the trader profile, the trade value and token amount, and the holder position after that trade, so you can replay how positions built up or unwound. Use it to render a live trade tape for a token, the scrolling feed of who bought or sold and when. The token block carries the market cap, and every trade carries the market cap at the moment it happened, so you can place it on a chart. > [!TIP] > > These are individual events, not positions, so they do not carry unrealized PnL. Each transaction includes holdings\_after, the holder bag right after that trade. The list is newest first and paginated with limit and cursor. Poll with since to receive only new trades: a poll that finds nothing new costs 0 credits. ## Query Parameters **blockchain** `string` *required* Chain of the token. One of solana, bnb, base, eth, rh (Robinhood Chain). **mint** `string` *required* The token mint or contract address. **type** `string` Optional wallet category kol, smart or whale. Omit to include all categories. **limit** `integer` Maximum number of transactions per page. Without limit and cursor the full list is returned. **cursor** `string` Opaque cursor for the next page. Pass the `next_cursor` value from the previous response, together with the same `limit`. A null `next_cursor` means there are no more pages. **since** `string` Only return transactions at or after this time. Accepts Unix seconds, Unix milliseconds or an ISO 8601 timestamp in UTC. The bound is inclusive so no trade in the same second is lost, so deduplicate by `tx_signature`. If no transaction is newer than `since`, the request costs 0 credits. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Polling for new trades To keep a chart or trade tape current, pass the `created_at` of the newest trade you already have as `since`. You get only the new trades, and a poll that finds nothing new is free. The `X-Credits-Charged` response header shows what a request cost. ```bash theme={null} curl "https://api.cabalspy.xyz/v1/tokens/transactions?blockchain=solana&mint=3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump&since=2026-07-04T16:25:34Z&api_key=YOUR_KEY" ``` > [!TIP] > > For a live feed, the [Transactions Stream](/transactions-1) filtered to one token is cheaper still: it pushes each trade the moment it happens and bills 1 credit per delivered trade, instead of polling. ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/tokens/transactions?blockchain=solana&mint=3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump&limit=50&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = { "blockchain": "solana", "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "limit": 50, "api_key": "YOUR_KEY", } r = requests.get("https://api.cabalspy.xyz/v1/tokens/transactions", params=params) d = r.json()["data"] for tx in d["transactions"]: print(tx["created_at"], tx["transaction_type"], tx["profile"]["name"], tx["value"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", mint: "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", limit: "50", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/tokens/transactions?${p}`); const { data } = await res.json(); data.transactions.forEach(tx => console.log(tx.created_at, tx.transaction_type, tx.value)); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **token** `object` **token** **mint** `string` Token mint or contract address. **token\_name** `string` Token name. **blockchain** `string` Chain. **currency** `string` Native currency. **token\_supply** `number` Total supply. **token\_decimals** `integer` Token decimals. **market\_cap** `number` Market cap in native currency, on every chain. See `market_cap_source` for where it comes from. Null when neither a live value nor a tracked trade is available. **market\_cap\_usd** `number` Market cap in USD. **market\_cap\_currency** `string` Currency of the market cap value (SOL, BNB or ETH), or null. **price** `number` Token price in native currency. **price\_usd** `number` Token price in USD. **market\_cap\_source** `string` `live` for the current market value of a token that is actively trading, `last_trade` when there is no live value and the market cap is the price of the newest tracked trade times supply, or null. **market\_cap\_updated\_at** `integer` Unix seconds of the market cap value: the time of the live update, or of the trade for `last_trade`. **native\_price\_usd** `number` USD price of the chain's native currency (SOL, BNB or ETH). **sol\_price\_usd** `number` SOL price in USD. Solana only, kept for compatibility; use `native_price_usd`. **transactions** `array` **transaction, newest first** **tx\_signature** `string` Transaction signature. **transaction\_type** `string` buy or sell. **value** `number` Trade value (native). **value\_usd** `number` Trade value in USD. **currency** `string` Native currency. **token\_amount** `number` Number of tokens in the trade. **price\_per\_token** `number` Price per token (native). **price\_per\_token\_usd** `number` Price per token in USD. **market\_cap** `number` Market cap at the moment of this trade in native currency (price per token times supply). Null if the supply is unknown. **market\_cap\_usd** `number` Market cap at the moment of this trade in USD. **created\_at** `string` ISO timestamp of the trade. **profile** `object` Wallet profile of the trader (name, image\_url, twitter, telegram, blockchain, currency, type). **holdings\_after** `object` **holdings\_after** **token\_amount** `number` Tokens held right after this trade. **token\_amount\_peak** `number` Peak tokens held. **supply\_pct** `number` Percent of supply held after this trade. **supply\_pct\_peak** `number` Peak percent of supply held. **bag\_pct** `number` Percent of peak holding still held after this trade. **still\_holding** `boolean` Whether the wallet still holds after this trade. **pagination** `object` **pagination** **limit** `integer` Transactions per page. **total** `integer` Total transactions. **has\_more** `boolean` Whether more pages follow. **next\_cursor** `string` Cursor for the next page (null means end). ```json Response theme={null} { "success": true, "data": { "token": { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "token_name": "invisibull", "blockchain": "solana", "currency": "SOL", "token_supply": 1000000000, "token_decimals": 6, "market_cap": 40.08, "market_cap_usd": 3301.2, "market_cap_currency": "SOL", "price": 4.008e-8, "price_usd": 3.3e-6, "market_cap_source": "live", "market_cap_updated_at": 1783340510, "native_price_usd": 82.36, "sol_price_usd": 82.36 }, "transactions": [ { "tx_signature": "5xr8abc...", "transaction_type": "buy", "value": 1.66, "value_usd": 137.44, "currency": "SOL", "token_amount": 22113972.03, "price_per_token": 7.5e-8, "price_per_token_usd": 6.2e-6, "market_cap": 75.0, "market_cap_usd": 6200.0, "created_at": "2026-07-04T16:25:34Z", "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol" }, "holdings_after": { "token_amount": 22113972.03, "token_amount_peak": 22113972.03, "supply_pct": 2.211397, "supply_pct_peak": 2.211397, "bag_pct": 100.0, "still_holding": true } } ] }, "pagination": { "limit": 50, "total": 1, "has_more": false, "next_cursor": null }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | missing\_parameter | mint is missing. | | 400 | invalid\_parameter | blockchain, type or since invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Transactions Stream Source: https://docs.cabalspy.xyz/transactions-1 Live WebSocket stream of KOL, Smart Money and Whale transactions with running position, bag percentage and supply percentage per wallet. The core realtime stream. Every time a tracked wallet buys or sells, you receive a position\_update event with the trade and the wallet running position on that token, including held amount, bag percentage and supply percentage. All CabalSpy streams share one WebSocket endpoint. You open a single connection, authenticate, then subscribe to as many channels as you like. This page covers the transactions channel. ## Endpoint Connect to `wss://stream.cabalspy.xyz`. Pass your API key either as a query parameter or as a Bearer header. ```javascript JavaScript theme={null} const ws = new WebSocket("wss://stream.cabalspy.xyz?apiKey=YOUR_KEY"); ws.onopen = () => { ws.send(JSON.stringify({ op: "subscribe", stream: "tx", blockchain: "solana", type: "kol", token: "*", })); }; ws.onmessage = (e) => { const msg = JSON.parse(e.data); if (msg.event === "position_update") { const d = msg.data; console.log(d.profile.name, d.transaction.action, d.token.symbol, d.position.bag_pct); } }; ``` ```python Python theme={null} import json, websocket def on_open(ws): ws.send(json.dumps({ "op": "subscribe", "stream": "tx", "blockchain": "solana", "type": "kol", "token": "*", })) def on_message(ws, message): msg = json.loads(message) if msg.get("event") == "position_update": d = msg["data"] print(d["profile"]["name"], d["transaction"]["action"], d["token"]["symbol"]) ws = websocket.WebSocketApp( "wss://stream.cabalspy.xyz?apiKey=YOUR_KEY", on_open=on_open, on_message=on_message, ) ws.run_forever() ``` ## Authentication Provide your API key one of two ways when opening the connection. As a query parameter, `wss://stream.cabalspy.xyz?apiKey=YOUR_KEY`. Or as a header, `Authorization: Bearer YOUR_KEY`. A connection without a valid key is closed immediately with code 1008. On connect you receive a welcome message listing the available streams and example subscriptions. After that you drive everything with subscribe messages. ## Chains and wallet types Each chain tracks a different set of wallet categories, and reports values in its own native currency. | blockchain | Wallet types | Native currency | | - | - | - | | solana | kol, smart, whale | SOL | | bnb | kol, smart | BNB | | base | kol, smart | ETH | | eth | kol | ETH | | rh | kol, smart | ETH | Asking for a wallet type a chain does not track is rejected with an error naming the types it does track. On EVM chains, contract addresses are matched case-insensitively. ## Subscribe To start receiving trades, send a subscribe message after the connection opens. You choose a chain, a wallet type, and optionally one token to narrow to. ```json Subscribe to all KOL trades on Solana theme={null} { "op": "subscribe", "stream": "tx", "blockchain": "solana", "type": "kol", "token": "*" } ``` The token field decides how much you get. Use the value "\*" to receive trades on every token, or a token mint address (Solana) or contract address (BNB, Base, ETH, Robinhood) to receive only trades on that one token. ```json Subscribe to one token only theme={null} { "op": "subscribe", "stream": "tx", "blockchain": "base", "type": "smart", "token": "0xYourTokenContractAddress" } ``` **op** `string` *required* The operation. Use subscribe to start. **stream** `string` *required* Set to tx for this stream. **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh. **type** `string` *required* Wallet category. See the table above. Solana has kol, smart, whale. BNB, Base and Robinhood have kol, smart. ETH has kol. **token** `string` Which token to watch. Either "\*" for all tokens, or a single token mint or contract address to narrow to one token. Defaults to all tokens. ## Unsubscribe and other operations To stop a subscription, send the same fields with op unsubscribe. ```json Unsubscribe theme={null} { "op": "unsubscribe", "stream": "tx", "blockchain": "solana", "type": "kol", "token": "*" } ``` To see what you are currently subscribed to, send op subscriptions. To check the connection is alive, send op ping and you get a pong back. ```json List your subscriptions theme={null} { "op": "subscriptions" } ``` ## Event Each matching trade delivers a position\_update event. **success** `boolean` Always true for stream events. **channel** `string` The channel that produced the event, for example tx.solana.kol. **event** `string` position\_update. **data** `object` **data** **wallet** `string` The trading wallet address. **profile** `object` Wallet profile (name, image\_url, twitter, telegram, blockchain, currency, type, active\_hours). **transaction** `object` **transaction** **signature** `string` Transaction signature on Solana, transaction hash on EVM chains. **slot** `integer` Slot of the transaction on Solana, block number on EVM chains, or null. **action** `string` buy or sell. **transaction\_type** `string` Same as action. **created\_at** `string` Timestamp of the trade, or null. **fee** `number` Raw fee as reported by the source. **fee\_native** `number` Fee in native currency, or null. **fee\_payer** `string` Fee payer address. **token** `object` **token** **mint** `string` Token mint on Solana, contract address on EVM chains. **symbol** `string` Token symbol. **name** `string` Token name. **decimals** `integer` Token decimals, or null. **supply** `number` Total supply. **logo** `string` Token logo URL, or null. **value** `object` **value** **currency** `string` Native currency of the chain. SOL, BNB or ETH. **amount** `number` Trade value in native currency. **amount\_usd** `number` Trade value in USD. **price\_usd** `number` Native currency price in USD used for the conversion. **peak** `number` Peak invested value on this position (native). **current** `number` Current invested value on this position (native). **position** `object` **position** **token\_amount** `number` Tokens moved in this trade. **held** `number` Tokens held after this trade. **peak** `number` Peak tokens held. **supply\_pct** `number` Percent of supply held after this trade. **bag\_pct** `number` Percent of peak holding still held. **prev\_supply\_pct** `number` Percent of supply held before this trade. **prev\_bag\_pct** `number` Bag percent before this trade. **delta\_supply\_pct** `number` Change in supply percent from this trade. **delta\_bag\_pct** `number` Change in bag percent from this trade. **delta\_held** `integer` Change in tokens held from this trade. **used\_fallback** `boolean` True when the bag percent was derived from value rather than token counts. ```json position_update theme={null} { "success": true, "channel": "tx.solana.kol", "event": "position_update", "data": { "wallet": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW", "profile": { "name": "Maze", "image_url": "https://cabalspy.xyz/images/7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW.png", "twitter": "https://x.com/MazeCCC", "telegram": "", "blockchain": "solana", "currency": "SOL", "type": "kol", "active_hours": [13, 14, 15] }, "transaction": { "signature": "5xr8abc...", "slot": 301948220, "action": "buy", "transaction_type": "buy", "created_at": "2026-07-04T16:25:34Z", "fee": 5000, "fee_native": 0.000005, "fee_payer": "7j7AA3HZR2zEjwAQEKPFh2qucLY4fqZpB9iodf39w8xW" }, "token": { "mint": "3Pkrq4MmLvDXyn1fa3sz5MekKRkZkc1iLDcz5AzWpump", "symbol": "invisibull", "name": "invisibull", "decimals": 6, "supply": 1000000000, "logo": null }, "value": { "currency": "SOL", "amount": 1.66, "amount_usd": 137.44, "price_usd": 82.36, "peak": 1.66, "current": 1.66 }, "position": { "token_amount": 22113972.03, "held": 22113972.03, "peak": 22113972.03, "supply_pct": 2.2114, "bag_pct": 100.0, "prev_supply_pct": 0.0, "prev_bag_pct": 0.0, "delta_supply_pct": 2.2114, "delta_bag_pct": 100.0, "delta_held": 22113972, "used_fallback": false } }, "meta": { "request_id": "req_5162c7cf7f87", "version": "2.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Billing Each delivered event counts against your plan, the same way a request does. A subscribe to a busy wildcard channel can produce many events, so scope your token filter when you can. ## Heartbeat The server sends WebSocket pings on an interval and expects your client to answer with pong, which browsers and standard clients do automatically. A connection that stops answering is closed. You can also send op ping at any time to check liveness. # Volume Source: https://docs.cabalspy.xyz/volume GET /v1/transactions/volume Total trading volume of tracked wallets within a time window, up to 24 hours back, in native currency and USD, optionally per token. The volume counterpart to Count. Returns the total trading volume of tracked wallets within a time window, up to 24 hours back, in both native currency and USD. Optionally filter to a single token with mint. Use it for volume indicators, for example how much SOL of KOL volume flowed through a token in the last hour, without pulling every transaction. > [!TIP] > > The window is built from seconds, minutes and hours, summed, up to a maximum of 24 hours. volume\_usd is null when no USD value could be derived. This endpoint returns only the totals, not the transactions. ## Query Parameters **blockchain** `string` *required* Chain. One of solana, bnb, base, eth, rh (Robinhood Chain). **type** `string` *required* Wallet category kol, smart or whale. **seconds** `integer` Seconds to look back. Combined with minutes and hours. **minutes** `integer` Minutes to look back. **hours** `integer` Hours to look back. Maximum total window is 24 hours. **mint** `string` Optional token mint to measure only that token volume. **api\_key** `string` Your API key, required on `https://api.cabalspy.xyz`. Alternatively pass it as an Authorization Bearer header. Not needed on the demo server `https://demo-api.cabalspy.xyz`. > [!NOTE] > > **Try it without an API key:** Try it runs on the demo server `https://demo-api.cabalspy.xyz` (20 requests per IP per day, data delayed 15 minutes, at most 5 rows), so you can send a request without a key. For live data, switch the server to `https://api.cabalspy.xyz` and enter your API key. Your own integration always calls `api.cabalspy.xyz` with your API key, as in the usage examples below. [Get a free key](/api-key) · [About the demo](/demo) ## Usage Example ```bash cURL theme={null} curl "https://api.cabalspy.xyz/v1/transactions/volume?blockchain=solana&type=kol&hours=1&api_key=YOUR_KEY" ``` ```python Python theme={null} import requests params = {"blockchain": "solana", "type": "kol", "hours": 1, "api_key": "YOUR_KEY"} r = requests.get("https://api.cabalspy.xyz/v1/transactions/volume", params=params) d = r.json()["data"] print("volume", d["volume"], d["currency"], "usd", d["volume_usd"]) ``` ```javascript JavaScript theme={null} const p = new URLSearchParams({ blockchain: "solana", type: "kol", hours: "1", api_key: "YOUR_KEY", }); const res = await fetch(`https://api.cabalspy.xyz/v1/transactions/volume?${p}`); const { data } = await res.json(); console.log("volume", data.volume, data.currency); ``` ## Response **success** `boolean` True on success. **data** `object` **data** **blockchain** `string` Requested chain. **type** `string` Requested wallet type. **mode** `string` volume. **volume** `number` Total traded volume in the window (native currency). **volume\_usd** `number` Total traded volume in USD, or null if no USD value could be derived. **currency** `string` Native currency. **time\_window\_seconds** `integer` The effective window in seconds, after capping. **mint** `string` Present only when a mint filter was passed. **warnings** `array` Present only if the requested window exceeded the 24 hour maximum and was capped. ```json Response theme={null} { "success": true, "data": { "blockchain": "solana", "type": "kol", "mode": "volume", "volume": 842.5, "volume_usd": 69388.6, "currency": "SOL", "time_window_seconds": 3600 }, "meta": { "request_id": "req_5162c7cf7f87", "cached": false, "cache_age_seconds": 0, "version": "1.0.0", "timestamp": "2026-07-06T11:01:57Z" } } ``` ## Errors | Status | Code | Meaning | | - | - | - | | 400 | invalid\_parameter | blockchain or type missing or invalid. | | 401 | unauthorized | API key missing. | | 403 | forbidden | API key invalid or credits exhausted. | | 429 | rate\_limited | Rate limit exceeded. | # Widget [IFrame] Source: https://docs.cabalspy.xyz/widget-i-frame The CabalSpy widget renders a live bubble map of wallet activity for a single address. You embed it with one ` ``` That is the whole integration. The widget reads its configuration from the URL query string, connects to CabalSpy for live data, and updates itself. > [!NOTE] > > Before it renders on your domain, your domain has to be whitelisted (see [Domain allow-list](#domain-allow-list)). Send us the domain(s) you will embed on. ## Parameters The widget is configured entirely through query parameters on the `/widget` URL. **address** `string` *required* The wallet address to display. A Solana base58 address, or an EVM `0x…` address for Base, BNB and Robinhood. **chain** `string` Which chain the address belongs to. One of `SOL`, `BASE`, `BNB`, `RH` (Robinhood). We strongly recommend always setting this explicitly — see [Choosing the chain](#choosing-the-chain). ## Choosing the chain Solana and EVM addresses look different (base58 vs `0x…`), but Base, BNB and Robinhood all use `0x…` addresses and cannot be told apart from the address alone. **Always pass `chain` explicitly** so the widget shows the right data: | Chain | `chain` value | Address format | Rings shown | Value unit | | - | - | - | - | - | | Solana | `SOL` | base58 | KOL, Smart, Whale | SOL | | Base | `BASE` | `0x…` | KOL, Smart | ETH | | BNB | `BNB` | `0x…` | KOL, Smart | BNB | | Robinhood | `RH` | `0x…` | KOL, Smart | ETH | ```html Robinhood example theme={null} ``` > [!NOTE] > > Robinhood uses the chain id `RH`. Values are denominated in ETH, and — like Base and BNB — the widget shows KOL and Smart Money rings (no marketcap-only features, which exist for Solana only). ## Sizing and responsiveness The widget fills the iframe, so size the iframe, not the widget. Use a fluid width and a fixed or aspect-ratio height. ```html Responsive wrapper theme={null}
``` A square-ish area (roughly 1:1 to 1:1.2) works best for the bubble layout. On mobile give it at least \~360 px of height. ## Domain allow-list For security the widget only renders inside pages on approved domains. Send us the hostname(s) you will embed on (for example `app.yoursite.com`) and we add them to the allow-list. All subdomains of an approved domain are covered automatically. Until your domain is approved the iframe will return `403` for its data calls. A direct visit to the widget URL in a browser tab always works, which is handy for testing. ## Live updates Once loaded, the widget keeps itself current over a WebSocket — new buys and sells animate in without a reload. There is nothing to configure for this; it uses the same connection CabalSpy manages for you. ## Troubleshooting > [accordion] The widget is blank / shows 403 > > Your embedding domain is not on the allow-list yet, or the address has no tracked wallets. Confirm the domain was approved and that `address` is correct for the given `chain`. > [accordion] Wrong data for a 0x address > > Base, BNB and Robinhood share the `0x…` format. Set `chain` explicitly (`BASE`, `BNB` or `RH`) instead of relying on auto-detection. > [accordion] Robinhood shows nothing > > Robinhood (`chain=RH`) requires the Robinhood-enabled widget build to be live. If RH data is not appearing, the update may not be deployed yet on your instance. # x402 for AI agents Source: https://docs.cabalspy.xyz/x402 AI agents pay per request in USDC for CabalSpy wallet data with x402: no account, no signup, no API key. Clients for TypeScript and Python with built-in spend limits. With x402, an AI agent pays in USDC for each API call and gets the same labeled wallet data as with an API key. There is no account, no signup and no key. The wallet is the identity. x402 builds on the HTTP status code 402 Payment Required: the server answers a request with a price, the client pays and repeats the request with proof of payment. ## Install ```bash TypeScript theme={null} npm install cabalspy-x402 ``` ```bash Python theme={null} pip install "cabalspy-x402[all]" ``` ## Quick start ```ts TypeScript theme={null} import { createClient } from 'cabalspy-x402'; const cabalspy = createClient({ signer, // Solana signer evmSigner, // Base, Polygon, Arbitrum, either or both maxSpendTotal: '$5.00', // hard cap for this process }); const wallet = await cabalspy.wallets.lookup('As7HjL7dzzvbRbaD3WCun47robib2kmAKRXMvjHkSMB5'); console.log(wallet.name, wallet.type); console.log(cabalspy.x402.summary()); // { calls: 1, spentUsd: 0.01, remainingUsd: 4.99 } ``` ```python Python theme={null} from cabalspy_x402 import create_client cabalspy = create_client( svm_signer=signer, # Solana max_spend_total="$5.00", # hard cap for this process ) wallet = cabalspy.wallets.lookup("As7HjL7dzzvbRbaD3WCun47robib2kmAKRXMvjHkSMB5") print(wallet["name"], wallet["type"]) print(cabalspy.x402.summary()) # {'calls': 1, 'spent_usd': 0.01, 'remaining_usd': 4.99} ``` The returned object is a full CabalSpy client, the same as in the [SDKs](/sdks). Only the payment differs. ## Spend limits A funded wallet handed to an autonomous agent is a standing authorisation to spend. Both limits are on unless you turn them off. | Limit | Default | Effect | | - | - | - | | Per call | \$0.10 | Refuses any single call priced above it | | Total | \$10.00 | Refuses further calls once reached | The price is read from the 402 response and checked before the wallet signs anything. A server asking for more than expected is refused without spending. ## Payment networks CabalSpy accepts USDC on Solana, Base, Polygon and Arbitrum and offers all of them in the same response. The payment chain is independent of the data: a question about a Base wallet can be paid for in Solana USDC. To test without real money, restrict the client to `solana-devnet`. The flow is identical. ## Source > [card] [cabalspy-x402 (TypeScript)](https://github.com/CabalSpy/cabalspy-x402) > > npm package and source. > [card] [cabalspy-x402 (Python)](https://github.com/CabalSpy/cabalspy-x402-python) > > PyPI package and source. Prefer a monthly plan with predictable cost? Use an [API key](/api-key) instead. Both return the same data.