Table of Contents

Struct StocksGroup

Namespace
MassiveDotNet.Rest
Assembly
MassiveDotNet.Rest.dll

Endpoints covering US equities. Reached through Stocks.

public readonly struct StocksGroup
Inherited Members

Remarks

This is a struct wrapping the shared transport, so navigating to a group costs no allocation. Endpoint methods live in the generated half of this partial type.

Methods

EnumerateAggregatesAsync(string, int, AggregateTimespan, DateOrTimestamp, DateOrTimestamp, bool?, SortOrder?, int?, CancellationToken)

Retrieves aggregate bars for a stock over a custom date range and time interval in Eastern Time, enumerating every page as a single lazy sequence.

public IAsyncEnumerable<Agg> EnumerateAggregatesAsync(string ticker, int multiplier, AggregateTimespan timespan, DateOrTimestamp from, DateOrTimestamp to, bool? adjusted = null, SortOrder? sort = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.

multiplier int

The size of the timespan multiplier.

timespan AggregateTimespan

The size of the time window.

from DateOrTimestamp

The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.

to DateOrTimestamp

The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.

adjusted bool?

Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get results that are NOT adjusted for splits.

sort SortOrder?

Sort the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return results in descending order (newest at the top).

limit int?

Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000. Read more about how limit is used to calculate aggregate results in our article on Aggregate Data API Improvements.

cancellationToken CancellationToken

A token to cancel the traversal.

Returns

IAsyncEnumerable<Agg>

Every results item across every page.

Remarks

Walks every page, requesting the next only once the previous one has been consumed. Use ListAggregatesAsync(string, int, AggregateTimespan, DateOrTimestamp, DateOrTimestamp, bool?, SortOrder?, int?, CancellationToken) to retrieve a single page instead. limit sizes each page rather than the traversal, so lowering it issues more requests rather than returning fewer items; bound the sequence with Take instead. Covers pre-market, regular, and after-hours sessions. Set multiplier and timespan together to size each bar, for example 5 and Minute for five-minute bars.

Exceptions

MassiveApiException

The server responded with an error status.

EnumerateDevTradesAsync(string, RangeFilter<DateOrNanoseconds>?, int?, string?, CancellationToken)

Retrieves tick-level trades for a stock from the in-development trades feed, filtered by SIP timestamp, enumerating every page as a single lazy sequence.

[Experimental("MASSIVE0001", Message = "Massive marks this operation experimental: it may change or be removed without notice. Suppress MASSIVE0001 to opt in.")]
public IAsyncEnumerable<DevTrade> EnumerateDevTradesAsync(string ticker, RangeFilter<DateOrNanoseconds>? sipTimestamp = null, int? limit = null, string? sort = null, CancellationToken cancellationToken = default)

Parameters

ticker string

The ticker symbol.

sipTimestamp RangeFilter<DateOrNanoseconds>?

The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it. Accepts an exact value or a range.

limit int?

Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '50000'.

sort string

A comma separated list of sort columns. For each column, append '.asc' or '.desc' to specify the sort direction. The sort column defaults to 'sip_timestamp' if not specified. The sort order defaults to 'desc' if not specified.

cancellationToken CancellationToken

A token to cancel the traversal.

Returns

IAsyncEnumerable<DevTrade>

Every results item across every page.

Remarks

Walks every page, requesting the next only once the previous one has been consumed. Use ListDevTradesAsync(string, RangeFilter<DateOrNanoseconds>?, int?, string?, CancellationToken) to retrieve a single page instead. limit sizes each page rather than the traversal, so lowering it issues more requests rather than returning fewer items; bound the sequence with Take instead. The route's dev segment marks it experimental (decision D22), and the service answered 404 for it when this was mapped; opt in with MASSIVE0001 knowing the shape may change with the route. Its rows are DevTrade, not Trade: the ticker rides on every row and the size is an integer with a separate fraction. sipTimestamp takes a calendar date for a whole session or an Instant for a moment within one, rendered as Unix nanoseconds (decision D20).

Exceptions

MassiveApiException

The server responded with an error status.

EnumerateDividendsAsync(Filter<string>?, RangeFilter<LocalDate>?, RangeFilter<long>?, SetFilter<string>?, int?, string?, CancellationToken)

Retrieves cash dividend distributions for US stocks, with declaration, ex-dividend, record, and pay dates, enumerating every page as a single lazy sequence.

public IAsyncEnumerable<Dividend> EnumerateDividendsAsync(Filter<string>? ticker = null, RangeFilter<LocalDate>? exDividendDate = null, RangeFilter<long>? frequency = null, SetFilter<string>? distributionType = null, int? limit = null, string? sort = null, CancellationToken cancellationToken = default)

Parameters

ticker Filter<string>?

Stock symbol for the company issuing the dividend. Accepts an exact value, a range, or a set of values.

exDividendDate RangeFilter<LocalDate>?

Date when the stock begins trading without the dividend value. Accepts an exact value or a range.

frequency RangeFilter<long>?

How many times per year this dividend is expected to occur. A value of 0 means the distribution is non-recurring or irregular (e.g., special, supplemental, or a one-off dividend). Other possible values include 1 (annual), 2 (semi-annual), 3 (trimester), 4 (quarterly), 12 (monthly), 24 (bi-monthly), 52 (weekly), 104 (bi-weekly), and 365 (daily) depending on the issuer's declared or inferred payout cadence. Accepts an exact value or a range.

distributionType SetFilter<string>?

Classification describing the nature of this dividend's recurrence pattern: recurring (paid on a regular schedule), special (one-time or commemorative), supplemental (extra beyond the regular schedule), irregular (unpredictable or non-recurring), unknown (cannot be classified from available data). Accepts an exact value or a set of values.

limit int?

Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '5000'.

sort string

A comma separated list of sort columns. For each column, append '.asc' or '.desc' to specify the sort direction. The sort column defaults to 'ticker' if not specified. The sort order defaults to 'asc' if not specified.

cancellationToken CancellationToken

A token to cancel the traversal.

Returns

IAsyncEnumerable<Dividend>

Every results item across every page.

Remarks

Walks every page, requesting the next only once the previous one has been consumed. Use ListDividendsAsync(Filter<string>?, RangeFilter<LocalDate>?, RangeFilter<long>?, SetFilter<string>?, int?, string?, CancellationToken) to retrieve a single page instead. limit sizes each page rather than the traversal, so lowering it issues more requests rather than returning fewer items; bound the sequence with Take instead. Every filter is optional and defaults to no constraint. Pass a plain value for equality, a RangeFilter factory for a range, or SetFilter for a set of values.

Exceptions

MassiveApiException

The server responded with an error status.

EnumerateEmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken)

