PHPackages                             pjmarshall1/laravel-massive - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. pjmarshall1/laravel-massive

ActiveLibrary

pjmarshall1/laravel-massive
===========================

A Laravel-native client for the Massive REST API.

v1.0.0(2mo ago)038↓66.7%MITPHPPHP ^8.3

Since Jul 1Pushed 2w agoCompare

[ Source](https://github.com/pjmarshall1/laravel-massive)[ Packagist](https://packagist.org/packages/pjmarshall1/laravel-massive)[ RSS](/packages/pjmarshall1-laravel-massive/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Laravel Massive
===============

[](#laravel-massive)

A Laravel-native client for the [Massive](https://massive.com) REST API.

This package intentionally uses Laravel's built-in HTTP client instead of Massive's PHP SDK.

Installation
------------

[](#installation)

Require the package with Composer:

```
composer require pjmarshall1/laravel-massive
```

Laravel will auto-discover the package service provider and facade.

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=massive-config
```

Add your Massive API key to `.env`:

```
MASSIVE_API_KEY=your-api-key
```

Optional environment variables:

```
MASSIVE_BASE_URL=https://api.massive.com
MASSIVE_TIMEOUT=10
MASSIVE_CONNECT_TIMEOUT=3
```

Usage
-----

[](#usage)

Resolve the client from Laravel's container:

```
use Pjmarshall1\Massive\Massive;

$massive = app(Massive::class);

$overview = $massive->stocks()->tickers()->overview('AAPL');
```

Or use the facade:

```
use Pjmarshall1\Massive\Facades\Massive;

$details = Massive::tickerDetails('AAPL');
```

Available Methods
-----------------

[](#available-methods)

### Generic GET Requests

[](#generic-get-requests)

Use `get` for any REST endpoint that is not wrapped yet:

```
$response = Massive::get('/v3/reference/tickers', [
    'ticker' => 'AAPL',
]);
```

### Stock Tickers

[](#stock-tickers)

```
$tickers = Massive::stocks()->tickers()->allTickers([
    'market' => 'stocks',
    'active' => 'true',
]);

$allTickers = Massive::stocks()->tickers()->allTickers([
    'market' => 'stocks',
    'active' => 'true',
], allPages: true);

$overview = Massive::stocks()->tickers()->overview('AAPL');
$types = Massive::stocks()->tickers()->types();
$related = Massive::stocks()->tickers()->related('AAPL');
```

### Stock Aggregates

[](#stock-aggregates)

```
$bars = Massive::stocks()->aggregates()->customBars(
    ticker: 'AAPL',
    multiplier: 1,
    timespan: 'day',
    from: '2024-01-01',
    to: '2024-01-31',
    query: ['adjusted' => true],
);

$allBars = Massive::stocks()->aggregates()->customBars(
    ticker: 'AAPL',
    multiplier: 1,
    timespan: 'day',
    from: '2024-01-01',
    to: '2024-01-31',
    query: ['limit' => 5000],
    allPages: true,
);

$grouped = Massive::stocks()->aggregates()->groupedDaily('2024-01-31', [
    'adjusted' => true,
]);

$openClose = Massive::stocks()->aggregates()->dailyOpenClose('AAPL', '2024-01-31', [
    'adjusted' => true,
]);

$previousClose = Massive::stocks()->aggregates()->previousClose('AAPL', [
    'adjusted' => true,
]);
```

### Stock Snapshots

[](#stock-snapshots)

```
$singleTicker = Massive::stocks()->snapshots()->singleTicker('AAPL');

$fullMarket = Massive::stocks()->snapshots()->fullMarket();

$unified = Massive::stocks()->snapshots()->unified([
    'ticker.any_of' => 'AAPL,MSFT',
]);

$gainers = Massive::stocks()->snapshots()->topMarketMovers('gainers');
$losers = Massive::stocks()->snapshots()->topMarketMovers('losers');
```

### Trades

[](#trades)

```
$trades = Massive::stocks()->trades()->historical('AAPL', [
    'timestamp.gte' => '2024-01-31',
]);

$allTrades = Massive::stocks()->trades()->historical('AAPL', [
    'limit' => 5000,
], allPages: true);

$latestTrade = Massive::stocks()->trades()->latest('AAPL');
```

### Quotes

[](#quotes)

```
$quotes = Massive::stocks()->quotes()->historical('AAPL', [
    'timestamp.gte' => '2024-01-31',
]);

$allQuotes = Massive::stocks()->quotes()->historical('AAPL', [
    'limit' => 5000,
], allPages: true);

$latestQuote = Massive::stocks()->quotes()->latest('AAPL');
```

### Indicators

[](#indicators)

```
$sma = Massive::stocks()->indicators()->sma('AAPL', [
    'timespan' => 'day',
]);

$ema = Massive::stocks()->indicators()->ema('AAPL', [
    'timespan' => 'day',
]);

$macd = Massive::stocks()->indicators()->macd('AAPL', [
    'timespan' => 'day',
]);

$rsi = Massive::stocks()->indicators()->rsi('AAPL', [
    'timespan' => 'day',
]);
```

### Market Operations

[](#market-operations)

```
$exchanges = Massive::stocks()->marketOperations()->exchanges([
    'asset_class' => 'stocks',
]);

$marketHolidays = Massive::stocks()->marketOperations()->marketHolidays();

$marketStatus = Massive::stocks()->marketOperations()->marketStatus();

$conditionCodes = Massive::stocks()->marketOperations()->conditionCodes([
    'asset_class' => 'stocks',
]);
```

### Corporate Actions

[](#corporate-actions)

```
$ipos = Massive::stocks()->corporateActions()->ipos([
    'ipo_status' => 'new',
]);

$splits = Massive::stocks()->corporateActions()->splits([
    'ticker' => 'AAPL',
]);

$dividends = Massive::stocks()->corporateActions()->dividends([
    'ticker' => 'AAPL',
]);

$tickerEvents = Massive::stocks()->corporateActions()->tickerEvents('AAPL', [
    'types' => 'ticker_change',
]);
```

### Fundamentals

[](#fundamentals)

```
$balanceSheets = Massive::stocks()->fundamentals()->balanceSheets([
    'ticker' => 'AAPL',
]);

$cashFlowStatements = Massive::stocks()->fundamentals()->cashFlowStatements([
    'ticker' => 'AAPL',
]);

$incomeStatements = Massive::stocks()->fundamentals()->incomeStatements([
    'ticker' => 'AAPL',
]);

$ratios = Massive::stocks()->fundamentals()->ratios([
    'ticker' => 'AAPL',
]);

$shortInterest = Massive::stocks()->fundamentals()->shortInterest([
    'ticker' => 'AAPL',
]);

$shortVolume = Massive::stocks()->fundamentals()->shortVolume([
    'ticker' => 'AAPL',
]);

$freeFloat = Massive::stocks()->fundamentals()->freeFloat([
    'ticker' => 'AAPL',
]);
```

### Filings

[](#filings)

```
$edgarIndex = Massive::stocks()->filings()->edgarIndex([
    'ticker' => 'AAPL',
]);

$tenKSections = Massive::stocks()->filings()->tenKSections([
    'ticker' => 'AAPL',
]);

$eightKText = Massive::stocks()->filings()->eightKText([
    'ticker' => 'AAPL',
]);

$thirteenF = Massive::stocks()->filings()->thirteenF([
    'cik' => '0001067983',
]);

$riskFactors = Massive::stocks()->filings()->riskFactors([
    'ticker' => 'AAPL',
]);

$riskCategories = Massive::stocks()->filings()->riskCategories();

$form3 = Massive::stocks()->filings()->form3([
    'ticker' => 'AAPL',
]);

$form4 = Massive::stocks()->filings()->form4([
    'ticker' => 'AAPL',
]);
```

### News

[](#news)

```
$news = Massive::stocks()->news()->articles([
    'ticker' => 'AAPL',
]);

$allNews = Massive::stocks()->news()->articles([
    'ticker' => 'AAPL',
    'limit' => 100,
], allPages: true);
```

### Options Contracts

[](#options-contracts)

```
$contracts = Massive::options()->contracts()->allContracts([
    'underlying_ticker' => 'AAPL',
    'contract_type' => 'call',
]);

$allContracts = Massive::options()->contracts()->allContracts([
    'underlying_ticker' => 'AAPL',
    'limit' => 1000,
], allPages: true);

$overview = Massive::options()->contracts()->overview('O:AAPL240119C00150000');
```

### Options Aggregates

[](#options-aggregates)

```
$bars = Massive::options()->aggregates()->customBars(
    optionsTicker: 'O:AAPL240119C00150000',
    multiplier: 1,
    timespan: 'day',
    from: '2024-01-01',
    to: '2024-01-31',
    query: ['adjusted' => true],
);

$allBars = Massive::options()->aggregates()->customBars(
    optionsTicker: 'O:AAPL240119C00150000',
    multiplier: 1,
    timespan: 'day',
    from: '2024-01-01',
    to: '2024-01-31',
    query: ['limit' => 5000],
    allPages: true,
);
```

### Options Snapshots

[](#options-snapshots)

```
$unified = Massive::options()->snapshots()->unified([
    'type' => 'options',
    'ticker.any_of' => 'O:AAPL240119C00150000,O:AAPL240119P00150000',
]);

$allUnified = Massive::options()->snapshots()->unified([
    'type' => 'options',
    'limit' => 250,
], allPages: true);

$chain = Massive::options()->snapshots()->chain('AAPL', [
    'expiration_date' => '2024-01-19',
    'contract_type' => 'call',
]);

$allChain = Massive::options()->snapshots()->chain('AAPL', [
    'limit' => 250,
], allPages: true);

$contract = Massive::options()->snapshots()->contract('AAPL', 'O:AAPL240119C00150000');
```

The original flat stock methods remain available as convenience proxies:

```
$details = Massive::tickerDetails('AAPL');
$dividends = Massive::dividends(['ticker' => 'AAPL']);
$bars = Massive::customBars('AAPL', 1, 'day', '2024-01-01', '2024-01-31');
$grouped = Massive::groupedDaily('2024-01-31');
$openClose = Massive::dailyOpenClose('AAPL', '2024-01-31');
$previousClose = Massive::previousClose('AAPL');
$singleTicker = Massive::singleTickerSnapshot('AAPL');
$fullMarket = Massive::fullMarketSnapshot();
$unified = Massive::unifiedSnapshot(['ticker.any_of' => 'AAPL,MSFT']);
$gainers = Massive::topMarketMovers('gainers');
$trades = Massive::historicalTrades('AAPL');
$latestTrade = Massive::latestTrade('AAPL');
$quotes = Massive::historicalQuotes('AAPL');
$latestQuote = Massive::latestQuote('AAPL');
$sma = Massive::sma('AAPL');
$ema = Massive::ema('AAPL');
$macd = Massive::macd('AAPL');
$rsi = Massive::rsi('AAPL');
$exchanges = Massive::exchanges(['asset_class' => 'stocks']);
$marketHolidays = Massive::marketHolidays();
$marketStatus = Massive::marketStatus();
$conditionCodes = Massive::conditionCodes(['asset_class' => 'stocks']);
$ipos = Massive::ipos(['ipo_status' => 'new']);
$splits = Massive::splits(['ticker' => 'AAPL']);
$tickerEvents = Massive::tickerEvents('AAPL');
$balanceSheets = Massive::balanceSheets(['ticker' => 'AAPL']);
$cashFlowStatements = Massive::cashFlowStatements(['ticker' => 'AAPL']);
$incomeStatements = Massive::incomeStatements(['ticker' => 'AAPL']);
$ratios = Massive::ratios(['ticker' => 'AAPL']);
$shortInterest = Massive::shortInterest(['ticker' => 'AAPL']);
$shortVolume = Massive::shortVolume(['ticker' => 'AAPL']);
$freeFloat = Massive::freeFloat(['ticker' => 'AAPL']);
$edgarIndex = Massive::edgarIndex(['ticker' => 'AAPL']);
$tenKSections = Massive::tenKSections(['ticker' => 'AAPL']);
$eightKText = Massive::eightKText(['ticker' => 'AAPL']);
$thirteenF = Massive::thirteenF(['cik' => '0001067983']);
$riskFactors = Massive::riskFactors(['ticker' => 'AAPL']);
$riskCategories = Massive::riskCategories();
$form3 = Massive::form3(['ticker' => 'AAPL']);
$form4 = Massive::form4(['ticker' => 'AAPL']);
$news = Massive::news(['ticker' => 'AAPL']);
$contracts = Massive::optionsContracts(['underlying_ticker' => 'AAPL']);
$overview = Massive::optionsContractOverview('O:AAPL240119C00150000');
$optionBars = Massive::optionsCustomBars('O:AAPL240119C00150000', 1, 'day', '2024-01-01', '2024-01-31');
$optionsUnified = Massive::optionsUnifiedSnapshot(['type' => 'options']);
$optionsChain = Massive::optionsChainSnapshot('AAPL');
$optionsContract = Massive::optionsContractSnapshot('AAPL', 'O:AAPL240119C00150000');
```

Error Handling
--------------

[](#error-handling)

Failed HTTP responses throw Laravel's `Illuminate\Http\Client\RequestException` via `throw()`.

```
use Illuminate\Http\Client\RequestException;
use Pjmarshall1\Massive\Facades\Massive;

try {
    $details = Massive::tickerDetails('AAPL');
} catch (RequestException $exception) {
    report($exception);
}
```

Testing
-------

[](#testing)

Use Laravel HTTP fakes in your application tests:

```
use Illuminate\Support\Facades\Http;
use Pjmarshall1\Massive\Facades\Massive;

Http::preventStrayRequests();

Http::fake([
    'api.massive.com/v3/reference/tickers/AAPL*' => Http::response([
        'status' => 'OK',
        'results' => [
            'ticker' => 'AAPL',
        ],
    ]),
]);

$details = Massive::tickerDetails('AAPL');
```

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance93

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

63d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3826887?v=4)[Patrick Marshall](/maintainers/pjmarshall1)[@pjmarshall1](https://github.com/pjmarshall1)

---

Top Contributors

[![pjmarshall1](https://avatars.githubusercontent.com/u/3826887?v=4)](https://github.com/pjmarshall1 "pjmarshall1 (52 commits)")

### Embed Badge

![Health badge](/badges/pjmarshall1-laravel-massive/health.svg)

```
[![Health](https://phpackages.com/badges/pjmarshall1-laravel-massive/health.svg)](https://phpackages.com/packages/pjmarshall1-laravel-massive)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80732.6M276](/packages/laravel-mcp)[illuminate/auth

The Illuminate Auth package.

10528.8M1.4k](/packages/illuminate-auth)[illuminate/routing

The Illuminate Routing package.

1419.6M3.8k](/packages/illuminate-routing)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45945.2k1](/packages/pressbooks-pressbooks)[api-platform/laravel

API Platform support for Laravel

58190.1k22](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
