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

# Cancel a trader export

> Stop an export job you no longer need and get back the job, cancelled or on its way to cancelled.

Call this when you queued an export you no longer want. The response is the same job resource [Trader export status](/api-reference/endpoint/get-trader-export-status) returns, so compare `status` to see what the cancel did.

## Parameters

| Parameter | Description                                                                                             |
| --------- | ------------------------------------------------------------------------------------------------------- |
| `job_id`  | Required. The integer the submit response returned.                                                     |
| `address` | The wallet the job was submitted for. A `trd_` id finds a job that was submitted under the bare wallet. |

An OAuth access token needs the `export` scope on this route. An API key needs nothing extra.

## What the cancel does

The answer is always `200` with the job. What the job reads depends on where it was when the cancel arrived.

| The job was                                           | It reads           | What happens next                                                                                                                          |
| ----------------------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `queued`                                              | `cancelled`        | Nothing. No worker will start it.                                                                                                          |
| `running`                                             | `cancel_requested` | The worker stops at its next safe point and the job reads `cancelled`. Poll the status route at `poll_after_s` until `terminal` is `true`. |
| `running`, with its file already being published      | unchanged          | The job finishes as `ready`, or as `reconcile_required` if the storage answer is lost. A cancel cannot reach it any more.                  |
| `cancel_requested` or `cancelled`                     | unchanged          | A repeat converges on the same state.                                                                                                      |
| `ready`, `reconcile_required`, `failed`, or `expired` | unchanged          | A cancel never deletes a ready file.                                                                                                       |

The worker checks for a cancel every 5 seconds while it reads the data and between upload parts, and once more at the last point before the file is published. A storage request already in flight finishes first, and each one is bounded at 120 seconds, so a running job reads `cancelled` within a few minutes at most. If the worker itself stops first, the job reads `cancelled` after its 30-minute lease lapses, at the next hourly cleanup.

## Key response fields

| Field                 | Meaning                                                                        |
| --------------------- | ------------------------------------------------------------------------------ |
| `status`              | `cancelled`, `cancel_requested`, or the status the job already had.            |
| `terminal`            | `true` once `status` can no longer change. `cancel_requested` is not terminal. |
| `cancel_requested_at` | When you asked to cancel. It is `null` when the cancel did not reach the job.  |
| `cancelled_at`        | When the job reached `cancelled`. It is `null` until then.                     |
| `next_action`         | `resubmit` on a cancelled job, `poll` while it is `cancel_requested`.          |

## Quota

Cancelling does not give quota back. The submit already counted against the 20 exports per account in 24 hours and the 5 per wallet in an hour, and that count stays for its full window, the same as a failed export's.

A later submit for the same wallet and format queues a new job. It never reuses a job you asked to cancel.

## Example

```bash theme={null}
curl -X POST -H "Authorization: Bearer $OXINSIDER_API_KEY" \
  "https://api.0xinsider.com/api/v1/trader/swisstony/export/cancel?job_id=123"
```

The TypeScript SDK wraps it as `client.cancelTraderExport(address, jobId)` from `@0xinsider/sdk` 0.11.0. The SDK retries it on a network error or a `5xx`, because a repeat is safe.

## What it does not do

* Delete a ready file. Once the file is being published, the job is returned unchanged and finishes normally.
* Return quota. The submit's count stays for its full window.
* Take an `Idempotency-Key`. A repeat is safe without one, because the second cancel returns the state the first one reached.
* Cancel a job belonging to another account, or a job submitted for a different wallet. Both answer `404`, the same as the status route.
* Notify you by webhook unless you subscribe. An endpoint subscribed to `export_job_cancelled` gets one delivery when the job reaches `cancelled`.


## OpenAPI