Retrieves the exponential moving average (EMA) of a stock's price over a window of aggregates, enumerating every page as a single lazy sequence.

public IAsyncEnumerable<IndicatorValue> EnumerateEmaAsync(string ticker, RangeFilter<DateOrTimestamp>? timestamp = null, AggregateTimespan? timespan = null, bool? adjusted = null, int? window = null, SeriesType? seriesType = null, bool? expandUnderlying = null, SortOrder? order = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol for which to get exponential moving average (EMA) data. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrTimestamp>?

Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. Accepts an exact value or a range.

timespan AggregateTimespan?

The size of the aggregate time window.

adjusted bool?

Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.

window int?

The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.

seriesType SeriesType?

The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to calculate the exponential moving average (EMA).

expandUnderlying bool?

Whether or not to include the aggregates used to calculate this indicator in the response.

order SortOrder?

The order in which to return the results, ordered by timestamp.

limit int?

Limit the number of results returned, default is 10 and max is 5000

cancellationToken CancellationToken

A token to cancel the traversal.

Returns

IAsyncEnumerable<IndicatorValue>

Every values entry across every page.

Remarks

Walks every page, requesting the next only once the previous one has been consumed, and yields each page's values in turn; the other members of each page's results are not observable through this sequence. A page that carries no results contributes nothing. Use ListEmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken) to retrieve a single page instead. limit sizes each page rather than the traversal, so lowering it issues more requests rather than returning fewer items; bound the sequence with Take instead. The same page shape as ListSmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken): each page carries the values computed for it and, with expandUnderlying, the aggregates they were computed from. timespan accepts every AggregateTimespan except Second, which this endpoint does not offer and rejects with a 400.

Exceptions

MassiveApiException

The server responded with an error status.

EnumerateExchangesAsync(int?, CancellationToken)

Retrieves the exchanges and trade reporting facilities that US stocks trade on, enumerating every page as a single lazy sequence.

public IAsyncEnumerable<StockExchange> EnumerateExchangesAsync(int? limit = null, CancellationToken cancellationToken = default)

Parameters

limit int?

Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '1000'.

cancellationToken CancellationToken

A token to cancel the traversal.

Returns

IAsyncEnumerable<StockExchange>

Every results item across every page.

Remarks

Walks every page, requesting the next only once the previous one has been consumed. Use ListExchangesAsync(int?, CancellationToken) to retrieve a single page instead. limit sizes each page rather than the traversal, so lowering it issues more requests rather than returning fewer items; bound the sequence with Take instead. The service does not serve this route today: it answered a plain-text 404 page not found on 2026-09-02, while Massive's own API description continues to declare it. ListExchangesAsync(MarketType?, string?, CancellationToken) with an assetClass of Stocks returns the same exchanges and is served, so prefer it until this route is stood up. The operation still ships because the description is what this SDK contracts to cover, so it will start working the day Massive serves it.

Exceptions

MassiveApiException

The server responded with an error status.

EnumerateMacdAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, int?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken)

Retrieves the moving average convergence/divergence (MACD) of a stock's price: the MACD line, its signal line, and the histogram between them, enumerating every page as a single lazy sequence.

public IAsyncEnumerable<MacdValue> EnumerateMacdAsync(string ticker, RangeFilter<DateOrTimestamp>? timestamp = null, AggregateTimespan? timespan = null, bool? adjusted = null, int? shortWindow = null, int? longWindow = null, int? signalWindow = null, SeriesType? seriesType = null, bool? expandUnderlying = null, SortOrder? order = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol for which to get moving average convergence/divergence (MACD) data. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrTimestamp>?

Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. Accepts an exact value or a range.

timespan AggregateTimespan?

The size of the aggregate time window.

adjusted bool?

Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.

shortWindow int?

The short window size used to calculate MACD data.

longWindow int?

The long window size used to calculate MACD data.

signalWindow int?

The window size used to calculate the MACD signal line.

seriesType SeriesType?

The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to calculate the MACD.

expandUnderlying bool?

Whether or not to include the aggregates used to calculate this indicator in the response.

order SortOrder?

The order in which to return the results, ordered by timestamp.

limit int?

Limit the number of results returned, default is 10 and max is 5000

cancellationToken CancellationToken

A token to cancel the traversal.

Returns

IAsyncEnumerable<MacdValue>

Every values entry across every page.

Remarks

Walks every page, requesting the next only once the previous one has been consumed, and yields each page's values in turn; the other members of each page's results are not observable through this sequence. A page that carries no results contributes nothing. Use ListMacdAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, int?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken) to retrieve a single page instead. limit sizes each page rather than the traversal, so lowering it issues more requests rather than returning fewer items; bound the sequence with Take instead. Three windows replace the single window of the other indicators: shortWindow and longWindow size the two averages whose difference is the MACD line, and signalWindow sizes the average of that line. Each page carries the values computed for it and, with expandUnderlying, the aggregates they were computed from. timespan accepts every AggregateTimespan except Second, which this endpoint does not offer and rejects with a 400.

Exceptions

MassiveApiException

The server responded with an error status.

