Sand AISand AI MAGI-2MAGI-2 が SandBase に登場しました: ネイティブ音声付き 1080p 動画今すぐ試す

Yahoo Finance Historical Data

APIドキュメント
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.

料金
$0.05USD / 回
メソッド
POST
レスポンス
非同期 JSON
パラメータ
必須 1 件 · 任意 2 件

プレイグラウンド

入力
Stock ticker symbol (e.g., AAPL).
Date range for historical data.
Data interval granularity.
出力準備完了

出力はここに表示されます

入力を完了してから[実行]をクリックしてください。

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.

さらに探索

関連 APIs

すべての APIs
API価格レスポンス
Yahoo Finance$0.05 / 回非同期 JSON
Yahoo Finance1回あたり $0.00099 からJSON
Yahoo Finance$0.05 / 回非同期 JSON
Yahoo Finance1回あたり $0.00099 からJSON
Yahoo Finance$0.05 / 回非同期 JSON
Yahoo Finance$0.05 / 回非同期 JSON

質問

FAQ

Yahoo Finance Historical Data API はどのように使いますか?

Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/yahoo-finance/historical-data に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。

Yahoo Finance Historical Data API の料金はいくらですか?

1回あたり $0.05、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。

Yahoo Finance Historical Data API はどのパラメータを受け付けますか?

必須: symbol (string)。 任意: range (string) と interval (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。

Yahoo Finance Historical Data API は何を返しますか?

JSON 結果です。このエンドポイントは非同期で実行されるため、レスポンスには完了した結果の取得方法が含まれます。 このページの README にサンプルレスポンスがあります。

Yahoo Finance の開発者アカウントまたは API key は必要ですか?

いいえ。Yahoo Finance Historical Data は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Yahoo Finance の API アクセスを別途申請する必要はありません。