# Financial Datasets — Get historical stock price data

Retrieve historical stock OHLCV prices via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Financial Datasets, pass parameters such as end_date, interval, start_date, and retrieve structured data including opening price, closing price, and reported trading volume for price chart, and historical comparison, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/financial-datasets/financial-datasets-get-historical-stock-price-data/2fefa12d-ac2b-4d49-89ff-94074ad472ef/
API ID: 2fefa12d-ac2b-4d49-89ff-94074ad472ef
Provider: financialdatasets
Contract revision: 4
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/financialdatasets/prices
Page update time: 2026-12-03T02:49:08.381Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.02 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:49:07.543Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "20000",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Financial Datasets Price History API

Provide ticker, interval, start\_date and end\_date. interval accepts day, week, month or year; prices contains OHLCV records with time. The interval and date range belong to the requested history and should remain consistent while traversing pagination.

## What You Can Build

- **Price chart**: Render OHLCV data at the requested interval.
- **Historical comparison**: Prepare price observations for a fixed ticker and date range.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `prices[].time` | Price observation date or time |
| `prices[].open` | Opening price |
| `prices[].high` | Highest price in the interval |
| `prices[].low` | Lowest price in the interval |
| `prices[].close` | Closing price |
| `prices[].volume` | Reported trading volume |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Financial Datasets — Get historical stock price data request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "ticker": {
          "type": "string",
          "description": "The stock ticker symbol (e.g. AAPL, MSFT)."
        },
        "interval": {
          "type": "string",
          "description": "The time interval for the price data.",
          "enum": [
            "day",
            "week",
            "month",
            "year"
          ]
        },
        "start_date": {
          "type": "string",
          "description": "The start date for the price data (format: YYYY-MM-DD).",
          "format": "date"
        },
        "end_date": {
          "type": "string",
          "description": "The end date for the price data (format: YYYY-MM-DD).",
          "format": "date"
        },
        "cursor": {
          "type": "string",
          "description": "Opaque pagination cursor from a previous response's next_page_url. When provided, all other query parameters are ignored: the cursor carries the original request's filters. Treat it as opaque; do not construct or modify it."
        }
      },
      "required": [
        "ticker",
        "interval",
        "start_date",
        "end_date"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "prices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "close": {
            "type": "number"
          },
          "high": {
            "type": "number"
          },
          "low": {
            "type": "number"
          },
          "open": {
            "type": "number"
          },
          "ticker": {
            "type": "string"
          },
          "time": {
            "type": "string"
          },
          "volume": {
            "type": "integer"
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Official example (abridged; HTTP assumed)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/financialdatasets/prices?end_date=2025-01-05&interval=day&start_date=2025-01-02&ticker=AAPL' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Configured HTTP 200; actual status is unverified.
```json
{
  "prices": [
    {
      "close": 243.36,
      "high": 244.15,
      "low": 241.91,
      "open": 243.85,
      "ticker": "AAPL",
      "time": "2025-01-02",
      "volume": 40230800
    },
    {
      "close": 245.0,
      "high": 245.55,
      "low": 242.8,
      "open": 243.36,
      "ticker": "AAPL",
      "time": "2025-01-03",
      "volume": 38420500
    }
  ]
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Which intervals are accepted?
Use day, week, month or year. This implementation does not expose an intraday interval.

### Are both date boundaries required?
Yes. start_date and end_date are required along with ticker and interval.

### Can I request an arbitrary page size?
No limit input is exposed by this implementation. Use the available cursor to continue longer histories.

### How do I continue through the results?
Use the opaque cursor from the pagination response on this same OpenAny endpoint, retaining required inputs. Keep the original query scope when continuing; a new filter selection starts a new request without that cursor.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Review the pricing area for the selected API implementation before calling. Follow its billing unit and terms; retrieving additional pages requires additional requests.

## Available implementations
- financialdatasets: https://openany.si/financial-datasets/financial-datasets-get-historical-stock-price-data/2fefa12d-ac2b-4d49-89ff-94074ad472ef/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