EnumerateQuotesAsync(string, RangeFilter<DateOrNanoseconds>?, SortOrder?, int?, string?, CancellationToken)

Retrieves tick-level NBBO quotes for a stock, filtered by timestamp, enumerating every page as a single lazy sequence.

public IAsyncEnumerable<Quote> EnumerateQuotesAsync(string ticker, RangeFilter<DateOrNanoseconds>? timestamp = null, SortOrder? order = null, int? limit = null, string? sort = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrNanoseconds>?

Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp. Accepts an exact value or a range.

order SortOrder?

Order results based on the sort field.

limit int?

Limit the number of results returned, default is 1000 and max is 50000.

sort string

Sort field used for ordering.

cancellationToken CancellationToken

A token to cancel the traversal.

Returns

IAsyncEnumerable<Quote>

Every results item across every page.

Remarks

Walks every page, requesting the next only once the previous one has been consumed. Use ListQuotesAsync(string, RangeFilter<DateOrNanoseconds>?, SortOrder?, int?, string?, CancellationToken) to retrieve a single page instead. limit sizes each page rather than the traversal, so lowering it issues more requests rather than returning fewer items; bound the sequence with Take instead. timestamp takes a calendar date for a whole session or an Instant for a moment within one; both convert implicitly to DateOrNanoseconds, and an instant renders as Unix nanoseconds (decision D20). Quotes outnumber trades many times over, so set limit and enumerate rather than list.

Exceptions

MassiveApiException

The server responded with an error status.

EnumerateRsiAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken)

Retrieves the relative strength index (RSI) of a stock's price over a window of aggregates, enumerating every page as a single lazy sequence.

public IAsyncEnumerable<IndicatorValue> EnumerateRsiAsync(string ticker, RangeFilter<DateOrTimestamp>? timestamp = null, AggregateTimespan? timespan = null, bool? adjusted = null, int? window = null, SeriesType? seriesType = null, bool? expandUnderlying = null, SortOrder? order = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol for which to get relative strength index (RSI) data. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrTimestamp>?

Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. Accepts an exact value or a range.

timespan AggregateTimespan?

The size of the aggregate time window.

adjusted bool?

Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.

window int?

The window size used to calculate the relative strength index (RSI).

seriesType SeriesType?

The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to calculate the relative strength index (RSI).

expandUnderlying bool?

Whether or not to include the aggregates used to calculate this indicator in the response.

order SortOrder?

The order in which to return the results, ordered by timestamp.

limit int?

Limit the number of results returned, default is 10 and max is 5000

cancellationToken CancellationToken

A token to cancel the traversal.

Returns

IAsyncEnumerable<IndicatorValue>

Every values entry across every page.

Remarks

Walks every page, requesting the next only once the previous one has been consumed, and yields each page's values in turn; the other members of each page's results are not observable through this sequence. A page that carries no results contributes nothing. Use ListRsiAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken) to retrieve a single page instead. limit sizes each page rather than the traversal, so lowering it issues more requests rather than returning fewer items; bound the sequence with Take instead. The same page shape as ListSmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken): each page carries the values computed for it and, with expandUnderlying, the aggregates they were computed from. timespan accepts every AggregateTimespan except Second, which this endpoint does not offer and rejects with a 400.

Exceptions

MassiveApiException

The server responded with an error status.

EnumerateSmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken)

Retrieves the simple moving average (SMA) of a stock's price over a window of aggregates, enumerating every page as a single lazy sequence.

public IAsyncEnumerable<IndicatorValue> EnumerateSmaAsync(string ticker, RangeFilter<DateOrTimestamp>? timestamp = null, AggregateTimespan? timespan = null, bool? adjusted = null, int? window = null, SeriesType? seriesType = null, bool? expandUnderlying = null, SortOrder? order = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol for which to get simple moving average (SMA) data. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrTimestamp>?

Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. Accepts an exact value or a range.

timespan AggregateTimespan?

The size of the aggregate time window.

adjusted bool?

Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.

window int?

The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.

seriesType SeriesType?

The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to calculate the simple moving average (SMA).

expandUnderlying bool?

Whether or not to include the aggregates used to calculate this indicator in the response.

order SortOrder?

The order in which to return the results, ordered by timestamp.

limit int?

Limit the number of results returned, default is 10 and max is 5000

cancellationToken CancellationToken

A token to cancel the traversal.

Returns

IAsyncEnumerable<IndicatorValue>

Every values entry across every page.

Remarks

Walks every page, requesting the next only once the previous one has been consumed, and yields each page's values in turn; the other members of each page's results are not observable through this sequence. A page that carries no results contributes nothing. Use ListSmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken) to retrieve a single page instead. limit sizes each page rather than the traversal, so lowering it issues more requests rather than returning fewer items; bound the sequence with Take instead. Each page carries the values computed for it and, with expandUnderlying, the aggregates they were computed from. timespan accepts every AggregateTimespan except Second, which this endpoint does not offer and rejects with a 400.

Exceptions

MassiveApiException

The server responded with an error status.

EnumerateSplitsAsync(Filter<string>?, RangeFilter<LocalDate>?, SetFilter<string>?, int?, string?, CancellationToken)

Retrieves stock splits and similar share-count changes for US stocks, with the execution date and ratio of each, enumerating every page as a single lazy sequence.

public IAsyncEnumerable<Split> EnumerateSplitsAsync(Filter<string>? ticker = null, RangeFilter<LocalDate>? executionDate = null, SetFilter<string>? adjustmentType = null, int? limit = null, string? sort = null, CancellationToken cancellationToken = default)

Parameters

ticker Filter<string>?

Stock symbol for the company that executed the split. Accepts an exact value, a range, or a set of values.

executionDate RangeFilter<LocalDate>?

Date when the stock split takes effect. The adjustment is applied overnight. On the prior trading day, the post-market session is the last session that shows pre-split prices. On the execution date, all trading is already adjusted for the split. This includes the pre-market session. Accepts an exact value or a range.

