$0.01
per call · USD Coin on Base
Get the simple moving average (SMA) for a ticker symbol over a given time range. Can't find what you're looking for? POST feedback to /feedback, no charge.
Endpoint
GET https://agent.massive.com/v1/indicators/sma/:stockTicker3
Calls / 30d
1
Unique payers / 30d
Aug 31
Last called
exact
Payment scheme
Call this service
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/v1/indicators/sma/:stockTicker", {
method: "GET",
});
const data = await res.json();curl -X GET \
"https://agent.massive.com/v1/indicators/sma/:stockTicker?adjusted=true&expand_underlying=false&limit=10&order=desc&series_type=close×pan=day&window=50" \
-H "X-PAYMENT: <signed x402 payment>"Example response
{
"next_url": "https://api.massive.com/v1/indicators/sma/AAPL?cursor=YWN0aXZlPXRydWUmZGF0ZT0yMDIxLTA0LTI1JmxpbWl0PTEmb3JkZXI9YXNjJnBhZ2VfbWFya2VyPUElN0M5YWRjMjY0ZTgyM2E1ZjBiOGUyNDc5YmZiOGE1YmYwNDVkYzU0YjgwMDcyMWE2YmI1ZjBjMjQwMjU4MjFmNGZiJnNvcnQ9dGlja2Vy",
"request_id": "a47d1beb8c11b6ae897ab76cdbbf35a3",
"results": {
"underlying": {
"aggregates": [
{
"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
}
],
"url": "https://api.massive.com/v2/aggs/ticker/AAPL/range/1/day/2003-01-01/2022-07-25"
},
"values": [
{
"timestamp": 1517562000016,
"value": 140.139
}
]
},
"status": "OK"
}Payment details
0x525f6ddce9af7a7179d7696aabfcd5fcd15a21e6USD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913Is this your API?
Pin it to the top of Market Data and the homepage with a featured placement.
More from Massive & similar services
Massive · Reference News
agent.massive.com
Get the most recent news articles relating to a stock ticker symbol, including a summary of the article and a link to the original source. Can't find what you're looking for? POST feedback to /feedback, no charge.
Massive · Stocks Tickers
agent.massive.com
Get the most up-to-date market data for a single traded stock ticker. Note: Snapshot data is cleared at 3:30am EST and gets populated as data is received from the exchanges. This can happen as early as 4am EST. Can't find what you're looking for? POST feedback to /feedback, no charge.
Massive · Reference Tickers
agent.massive.com
Get a single ticker supported by Massive. This response will have detailed information about the ticker and the company behind it. Can't find what you're looking for? POST feedback to /feedback, no charge.