````yaml POST /api/v1/trader/{address}/export/cancel
openapi: 3.1.0
info:
  x-generated-rate-limit-policy-from: web/src/lib/rate-limit-facts.ts via web/scripts/generate-api-policy.ts
  title: 0xinsider API
  description: >-
    Follow provider-exposed large-trade activity from Polymarket. Polymarket
    wallet-attributed trades can add grades, P&L, strategy, and diagnostic-score
    context when sufficient source data exists. Fields can be null or
    unavailable. Normal API requests use a 30-second server timeout that returns
    HTTP 408 Request Timeout with the standard error envelope (error.code
    request_timeout) when exceeded. Every /api/v1 failure answers that envelope,
    including a body that is not JSON or does not fit the request schema (400
    invalid_body), a query or path value that does not parse (400 invalid_query,
    invalid_path), a missing Content-Type: application/json (415
    unsupported_media_type), a body over 1048576 bytes (413 payload_too_large)
    and a method the path does not serve (405 method_not_allowed), each with
    error.param naming the field where one is known and meta.request_id equal to
    X-Request-Id. Unknown query names are ignored by default and reported in
    X-Query-Ignored, while X-Effective-Query lists the normalized names and
    values applied using form-urlencoded decoding, where + is a space; strict
    mode returns 400 bad_request with error.reason unknown_query_parameter
    before the handler runs, including for an unknown name with an incomplete
    percent escape. 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, Mcp-Session-Id,
    Mcp-Protocol-Version, Last-Event-Id, and X-Query-Validation request headers.
    X-Query-Validation: strict opts into rejecting unknown query names; the
    default remains compatible. 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 RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset, the legacy
    X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After,
    ETag, X-Request-Id, X-Request-Cost, X-Usage-Accounting,
    X-Batch-RateLimit-Limit, X-Batch-RateLimit-Remaining,
    X-Batch-RateLimit-Reset, Mcp-Session-Id, X-Mcp-Error-Code, X-Query-Ignored,
    and X-Effective-Query response headers. Rate-limit headers describe the
    budget a request was counted against: the API key's per-minute window on an
    authenticated call, and the per-IP budget on a public route or on a refused
    credential (401, 402, 403, 423), so a client looping on a bad or lapsed key
    still sees how much room it has. Conditional GET: these operations return a
    weak ETag and answer If-None-Match with 304 Not Modified and an empty body:
    GET /api/v1/health, GET /api/v1/insider-radar, GET
    /api/v1/insider-radar/{id}, GET /api/v1/large-positions, GET
    /api/v1/leaderboard, GET /api/v1/leaderboard/trending, GET
    /api/v1/market/{condition_id}/candles, GET
    /api/v1/market/{condition_id}/flow, GET /api/v1/market/{condition_id}/intel,
    GET /api/v1/market/{condition_id}/snapshot, GET /api/v1/markets/explore, GET
    /api/v1/markets/sharp-money-flows, GET /api/v1/markets/smart-money-flows,
    GET /api/v1/pick-of-the-day, GET /api/v1/pick-of-the-day/archive, GET
    /api/v1/positions, GET /api/v1/sports-edge-observations, GET
    /api/v1/sports-edge-signals, GET /api/v1/trader/{address}, GET
    /api/v1/trader/{address}/context, GET /api/v1/trader/{address}/pnl, GET
    /api/v1/trader/{address}/position-timeline, GET
    /api/v1/traders/{trader}/position-timeline, GET /api/v1/whale-trades, GET
    /api/v1/whale-trades/history, GET /api/v1/whale-trades/{id}, GET
    /api/v1/whale-trades/{id}/counterparties/executions, GET
    /api/v1/whale-trades/{id}/counterparties/executions/{execution_id}/makers.
    Credentialed first-party routes such as /api/keys, /api/billing, and auth
    endpoints remain restricted to configured 0xinsider origins. Protected V1
    responses, except the zero-cost /api/v1/usage route, after handler execution
    carry X-Usage-Accounting: persisted, failed, or unknown. This reports the
    usage-record write; it does not change the handler result. Do not replay a
    successful mutation to repair an unknown usage record. Before execution,
    unavailable accounting capacity returns HTTP 503 with
    error.reason=request_accounting_unavailable; honor Retry-After. Public API
    responses add the browser-readable Server-Timing header: Processing time in
    milliseconds, for example api;dur=12.345. Includes API authentication, quota
    admission, handler work and response construction. Excludes network transit
    and streamed body or export-file transfer. The engineering budget is
    strictly below 250 ms; this header reports observations, not a latency
    guarantee or a new timeout.
  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 Pro subscription. A sandbox key (oxi_sk_test_...) is
      answered with 401 invalid_api_key and error.reason sandbox_api_key.
  - url: https://0xinsider.com/sandbox
    description: >-
      Sandbox. No credential required and no production data: every documented
      operation answers with its documented example or a deterministic sample of
      its response schema. GET /api/v1/stream is the one exclusion and answers
      400 there, because a Server-Sent Events stream is a live connection rather
      than a body. Add ?sandbox_status=<code> to receive one of the error
      responses the operation documents (for example 429 with Retry-After).
      Documented query parameters and JSON request bodies are checked against
      this document, the two context.md routes answer 200 text/markdown, GET
      /api/v1/trader/{address}/export/download answers its 302 with a Location
      the sandbox serves itself rather than an object store, and nothing is
      stored between requests. A sandbox key (oxi_sk_test_..., issued with no
      account by POST https://api.0xinsider.com/api/v1/agents/register) is
      optional: on an operation that requires a credential, a well-formed key is
      answered with X-Oxi-Sandbox-Key: valid and a malformed one with 401
      invalid_api_key.
security:
  - bearerAuth: []
  - oauth2:
      - read
tags:
  - name: Traders
    description: Traders, 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: Large trades
    description: Recent and historical large trades.
  - name: Leaderboard
    description: Ranked trader discovery and category/strategy leaderboards.
  - name: Pick of the Day
    description: >-
      One sourced sharp-money call a day: the side profitable wallets are
      backing, with pre-game odds, the holders, and the track record.
  - name: Games
    description: >-
      Sports and esports games: both sides, schedules, provider status and the
      Polymarket markets linked to each game.
  - name: Markets
    description: Market search, discovery, snapshots, and sharp-money flow.
  - name: Content
    description: Search across 0xinsider editorial content.
  - name: Suspicious trades
    description: Trades whose recorded suspicion score meets the live flag threshold.
  - name: Insider Radar
    description: >-
      Deprecated spelling of Suspicious trades; both operations stay live as
      aliases.
  - 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: Onboarding
    description: >-
      Self-serve agent registration: a sandbox key with no account, and the path
      to live access.
  - 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.
  - name: Account
    description: Identify the account and credential authenticated for a paid API request.
externalDocs:
  description: 0xinsider API docs
  url: https://docs.0xinsider.com
paths:
  /api/v1/trader/{address}/export/cancel:
    post:
      tags:
        - Traders
      summary: Cancel a trader export job
      description: >-
        Cancels a submitted export and returns the job resource, the same shape
        the status route returns. A queued job reads cancelled at once and no
        worker will start it. A running job reads cancel_requested until the
        worker reaches its next safe point, then cancelled: the worker checks
        every 5 seconds while it reads the snapshot and between upload parts,
        and once more at the last point before the file is published; a storage
        request already in flight finishes first (each is bounded at 120
        seconds), and a partial upload is discarded. If the worker itself stops
        first, the job reads cancelled after its 30-minute lease lapses, at the
        next hourly cleanup. A job a cancel can no longer reach is returned
        unchanged with 200: once its upload is being completed it finishes as
        ready (or reconcile_required, then ready or failed), and ready, failed,
        expired and cancelled jobs are terminal. A cancel never deletes a ready
        file; compare status before and after. Repeating the request is safe: it
        converges on the same state and never repeats a transition, so a client
        that lost the answer can send it again or read the status route. While
        terminal is false, poll the status route after poll_after_s. Quota is
        unchanged: the submit's reservation keeps counting toward the per-user
        daily and per-address hourly export caps for its full window, as a
        failed export's does, and a job its owner asked to cancel is never
        reused by a later submit, which reserves a new job. Webhook endpoints
        subscribed to export_job_cancelled receive it when the job reaches
        cancelled. An unknown job id, or a job owned by another account or
        submitted for another trader, answers 404 exactly as the status route
        does.
      operationId: cancelTraderExport
      parameters:
        - name: X-Query-Validation
          in: header
          required: false
          description: >-
            Opt into strict query-name validation. The default is compatible:
            unknown names are ignored and reported in X-Query-Ignored. With
            strict, an unknown name returns 400 bad_request with error.reason
            unknown_query_parameter before the handler runs, including when its
            percent escape is incomplete.
          schema:
            type: string
            enum:
              - strict
        - name: address
          in: path
          required: true
          description: >-
            Trader wallet address (0x...), known trader username-style lookup,
            or trd_-prefixed trader ID emitted by this API.
          schema:
            type: string
        - name: job_id
          in: query
          required: true
          description: Export job id returned by the submit route.
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: >-
            The job after the cancel: cancelled, cancel_requested, or unchanged
            when a cancel can no longer reach it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TraderExportJob'
              examples:
                cancelled:
                  summary: A queued job, cancelled before a worker started it
                  value:
                    object: trader_export_job
                    data:
                      job_id: 123
                      status: cancelled
                      format: csv
                      total_trades: 4821
                      processed_trades: 0
                      file_size: null
                      error: null
                      terminal: true
                      next_action: resubmit
                      created_at: '2026-09-22T09:00:00Z'
                      started_at: null
                      ready_at: null
                      failed_at: null
                      expires_at: '2026-09-23T09:00:00Z'
                      expired_at: null
                      data_as_of: null
                      cancel_requested_at: '2026-09-22T09:00:02Z'
                      cancelled_at: '2026-09-22T09:00:02Z'
                      attempt: 0
                      max_attempts: 3
                    meta:
                      request_id: req_example
                      cached: false
                      cost: 1
                cancel_requested:
                  summary: A running job; the worker stops at its next safe point
                  value:
                    object: trader_export_job
                    data:
                      job_id: 123
                      status: cancel_requested
                      format: csv
                      total_trades: 4821
                      processed_trades: 4821
                      file_size: null
                      error: null
                      terminal: false
                      next_action: poll
                      poll_after_s: 5
                      created_at: '2026-09-22T09:00:00Z'
                      started_at: '2026-09-22T09:00:04Z'
                      ready_at: null
                      failed_at: null
                      expires_at: '2026-09-23T09:00:00Z'
                      expired_at: null
                      data_as_of: null
                      cancel_requested_at: '2026-09-22T09:00:20Z'
                      cancelled_at: null
                      attempt: 1
                      max_attempts: 3
                    meta:
                      request_id: req_example
                      cached: false
                      cost: 1
                unchanged_ready:
                  summary: >-
                    Too late: the file was already published, and the job is
                    returned unchanged
                  value:
                    object: trader_export_job
                    data:
                      job_id: 123
                      status: ready
                      format: csv
                      total_trades: 4821
                      processed_trades: 4821
                      file_size: 1893344
                      error: null
                      terminal: true
                      next_action: download
                      created_at: '2026-09-22T09:00:00Z'
                      started_at: '2026-09-22T09:00:04Z'
                      ready_at: '2026-09-22T09:00:31Z'
                      failed_at: null
                      expires_at: '2026-09-23T09:00:00Z'
                      expired_at: null
                      data_as_of: '2026-09-22T08:58:12Z'
                      cancel_requested_at: null
                      cancelled_at: null
                      attempt: 1
                      max_attempts: 3
                      artifact:
                        artifact_id: export_artifact_123
                        etag: '"3f2a9c1e5b7d4a6f8e0c2b4d6f8a0c2e-3"'
                        compressed_size_bytes: 412903
                        content_type: text/csv
                        content_encoding: gzip
                        manifest:
                          manifest_version: '1'
                          format: csv
                          schema_version: trader-export-csv-v1
                          coverage: trades_only
                          generation:
                            id: 9d3e8c45-56cc-47a6-a4f8-1e0f54e3e4d1
                            selected_at: '2026-09-22T09:00:05Z'
                            consistency: repeatable_read
                            source_watermarks:
                              positions:
                                source: >-
                                  trader_position_snapshots_or_traders_last_synced
                                coverage: position_snapshot
                                generation: 42
                                data_as_of: '2026-09-22T08:58:12Z'
                              pnl:
                                source: trader_trading_pnl
                                coverage: native_provider
                                revision: 17
                                observed_at: '2026-09-22T08:58:12Z'
                              categories:
                                source: trader_category_breakdown_runs
                                coverage: published_projection
                                publication_fence: '2026-09-22T08:58:12Z'
                                data_as_of: '2026-09-22T08:58:12Z'
                              trades:
                                source: trades
                                coverage: all_matching_rows
                                rows: 4821
                                first_activity_date: '2024-01-01'
                          row_count: 4821
                          content_size_bytes: 1893344
                          content_sha256: >-
                            0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
                          compressed_size_bytes: 412903
                          compressed_sha256: >-
                            abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789
                    meta:
                      request_id: req_example
                      cached: false
                      cost: 1
          headers:
            X-Query-Ignored:
              $ref: '#/components/headers/X-Query-Ignored'
            X-Effective-Query:
              $ref: '#/components/headers/X-Effective-Query'
            X-Usage-Accounting:
              $ref: '#/components/headers/X-Usage-Accounting'
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            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'
            Server-Timing:
              $ref: '#/components/headers/Server-Timing'
        '400':
          description: >-
            Invalid request parameter: job_id missing or not an integer, or a
            malformed trader path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '402':
          description: >-
            Active Pro subscription required. The key is valid but the account
            has no active Pro subscription; error.reason is
            subscription_inactive and error.message names the reactivation URL
            (https://0xinsider.com/billing). Permanent until a person
            reactivates: no Retry-After, never retry on a schedule.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: Account access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '408':
          description: >-
            The handler did not answer inside the server's 30-second timeout.
            error.code is request_timeout. On GET and HEAD the response carries
            Retry-After and error.retry_at; on a mutation it carries neither,
            because the request may have completed on the server: check its
            state before repeating it, and reuse its Idempotency-Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '423':
          description: Account is locked
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: >-
            Rate limit exceeded. Three independent budgets. (1) 100
            requests/minute per user (sliding window), on every authenticated
            route. (2) On the BATCH routes only: 2500 batch item units/minute
            per user, reserved before any item is executed. A batch with N
            requested items costs N item units, including duplicate and invalid
            items. 2500 = 100 requests x 25 items per batch, which is the most
            item work a key can buy through the request limiter at all: a caller
            may spend their entire 100-request minute on full 25-item batches
            without the item budget being what stops them. The REQUEST budget is
            the effective ceiling, and batching is never the more expensive
            choice. The item budget can still deny at a sliding-window boundary
            (both counters carry the previous window forward with a floor, and
            the item counter runs 25x the request counter), so honor a 429 from
            either. Over-quota batches return 429 with Retry-After plus
            RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset before any
            item work is done. (3) The monthly quota: Pro includes 250,000
            authenticated requests per UTC calendar month, whatever the billing
            cadence. Over 250,000: with pay as you go on, requests keep
            answering and the excess bills at USD 0.20 per 1,000 on a monthly
            invoice, up to 1,000,000 requests a month; without it, from October
            1, 2026, the next request answers 429 rate_limited with error.reason
            monthly_quota_exceeded and a Retry-After to the month's reset, and
            from the same day a pay-as-you-go account answers the same past
            1,000,000. A refused request is not counted. Every authenticated
            response carries X-Monthly-Quota-Limit, X-Monthly-Quota-Remaining,
            and X-Monthly-Quota-Reset (unix seconds, the first of next month).
            (4) The per-address budget: 1200 requests/minute per IP, shared by
            every caller behind one address and counted before authentication,
            on every route. A 429 from it carries error.reason ip_rate_limited
            and describes that bucket in RateLimit-*; a throttled address
            (sustained over-limit traffic) carries error.reason ip_throttled
            with a Retry-After of minutes to days, and a request before it does
            not shorten the cooldown. Every 429 is the standard error envelope
            with meta.request_id equal to X-Request-Id.
          headers:
            Retry-After:
              description: Seconds until rate limit resets.
              schema:
                type: integer
            RateLimit-Limit:
              $ref: '#/components/headers/RateLimit-Limit'
            RateLimit-Remaining:
              $ref: '#/components/headers/RateLimit-Remaining'
            RateLimit-Reset:
              $ref: '#/components/headers/RateLimit-Reset'
            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'
        '500':
          description: Unexpected server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '503':
          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'
      security:
        - bearerAuth: []
        - oauth2:
            - export
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -sS -X POST \
              -H "Authorization: Bearer $OXINSIDER_API_KEY" \
              'https://api.0xinsider.com/api/v1/trader/{address}/export/cancel?job_id=123'
components:
  schemas:
    TraderExportJob:
      type: object
      required:
        - object
        - data
        - meta
      properties:
        object:
          type: string
          const: trader_export_job
        data:
          type: object
          required:
            - job_id
            - status
            - format
            - total_trades
            - processed_trades
            - file_size
            - error
            - terminal
            - next_action
            - created_at
            - started_at
            - ready_at
            - failed_at
            - expires_at
            - expired_at
            - data_as_of
            - cancel_requested_at
            - cancelled_at
            - attempt
            - max_attempts
          properties:
            job_id:
              type: integer
              format: int64
            status:
              type: string
              enum:
                - queued
                - running
                - ready
                - failed
                - reconcile_required
                - expired
                - cancel_requested
                - cancelled
              description: >-
                queued: accepted, not started. running: the worker is streaming
                rows. reconcile_required: the upload finished but the storage
                completion answer was lost; the hourly reconciler reads the
                object back and moves the job to ready or failed, and expires_at
                bounds the wait. ready: downloadable until expires_at. failed:
                terminal; error says why; submit a new export. expired: the
                retention window passed; the file is retired, the download route
                answers 410, submit a new export. cancel_requested: the owner
                cancelled a running job (POST
                /api/v1/trader/{address}/export/cancel); the worker stops at its
                next safe point and the job reads cancelled. cancelled:
                terminal; the owner cancelled the job and no file was published;
                submit a new export. A job that has not reached ready by
                expires_at reads failed with error 'export expired before
                completion'. failed, cancelled and expired rows stay readable
                for 48 hours, then the job answers 404.
            format:
              type: string
              enum:
                - json
                - ndjson
                - csv
            total_trades:
              type: integer
              format: int64
              nullable: true
            processed_trades:
              type: integer
              format: int64
              nullable: true
            file_size:
              type: integer
              format: int64
              nullable: true
            error:
              type: string
              nullable: true
            terminal:
              type: boolean
              description: >-
                True when status never changes again (ready, failed, expired,
                cancelled). Stop polling.
            next_action:
              type: string
              enum:
                - poll
                - download
                - resubmit
              description: >-
                What to do next: poll the status route after poll_after_s,
                follow the download route, or submit a new export. Published
                beside status so a status value added later does not strand a
                client.
            poll_after_s:
              type: integer
              description: >-
                Seconds to wait before polling again. Absent when terminal. 5
                while queued, running or cancel_requested; 300 while
                reconcile_required, the cadence that state can change at.
            created_at:
              type: string
              format: date-time
            started_at:
              type: string
              format: date-time
              nullable: true
              description: When the worker last claimed the job; null while queued.
            ready_at:
              type: string
              format: date-time
              nullable: true
              description: >-
                When the file became downloadable. null before ready, and on
                jobs finalized before this field existed.
            failed_at:
              type: string
              format: date-time
              nullable: true
            expires_at:
              type: string
              format: date-time
              description: >-
                The retention window: 24 hours from submit. A ready file
                downloads until this instant; a job that has not reached ready
                by it fails. A reused job (200 on submit) keeps its original
                window.
            expired_at:
              type: string
              format: date-time
              nullable: true
              description: When the job became expired; null until then.
            data_as_of:
              type: string
              format: date-time
              nullable: true
              description: >-
                What the file is a snapshot of: the trader's served-data clock
                (the latest position refresh, else the last completed sync) when
                the file was written; the same value as
                export_metadata.data_as_of inside the file. null until the file
                is written, or when the trader had neither. Read this, not
                ready_at, to decide whether a reused job is fresh enough; submit
                with fresh=true for a newer snapshot.
            cancel_requested_at:
              type: string
              format: date-time
              nullable: true
              description: >-
                When the owner asked to cancel the job; null otherwise. Set on
                every cancelled job, including one cancelled while queued. While
                status is cancel_requested this is the instant the worker was
                asked to stop.
            cancelled_at:
              type: string
              format: date-time
              nullable: true
              description: When the job reached cancelled; null until then.
            attempt:
              type: integer
              description: Worker claims so far.
            max_attempts:
              type: integer
              description: The job fails when attempt reaches this.
            artifact:
              type: object
              description: >-
                Present only while status is ready: the stored object's
                identity, so a client can check the download it receives.
              required:
                - artifact_id
                - etag
                - compressed_size_bytes
                - content_type
                - content_encoding
                - manifest
              properties:
                artifact_id:
                  type: string
                  description: >-
                    Stable identity for this completed export artifact;
                    unchanged when a temporary download URL is renewed.
                etag:
                  type: string
                  nullable: true
                  description: The storage ETag of the object.
                compressed_size_bytes:
                  type: integer
                  format: int64
                  nullable: true
                  description: >-
                    Bytes on the wire (gzip); file_size is the decompressed
                    size.
                content_type:
                  type: string
                  enum:
                    - application/json
                    - application/x-ndjson
                    - text/csv
                content_encoding:
                  type: string
                  const: gzip
                manifest:
                  oneOf:
                    - $ref: '#/components/schemas/TraderExportArtifactManifest'
                    - type: 'null'
                  nullable: true
                  description: >-
                    Immutable manifest for artifacts generated with manifest
                    support; null on historical artifacts written before this
                    contract.
        meta:
          $ref: '#/components/schemas/ResponseMeta'
    ApiError:
      type: object
      required:
        - object
        - error
        - meta
      properties:
        object:
          type: string
          const: error
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: >-
                FROZEN: an existing value never changes meaning. request_timeout
                (408, #16146) was added the way insufficient_scope was: the
                handler did not answer inside the server's 30-second timeout.
                Retry-After and retry_at ride on it only for a safe method (GET,
                HEAD); a timed-out mutation may have completed, so check its
                state and reuse its Idempotency-Key.
              enum:
                - bad_request
                - invalid_api_key
                - subscription_required
                - forbidden
                - insufficient_scope
                - not_found
                - account_locked
                - rate_limited
                - rate_limit_unavailable
                - internal_error
                - request_timeout
            message:
              type: string
            doc_url:
              type: string
            param:
              type: string
            retry_at:
              type: string
              format: date-time
              description: >-
                The recommended next request instant (RFC3339), always in the
                future. Present on every retryable error: `pick_not_released`,
                `rate_limited`, `rate_limit_unavailable`, and
                `read_model_warming`. Omitted otherwise. The absolute twin of
                `Retry-After`; prefer the header for the sleep duration. For
                `pick_not_released`, the earliest of the next scheduled release,
                the next automatic selector attempt, the operating-window start,
                or about 60 seconds. See that response.
            freshness:
              $ref: '#/components/schemas/FreshnessFailure'
            reason:
              type: string
              enum:
                - cursor_expired
                - unknown_endpoint
                - pick_not_released
                - trader_not_tracked
                - read_model_warming
                - database_unavailable
                - request_accounting_unavailable
                - idempotency_in_progress
                - webhook_delivery_in_progress
                - webhook_secret_rotation_not_prepared
                - webhook_secret_rotation_overlap_active
                - sandbox_api_key
                - api_key_in_query
                - subscription_inactive
                - monthly_quota_exceeded
                - invalid_query
                - unknown_query_parameter
                - invalid_path
                - invalid_body
                - unsupported_media_type
                - payload_too_large
                - method_not_allowed
                - ip_rate_limited
                - ip_throttled
                - export_expired
                - freshness_ceiling_unsatisfied
              description: >-
                ADDITIVE (#7209). The specific, actionable cause behind `code`,
                when there is one more specific than the code itself. `code`
                keeps its published values, so existing clients are unaffected;
                new clients branch on `reason`. Omitted when the code already
                says everything we know. pick_not_released: no Pick of the Day
                is published for the current product day; schedule one request
                against retry_at instead of polling. unknown_endpoint: the PATH
                is not a route on this API -- read GET /api/v1, do not retry.
                trader_not_tracked: the wallet is real and the URL is right, but
                the trader is outside the HOT/WARM sync tiers -- stop asking for
                this wallet. cursor_expired: pagination went stale mid-walk --
                re-request the first page and continue. read_model_warming: the
                requested endpoint cannot serve its read model yet; exact causes
                are endpoint-specific and can include a cold or contended
                refresh or a dependency that prevented refresh.
                database_unavailable: the API's database or its connection pool
                is temporarily unreachable (a connection-class failure, not a
                query fault); code stays rate_limit_unavailable, nothing is
                rate-limited, retry after Retry-After / retry_at.
                idempotency_in_progress: retain the exact Idempotency-Key and
                request body, then retry shortly. webhook_delivery_in_progress:
                retry the URL or signing-secret configuration change after the
                destination's active request completes.
                request_accounting_unavailable: accounting capacity is
                unavailable before the handler executes; retry after Retry-After
                / retry_at. sandbox_api_key: the credential is a sandbox key
                (oxi_sk_test_) from POST /api/v1/agents/register, which only the
                sandbox server accepts -- call the sandbox base URL with it, or
                get a live key or OAuth access token; do not retry it here.
                api_key_in_query: the key was sent as a ?token= query parameter,
                which no route reads because URLs land in logs and history; the
                key itself was not checked -- resend it as Authorization:
                Bearer. subscription_inactive: the key is valid but the
                account's Pro subscription has lapsed (402
                subscription_required); permanent until a person reactivates at
                https://0xinsider.com/billing, which the message names -- stop
                retrying on a schedule and surface the link. The key owner is
                emailed once per lapse. monthly_quota_exceeded: the account has
                used the requests Pro includes for the UTC calendar month (429
                rate_limited); retry_at and Retry-After name the first of next
                month, the only retry that can succeed, and the message names
                https://0xinsider.com/developers, where pay as you go for
                requests over the quota is turned on. The X-Monthly-Quota-Limit,
                X-Monthly-Quota-Remaining and X-Monthly-Quota-Reset headers on
                every authenticated response say how close the account is.
                invalid_query, invalid_path, invalid_body (400 bad_request,
                #16146): a query parameter, a path segment or the JSON body did
                not parse or does not fit the route's schema, so no handler ran;
                param names the field when the parser named one (a query key, a
                path segment, a JSON path such as traders[0], or body); fix the
                request, never retry it as sent. unsupported_media_type (415
                bad_request, param content-type): send the body with
                Content-Type: application/json. payload_too_large (413
                bad_request, param body): the body is over 1048576 bytes.
                method_not_allowed (405 bad_request): the path is a route but
                not with this method; the Allow header names the methods it
                serves. ip_rate_limited (429 rate_limited, #16380): the
                per-address budget every caller behind one IP shares, counted
                before authentication, is spent; not the key's own window, and
                the RateLimit-* headers describe that bucket. ip_throttled (429
                rate_limited): the address is in a cooldown after sustained
                over-limit traffic; Retry-After is minutes to days, and a
                request before it does not shorten the cooldown.
        meta:
          $ref: '#/components/schemas/ResponseMeta'
    TraderExportArtifactManifest:
      type: object
      required:
        - manifest_version
        - format
        - schema_version
        - coverage
        - generation
        - row_count
        - content_size_bytes
        - content_sha256
        - compressed_size_bytes
        - compressed_sha256
      properties:
        manifest_version:
          type: string
          description: Version of the artifact manifest contract.
        format:
          type: string
          enum:
            - json
            - ndjson
            - csv
          description: Serialization used for the decompressed content.
        schema_version:
          type: string
          enum:
            - trader-export-json-v1
            - trader-export-ndjson-v1
            - trader-export-csv-v1
          description: Stable schema identifier for the selected serialization.
        coverage:
          type: string
          enum:
            - full_envelope_and_trades
            - trades_only
          description: >-
            Sections represented by the artifact. JSON and NDJSON carry the full
            envelope and trades; CSV carries trade rows only.
        generation:
          $ref: '#/components/schemas/TraderExportGeneration'
        row_count:
          type: integer
          format: int64
          description: Number of trade rows written.
        content_size_bytes:
          type: integer
          format: int64
          description: Exact byte count of the decompressed content stream clients receive.
        content_sha256:
          type: string
          pattern: ^[0-9a-f]{64}$
          description: Lowercase SHA-256 of the decompressed content bytes.
        compressed_size_bytes:
          type: integer
          format: int64
          description: >-
            Exact byte count of the gzip-compressed bytes stored by the object
            provider.
        compressed_sha256:
          type: string
          pattern: ^[0-9a-f]{64}$
          description: >-
            Lowercase SHA-256 of the stored gzip bytes; the multipart ETag is
            not used as this checksum.
    ResponseMeta:
      type: object
      required:
        - request_id
        - cached
        - cost
      properties:
        request_id:
          type: string
          description: >-
            Unique request ID (req_ prefix). The same value as the X-Request-Id
            response header, the request's usage accounting row and its log
            lines.
        cached:
          type: boolean
        cache_age_s:
          type: integer
          description: >-
            Cache age in seconds. Omitted when the response was not cached, and
            also when it was cached but its age cannot be established (an entry
            stored before its cache carried a computed instant). Never a
            placeholder: an unknown age is reported as no value rather than as
            the cache TTL.
        cost:
          type: integer
          description: >-
            Advisory request weight (relative compute cost). 1 for simple reads;
            higher for heavier endpoints. Not a credit/price.
        ranking_generation:
          type: integer
          description: >-
            Committed PostgreSQL-owned leaderboard generation for the returned
            rows and cursor. Present on GET /api/v1/leaderboard; omitted on
            endpoints that do not read this ranking.
        ranking_as_of:
          type: string
          format: date-time
          description: >-
            Authoritative RFC3339 timestamp from cache_generations.updated_at
            for ranking_generation. It is read in the same repeatable-read
            snapshot as the leaderboard rows and is not request time, cache
            write time, or row insertion order.
        directional_source:
          type: string
          enum:
            - live
            - degraded
          description: >-
            Which path produced the team-directional read on this response. Only
            present on endpoints that compute one (today: GET
            /api/v1/sports-edge-signals). "live" means the read RAN. "degraded"
            means it FAILED, so nothing was measured and the ranking fell back
            to raw conviction. The flag describes the READ, not its consequence:
            a read that ran and found nothing groupable also leaves the
            directional fields null, and that is honestly "live" -- the
            per-signal nulls already say "nothing to enrich here", so this
            snapshot-level flag carries only what they cannot, namely whether
            the read ran at all. A degraded response is cached on the shorter
            degraded TTL so it self-heals. Reported SEPARATELY from
            ranking_source because the two degradations are independent -- a
            sharp-money DB miss weakens the ranking DATA, a directional failure
            removes a ranking WEIGHT -- and a consumer down-weighting a degraded
            response needs to know which input it lost. Omitted on endpoints
            that compute no directional read.
        ranking_source:
          type: string
          enum:
            - live
            - db_only
          description: >-
            Which ranking-data path produced this response. Only present on
            endpoints that can degrade a ranking (today: GET
            /api/v1/sports-edge-signals). "live" is the normal path (the current
            holder pile from the provider batch); "db_only" is the degraded
            fallback (a truthful but weaker trader_markets ranking) served when
            the live sharp-money ranking batch is unavailable (a sharp-money DB
            read failure, not a Polymarket outage) and cached on a shorter TTL,
            so a consumer can down-weight or skip it. Omitted on endpoints that
            never degrade.
        category_skill_source:
          type: string
          enum:
            - live
            - partial
            - degraded
            - unavailable
          description: >-
            Whole filtered snapshot category-evidence status before pagination.
            Operational live always remains partial source coverage.
        category_skill_model_version:
          type: string
        category_skill_taxonomy_version:
          type: string
        category_skill_platform:
          type: string
          const: polymarket
        category_skill_scope:
          type: string
          const: observed_goldsky_primary_taker_fill
        category_skill_source_coverage:
          type: string
          enum:
            - partial_whale_threshold_fills
            - graded_wallet_fills
        category_skill_observation_started_at:
          type: string
          format: date-time
        category_skill_model_operationally_degraded:
          type: boolean
          description: >-
            Whole-model operational readiness captured with the category model
            snapshot. Present on category-enriched responses even when the
            filtered signal list is empty. When true, category_skill_source is
            degraded and sports-edge-signals uses the shorter degraded cache
            TTL.
        category_skill_status_counts:
          type: object
          required:
            - live
            - insufficient
            - stale
            - unknown
            - degraded
          properties:
            live:
              type: integer
              minimum: 0
            insufficient:
              type: integer
              minimum: 0
            stale:
              type: integer
              minimum: 0
            unknown:
              type: integer
              minimum: 0
            degraded:
              type: integer
              minimum: 0
        category_skill_base_payload_hash:
          type: string
          pattern: ^[0-9a-f]{64}$
          description: >-
            SHA-256 of the funded signal membership/order/rank/cursor vector
            immediately before category-skill enrichment. Sports-edge-signals
            only.
        category_skill_enriched_base_payload_hash:
          type: string
          pattern: ^[0-9a-f]{64}$
          description: >-
            Independent SHA-256 recomputation over the same base fields
            immediately after category-skill enrichment. Equality with
            category_skill_base_payload_hash proves shadow enrichment did not
            change funded inputs. Sports-edge-signals only.
    FreshnessFailure:
      type: object
      required:
        - max_age_s
        - data_quality_status
      properties:
        max_age_s:
          type: integer
          format: int64
          minimum: 0
          description: The caller's requested whole-response freshness ceiling in seconds.
        actual_age_s:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Age in seconds of the oldest stored data_quality.as_of clock, when
            one is available.
        as_of:
          type: string
          format: date-time
          description: >-
            The oldest stored data-quality clock used to calculate actual_age_s,
            when one is available.
        data_quality_status:
          type: string
          enum:
            - fresh
            - partial
            - unknown
            - untracked
            - unavailable
          description: >-
            The trader body's whole-response data-quality status. Only fresh can
            satisfy max_age_s.
    TraderExportGeneration:
      type: object
      required:
        - id
        - selected_at
        - consistency
        - source_watermarks
      properties:
        id:
          type: string
          format: uuid
          description: Opaque generation identity selected for the coherent read snapshot.
        selected_at:
          type: string
          format: date-time
        consistency:
          type: string
          const: repeatable_read
        source_watermarks:
          $ref: '#/components/schemas/TraderExportSourceWatermarks'
    TraderExportSourceWatermarks:
      type: object
      required:
        - positions
        - pnl
        - categories
        - trades
      properties:
        positions:
          $ref: '#/components/schemas/TraderExportPositionWatermark'
        pnl:
          $ref: '#/components/schemas/TraderExportPnlWatermark'
        categories:
          $ref: '#/components/schemas/TraderExportCategoryWatermark'
        trades:
          $ref: '#/components/schemas/TraderExportTradeWatermark'
    TraderExportPositionWatermark:
      type: object
      required:
        - source
        - coverage
        - generation
        - data_as_of
      properties:
        source:
          type: string
        coverage:
          type: string
        generation:
          type: integer
          format: int64
          nullable: true
        data_as_of:
          type: string
          format: date-time
          nullable: true
    TraderExportPnlWatermark:
      type: object
      required:
        - source
        - coverage
        - revision
        - observed_at
      properties:
        source:
          type: string
        coverage:
          type: string
        revision:
          type: integer
          format: int64
          nullable: true
        observed_at:
          type: string
          format: date-time
          nullable: true
    TraderExportCategoryWatermark:
      type: object
      required:
        - source
        - coverage
        - publication_fence
        - data_as_of
      properties:
        source:
          type: string
        coverage:
          type: string
        publication_fence:
          type: string
          format: date-time
          nullable: true
        data_as_of:
          type: string
          format: date-time
          nullable: true
    TraderExportTradeWatermark:
      type: object
      required:
        - source
        - coverage
        - rows
        - first_activity_date
      properties:
        source:
          type: string
        coverage:
          type: string
        rows:
          type: integer
          format: int64
        first_activity_date:
          type: string
          format: date
          nullable: true
  headers:
    X-Query-Ignored:
      description: >-
        Comma-separated, percent-encoded query names the operation did not
        publish and therefore ignored in compatible mode. Names are sorted and
        de-duplicated.
      schema:
        type: string
    X-Effective-Query:
      description: >-
        Normalized, percent-encoded query string containing only the recognized
        names and values applied by the operation. Query names and values use
        form-urlencoded decoding, where + is a space. Repeated names are
        retained and sorted by name.
      schema:
        type: string
    X-Usage-Accounting:
      description: >-
        Usage-record persistence for a protected V1 handler response. persisted:
        confirmed row; failed: write failed; unknown: completion could not be
        confirmed. Independent of handler success; do not replay successful
        mutations to repair accounting. Absent before accounting admission and
        on public routes. The zero-cost /api/v1/usage route also omits it.
      schema:
        type: string
        enum:
          - persisted
          - failed
          - unknown
    RateLimit-Limit:
      description: >-
        Request limit of the budget this request was counted against, for its
        current window: the API key's per-minute sliding window on an
        authenticated call; the per-IP budget on a public route and on a refused
        credential (401, 402, 403, 423), which never reaches the per-key
        limiter. Standard RateLimit header spelling.
      schema:
        type: integer
        example: 100
    RateLimit-Remaining:
      description: >-
        Requests remaining in that budget's current window after this response.
        Standard RateLimit header spelling.
      schema:
        type: integer
        example: 84
    RateLimit-Reset:
      description: >-
        Seconds until that budget's current window resets. Standard RateLimit
        header spelling.
      schema:
        type: integer
        example: 42
    X-RateLimit-Limit:
      description: >-
        Request limit of the budget this request was counted against, for its
        current window: the API key's per-minute sliding window on an
        authenticated call; the per-IP budget on a public route and on a refused
        credential (401, 402, 403, 423).
      schema:
        type: integer
        example: 100
    X-RateLimit-Remaining:
      description: Requests remaining in that budget's current window after this response.
      schema:
        type: integer
        example: 84
    X-RateLimit-Reset:
      description: Unix timestamp when that budget's current window resets.
      schema:
        type: integer
        example: 1710772860
    X-Request-Id:
      description: >-
        Server-generated request identifier for support and tracing. On every
        /api/v1 response, including 304, 408, CORS preflights and every error,
        and always equal to meta.request_id in the body. It is the key of the
        request's usage accounting row and of every log line the request
        emitted, so quote either form to support. A client-supplied X-Request-Id
        request header is ignored: the value is never adopted or echoed.
      schema:
        type: string
        example: req_550e8400
    Server-Timing:
      description: >-
        Processing time in milliseconds, for example api;dur=12.345. Includes
        API authentication, quota admission, handler work and response
        construction. Excludes network transit and streamed body or export-file
        transfer. The engineering budget is strictly below 250 ms; this header
        reports observations, not a latency guarantee or a new timeout.
      schema:
        type: string
      example: api;dur=12.345
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Legacy default or named integration API key, or OAuth 2.1 access token,
        in the Authorization header as `Bearer oxi_sk_live_...` or `Bearer
        oxi_at_...`. Default keys retain full access; integration keys are
        limited to their approved read, webhooks, export and usage scopes and
        expire within 90 days. All credentials share the owner's account limits.
        Data calls require an active Pro subscription and return live data. A
        401 carries WWW-Authenticate: Bearer
        resource_metadata="https://api.0xinsider.com/.well-known/oauth-protected-resource"
        (RFC 6750 section 3, RFC 9728).
    oauth2:
      type: oauth2
      description: >-
        OAuth 2.1 authorization code flow with PKCE S256 for apps and MCP
        clients acting for a user. Public clients only (no client secret):
        register with RFC 7591 at https://api.0xinsider.com/oauth/register or
        present an https client ID metadata document URL as client_id.
        Authorization server metadata:
        https://api.0xinsider.com/.well-known/oauth-authorization-server. The
        access token (oxi_at_..., one hour) is sent as `Authorization: Bearer`;
        refresh tokens rotate on every use. A route outside the token's scopes
        answers 403 insufficient_scope. Walkthrough:
        https://0xinsider.com/auth.md.
      flows:
        authorizationCode:
          authorizationUrl: https://0xinsider.com/oauth/authorize
          tokenUrl: https://api.0xinsider.com/oauth/token
          refreshUrl: https://api.0xinsider.com/oauth/token
          scopes:
            read: >-
              Read markets, traders, large trades, positions, reports, search,
              the event stream and every MCP tool
            webhooks: Create, list, verify, rotate and delete webhook endpoints
            export: Start, poll and download trader exports
            usage: Read the caller's API usage counters

````