Massive · Ticker Range

by Massive

GETBase

$0.01

per call · USD Coin on Base

Get aggregate bars for a stock over a given date range in custom time window sizes. For example, if timespan = ‘minute’ and multiplier = ‘5’ then 5-minute bars will be returned. Can't find what you're looking for? POST feedback to /feedback, no charge.

Endpoint

GET https://agent.massive.com/v2/aggs/ticker/:stocksTicker/range/:multiplier/:timespan/:from/:to

13

Calls / 30d

6

Unique payers / 30d

Sep 3

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://agent.massive.com/v2/aggs/ticker/:stocksTicker/range/:multiplier/:timespan/:from/:to", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://agent.massive.com/v2/aggs/ticker/:stocksTicker/range/:multiplier/:timespan/:from/:to?adjusted=true&limit=120&sort=asc" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "adjusted": true,
  "next_url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/1578114000000/2020-01-10?cursor=bGltaXQ9MiZzb3J0PWFzYw",
  "queryCount": 2,
  "request_id": "6a7e466379af0a71039d60cc78e72282",
  "results": [
    {
      "c": 75.0875,
      "h": 75.15,
      "l": 73.7975,
      "n": 1,
      "o": 74.06,
      "t": 1577941200000,
      "v": 135647456,
      "vw": 74.6099
    },
    {
      "c": 74.3575,
      "h": 75.145,
      "l": 74.125,
      "n": 1,
      "o": 74.2875,
      "t": 1578027600000,
      "v": 146535512,
      "vw": 74.7026
    }
  ],
  "resultsCount": 2,
  "status": "OK",
  "ticker": "AAPL"
}

Payment details

Pay to0x525f6ddce9af7a7179d7696aabfcd5fcd15a21e6
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Market Data and the homepage with a featured placement.

Get featured →

More from Massive & similar services