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

# Get Stream

> Server-Sent Events stream of the live feed envelopes the platform already broadcasts (whale-trade pulses and other public/insider feed events). Forwards the same backend-owned envelope shape as the internal feed; no provider data is recomputed. Authenticated via the oxi_sk Bearer key like every other /api/v1 endpoint, and limited to a small number of concurrent connections per API key and a cluster-wide ceiling across all keys (HTTP 429 with Retry-After when either cap is exceeded; HTTP 503 with Retry-After if the admission backend is briefly unavailable). Each delivered frame carries an SSE id equal to the envelope sequence; reconnect with the Last-Event-ID header (or the last_event_id / seq query fallback) to replay the missed window before resuming live. When the requested resume point predates the retained window the stream emits one resync marker event (event: resync) instead of silently skipping frames. Idle connections receive periodic ': keep-alive' comment lines. This is a long-lived response: keep the connection open and read frames as they arrive.

A resumable Server-Sent Events stream of the live feed envelopes the platform broadcasts: whale-trade pulses and other public and insider feed events. This is a long-lived `text/event-stream` response. Keep the connection open and read frames as they arrive. It forwards the same backend-owned envelope shape as the internal feed, with no provider data recomputed.

Authenticate with your `oxi_sk` Bearer key like every other `/api/v1` endpoint. Connection counts are limited per API key and across the cluster: when either cap is exceeded you get `429` with a `Retry-After`, and `503` with a `Retry-After` if the admission backend is briefly unavailable.

```bash theme={null}
curl -N -H "Authorization: Bearer $OXINSIDER_API_KEY" \
  "https://api.0xinsider.com/api/v1/stream"
```

Every frame carries an SSE `id` equal to the envelope sequence. To resume after a disconnect, reconnect with the `Last-Event-ID` header (or the `last_event_id` / `seq` query fallback when you cannot set the header); the stream replays the strictly-newer window before resuming live. If your resume point predates the retained window, the stream emits one `event: resync` marker instead of silently skipping frames. Idle connections receive periodic `: keep-alive` comment lines.


## OpenAPI

