Outcometick Backtest API

Hosted backtester

GitHub OpenAPI

Operations 14

GET /v1/backtest/contract The strategy contract: languages, hooks, datasets, limits #
GET /v1/backtest/packs Credit packs, prices, sellable venues/assets and run limits #
GET /v1/backtest/capacity Which days can be backtested on a venue, and how busy the queue is #
POST /v1/backtest/quote Price a backtest scope in credits (1 credit = 1 market-day). #
POST /v1/backtest/check Validate a strategy with the exact validator the queue runs, and price it. Free #
POST /v1/backtest/upload Get a 5-minute signed URL to PUT one series CSV, for use in submit #
POST /v1/backtest/submit Queue a backtest run. #
GET /v1/backtest/balance Credit balance and the 25 most recent ledger entries #
GET /v1/backtest/runs Recent runs under your backtest key #
GET /v1/backtest/run/{id} One run: status, progress, credits and report summary #
GET /v1/backtest/run/{id}/archive Download the run's report archive (signed URL, 15 minutes) #
POST /v1/backtest/checkout Buy a credit pack by card; returns a Stripe payment page URL #
POST /v1/backtest/claim-credits After a credit-pack card checkout: the backtest key (shown once) and balance #
POST /v1/backtest/crypto-order Buy a credit pack with USDT/USDC #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/outcometick-com:outcometick-com-backtest-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

outcometick-com-backtest-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: outcometick Backtest API
  version: 3.1.0
  summary: Historical tick data for Polymarket and Predict.fun crypto up/down markets, and a hosted backtester.
  description: 'Public endpoints need no key. Data endpoints take a data subscription key, backtest endpoints a backtest key, both as `Authorization: Bearer `. Operations marked x-requires-human-confirmation spend money or credits: an agent must get the user''s explicit approval first. Full documentation: https://outcometick.com/llms-full.txt'
  contact:
    email: support@outcometick.com
    url: https://outcometick.com/docs
servers:
- url: https://outcometick.com
security: []
tags:
- name: backtest
  description: Hosted backtester
