82trust / 100

Stock History

by Stock historical bars in Markets & finance

x402 APIPassing, checked 1 h ago

Daily OHLCV bars for a US equity: the last `days` sessions, 1 to 250, default 30. Daily only, no intraday. Built from a three-venue consolidation (Databento DBEQ.BASIC), so each bar's high and low are the extremes across those venues, open and close come from the venue that traded the most that session, and venueVolume sums those three venues rather than the consolidated tape. A flat ascending array ready for charting or backtests.

GET https://agent402.tools/api/stock-history

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
190 ms typical, 338 ms slowest 5%
Last check
1 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://agent402.tools/api/stock-history?days=30&symbol=AAPL"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fstock-history
const res = await pay("https://agent402.tools/api/stock-history?days=30&symbol=AAPL");
console.log(await res.json());

Example input

{
  "days": 30,
  "symbol": "AAPL"
}

Example output

{
  "asOf": "2026-09-18",
  "bars": [
    {
      "close": 219.8,
      "day": "2026-09-17",
      "high": 220.3,
      "low": 217.65,
      "open": 218.2,
      "venueVolume": 1481234
    },
    {
      "close": 220.4,
      "day": "2026-09-18",
      "high": 221.05,
      "low": 219.1,
      "open": 219.9,
      "venueVolume": 1630155
    }
  ],
  "days": 2,
  "note": "Daily bars from a three-venue consolidation; venueVolume counts those venues only, not the consolidated tape.",
  "source": "databento.com DBEQ.BASIC",
  "symbol": "AAPL",
  "venues": "NYSE Texas (formerly NYSE Chicago), NYSE National, IEX"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402269 ms$0.005
5 h agoPassed402255 ms$0.005
8 h agoPassed402338 ms$0.005
12 h agoPassed402190 ms$0.005
15 h agoPassed402189 ms$0.005
19 h agoPassed402187 ms$0.005
23 h agoPassed402223 ms$0.005
26 h agoPassed402185 ms$0.005
31 h agoPassed402192 ms$0.005
33 h agoPassed402186 ms$0.005
37 h agoPassed402187 ms$0.005
42 h agoPassed402554 ms$0.005