price_history

Pack: market-recap · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/price_history for the schema, then POST the same URL with its arguments for the data.

Closing prices and daily returns for a stock, index or other symbol, on any exchange (EL.PA, FME.DE, 7203.T), over a past date or date range.

Tool description as the model sees it

PREFER for HISTORICAL closing prices and daily returns on a specific past date or date range — “what did the S&P 500 close at on August 7”, “closing prices and daily returns for these four indices last Friday”, “AAPL close on 2026-06-30”. Accepts one or more Yahoo Finance symbols (indices ^GSPC/^IXIC/^DJI/^SOX/^RUT, stocks, ^TNX yields, GC=F commodities, BTC-USD crypto, EURUSD=X FX — same symbol space as get_quotes) plus start_date/end_date, and returns each trading day’s close WITH the previous close and the computed daily return percent, per symbol. Covers shares listed on exchanges worldwide through the Yahoo exchange suffix — EL.PA (EssilorLuxottica, Euronext Paris), FME.DE (Fresenius Medical Care, Xetra), RED.MC (Redeia, Bolsa de Madrid), EVO.ST (Evolution, Nasdaq Stockholm), ENI.MI, ASML.AS, NESN.SW, NOVO-B.CO, HSBA.L (London), 7203.T (Toyota, Tokyo), 0700.HK, 005930.KS, 2330.TW, BHP.AX, RELIANCE.NS, SHOP.TO, PETR4.SA — each result carries its currency and exchange; “last 6 daily closes of EssilorLuxottica on Euronext Paris” is one call. Also accepts an ISIN in place of a symbol (e.g. FR0000121667, DK0062498333): it is matched to the exchange listing and the row says which listing was chosen (resolved_from_isin, symbol, exchange, currency). An ISIN that trades on several exchanges needs the optional exchange argument (”.DE”, “Xetra”); without it the tool returns the candidate listings instead of choosing. Company names are not looked up. Keyless (Yahoo Finance). Use get_quotes for CURRENT prices; this tool is for any date in the past.

Parameters

NameTypeRequiredDescription
symbolsstring,arrayyesOne or more Yahoo Finance symbols, e.g. “^GSPC” or [“^GSPC”,“^IXIC”,“^DJI”,“^SOX”]. Comma-separated string also accepted. Up to 40 per call — symbols beyond that come back in “dropped_symbols”, never silently.
itemsstringno
exchangestringnoOnly used when a symbol is an ISIN that trades on several exchanges: a suffix such as ”.DE” / ”.PA” or an exchange name such as “Xetra” picks the listing. Without it, an ISIN with several listings returns the candidate listings (symbol, exchange, currency, name) and no prices.
start_datestringyesFirst date wanted, YYYY-MM-DD. For a single day, set start_date = end_date — the previous close and daily return for that day are included automatically.
end_datestringnoLast date wanted, YYYY-MM-DD. Defaults to start_date.

Example call

Arguments

{
  "symbols": [
    "^GSPC",
    "^IXIC",
    "^DJI",
    "^SOX"
  ],
  "start_date": "2026-08-07"
}

curl

curl -X POST https://gateway.pipeworx.io/market-recap/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"price_history","arguments":{"symbols":["^GSPC","^IXIC","^DJI","^SOX"],"start_date":"2026-08-07"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('price_history', {
  "symbols": [
    "^GSPC",
    "^IXIC",
    "^DJI",
    "^SOX"
  ],
  "start_date": "2026-08-07"
});

More examples

{
  "symbols": "AAPL",
  "start_date": "2026-06-01",
  "end_date": "2026-06-30"
}
{
  "symbols": [
    "EL.PA",
    "FME.DE",
    "EVO.ST"
  ],
  "start_date": "2026-11-05",
  "end_date": "2026-11-12"
}
{
  "symbols": "FR0000121667",
  "start_date": "2026-11-10",
  "end_date": "2026-11-13"
}
{
  "symbols": "DE0007236101",
  "start_date": "2026-11-10",
  "end_date": "2026-11-13",
  "exchange": ".DE"
}

Response shape

Always returns: requested, results

FieldTypeDescription
start_datestring
end_datestring
requestednumber
servednumber
lookupsnumber
dropped_symbolsarray
dropped_notestring
partialboolean
partial_notestring
resultsarray
sourcestring
notestring
Full JSON Schema
{
  "type": "object",
  "description": "Daily closes and returns per symbol. A symbol may be an ISIN: it is matched to its exchange listing; with several listings and no exchange hint the row has found:false and candidates.",
  "properties": {
    "start_date": {
      "type": "string"
    },
    "end_date": {
      "type": "string"
    },
    "requested": {
      "type": "number"
    },
    "served": {
      "type": "number"
    },
    "lookups": {
      "type": "number"
    },
    "dropped_symbols": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "dropped_note": {
      "type": "string"
    },
    "partial": {
      "type": "boolean"
    },
    "partial_note": {
      "type": "string"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "The listing symbol priced (for an ISIN, the resolved one); the ISIN itself when it could not be resolved"
          },
          "found": {
            "type": "boolean"
          },
          "error": {
            "type": "string"
          },
          "currency": {
            "type": [
              "string",
              "null"
            ]
          },
          "exchange": {
            "type": [
              "string",
              "null"
            ]
          },
          "days": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                },
                "close": {
                  "type": "number"
                },
                "previous_close": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "daily_return_pct": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "required": [
                "date",
                "close"
              ]
            }
          },
          "resolved_from_isin": {
            "type": "string",
            "description": "Present when the symbol asked for was an ISIN: the ISIN as given"
          },
          "resolution_note": {
            "type": "string",
            "description": "Which listing the ISIN was matched to and why"
          },
          "empty_reason": {
            "type": "string",
            "enum": [
              "unknown_isin",
              "several_listings",
              "exchange_hint_no_match",
              "lookup_failed"
            ],
            "description": "Why an ISIN produced no price"
          },
          "note": {
            "type": "string"
          },
          "candidates": {
            "type": "array",
            "description": "Listings to choose from when an ISIN has several (or the hint matched none)",
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string"
                },
                "exchange": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "exchange_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "currency": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "symbol"
              ]
            }
          }
        },
        "required": [
          "symbol",
          "found"
        ]
      }
    },
    "source": {
      "type": "string"
    },
    "note": {
      "type": "string"
    }
  },
  "required": [
    "requested",
    "results"
  ]
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the market-recap pack
{
  "mcpServers": {
    "market-recap": {
      "url": "https://gateway.pipeworx.io/market-recap/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 15, 2026