adjustmentType SetFilter<string>?

Classification of the share-change event. Possible values include: forward_split (share count increases), reverse_split (share count decreases), stock_dividend (shares issued as a dividend). Accepts an exact value or a set of values.

limit int?

Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '5000'.

sort string

A comma separated list of sort columns. For each column, append '.asc' or '.desc' to specify the sort direction. The sort column defaults to 'execution_date' if not specified. The sort order defaults to 'desc' if not specified.

cancellationToken CancellationToken

A token to cancel the traversal.

Returns

IAsyncEnumerable<Split>

Every results item across every page.

Remarks

Walks every page, requesting the next only once the previous one has been consumed. Use ListSplitsAsync(Filter<string>?, RangeFilter<LocalDate>?, SetFilter<string>?, int?, string?, CancellationToken) to retrieve a single page instead. limit sizes each page rather than the traversal, so lowering it issues more requests rather than returning fewer items; bound the sequence with Take instead. Every filter is optional and defaults to no constraint. Pass a plain value for equality, a RangeFilter factory for a range, or SetFilter for a set of values. Lives beside ListDividendsAsync(Filter<string>?, RangeFilter<LocalDate>?, RangeFilter<long>?, SetFilter<string>?, int?, string?, CancellationToken) because the description marks it a stocks operation.

Exceptions

MassiveApiException

The server responded with an error status.

EnumerateTradesAsync(string, RangeFilter<DateOrNanoseconds>?, SortOrder?, int?, string?, CancellationToken)

Retrieves tick-level trades for a stock, filtered by timestamp, enumerating every page as a single lazy sequence.

