PHPackages                             morningstardevops/opensea-sdk - 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. [API Development](/categories/api)
4. /
5. morningstardevops/opensea-sdk

ActiveLibrary[API Development](/categories/api)

morningstardevops/opensea-sdk
=============================

An Opensea SDK for PHP Development

04PHP

Since May 27Pushed 11mo agoCompare

[ Source](https://github.com/MorningStarDevOps/opensea-sdk-v2)[ Packagist](https://packagist.org/packages/morningstardevops/opensea-sdk)[ RSS](/packages/morningstardevops-opensea-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

OpenSea SDK
===========

[](#opensea-sdk)

This package will help you to integrate Opensea API to your Laravel Project or PHP Project

Features
--------

[](#features)

- Get Collection
- Get Collection Statistic
- Validate NFT Owner by TokenID

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

[](#installation)

Install the package in your Laravel Project.

```
composer require morningstardevops/opensea-sdk
```

Usage
-----

[](#usage)

#### Publish configuration :

[](#publish-configuration-)

Before initializing the package, make sure you have publish the configuration file by typing the code below.

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

#### Environment:

[](#environment)

You need to define the API at your .env file.

```
OPENSEA_APIKEY=[opensea api key]
OPENSEA_COLLECTION=[the collection slug from opensea]
```

#### Get Collection

[](#get-collection)

This function is used to retrieve more in-depth information about an individual collection, including real time statistics such as floor price.

```
$collection = 'moondogz-official';
$opensea = Opensea::get_collection($collection);
return $opensea;
```

The variable collection was an optional if you have declare the OPENSEA\_COLLECTION in the .env file.

#### Get Collection Statistic

[](#get-collection-statistic)

This function can be used to fetch stats for a specific collection, including real-time floor price data.

```
$collection = 'moondogz-official';
$opensea = Opensea::get_collection_stat($collection);
return $opensea;
```

The variable collection was an optional if you have declare the OPENSEA\_COLLECTION in the .env file.

#### Get Collection Statistic

[](#get-collection-statistic-1)

This function is used to fetch information about a single NFT, based on its contract address and token ID. The response will contain an Asset Object.

```
$wallet = '0x4f14d3d1D3D95cd54Aa2812cAC3ce729dD8CDcf0';
$opensea = Opensea::validate_owner($wallet, null, 'moondogz-official');
return $opensea;
```

The variable collection was an optional if you have declare the OPENSEA\_COLLECTION in the .env file. The second parameter was the field to put the tokenID of the NFT's.

#### Retrieve Listings

[](#retrieve-listings)

This function is used to get latest order from certain token\_id. If the NFT was ON sale, the order array will show the result but if the NFT was NOT IN sale the data will be empty (array).

##### ONLY WORKS FOR THE NFT THAT ON SALE THAT TIME

[](#only-works-for-the-nft-that-on-sale-that-time)

```
$contractAddr = '0xd2f668a8461d6761115daf8aeb3cdf5f40c532c6';
$opensea = Opensea::getListing('909', $contractAddr);
return $opensea;
```

#### Retrieve Offers

[](#retrieve-offers)

This function is used to get offers while the NFT was not in sale. the order array will show the result but if the NFT was IN sale the data will be empty (array).

##### ONLY WORKS FOR THE NFT THAT NOT ON SALE THAT TIME

[](#only-works-for-the-nft-that-not-on-sale-that-time)

```
$contractAddr = '0xd2f668a8461d6761115daf8aeb3cdf5f40c532c6';
$opensea = Opensea::getOffers('909', $contractAddr);
return $opensea;
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fed6727a2d2a00f9516b2462f68f9ea02a546136b165ac028b6fd97fc4d86cb2?d=identicon)[MorningStarDevOps](/maintainers/MorningStarDevOps)

---

Top Contributors

[![MorningStarDevOps](https://avatars.githubusercontent.com/u/208629002?v=4)](https://github.com/MorningStarDevOps "MorningStarDevOps (1 commits)")

### Embed Badge

![Health badge](/badges/morningstardevops-opensea-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/morningstardevops-opensea-sdk/health.svg)](https://phpackages.com/packages/morningstardevops-opensea-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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