````yaml GET /api/v1/stream
openapi: 3.1.0
info:
  title: 0xinsider API
  description: >-
    Find your edge on Polymarket and Kalshi. Every wallet graded, every trade
    scored, every outlier flagged. API exposes trader grades, whale trades,
    smart money signals, and insider detection for AI agents, trading bots, and
    research tools. Normal API requests use a 30-second server timeout that
    returns HTTP 408 Request Timeout with an empty body when exceeded. Public
    REST /api/v1/* endpoints, excluding /api/v1/mcp, use Bearer-token based
    non-credentialed browser CORS: any Origin may call with Authorization,
    Content-Type, If-None-Match, Idempotency-Key, and Mcp-Session-Id request
    headers. Remote MCP at /api/v1/mcp is non-credentialed, but still validates
    Origin against the 0xinsider/localhost allowlist per MCP Streamable HTTP
    DNS-rebinding guidance. Successful browser CORS preflight responses
    advertise Access-Control-Max-Age: 86400. Browser JavaScript may read
    X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After,
    ETag, X-Request-Id, X-Request-Cost, X-Batch-RateLimit-Limit,
    X-Batch-RateLimit-Remaining, X-Batch-RateLimit-Reset, Mcp-Session-Id, and
    X-Mcp-Error-Code response headers. Credentialed first-party routes such as
    /api/keys, /api/billing, and auth endpoints remain restricted to configured
    0xinsider origins.
  version: 1.0.0
  contact:
    name: 0xinsider
    email: support@0xinsider.com
    url: https://0xinsider.com
servers:
  - url: https://api.0xinsider.com
    description: >-
      Production (live data). Authenticate with a live key (oxi_sk_live_...);
      requires an active Insider subscription.
  - url: https://api.0xinsider.com
    description: >-
      Sandbox / test mode (deterministic fixture data, no live rows).
      Authenticate with a test key (oxi_sk_test_...) on a free account. Same
      base URL and paths as production: the key class selects live vs sandbox.
      Test keys are billing-exempt, served from a fixed fixture dataset, and
      never read live data or persist writes; webhooks, usage, and MCP responses
      show the response shape only.
security:
  - bearerAuth: []
tags:
  - name: Traders
    description: Trader intelligence, batch lookups, timelines, and export readiness.
  - name: Positions
    description: Current prediction-market position snapshots from backend-owned mirrors.
  - name: Large Positions
    description: Largest current open positions from graded traders (Polymarket-only).
  - name: Whale Trades
    description: Recent and historical large trade intelligence.
  - name: Leaderboard
    description: Ranked trader discovery and category/strategy leaderboards.
  - name: Markets
    description: Market search, discovery, snapshots, and smart-score flow.
  - name: Insider Radar
    description: Suspicious trading pattern detection.
  - name: Events
    description: Durable public event replay streams.
  - name: Streaming
    description: Resumable real-time Server-Sent Events stream of live feed envelopes.
  - name: Webhooks
    description: Signed builder webhook destinations and delivery controls.
  - name: Usage
    description: Developer API budget and usage introspection.
  - name: System
    description: Health and operational status checks.
  - name: MCP
    description: Remote Model Context Protocol transport.
  - name: Reports
    description: Daily, weekly, monthly, and trader export report snapshots.
paths:
  /api/v1/stream:
    get:
      tags:
        - Streaming
      summary: Resumable real-time event stream (SSE)
      description: >-
        Server-Sent Events stream of the live feed envelopes the platform
        already broadcasts (whale-trade pulses and other public/insider feed
        events). Forwards the same backend-owned envelope shape as the internal
        feed; no provider data is recomputed. Authenticated via the oxi_sk
        Bearer key like every other /api/v1 endpoint, and limited to a small
        number of concurrent connections per API key and a cluster-wide ceiling
        across all keys (HTTP 429 with Retry-After when either cap is exceeded;
        HTTP 503 with Retry-After if the admission backend is briefly
        unavailable). Each delivered frame carries an SSE id equal to the
        envelope sequence; reconnect with the Last-Event-ID header (or the
        last_event_id / seq query fallback) to replay the missed window before
        resuming live. When the requested resume point predates the retained
        window the stream emits one resync marker event (event: resync) instead
        of silently skipping frames. Idle connections receive periodic ':
        keep-alive' comment lines. This is a long-lived response: keep the
        connection open and read frames as they arrive.
      operationId: getStream
      parameters:
        - name: Last-Event-ID
          in: header
          required: false
          description: >-
            Sequence id of the last frame the client successfully processed. The
            stream replays the strictly-newer window before resuming live.
            Browser EventSource clients send this automatically on reconnect.
            Omit to attach live from now.
          schema:
            type: string
        - name: last_event_id
          in: query
          required: false
          description: >-
            Query-string fallback for the Last-Event-ID resume cursor when the
            client cannot set the request header. Numeric sequence id;
            non-numeric or absent attaches live with no replay.
          schema:
            type: string
        - name: seq
          in: query
          required: false
          description: >-
            Alias for last_event_id. Numeric sequence id to resume after;
            non-numeric or absent attaches live with no replay.
          schema:
            type: string
      responses:
        '200':
          description: >-
            Open Server-Sent Events stream. The body is an unbounded
            text/event-stream of frames; each data frame is a JSON feed envelope
            (with seq, published_at, type, and event-specific fields) and
            carries an SSE id equal to seq. resync marker frames use event:
            resync.
          content:
            text/event-stream:
              schema:
                type: string
                description: >-
                  Newline-delimited SSE frames: 'id: <seq>\ndata:
                  <json-envelope>\n\n' for events, 'event: resync\nid:
                  <seq>\ndata: <json>\n\n' for resync markers, and ':
                  keep-alive' comment lines while idle.
              examples:
                whaleEvent:
                  summary: One live whale-trade event frame
                  value: >+
                    id: 142

                    data:
                    {"seq":142,"published_at":"2026-06-04T12:00:00Z","type":"WhaleTradesInserted","count":3}

                resyncMarker:
                  summary: Resync marker after a too-old resume point
                  value: >+
                    event: resync

                    id: 9001

                    data:
                    {"type":"resync","completeness":{"status":"truncated","reason":"The
                    requested Last-Event-ID predates the retained replay window;
                    treat this as a full resync and refetch current
                    state."},"from_sequence":12,"to_sequence":9001}

          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/SubscriptionRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '423':
          $ref: '#/components/responses/Locked'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/RateLimitUnavailable'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -N -sS \
              -H 'Authorization: Bearer $OXI_SK' \
              'https://api.0xinsider.com/api/v1/stream'
        - lang: curl
          label: cURL (resume)
          source: |-
            curl -N -sS \
              -H 'Authorization: Bearer $OXI_SK' \
              -H 'Last-Event-ID: 100' \
              'https://api.0xinsider.com/api/v1/stream'
components:
  headers:
    X-RateLimit-Limit:
      description: Authenticated V1 per-user request limit for the current sliding window.
      schema:
        type: integer
        example: 100
    X-RateLimit-Remaining:
      description: >-
        Authenticated V1 requests remaining in the current sliding window after
        this response.
      schema:
        type: integer
        example: 84
    X-RateLimit-Reset:
      description: Unix timestamp when the authenticated V1 request window resets.
      schema:
        type: integer
        example: 1710772860
    X-Request-Id:
      description: Server-generated request identifier for support and tracing.
      schema:
        type: string
        example: req_550e8400
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    SubscriptionRequired:
      description: Active Insider subscription required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Account access denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Locked:
      description: Account is locked
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimited:
      description: >-
        Rate limit exceeded (100 req/min; batch endpoints also reserve 100 batch
        item units/min before execution)
      headers:
        Retry-After:
          description: Seconds until rate limit resets.
          schema:
            type: integer
        X-RateLimit-Limit:
          schema:
            type: integer
        X-RateLimit-Remaining:
          schema:
            type: integer
        X-RateLimit-Reset:
          schema:
            type: integer
        X-Request-Id:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimitUnavailable:
      description: >-
        Redis-backed authenticated rate limiter unavailable; retry after the
        per-process outage cooldown
      headers:
        Retry-After:
          description: >-
            Seconds until the middleware will probe the Redis-backed rate
            limiter again.
          schema:
            type: integer
        X-Request-Id:
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    ApiError:
      type: object
      required:
        - object
        - error
        - meta
      properties:
        object:
          type: string
          const: error
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - bad_request
                - invalid_api_key
                - subscription_required
                - forbidden
                - not_found
                - account_locked
                - rate_limited
                - rate_limit_unavailable
                - internal_error
            message:
              type: string
            doc_url:
              type: string
              nullable: true
            param:
              type: string
              nullable: true
        meta:
          $ref: '#/components/schemas/ResponseMeta'
    ResponseMeta:
      type: object
      required:
        - request_id
        - cached
      properties:
        request_id:
          type: string
          description: Unique request ID (req_ prefix).
        cached:
          type: boolean
        cache_age_s:
          type: integer
          nullable: true
          description: Cache age in seconds, null if not cached.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key: Authorization: Bearer oxi_sk_live_... for live data (requires
        an active Insider subscription), or oxi_sk_test_... for sandbox/test
        mode (free account, deterministic fixture data, no live rows). Both key
        classes use the same paths; the prefix selects live vs sandbox.

````