public IAsyncEnumerable<Trade> EnumerateTradesAsync(string ticker, RangeFilter<DateOrNanoseconds>? timestamp = null, SortOrder? order = null, int? limit = null, string? sort = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrNanoseconds>?

Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp. Accepts an exact value or a range.

order SortOrder?

Order results based on the sort field.

limit int?

Limit the number of results returned, default is 1000 and max is 50000.

sort string

Sort field used for ordering.

cancellationToken CancellationToken

A token to cancel the traversal.

Returns

IAsyncEnumerable<Trade>

Every results item across every page.

Remarks

Walks every page, requesting the next only once the previous one has been consumed. Use ListTradesAsync(string, RangeFilter<DateOrNanoseconds>?, SortOrder?, int?, string?, CancellationToken) to retrieve a single page instead. limit sizes each page rather than the traversal, so lowering it issues more requests rather than returning fewer items; bound the sequence with Take instead. timestamp takes a calendar date for a whole session or an Instant for a moment within one; both convert implicitly to DateOrNanoseconds, and an instant renders as Unix nanoseconds (decision D20). A busy session is millions of trades, so set limit and enumerate rather than list.

Exceptions

MassiveApiException

The server responded with an error status.

GetDailyOpenCloseAsync(string, LocalDate, bool?, CancellationToken)

Retrieves the open, high, low, close, and volume for a stock on one trading day, with its pre-market and after-hours prices.

public Task<DailyOpenClose> GetDailyOpenCloseAsync(string ticker, LocalDate date, bool? adjusted = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.

date LocalDate

The date of the requested open/close in the format YYYY-MM-DD.

adjusted bool?

Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get results that are NOT adjusted for splits.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DailyOpenClose>

The response body, deserialized as one object.

Remarks

A date with no session, such as a weekend or a holiday, is a 404, surfaced as MassiveApiException.

Exceptions

MassiveApiException

The server responded with an error status, or with a success that carried no payload.

GetLastQuoteAsync(string, CancellationToken)

Retrieves the most recent NBBO quote for a stock.

public Task<LastQuote> GetLastQuoteAsync(string ticker, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<LastQuote>

The results object from the response.

Remarks

A 200 without its payload is reported as MassiveApiException rather than as null (decision D17).

Exceptions

MassiveApiException

The server responded with an error status, or with a success that carried no payload.

GetLastTradeAsync(string, CancellationToken)

Retrieves the most recent trade for a stock.

public Task<LastTrade> GetLastTradeAsync(string ticker, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<LastTrade>

The results object from the response.

Remarks

An unknown ticker is a 404, surfaced as MassiveApiException, not an empty result.

Exceptions

MassiveApiException

The server responded with an error status, or with a success that carried no payload.

GetSnapshotAsync(string, CancellationToken)

Retrieves the current snapshot of one stock: today's and the previous day's bars, the latest minute bar, the last quote and trade, and today's change.

public Task<TickerSnapshot> GetSnapshotAsync(string ticker, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<TickerSnapshot>

The ticker object from the response.

Remarks

A 200 without its payload is reported as MassiveApiException rather than as null (decision D17).

Exceptions

MassiveApiException

The server responded with an error status, or with a success that carried no payload.

ListAggregatesAsync(string, int, AggregateTimespan, DateOrTimestamp, DateOrTimestamp, bool?, SortOrder?, int?, CancellationToken)

Retrieves aggregate bars for a stock over a custom date range and time interval in Eastern Time.

public Task<MassivePage<Agg>> ListAggregatesAsync(string ticker, int multiplier, AggregateTimespan timespan, DateOrTimestamp from, DateOrTimestamp to, bool? adjusted = null, SortOrder? sort = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.

multiplier int

The size of the timespan multiplier.

timespan AggregateTimespan

The size of the time window.

from DateOrTimestamp

The start of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.

to DateOrTimestamp

The end of the aggregate time window. Either a date with the format YYYY-MM-DD or a millisecond timestamp.

adjusted bool?

Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get results that are NOT adjusted for splits.

sort SortOrder?

Sort the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return results in descending order (newest at the top).

limit int?

Limits the number of base aggregates queried to create the aggregate results. Max 50000 and Default 5000. Read more about how limit is used to calculate aggregate results in our article on Aggregate Data API Improvements.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<MassivePage<Agg>>

A single page of results, reporting whether more exist.

Remarks

Returns the first page only. Use EnumerateAggregatesAsync(string, int, AggregateTimespan, DateOrTimestamp, DateOrTimestamp, bool?, SortOrder?, int?, CancellationToken) to walk every page without handling cursors yourself. Covers pre-market, regular, and after-hours sessions. Set multiplier and timespan together to size each bar, for example 5 and Minute for five-minute bars.

Exceptions

MassiveApiException

The server responded with an error status.

ListDevTradesAsync(string, RangeFilter<DateOrNanoseconds>?, int?, string?, CancellationToken)

Retrieves tick-level trades for a stock from the in-development trades feed, filtered by SIP timestamp.

[Experimental("MASSIVE0001", Message = "Massive marks this operation experimental: it may change or be removed without notice. Suppress MASSIVE0001 to opt in.")]
public Task<MassivePage<DevTrade>> ListDevTradesAsync(string ticker, RangeFilter<DateOrNanoseconds>? sipTimestamp = null, int? limit = null, string? sort = null, CancellationToken cancellationToken = default)

Parameters

ticker string

The ticker symbol.

sipTimestamp RangeFilter<DateOrNanoseconds>?

The nanosecond accuracy SIP Unix Timestamp. This is the timestamp of when the SIP received this trade from the exchange which produced it. Accepts an exact value or a range.

limit int?

Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '50000'.

sort string

A comma separated list of sort columns. For each column, append '.asc' or '.desc' to specify the sort direction. The sort column defaults to 'sip_timestamp' if not specified. The sort order defaults to 'desc' if not specified.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<MassivePage<DevTrade>>

A single page of results, reporting whether more exist.

Remarks

Returns the first page only. Use EnumerateDevTradesAsync(string, RangeFilter<DateOrNanoseconds>?, int?, string?, CancellationToken) to walk every page without handling cursors yourself. The route's dev segment marks it experimental (decision D22), and the service answered 404 for it when this was mapped; opt in with MASSIVE0001 knowing the shape may change with the route. Its rows are DevTrade, not Trade: the ticker rides on every row and the size is an integer with a separate fraction. sipTimestamp takes a calendar date for a whole session or an Instant for a moment within one, rendered as Unix nanoseconds (decision D20).

Exceptions

MassiveApiException

The server responded with an error status.

ListDividendsAsync(Filter<string>?, RangeFilter<LocalDate>?, RangeFilter<long>?, SetFilter<string>?, int?, string?, CancellationToken)

Retrieves cash dividend distributions for US stocks, with declaration, ex-dividend, record, and pay dates.

public Task<MassivePage<Dividend>> ListDividendsAsync(Filter<string>? ticker = null, RangeFilter<LocalDate>? exDividendDate = null, RangeFilter<long>? frequency = null, SetFilter<string>? distributionType = null, int? limit = null, string? sort = null, CancellationToken cancellationToken = default)

Parameters

ticker Filter<string>?

Stock symbol for the company issuing the dividend. Accepts an exact value, a range, or a set of values.

exDividendDate RangeFilter<LocalDate>?

Date when the stock begins trading without the dividend value. Accepts an exact value or a range.

frequency RangeFilter<long>?

How many times per year this dividend is expected to occur. A value of 0 means the distribution is non-recurring or irregular (e.g., special, supplemental, or a one-off dividend). Other possible values include 1 (annual), 2 (semi-annual), 3 (trimester), 4 (quarterly), 12 (monthly), 24 (bi-monthly), 52 (weekly), 104 (bi-weekly), and 365 (daily) depending on the issuer's declared or inferred payout cadence. Accepts an exact value or a range.

distributionType SetFilter<string>?

Classification describing the nature of this dividend's recurrence pattern: recurring (paid on a regular schedule), special (one-time or commemorative), supplemental (extra beyond the regular schedule), irregular (unpredictable or non-recurring), unknown (cannot be classified from available data). Accepts an exact value or a set of values.

limit int?

Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '5000'.

sort string

A comma separated list of sort columns. For each column, append '.asc' or '.desc' to specify the sort direction. The sort column defaults to 'ticker' if not specified. The sort order defaults to 'asc' if not specified.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<MassivePage<Dividend>>

A single page of results, reporting whether more exist.

Remarks

Returns the first page only. Use EnumerateDividendsAsync(Filter<string>?, RangeFilter<LocalDate>?, RangeFilter<long>?, SetFilter<string>?, int?, string?, CancellationToken) to walk every page without handling cursors yourself. Every filter is optional and defaults to no constraint. Pass a plain value for equality, a RangeFilter factory for a range, or SetFilter for a set of values.

Exceptions

MassiveApiException

The server responded with an error status.

ListEmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken)

Retrieves the exponential moving average (EMA) of a stock's price over a window of aggregates.

public Task<MassivePagedResult<IndicatorSeries>> ListEmaAsync(string ticker, RangeFilter<DateOrTimestamp>? timestamp = null, AggregateTimespan? timespan = null, bool? adjusted = null, int? window = null, SeriesType? seriesType = null, bool? expandUnderlying = null, SortOrder? order = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol for which to get exponential moving average (EMA) data. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrTimestamp>?

Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. Accepts an exact value or a range.

timespan AggregateTimespan?

The size of the aggregate time window.

adjusted bool?

Whether or not the aggregates used to calculate the exponential moving average are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.

window int?

The window size used to calculate the exponential moving average (EMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.

seriesType SeriesType?

The price in the aggregate which will be used to calculate the exponential moving average. i.e. 'close' will result in using close prices to calculate the exponential moving average (EMA).

expandUnderlying bool?

Whether or not to include the aggregates used to calculate this indicator in the response.

order SortOrder?

The order in which to return the results, ordered by timestamp.

limit int?

Limit the number of results returned, default is 10 and max is 5000

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<MassivePagedResult<IndicatorSeries>>

A single page: the results object, reporting whether more exist.

Remarks

Returns the first page only. Use EnumerateEmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken) to walk every page without handling cursors yourself. The same page shape as ListSmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken): each page carries the values computed for it and, with expandUnderlying, the aggregates they were computed from. timespan accepts every AggregateTimespan except Second, which this endpoint does not offer and rejects with a 400.

Exceptions

MassiveApiException

The server responded with an error status, or with a success that carried no payload.

ListExchangesAsync(int?, CancellationToken)

Retrieves the exchanges and trade reporting facilities that US stocks trade on.

public Task<MassivePage<StockExchange>> ListExchangesAsync(int? limit = null, CancellationToken cancellationToken = default)

Parameters

limit int?

Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '1000'.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<MassivePage<StockExchange>>

A single page of results, reporting whether more exist.

Remarks

Returns the first page only. Use EnumerateExchangesAsync(int?, CancellationToken) to walk every page without handling cursors yourself. The service does not serve this route today: it answered a plain-text 404 page not found on 2026-09-02, while Massive's own API description continues to declare it. ListExchangesAsync(MarketType?, string?, CancellationToken) with an assetClass of Stocks returns the same exchanges and is served, so prefer it until this route is stood up. The operation still ships because the description is what this SDK contracts to cover, so it will start working the day Massive serves it.

Exceptions

MassiveApiException

The server responded with an error status.

ListGroupedDailyAsync(LocalDate, bool?, bool?, CancellationToken)

Retrieves the daily bar for every US stock on one trading day.

public Task<GroupedDailyBar[]> ListGroupedDailyAsync(LocalDate date, bool? adjusted = null, bool? includeOtc = null, CancellationToken cancellationToken = default)

Parameters

date LocalDate

The beginning date for the aggregate window.

adjusted bool?

Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get results that are NOT adjusted for splits.

includeOtc bool?

Include OTC securities in the response. Default is false (don't include OTC securities).

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<GroupedDailyBar[]>

The results array from the response, empty when the server returned none.

Remarks

One request returns the whole market, so each bar carries its own Ticker. OTC securities are excluded unless includeOtc is set.

Exceptions

MassiveApiException

The server responded with an error status.

ListHistoricQuotesAsync(string, LocalDate, long?, long?, bool?, int?, CancellationToken)

Retrieves tick-level NBBO quotes for a stock on one trading day from the deprecated v2 endpoint.

[Obsolete("Massive has deprecated this operation. Use Stocks.ListQuotesAsync instead.", DiagnosticId = "MASSIVE0002")]
public Task<HistoricQuote[]> ListHistoricQuotesAsync(string ticker, LocalDate date, long? timestamp = null, long? timestampLimit = null, bool? reverse = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

The ticker symbol we want quotes for.

date LocalDate

The date/day of the quotes to retrieve in the format YYYY-MM-DD.

timestamp long?

The timestamp offset, used for pagination. This is the offset at which to start the results. Using the timestamp of the last result as the offset will give you the next page of results.

timestampLimit long?

The maximum timestamp allowed in the results.

reverse bool?

Reverse the order of the results.

limit int?

Limit the size of the response, max 50000 and default 5000.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<HistoricQuote[]>

The results array from the response, empty when the server returned none.

Remarks

Pagination here is manual: pass the last result's SipTimestampNanoseconds as timestamp to fetch the next page. ListQuotesAsync(string, RangeFilter<DateOrNanoseconds>?, SortOrder?, int?, string?, CancellationToken) replaces this with a cursor the SDK follows for you.

Exceptions

MassiveApiException

The server responded with an error status.

ListHistoricTradesAsync(string, LocalDate, long?, long?, bool?, int?, CancellationToken)

Retrieves tick-level trades for a stock on one trading day from the deprecated v2 endpoint.

[Obsolete("Massive has deprecated this operation. Use Stocks.ListTradesAsync instead.", DiagnosticId = "MASSIVE0002")]
public Task<HistoricTrade[]> ListHistoricTradesAsync(string ticker, LocalDate date, long? timestamp = null, long? timestampLimit = null, bool? reverse = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

The ticker symbol we want trades for.

date LocalDate

The date/day of the trades to retrieve in the format YYYY-MM-DD.

timestamp long?

The timestamp offset, used for pagination. This is the offset at which to start the results. Using the timestamp of the last result as the offset will give you the next page of results.

timestampLimit long?

The maximum timestamp allowed in the results.

reverse bool?

Reverse the order of the results.

limit int?

Limit the size of the response, max 50000 and default 5000.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<HistoricTrade[]>

The results array from the response, empty when the server returned none.

Remarks

Pagination here is manual: pass the last result's SipTimestampNanoseconds as timestamp to fetch the next page. ListTradesAsync(string, RangeFilter<DateOrNanoseconds>?, SortOrder?, int?, string?, CancellationToken) replaces this with a cursor the SDK follows for you.

Exceptions

MassiveApiException

The server responded with an error status.

ListMacdAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, int?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken)

Retrieves the moving average convergence/divergence (MACD) of a stock's price: the MACD line, its signal line, and the histogram between them.

public Task<MassivePagedResult<MacdSeries>> ListMacdAsync(string ticker, RangeFilter<DateOrTimestamp>? timestamp = null, AggregateTimespan? timespan = null, bool? adjusted = null, int? shortWindow = null, int? longWindow = null, int? signalWindow = null, SeriesType? seriesType = null, bool? expandUnderlying = null, SortOrder? order = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol for which to get moving average convergence/divergence (MACD) data. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrTimestamp>?

Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. Accepts an exact value or a range.

timespan AggregateTimespan?

The size of the aggregate time window.

adjusted bool?

Whether or not the aggregates used to calculate the MACD are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.

shortWindow int?

The short window size used to calculate MACD data.

longWindow int?

The long window size used to calculate MACD data.

signalWindow int?

The window size used to calculate the MACD signal line.

seriesType SeriesType?

The price in the aggregate which will be used to calculate the MACD. i.e. 'close' will result in using close prices to calculate the MACD.

expandUnderlying bool?

Whether or not to include the aggregates used to calculate this indicator in the response.

order SortOrder?

The order in which to return the results, ordered by timestamp.

limit int?

Limit the number of results returned, default is 10 and max is 5000

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<MassivePagedResult<MacdSeries>>

A single page: the results object, reporting whether more exist.

Remarks

Returns the first page only. Use EnumerateMacdAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, int?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken) to walk every page without handling cursors yourself. Three windows replace the single window of the other indicators: shortWindow and longWindow size the two averages whose difference is the MACD line, and signalWindow sizes the average of that line. Each page carries the values computed for it and, with expandUnderlying, the aggregates they were computed from. timespan accepts every AggregateTimespan except Second, which this endpoint does not offer and rejects with a 400.

Exceptions

MassiveApiException

The server responded with an error status, or with a success that carried no payload.

ListMoversAsync(SnapshotDirection, bool?, CancellationToken)

Retrieves the current snapshots of the day's top twenty gainers or losers.

public Task<TickerSnapshot[]> ListMoversAsync(SnapshotDirection direction, bool? includeOtc = null, CancellationToken cancellationToken = default)

Parameters

direction SnapshotDirection

The direction of the snapshot results to return.

includeOtc bool?

Include OTC securities in the response. Default is false (don't include OTC securities).

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<TickerSnapshot[]>

The tickers array from the response, empty when the server returned none.

Remarks

One operation with a path enum, so one method: direction chooses the end of the market. OTC securities are excluded unless includeOtc is set.

Exceptions

MassiveApiException

The server responded with an error status.

ListPreviousCloseAsync(string, bool?, CancellationToken)

Retrieves the previous trading day's bar for a stock.

public Task<PreviousCloseBar[]> ListPreviousCloseAsync(string ticker, bool? adjusted = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.

adjusted bool?

Whether or not the results are adjusted for splits. By default, results are adjusted. Set this to false to get results that are NOT adjusted for splits.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<PreviousCloseBar[]>

The results array from the response, empty when the server returned none.

Remarks

The description declares an array, and the service answers with an array of one bar; it is returned as it arrives rather than unwrapped, so the shape cannot drift silently if the service ever sends more.

Exceptions

MassiveApiException

The server responded with an error status.

ListQuotesAsync(string, RangeFilter<DateOrNanoseconds>?, SortOrder?, int?, string?, CancellationToken)

Retrieves tick-level NBBO quotes for a stock, filtered by timestamp.

public Task<MassivePage<Quote>> ListQuotesAsync(string ticker, RangeFilter<DateOrNanoseconds>? timestamp = null, SortOrder? order = null, int? limit = null, string? sort = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrNanoseconds>?

Query by timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp. Accepts an exact value or a range.

order SortOrder?

Order results based on the sort field.

limit int?

Limit the number of results returned, default is 1000 and max is 50000.

sort string

Sort field used for ordering.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<MassivePage<Quote>>

A single page of results, reporting whether more exist.

Remarks

Returns the first page only. Use EnumerateQuotesAsync(string, RangeFilter<DateOrNanoseconds>?, SortOrder?, int?, string?, CancellationToken) to walk every page without handling cursors yourself. timestamp takes a calendar date for a whole session or an Instant for a moment within one; both convert implicitly to DateOrNanoseconds, and an instant renders as Unix nanoseconds (decision D20). Quotes outnumber trades many times over, so set limit and enumerate rather than list.

Exceptions

MassiveApiException

The server responded with an error status.

ListRsiAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken)

Retrieves the relative strength index (RSI) of a stock's price over a window of aggregates.

public Task<MassivePagedResult<IndicatorSeries>> ListRsiAsync(string ticker, RangeFilter<DateOrTimestamp>? timestamp = null, AggregateTimespan? timespan = null, bool? adjusted = null, int? window = null, SeriesType? seriesType = null, bool? expandUnderlying = null, SortOrder? order = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol for which to get relative strength index (RSI) data. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrTimestamp>?

Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. Accepts an exact value or a range.

timespan AggregateTimespan?

The size of the aggregate time window.

adjusted bool?

Whether or not the aggregates used to calculate the relative strength index are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.

window int?

The window size used to calculate the relative strength index (RSI).

seriesType SeriesType?

The price in the aggregate which will be used to calculate the relative strength index. i.e. 'close' will result in using close prices to calculate the relative strength index (RSI).

expandUnderlying bool?

Whether or not to include the aggregates used to calculate this indicator in the response.

order SortOrder?

The order in which to return the results, ordered by timestamp.

limit int?

Limit the number of results returned, default is 10 and max is 5000

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<MassivePagedResult<IndicatorSeries>>

A single page: the results object, reporting whether more exist.

Remarks

Returns the first page only. Use EnumerateRsiAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken) to walk every page without handling cursors yourself. The same page shape as ListSmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken): each page carries the values computed for it and, with expandUnderlying, the aggregates they were computed from. timespan accepts every AggregateTimespan except Second, which this endpoint does not offer and rejects with a 400.

Exceptions

MassiveApiException

The server responded with an error status, or with a success that carried no payload.

ListSmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken)

Retrieves the simple moving average (SMA) of a stock's price over a window of aggregates.

public Task<MassivePagedResult<IndicatorSeries>> ListSmaAsync(string ticker, RangeFilter<DateOrTimestamp>? timestamp = null, AggregateTimespan? timespan = null, bool? adjusted = null, int? window = null, SeriesType? seriesType = null, bool? expandUnderlying = null, SortOrder? order = null, int? limit = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol for which to get simple moving average (SMA) data. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrTimestamp>?

Query by timestamp. Either a date with the format YYYY-MM-DD or a millisecond timestamp. Accepts an exact value or a range.

timespan AggregateTimespan?

The size of the aggregate time window.

adjusted bool?

Whether or not the aggregates used to calculate the simple moving average are adjusted for splits. By default, aggregates are adjusted. Set this to false to get results that are NOT adjusted for splits.

window int?

The window size used to calculate the simple moving average (SMA). i.e. a window size of 10 with daily aggregates would result in a 10 day moving average.

seriesType SeriesType?

The price in the aggregate which will be used to calculate the simple moving average. i.e. 'close' will result in using close prices to calculate the simple moving average (SMA).

expandUnderlying bool?

Whether or not to include the aggregates used to calculate this indicator in the response.

order SortOrder?

The order in which to return the results, ordered by timestamp.

limit int?

Limit the number of results returned, default is 10 and max is 5000

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<MassivePagedResult<IndicatorSeries>>

A single page: the results object, reporting whether more exist.

Remarks

Returns the first page only. Use EnumerateSmaAsync(string, RangeFilter<DateOrTimestamp>?, AggregateTimespan?, bool?, int?, SeriesType?, bool?, SortOrder?, int?, CancellationToken) to walk every page without handling cursors yourself. Each page carries the values computed for it and, with expandUnderlying, the aggregates they were computed from. timespan accepts every AggregateTimespan except Second, which this endpoint does not offer and rejects with a 400.

Exceptions

MassiveApiException

The server responded with an error status, or with a success that carried no payload.

ListSnapshotsAsync(string[]?, bool?, CancellationToken)

Retrieves the current snapshot of every US stock, or of the tickers named.

public Task<TickerSnapshot[]> ListSnapshotsAsync(string[]? tickers = null, bool? includeOtc = null, CancellationToken cancellationToken = default)

Parameters

tickers string[]

A case-sensitive comma separated list of tickers to get snapshots for. For example, AAPL,TSLA,GOOG. Empty string defaults to querying all tickers.

includeOtc bool?

Include OTC securities in the response. Default is false (don't include OTC securities).

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<TickerSnapshot[]>

The tickers array from the response, empty when the server returned none.

Remarks

tickers renders comma-joined, the only form the service reads every element of (decision D19); null or empty asks for the whole market, which is thousands of snapshots in one response. OTC securities are excluded unless includeOtc is set.

Exceptions

MassiveApiException

The server responded with an error status.

ListSplitsAsync(Filter<string>?, RangeFilter<LocalDate>?, SetFilter<string>?, int?, string?, CancellationToken)

Retrieves stock splits and similar share-count changes for US stocks, with the execution date and ratio of each.

public Task<MassivePage<Split>> ListSplitsAsync(Filter<string>? ticker = null, RangeFilter<LocalDate>? executionDate = null, SetFilter<string>? adjustmentType = null, int? limit = null, string? sort = null, CancellationToken cancellationToken = default)

Parameters

ticker Filter<string>?

Stock symbol for the company that executed the split. Accepts an exact value, a range, or a set of values.

executionDate RangeFilter<LocalDate>?

Date when the stock split takes effect. The adjustment is applied overnight. On the prior trading day, the post-market session is the last session that shows pre-split prices. On the execution date, all trading is already adjusted for the split. This includes the pre-market session. Accepts an exact value or a range.

adjustmentType SetFilter<string>?

Classification of the share-change event. Possible values include: forward_split (share count increases), reverse_split (share count decreases), stock_dividend (shares issued as a dividend). Accepts an exact value or a set of values.

limit int?

Limit the maximum number of results returned. Defaults to '100' if not specified. The maximum allowed limit is '5000'.

sort string

A comma separated list of sort columns. For each column, append '.asc' or '.desc' to specify the sort direction. The sort column defaults to 'execution_date' if not specified. The sort order defaults to 'desc' if not specified.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<MassivePage<Split>>

A single page of results, reporting whether more exist.

Remarks

Returns the first page only. Use EnumerateSplitsAsync(Filter<string>?, RangeFilter<LocalDate>?, SetFilter<string>?, int?, string?, CancellationToken) to walk every page without handling cursors yourself. Every filter is optional and defaults to no constraint. Pass a plain value for equality, a RangeFilter factory for a range, or SetFilter for a set of values. Lives beside ListDividendsAsync(Filter<string>?, RangeFilter<LocalDate>?, RangeFilter<long>?, SetFilter<string>?, int?, string?, CancellationToken) because the description marks it a stocks operation.

Exceptions

MassiveApiException

The server responded with an error status.

ListTradesAsync(string, RangeFilter<DateOrNanoseconds>?, SortOrder?, int?, string?, CancellationToken)

Retrieves tick-level trades for a stock, filtered by timestamp.

public Task<MassivePage<Trade>> ListTradesAsync(string ticker, RangeFilter<DateOrNanoseconds>? timestamp = null, SortOrder? order = null, int? limit = null, string? sort = null, CancellationToken cancellationToken = default)

Parameters

ticker string

Specify a case-sensitive ticker symbol. For example, AAPL represents Apple Inc.

timestamp RangeFilter<DateOrNanoseconds>?

Query by trade timestamp. Either a date with the format YYYY-MM-DD or a nanosecond timestamp. Accepts an exact value or a range.

order SortOrder?

Order results based on the sort field.

limit int?

Limit the number of results returned, default is 1000 and max is 50000.

sort string

Sort field used for ordering.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<MassivePage<Trade>>

A single page of results, reporting whether more exist.

Remarks

Returns the first page only. Use EnumerateTradesAsync(string, RangeFilter<DateOrNanoseconds>?, SortOrder?, int?, string?, CancellationToken) to walk every page without handling cursors yourself. timestamp takes a calendar date for a whole session or an Instant for a moment within one; both convert implicitly to DateOrNanoseconds, and an instant renders as Unix nanoseconds (decision D20). A busy session is millions of trades, so set limit and enumerate rather than list.

Exceptions

MassiveApiException

The server responded with an error status.