Aries Financial Prediction Historical Data API

Historical YES/NO tick data for prediction-market contracts

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

GET /v1/predictions/historical-data Get historical ticks for a single symbol #
POST /v1/predictions/historical-data/batch Batch historical ticks for up to 5 symbols #

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/finance-dev:finance-dev-prediction-historical-data-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

finance-dev-prediction-historical-data-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: support@aries.com
    name: Aries Financial
  description: 'OpenAPI Specification for the Aries trading platform API. # Authentication


    Learn how to authenticate with the Aries API using OAuth2 and manage access tokens in your SDK. ## Overview


    The Aries API uses **OAuth2 with Bearer tokens** (JWT format) for authentication. All API requests require a valid access token in the `Authorization` header:


    ```

    Authorization: Bearer

    ```


    ## Providing Client ID and Client Secret (SDK)


    When using the generated SDK, provide your **Client ID** and **Client Secret** when you create the API client (e.g. in the constructor or security options). The SDK will use these to obtain and refresh the access token internally; you do not need to manage tokens yourself. Obtain your OAuth2 credentials from the Aries platform (e.g. Client Center / Manage Account at https://app.aries.com):


    - **Client ID** – Your application identifier (pass to SDK client)

    - **Client Secret** – Your application secret key (pass to SDK client; use PKCE for public clients where secret cannot be stored)


    ## Authentication Flow


    ### 1. Authorization Code Flow


    For server-side or confidential clients:


    1. **Redirect the user** to the authorization URL to sign in and consent:

    - **URL:** `https://app.aries.com/oauth2/authorize`

    - **Query params:** `response_type=code`, `client_id`, `redirect_uri`, `scope`, `state`


    2. **Exchange the code for tokens** (after user is redirected back with `?code=.`):

    - **POST** `https://api.aries.com/v1/oauth2/token`

    - **Body:** `grant_type=authorization_code`, `code`, `redirect_uri`, `client_id`, `client_secret`

    - Response includes `access_token` and `refresh_token`


    3. **Call the API** with the access token: `Authorization: Bearer `


    ### 2. PKCE Flow


    For SPAs and mobile apps (public clients that cannot store `client_secret`):


    1. Generate a **code_verifier** (random string) and **code_challenge** = BASE64URL(SHA256(code_verifier)). 2. **Redirect the user** to `https://app.aries.com/oauth2/authorize` with `code_challenge`, `code_challenge_method=S256`, plus `client_id`, `redirect_uri`, `scope`, `state`. 3. **Exchange the code** at POST `https://api.aries.com/v1/oauth2/token` with `grant_type=authorization_code`, `code`, `redirect_uri`, `client_id`, `code_verifier` (no client_secret). 4. Use the returned `access_token` as Bearer. ### 3. MFA Verification


    If the user has MFA enabled, the authorize step may return `is_mfa: true` and a `next_step_auth_id`. Call **POST** `https://api.aries.com/v1/oauth2/authorize/mfa` with `next_step_auth_id` and `verification_code` (6-digit code). Then continue with **POST** `/v1/oauth2/authorize/confirm` to get the authorization code, and exchange it at `/v1/oauth2/token`. ## Token Management


    - **Refresh when expired:** POST `https://api.aries.com/v1/oauth2/token` with `grant_type=refresh_token`, `client_id`, `client_secret`, `refresh_token`. - **Using a Bearer token directly:** If you already have an access token, set the header `Authorization: Bearer ` on every request. The SDK can accept a pre-obtained token and use it until it expires. ## OAuth2 Scopes


    Request only the scopes your application needs.'
  title: Aries API — OpenAPI Specification Prediction Historical…
  version: 1.0.0
servers:
- description: Production server
  url: https://api.aries.com
- description: Staging server
  url: https://api.tradearies.dev
tags:
- description: Historical YES/NO tick data for prediction-market contracts
  name: Prediction Historical Data
paths:
  /v1/predictions/historical-data:
    get:
      description: Returns prediction-market YES/NO price history for a single symbol. Time range is optional; omit both `from` and `to` to use the service default. `from`/`to` accept RFC3339 strings (e.g. `2026-04-01T00:00:00Z`) or Unix seconds/milliseconds.
      operationId: getHistory
      x-codeSamples:
      - lang: python
        label: Python (SDK)
        source: "from finance_dev import FinanceDev\n\n\nwith FinanceDev() as fd_client:\n\n    res = fd_client.prediction_historical_data.get(symbol=\"HORC_1126_Republican\", from_=\"2026-04-01T00:00:00Z\", to=\"2026-04-20T00:00:00Z\", limit=500)\n\n    assert res.object is not None\n\n    # Handle response\n    print(res.object)"
      - lang: typescript
        label: Typescript (SDK)
        source: "import { FinanceDev } from \"@ariesdotcom/finance-dev\";\n\nconst financeDev = new FinanceDev();\n\nasync function run() {\n  const result = await financeDev.predictionHistoricalData.get({\n    symbol: \"HORC_1126_Republican\",\n    from: \"2026-04-01T00:00:00Z\",\n    to: \"2026-04-20T00:00:00Z\",\n    limit: 500,\n  });\n\n  console.log(result);\n}\n\nrun();"
      parameters:
      - in: query
        name: symbol
        required: true
        schema:
          example: HORC_1126_Republican
          type: string
      - description: RFC3339 timestamp or Unix seconds/milliseconds.
        in: query
        name: from
        required: false
        schema:
          example: '2026-04-01T00:00:00Z'
          type: string
      - description: RFC3339 timestamp or Unix seconds/milliseconds.
        in: query
        name: to
        required: false
        schema:
          example: '2026-04-20T00:00:00Z'
          type: string
      - description: 0 or omitted means 10000; values above 10000 are clamped to it.
        in: query
        name: limit
        required: false
        schema:
          example: 500
          maximum: 10000
          minimum: 0
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PredMdSuccessEnvelope'
                - properties:
                    data:
                      $ref: '#/components/schemas/PredMdHistoryResponse'
                  type: object
          description: Historical ticks
        '400':
          $ref: '#/components/responses/PredMdBadRequest'
        '502':
          $ref: '#/components/responses/PredMdBadGateway'
      security: []
      summary: Get historical ticks for a single symbol
      tags:
      - Prediction Historical Data
  /v1/predictions/historical-data/batch:
    post:
      description: Returns historical ticks for multiple symbols in one request. Each query may carry its own optional `from`/`to`/`limit`. Maximum 5 queries per call.
      operationId: getHistoryBatch
      x-codeSamples:
      - lang: python
        label: Python (SDK)
        source: "from finance_dev import FinanceDev\nfrom finance_dev.utils import parse_datetime\n\n\nwith FinanceDev() as fd_client:\n\n    res = fd_client.predictions.batch_get(queries=[\n        {\n            \"from_\": parse_datetime(\"2026-04-01T00:00:00Z\"),\n            \"limit\": 500,\n            \"symbol\": \"HORC_1126_Republican\",\n            \"to\": parse_datetime(\"2026-04-20T00:00:00Z\"),\n        },\n    ])\n\n    assert res.object is not None\n\n    # Handle response\n    print(res.object)"
      - lang: typescript
        label: Typescript (SDK)
        source: "import { FinanceDev } from \"@ariesdotcom/finance-dev\";\n\nconst financeDev = new FinanceDev();\n\nasync function run() {\n  const result = await financeDev.predictions.batchGet({\n    queries: [\n      {\n        from: new Date(\"2026-04-01T00:00:00Z\"),\n        limit: 500,\n        symbol: \"HORC_1126_Republican\",\n        to: new Date(\"2026-04-20T00:00:00Z\"),\n      },\n    ],\n  });\n\n  console.log(result);\n}\n\nrun();"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PredMdBatchHistoryRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/PredMdSuccessEnvelope'
                - properties:
                    data:
                      $ref: '#/components/schemas/PredMdBatchHistoryResponse'
                  type: object
          description: Batch history results
        '400':
          $ref: '#/components/responses/PredMdBadRequest'
        '502':
          $ref: '#/components/responses/PredMdBadGateway'
      security: []
      summary: Batch historical ticks for up to 5 symbols
      tags:
      - Prediction Historical Data
components:
  schemas:
    AppError:
      description: Structured application error returned inside an `ErrorEnvelope`.
      properties:
        code:
          description: Machine-readable code, e.g. `SYMBOL_REQUIRED`, `EVENT_NOT_FOUND`.
          example: SYMBOL_REQUIRED
          type: string
        details:
          additionalProperties: true
          type: object
        message:
          description: Error detail as a string. Exact message content is not fixed and should not be hard-coded.
          example: string
          type: string
        operation:
          type: string
        request_id:
          type: string
        service:
          type: string
        type:
          description: 'Categorical error type. Use this for branching error-handling logic; the values are stable across endpoints:

            - `VALIDATION` — request body or query parameters failed validation.

            - `AUTHENTICATION` — missing, invalid, or expired token.

            - `AUTHORIZATION` — token is valid but lacks the required scope/permission.

            - `NOT_FOUND` — the requested resource does not exist.

            - `CONFLICT` — request conflicts with current state (e.g. duplicate).

            - `INTERNAL` — server-side error; retry or contact support.

            - `TIMEOUT` — operation took too long.

            - `UNKNOWN` — uncategorized error; check `message`.

            (Additional categorical values may appear in service-specific responses.)'
          enum:
          - UNKNOWN
          - VALIDATION
          - AUTHENTICATION
          - AUTHORIZATION
          - NOT_FOUND
          - CONFLICT
          - INTERNAL
          - TIMEOUT
          - RATE_LIMIT
          - BAD_REQUEST
          - DATABASE
          - EXTERNAL_SERVICE
          - PRECONDITION_FAILED
          - SERVICE_UNAVAILABLE
          - GRPC
          - QUEUE
          - JSON_PARSING
          type: string
      required:
      - type
      - code
      - message
      type: object
    PredMdSuccessEnvelope:
      description: Standard success envelope used by all success responses. `data` is endpoint-specific.
      properties:
        data: {}
        success:
          example: true
          type: boolean
      required:
      - success
      type: object
    PredMdTick:
      properties:
        noPrice:
          description: Exact decimal, serialized as a string so no client parses it through a float.
          example: '0.46'
          format: decimal
          type: string
        quantity:
          example: 10
          format: int64
          minimum: 0
          type: integer
        timestamp:
          example: '2026-04-18T13:45:01.234Z'
          format: date-time
          type: string
        yesPrice:
          description: Exact decimal, serialized as a string so no client parses it through a float.
          example: '0.54'
          format: decimal
          type: string
      required:
      - timestamp
      - yesPrice
      - noPrice
      - quantity
      type: object
    PredMdBatchHistoryRequest:
      properties:
        queries:
          items:
            $ref: '#/components/schemas/PredMdHistoryRequest'
          maxItems: 5
          minItems: 1
          type: array
      required:
      - queries
      type: object
    PredMdBatchHistoryResponse:
      properties:
        results:
          items:
            $ref: '#/components/schemas/PredMdHistoryResponse'
          type: array
      required:
      - results
      type: object
    ErrorEnvelope:
      description: Prediction-market error envelope. Returned by historical-data and prediction-market reference endpoints on 400/404/500/502.
      properties:
        error:
          $ref: '#/components/schemas/AppError'
        success:
          example: false
          type: boolean
      required:
      - success
      - error
      type: object
    PredMdHistoryRequest:
      description: Single query within a batch historical-data request.
      properties:
        from:
          description: Inclusive lower bound. Zero/omitted means unbounded.
          example: '2026-04-01T00:00:00Z'
          format: date-time
          type: string
        limit:
          description: 0 or omitted means 10000; values above 10000 are clamped to it.
          example: 500
          maximum: 10000
          minimum: 0
          type: integer
        symbol:
          example: HORC_1126_Republican
          type: string
        to:
          description: Inclusive upper bound. Zero/omitted means unbounded.
          example: '2026-04-20T00:00:00Z'
          format: date-time
          type: string
      required:
      - symbol
      type: object
    PredMdHistoryResponse:
      properties:
        count:
          minimum: 0
          type: integer
        from:
          format: date-time
          type: string
        symbol:
          type: string
        ticks:
          items:
            $ref: '#/components/schemas/PredMdTick'
          type: array
        to:
          format: date-time
          type: string
      required:
      - symbol
      - count
      - ticks
      type: object
  responses:
    PredMdBadRequest:
      content:
        application/json:
          example:
            error:
              code: SYMBOL_REQUIRED
              message: string
              type: VALIDATION
            success: false
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
      description: Invalid request (validation error, malformed JSON, or missing required parameters). Response body is a prediction-market `ErrorEnvelope` with a structured `AppError`.
    PredMdBadGateway:
      content:
        application/json:
          example:
            error:
              code: UPSTREAM_UNAVAILABLE
              message: string
              type: EXTERNAL_SERVICE
            success: false
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
      description: Upstream data source failure. Response body is a prediction-market `ErrorEnvelope` with a structured `AppError`.
  securitySchemes:
    OAuth2:
      description: 'OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.'
      flows:
        authorizationCode:
          authorizationUrl: https://app.aries.com/oauth2/authorize
          refreshUrl: https://api.aries.com/v1/oauth2/token
          scopes:
            account:information: View account balances, positions, and transaction history
            analytics:information: View analytics, ratings, and market insights
            calendar:information: Access earnings, economic, and market schedule data
            market:information: Access live and historical market data
            market:supplemental: News, company profiles, financials, filings, ETF data, technical analysis
            options:information: Access options chains and expiration data
            order:execution: Place, modify, and cancel orders
            order:information: View order history and status
            position:information: View current positions and holdings
            user:information: View user profile and personal details
            user:management: Manage user-scoped resources and saved configuration (internal).
            watchlist:information: View your watchlists and their symbols.
            watchlist:management: Create, update, replace, and delete your watchlists.
          tokenUrl: https://api.aries.com/v1/oauth2/token
        clientCredentials:
          refreshUrl: https://api.aries.com/v1/oauth2/token
          scopes:
            account:information: View account balances, positions, and transaction history
            analytics:information: View analytics, ratings, and market insights
            calendar:information: Access earnings, economic, and market schedule data
            market:information: Access live and historical market data
            market:supplemental: News, company profiles, financials, filings, ETF data, technical analysis
            options:information: Access options chains and expiration data
            order:execution: Place, modify, and cancel orders
            order:information: View order history and status
            position:information: View current positions and holdings
            user:information: View user profile and personal details
            user:management: Manage user-scoped resources and saved configuration (internal).
            watchlist:information: View your watchlists and their symbols.
            watchlist:management: Create, update, replace, and delete your watchlists.
          tokenUrl: https://api.aries.com/v1/oauth2/token
      type: oauth2