paths:
  /v1/backtest/contract:
    get:
      operationId: backtestContract
      tags:
      - backtest
      security: []
      summary: 'The strategy contract: languages, hooks, datasets, limits'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/packs:
    get:
      operationId: backtestPacks
      tags:
      - backtest
      security: []
      summary: Credit packs, prices, sellable venues/assets and run limits
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/capacity:
    get:
      operationId: backtestCapacity
      tags:
      - backtest
      security: []
      summary: Which days can be backtested on a venue, and how busy the queue is
      parameters:
      - name: venue
        in: query
        required: false
        schema:
          type: string
          enum:
          - polymarket
          - predict
        description: 'Venue (recommended: the windows differ)'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/quote:
    post:
      operationId: backtestQuote
      tags:
      - backtest
      security: []
      summary: Price a backtest scope in credits (1 credit = 1 market-day).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/BacktestScope'
              - type: object
                properties:
                  mode:
                    type: string
                    enum:
                    - market
                    - session
                    default: market
                  intervals:
                    type: array
                    items:
                      type: string
                  language:
                    type: string
                    enum:
                    - python@3.14
                    - nodejs@24
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  quote:
                    $ref: '#/components/schemas/Quote'
        '422':
          description: Scope refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rejection'
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/check:
    post:
      operationId: backtestCheck
      tags:
      - backtest
      security:
      - {}
      - backtestKey: []
      summary: Validate a strategy with the exact validator the queue runs, and price it. Free
      description: A backtest key is required only when the body names uploads.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Submission'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  manifest:
                    type: object
                    additionalProperties: true
                  hooks:
                    type: array
                    items:
                      type: string
                  files:
                    type: array
                    items:
                      type: object
                  total_bytes:
                    type: integer
                  imports:
                    type: array
                    items:
                      type: string
                  quote:
                    $ref: '#/components/schemas/Quote'
        '401':
          description: Uploads named without a valid backtest key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Rejected; costs nothing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rejection'
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/upload:
    post:
      operationId: backtestUpload
      tags:
      - backtest
      security:
      - backtestKey: []
      summary: Get a 5-minute signed URL to PUT one series CSV, for use in submit
      x-requires-human-confirmation: true
      description: Part of submitting a run. Spends money or credits. An agent must show the quote to the user and get explicit approval before calling this.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                bytes:
                  type: integer
                  minimum: 1
              required:
              - bytes
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  key:
                    type: string
                  bytes:
                    type: integer
                  expires_in:
                    type: integer
                  headers:
                    type: object
                    additionalProperties:
                      type: string
        '400':
          description: Bad size
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, unknown, revoked or expired key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/submit:
    post:
      operationId: backtestSubmit
      tags:
      - backtest
      security:
      - backtestKey: []
      summary: Queue a backtest run.
      x-requires-human-confirmation: true
      description: Spends money or credits. An agent must show the quote to the user and get explicit approval before calling this.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/Submission'
              - type: object
                properties:
                  email:
                    type: string
                    format: email
                  locale:
                    type: string
                    enum:
                    - en
                    - zh
                    default: en
                    description: Decides the currency (zh pays in CNY) and the return page
      responses:
        '202':
          description: Queued
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  run_id:
                    type: string
                  status:
                    const: queued
                  credits_held:
                    type: integer
                  quote:
                    $ref: '#/components/schemas/Quote'
                  source_sha256:
                    type: string
        '401':
          description: Missing, unknown, revoked or expired key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  balance:
                    type: integer
                  required:
                    type: integer
                  quote:
                    $ref: '#/components/schemas/Quote'
        '422':
          description: Rejected; costs nothing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rejection'
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/balance:
    get:
      operationId: backtestBalance
      tags:
      - backtest
      security:
      - backtestKey: []
      summary: Credit balance and the 25 most recent ledger entries
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  balance:
                    type: integer
                  history:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
        '401':
          description: Missing, unknown, revoked or expired key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/runs:
    get:
      operationId: backtestRuns
      tags:
      - backtest
      security:
      - backtestKey: []
      summary: Recent runs under your backtest key
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
        description: How many
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  runs:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
        '401':
          description: Missing, unknown, revoked or expired key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/run/{id}:
    get:
      operationId: backtestRun
      tags:
      - backtest
      security:
      - backtestKey: []
      summary: 'One run: status, progress, credits and report summary'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: run_id
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Run'
        '401':
          description: Missing, unknown, revoked or expired key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such run under this key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/run/{id}/archive:
    get:
      operationId: backtestRunArchive
      tags:
      - backtest
      security:
      - backtestKey: []
      summary: Download the run's report archive (signed URL, 15 minutes)
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: run_id
      - name: as
        in: query
        required: false
        schema:
          type: string
          enum:
          - json
        description: json returns {url, expires_in} instead of redirecting
      responses:
        '200':
          description: With as=json
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                  expires_in:
                    type: integer
        '302':
          description: Redirect to the archive
        '401':
          description: Missing, unknown, revoked or expired key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such run
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: No archive for this run
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/checkout:
    post:
      operationId: backtestCreditsCheckout
      tags:
      - backtest
      security: []
      summary: Buy a credit pack by card; returns a Stripe payment page URL
      x-requires-human-confirmation: true
      description: Spends money or credits. An agent must show the quote to the user and get explicit approval before calling this. Pass key to add the credits to an existing backtest key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pack:
                  type: string
                  description: Pack id from /v1/backtest/packs
                locale:
                  type: string
                  enum:
                  - en
                  - zh
                  default: en
                  description: Decides the currency (zh pays in CNY) and the return page
                key:
                  type: string
                  description: Existing backtest key to top up
              required:
              - pack
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
                  session_id:
                    type: string
        '401':
          description: Backtest key not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Unknown pack
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Account cannot be topped up here
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/claim-credits:
    post:
      operationId: backtestClaimCredits
      tags:
      - backtest
      security: []
      summary: 'After a credit-pack card checkout: the backtest key (shown once) and balance'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sessionId:
                  type: string
                  pattern: ^cs_[A-Za-z0-9_]{10,200}$
                  description: Stripe Checkout Session id from the success redirect
              required:
              - sessionId
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '202':
          description: Not active yet; poll
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pending'
        '400':
          description: Bad session id or not a credits checkout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v1/backtest/crypto-order:
    post:
      operationId: backtestCreditsCryptoOrder
      tags:
      - backtest
      security: []
      summary: Buy a credit pack with USDT/USDC
      x-requires-human-confirmation: true
      description: Spends money or credits. An agent must show the quote to the user and get explicit approval before calling this. Claim with POST /v1/public/crypto-claim once paid.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pack:
                  type: string
                asset:
                  type: string
                  enum:
                  - USDT
                  - USDC
                  default: USDT
                key:
                  type: string
                  description: Existing backtest key to top up
              required:
              - pack
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CryptoOrder'
        '400':
          description: Unsupported asset
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Backtest key not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Unknown pack
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; retry after the Retry-After header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable; retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Submission:
      allOf:
      - $ref: '#/components/schemas/BacktestScope'
      - type: object
        properties:
          files:
            type: array
            items:
              $ref: '#/components/schemas/SourceFile'
            description: manifest.json plus source files
          uploads:
            type: object
            additionalProperties:
              type: string
            description: Series file name to the `key` from POST /v1/backtest/upload
    Rejection:
      type: object
      description: A backtest validation rejection. Costs nothing.
      properties:
        ok:
          const: false
        code:
          type: string
          description: E_MANIFEST, E_SCOPE, E_LIMIT, ...
        detail:
          type: string
      required:
      - ok
      - code
      - detail
      additionalProperties: true
    BacktestScope:
      type: object
      description: Give from/to, or days (the most recent n backtestable days), or range.
      properties:
        venue:
          type: string
          enum:
          - polymarket
          - predict
          default: polymarket
        assets:
          type: array
          items:
            type: string
          description: Base symbols, e.g. ["BTC"]
        from:
          type: string
          format: date
          description: UTC day, YYYY-MM-DD
        to:
          type: string
          format: date
          description: UTC day, YYYY-MM-DD
        days:
          type: integer
          minimum: 1
        range:
          type: string
          enum:
          - 7 days
          - 30 days
        sweep_cells:
          type: integer
          minimum: 1
          default: 1
    CryptoOrder:
      type: object
      description: Send exactly `amount` of `asset` on BNB Smart Chain (BEP-20) to `address` before `expiresMs`. The exact amount identifies the payment.
      properties:
        orderId:
          type: string
          pattern: ^co_[0-9a-f]{18}$
        asset:
          type: string
          enum:
          - USDT
          - USDC
        amount:
          type: string
          description: Exact amount to send, 6 decimals
        address:
          type: string
        expiresMs:
          type: integer
        ttlMs:
          type: integer
        usd:
          type: number
        qrSvg:
          type:
          - string
          - 'null'
        kind:
          type:
          - string
          - 'null'
        credits:
          type:
          - integer
          - 'null'
    Error:
      type: object
      properties:
        error:
          type: string
      required:
      - error
      additionalProperties: true
    Quote:
      type: object
      properties:
        venue:
          type: string
        assets:
          type: array
          items:
            type: string
        from:
          type: string
          format: date
          description: UTC day, YYYY-MM-DD
        to:
          type: string
          format: date
          description: UTC day, YYYY-MM-DD
        requestedFrom:
          type: string
          format: date
          description: UTC day, YYYY-MM-DD
        requestedTo:
          type: string
          format: date
          description: UTC day, YYYY-MM-DD
        requestedDays:
          type: integer
        archivedDayCount:
          type: integer
        missingDays:
          type: integer
        marketDays:
          type: integer
        mode:
          type: string
        sweepCells:
          type: integer
        credits:
          type: integer
          description: What the run will hold; refunded in full unless a report is produced
        approxUsd:
          type: number
        approx:
          type: object
          additionalProperties:
            type: number
      additionalProperties: true
    Run:
      type: object
      properties:
        run_id:
          type: string
        status:
          type: string
          description: staging, queued, running, done, failed, ...
        language:
          type: string
          enum:
          - python@3.14
          - nodejs@24
        mode:
          type: string
        venue:
          type: string
        assets:
          type: array
          items:
            type: string
        from:
          type: string
          format: date
          description: UTC day, YYYY-MM-DD
        to:
          type: string
          format: date
          description: UTC day, YYYY-MM-DD
        market_days:
          type: integer
        credits_held:
          type: integer
        credits_spent:
          type:
          - integer
          - 'null'
        rejection:
          type:
          - object
          - 'null'
          additionalProperties: true
        report:
          type:
          - object
          - 'null'
          additionalProperties: true
        progress:
          type:
          - object
          - 'null'
          additionalProperties: true
        queue_position:
          type:
          - integer
          - 'null'
        archive_available:
          type: boolean
        archive_bytes:
          type:
          - integer
          - 'null'
        source_sha256:
          type:
          - string
          - 'null'
        created_ms:
          type: integer
        started_ms:
          type:
          - integer
          - 'null'
        finished_ms:
          type:
          - integer
          - 'null'
    Pending:
      type: object
      properties:
        pending:
          const: true
        reason:
          type: string
        status:
          type: string
    SourceFile:
      type: object
      properties:
        name:
          type: string
        content:
          type: string
      required:
      - name
      - content
  securitySchemes:
    dataKey:
      type: http
      scheme: bearer
      description: Data (or smart-money) subscription key, ck_….
    dataKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: Only on /v1/dl/{date}/{name}
    backtestKey:
      type: http
      scheme: bearer
      description: Backtest key. X-Backtest-Key header also accepted.
externalDocs:
  url: https://outcometick.com/llms-full.txt