> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cabalspy.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# CabalSpy ID — SocialFi API & SDK

> 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.**<br />

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.

<Columns cols={3}>
  <Column>
    <Card title="Login" icon="right-to-bracket" href="/cabalspy-id/login-button">
      A drop-in login button and a standard OpenID Connect provider. Every user arrives with X and verified wallets.
    </Card>
  </Column>

  <Column>
    <Card title="Data API" icon="rectangle-api" href="/cabalspy-id/data-api">
      Profiles, trading stats, PnL charts, holdings, calendars and leaderboards of your users.
    </Card>
  </Column>

  <Column>
    <Card title="Live" icon="bolt" href="/cabalspy-id/stream">
      Every trade of your users pushed live, plus webhooks when a user verifies a wallet or becomes a KOL.
    </Card>
  </Column>
</Columns>

## 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. | [leaderboard](/cabalspy-id/leaderboard), [tracker](/cabalspy-id/tracker), [users](/cabalspy-id/users) |
| 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.

<Steps>
  <Step title="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.
  </Step>

  <Step title="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.
  </Step>

  <Step title="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.
  </Step>
</Steps>

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.<name>`, 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/<handle>`, 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. The [Quickstart](/cabalspy-id/quickstart) walks through it.

<Steps>
  <Step title="Create an instance">
    An instance is your OpenID Connect client. Its Instance ID is your `client_id` and starts with `csid_`. Server-side apps also create a client secret, which starts with `csid_sk_`.
  </Step>

  <Step title="Add the login button">
    Design the button in the builder, paste two lines of HTML, or run the OpenID Connect flow yourself.
  </Step>

  <Step title="Read your users' data">
    Call the Data API with the same API key you use for the CabalSpy API, after enabling CabalSpy ID for it on the API keys page.
  </Step>
</Steps>

The dashboard also holds your redirect URIs, verified domain, testers, webhooks, users and statistics, billing and a sandbox to try every endpoint.

### Instance modes

| Mode | Who can sign in | Requirements |
| - | - | - |
| sandbox | Made-up test users only, no real data | None. For building and CI. |
| development | You and up to 25 testers | None. Real CabalSpy ID sign-in. |
| 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. |

You verify a domain with a DNS TXT record at `_csid-verification.<domain>` or with a file at `https://<domain>/.well-known/csid-verification.txt`. The dashboard shows the exact value.

## 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. |

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.

<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).
</Note>

## 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
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.