Sand AISand AI MAGI-2MAGI-2 ist jetzt auf SandBase: 1080p-Video mit nativem AudioJetzt testen

Yahoo Finance Historical Data

API-Dokumentation
https://api.sandbase.ai/v1/api/yahoo-finance/historical-data

Extract historical OHLCV price data for a single ticker over a configurable date range and interval. Returns timestamped records suitable for charting and technical analysis.

Preis
$0.05USD / Aufruf
Methode
POST
Antwort
Asynchrones JSON
Parameter
1 erforderlich · 2 optional

Playground

Eingabe
Stock ticker symbol (e.g., AAPL).
Date range for historical data.
Data interval granularity.
AusgabeBereit

Ihre Ausgabe wird hier angezeigt

Vervollständigen Sie die Eingaben und klicken Sie dann auf Ausführen.

API-README

Yahoo Finance Historical Data

Returns historical price records for one stock ticker on Yahoo Finance. Each record has open, high, low, close and volume values with a timestamp. The only required input is symbol, and you can set range and interval to change the window and spacing.

Use cases

  • Plot a candlestick chart for AAPL from the returned open, high, low and close values.
  • Compute moving averages or other technical indicators over the closing price series.
  • Compare trading volume across days to spot unusually active sessions.
  • Export daily price history for a ticker into a spreadsheet or backtesting tool.

Request

curl -X POST "https://api.sandbase.ai/v1/api/yahoo-finance/historical-data" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symbol": "AAPL"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
symbolstringYesStock ticker symbol (e.g., AAPL).
intervalstringNoData interval granularity.
rangestringNoDate range for historical data.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "currency": "USD",
    "history": [
      {
        "close": 269.04998779296875,
        "high": 270.8500061035156,
        "low": 266.25,
        "open": 270.4200134277344,
        "timestamp": 1762180200,
        "volume": 50194600
      }
    ],
    "symbol": "AAPL"
  },
  "status": "success"
}

Response fields

FieldMeaning
data.symbolThe ticker symbol the history belongs to, such as AAPL.
data.currencyThe currency code of the price values, such as USD.
data.history[]One price record per interval, listed in order from oldest to newest.
data.history[].timestampThe start time of the record as a Unix timestamp in seconds.
data.history[].open / data.history[].closeThe first and last price of the interval.
data.history[].high / data.history[].lowThe highest and lowest price reached during the interval.
data.history[].volumeThe number of shares traded during the interval.
statusShows success when the request worked.

Notes

  • symbol is the stock ticker. If you do not know it, use Yahoo Finance Search Tickers to find it.
  • timestamp values are Unix seconds. Convert them to dates before charting.
  • Price values are floats with many decimal places. Round them for display.
  • For the latest price instead of a series, call Yahoo Finance Quote.

Pricing

$0.05 per successful call. Failed calls are not charged.

Mehr entdecken

Verwandte APIs

Alle APIs
APIPreisAntwort
Yahoo Finance$0.05 pro AufrufAsynchrones JSON
Yahoo FinanceAb $0.00099 pro AufrufJSON
Yahoo Finance$0.05 pro AufrufAsynchrones JSON
Yahoo FinanceAb $0.00099 pro AufrufJSON
Yahoo Finance$0.05 pro AufrufAsynchrones JSON
Yahoo Finance$0.05 pro AufrufAsynchrones JSON

Fragen

FAQ

Wie verwende ich die Yahoo Finance Historical Data API?

Senden Sie eine POST-Anfrage an https://api.sandbase.ai/v1/api/yahoo-finance/historical-data mit Ihrem SandBase API-Schlüssel im Authorization-Header (Bearer) und den Parametern als JSON-Body. Sie können das auch ohne Code direkt auf dieser Seite im Playground testen.

Was kostet die Yahoo Finance Historical Data API?

$0.05 pro Aufruf, abgerechnet von Ihrem SandBase-Guthaben. Es werden nur die von Ihnen getätigten Aufrufe berechnet; es gibt kein Abo.

Welche Parameter akzeptiert die Yahoo Finance Historical Data API?

Erforderlich: symbol (string). Optional: range (string) und interval (string). Die Parametertabelle und der Playground auf dieser Seite listen jedes Feld auf.

Was gibt die Yahoo Finance Historical Data API zurück?

Ein JSON-Ergebnis. Dieser Endpunkt läuft asynchron, daher zeigt die Antwort, wie Sie das fertige Ergebnis abrufen. Die README auf dieser Seite enthält eine Beispielantwort.

Benötige ich ein Yahoo Finance-Entwicklerkonto oder einen API-Schlüssel?

Nein. Yahoo Finance Historical Data läuft über SandBase, daher deckt ein SandBase API-Schlüssel diesen Endpunkt und jede andere API sowie jedes Modell im Katalog ab. Sie müssen keinen separaten Zugang für Yahoo Finance API beantragen.