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

# 0xinsider API

> Prediction market intelligence for AI agents, trading bots, and research tools.

Trader grades, whale-trade signals, smart-money flow, positions, and insider detection for Polymarket and Kalshi. The same data behind the [0xinsider terminal](https://0xinsider.com), as an API.

Three ways in:

* **REST API**: `https://api.0xinsider.com/api/v1/` for bots, dashboards, and research code.
* **Local MCP server**: [`@0xinsider/mcp`](https://www.npmjs.com/package/@0xinsider/mcp) on stdio for Claude Code, Cursor, Codex, Gemini CLI.
* **Remote MCP**: streamable HTTP for agents that can't run a local subprocess.

One [Insider subscription](https://0xinsider.com/pricing) covers all three.

<Tip>
  Working in Claude Code, Cursor, or another AI agent? Feed it [llms-full.txt](https://docs.0xinsider.com/llms-full.txt), the whole docs site as one plain-text file. Drop it into context and ask the model to wire up calls, draft a bot, or surface ideas you can build on the data.
</Tip>

## What it solves

Polymarket and Kalshi publish raw trades. They don't publish grades, signal scores, smart-money breakdowns, position timelines, or pattern detection. 0xinsider builds that layer. The API exposes it.

So you can answer:

* Which traders consistently beat the market on crypto resolution events?
* Did anyone buy big into this market in the last hour, and are they sharp?
* Is someone accumulating shares in a market that hasn't resolved yet?
* Where is smart money flowing this week?
* What price did that S-grade trader get filled at?

## What you can build

* **Trading bots** that fire on whale buys from S-grade traders in a category.
* **AI agents** that summarize who's winning, what they hold, and at what cost.
* **Research tools** that pull leaderboards, trader profiles, history ranges, and category performance.
* **Dashboards** that show where capital is rotating across prediction markets.
* **Webhooks** that push whale-trade and radar events to your stack in real time.

## A real response

The top trader by composite score, right now:

```bash theme={null}
curl -H "Authorization: Bearer oxi_sk_live_..." \
  "https://api.0xinsider.com/api/v1/leaderboard?limit=1"
```

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "trd_0x863134d00841b2e200492805a01e1e2f5defaa53",
      "username": "RepTrump",
      "grade": "S",
      "score": 97.94,
      "pnl": 7532409.67,
      "win_rate": 1.0,
      "markets_traded": 28,
      "strategy_type": "swing_trader"
    }
  ],
  "has_more": true,
  "next_cursor": "97.94_0x863134d00841b2e200492805a01e1e2f5defaa53"
}
```

One trader. The leaderboard ranks thousands.

## Endpoints

<CardGroup cols={2}>
  <Card title="Get Trader" icon="user" href="/api-reference/endpoint/get-trader">
    Full profile for a wallet: grade, P\&L, win rate, strategy, category strengths.
  </Card>

  <Card title="Batch Get Traders" icon="layer-group" href="/api-reference/endpoint/batch-get-traders">
    Up to 25 trader profiles in one round trip.
  </Card>

  <Card title="Whale Trades" icon="whale" href="/api-reference/endpoint/get-whale-trades">
    Recent large trades with signal scoring. Filter by grade, category, side.
  </Card>

  <Card title="Whale Trades History" icon="clock-rotate-left" href="/api-reference/endpoint/get-whale-trades-history">
    Historical whale-trade ranges for backtesting and recap reports.
  </Card>

  <Card title="Positions" icon="chart-line" href="/api-reference/endpoint/get-positions">
    Current positions across traders or markets, with freshness metadata.
  </Card>

  <Card title="Position Timeline" icon="timeline" href="/api-reference/endpoint/get-position-timeline">
    Server-computed running amount and average entry price per fill.
  </Card>

  <Card title="Explore Markets" icon="compass" href="/api-reference/endpoint/explore-markets">
    Browse whale-active titled markets by category, platform, status.
  </Card>

  <Card title="Market Intel" icon="chart-mixed" href="/api-reference/endpoint/get-market-intel">
    Smart-money flow direction and top positions for a single market.
  </Card>

  <Card title="Market Snapshot" icon="camera" href="/api-reference/endpoint/get-market-snapshot">
    One-shot market state with trust-metadata fields.
  </Card>

  <Card title="Leaderboard" icon="ranking-star" href="/api-reference/endpoint/get-leaderboard">
    Top traders by composite score, cursor-paginated.
  </Card>

  <Card title="Search Markets" icon="magnifying-glass" href="/api-reference/endpoint/search-markets">
    Keyword search across markets with filters.
  </Card>

  <Card title="Insider Radar" icon="radar" href="/api-reference/endpoint/get-insider-radar">
    Suspicious patterns: pre-resolution accumulation, unusual timing.
  </Card>

  <Card title="Event Replay" icon="rotate-right" href="/api-reference/endpoint/get-event-replay-since">
    Replay missed feed events after a disconnection.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/api-reference/endpoint/list-webhooks">
    Push whale-trade and radar events to your endpoint.
  </Card>

  <Card title="Report Snapshots" icon="file-chart-column" href="/api-reference/endpoint/get-daily-report-snapshot">
    Daily, weekly, monthly recap exports.
  </Card>

  <Card title="Remote MCP" icon="robot" href="/api-reference/endpoint/remote-mcp">
    Streamable HTTP MCP endpoint for hosted agents.
  </Card>
</CardGroup>

## Where to go next

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Generate a key, fire your first request, and follow the whales end to end.
  </Card>

  <Card title="Local MCP Server" icon="terminal" href="/integrations/mcp">
    Plug 0xinsider into Claude Code, Cursor, Codex, or Gemini CLI in two minutes.
  </Card>

  <Card title="TypeScript Client" icon="code" href="/integrations/typescript-client">
    Drift-tested source client with typed errors and repeated `expand` params.
  </Card>

  <Card title="Trader Grades" icon="medal" href="/concepts/grades">
    What S, A, B, C, D, F actually mean, with real profile examples.
  </Card>
</CardGroup>
