PHPackages                             slvler/covalent - 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. slvler/covalent

ActiveLibrary[API Development](/categories/api)

slvler/covalent
===============

Laravel covalenthq.com api service

v2.0.1(1y ago)93231MITPHPPHP ^8.2

Since Jun 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/slvler/covalenthq-service)[ Packagist](https://packagist.org/packages/slvler/covalent)[ Docs](https://github.com/slvler/covalenthq-service)[ RSS](/packages/slvler-covalent/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (12)Used By (0)

covalenthq Service
==================

[](#covalenthq-service)

[![tests](https://github.com/slvler/covalenthq-service/actions/workflows/tests.yml/badge.svg)](https://github.com/slvler/covalenthq-servicee/actions/workflows/tests.yml)[![Latest Stable Version](https://camo.githubusercontent.com/6765af8a2b3e39d57a49ac6f16ee619b4fbbfe2e7777a93402fe72e6cab4b833/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736c766c65722f636f76616c656e742e737667)](https://packagist.org/packages/slvler/covalent)[![Total Downloads](https://camo.githubusercontent.com/0d37d0ef80a9b1407cecf23b8ca7addc2ed4202db09d373578ad265df18d4be8/68747470733a2f2f706f7365722e707567782e6f72672f736c766c65722f636f76616c656e742f646f776e6c6f616473)](https://packagist.org/packages/slvler/covalent)[![License](https://camo.githubusercontent.com/a490bd777d8e33a0b7c581d0f15f3352be4f693cedfc229ead0598e30c652348/68747470733a2f2f706f7365722e707567782e6f72672f736c766c65722f636f76616c656e742f6c6963656e7365)](https://packagist.org/packages/slvler/covalent)

An api service for covalenthq.com

Requirements
------------

[](#requirements)

- PHP 8.2
- Laravel 9.x | 10.x | 11.x

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

[](#installation)

To install this package tou can use composer:

```
composer require slvler/covalent
```

Usage
-----

[](#usage)

- First, you should extract the config/covalent.php file to the config folder.

```
php artisan vendor:publish --tag=covalent
```

- First of all we'll add the API key and API Url of the service we're using to our .env file of our project. API key to be obtained from covalenthq.com address should be declared.

```
COVALENTHQ_BASE_URL=https://api.covalenthq.com
COVALENTHQ_API_KEY=YOUR-API-KEY
```

- This is how you can connect to the covalenthq service.

```
$covalenthq = new BaseApi();
```

- Given chain\_id and wallet address, return current token balances along with their spot prices. This endpoint supports a variety of token standards like ERC20, ERC721 and ERC1155.

```
$covalenthq->getBalancesForAddress('1','demo.eth');
```

- Given chain\_id and wallet address , return wallet value for the last 30 days at 24 hour interval timestamps.

```
$covalenthq->getHistoricalPortfolio('1','demo.eth');
```

- Given chain\_id, wallet address and contract-address , return all ERC20 token contract transfers along with their historical prices at the time of their transfer.

```
$covalenthq->getERC20token('1','0x197e3eCCD00F07B18205753C638c3E59013A92bf','0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48');
```

- Given chain\_id and wallet address, return a paginated list of token holders. If block-height is omitted, the latest block is used.

```
$covalenthq->getTokenHolders('1','0x3883f5e181fccaf8410fa61e12b59bad963fb645');
```

- Given chain\_id and wallet address, return a paginated list of token holders and their current/historical balances, where the token balance of the token holder changes between starting-block and ending-block.

```
$covalenthq->getChangesInToken('1','0x3883f5e181fccaf8410fa61e12b59bad963fb645','12500100','13210000');
```

- Given chain\_id and contract\_address, return a list of all token IDs for the NFT contract on the blockchain.

```
$covalenthq->getNFTTokenIDs('1','0xe4605d46fd0b3f8329d936a8b258d69276cba264');
```

- Given chain\_id,contract\_address and token\_id, return a list of transactions.

```
$covalenthq->getNFTTransactions('1','0xe4605d46fd0b3f8329d936a8b258d69276cba264','123');
```

- Given chain\_id, contract\_address and token\_id, fetch and return the external metadata. Both ERC721 as well as ERC1155 standards are supported.

```
$covalenthq->getNFTExternalMetadata('1','0xe4605d46fd0b3f8329d936a8b258d69276cba264','123');
```

- Given chain\_id and wallet address, return all transactions along with their decoded log events. This endpoint does a deep-crawl of the blockchain to retrieve all kinds of transactions that references the address including indexed topics within the event logs.

```
$covalenthq->getTransactionsAddress('1','0xa79E63e78Eec28741e711f89A672A4C40876Ebf3');
```

- Given chain\_id and tx\_hash, return the transaction data with their decoded event logs.

```
$covalenthq->getTransaction('1','0xbda92389200cadac424d64202caeab70cd5e93756fe34c08578adeb310bba254');
```

- Given chain\_id and block\_height, return a single block at block\_height. If block\_height is set to the value latest, return the latest block available.

```
$covalenthq->getBlock('11297108109','latest');
```

- Given chain\_id, start\_date and end\_date, return all the block height(s) of a particular chain within a date range. If the end\_date is set to latest, return every block height from the start\_date to now.

```
$covalenthq->getBlockHeights('1','2021-01-01','2021-01-03');
```

- Given chain\_id and contract address, return a paginated list of decoded log events emitted by a particular smart contract.

```
$covalenthq->getContractAddress('1','0xc0da01a04c3f3e0be433606045bb7017a7323e38','12115107','12240004');
```

- Given chain\_id and topic hash(es), return a paginated list of decoded log events with one or more topic hashes separated by a comma.

```
$covalenthq->getTopicHashes('1','0x804c9b842b2748a22bb64b345453a3de7ca54a6ca45ce00d415894979e22897a','12500000','12500100','0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9');
```

- Returns a list of all chains.

```
$covalenthq->getAllChains();
```

- Returns a list of all chain statuses.

```
$covalenthq->getallChainStatuses();
```

### Testing

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [slvler](https://github.com/slvler)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/slvler/covalenthq-service/blob/main/LICENSE.md) for more information.

Contributing
------------

[](#contributing)

You're very welcome to contribute. Please see [CONTRIBUTING](https://github.com/slvler/covalenthq-service/blob/main/CONTRIBUTING.md) for details.

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance40

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 95% 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

Every ~118 days

Recently: every ~175 days

Total

7

Last Release

503d ago

Major Versions

v1.2.1 → v2.0.02024-12-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ab8128832fb3e8a0d513453a903d7c49475f5f89dbf7ec39cf1d0518026b7ea?d=identicon)[slvler](/maintainers/slvler)

---

Top Contributors

[![selviler](https://avatars.githubusercontent.com/u/56368718?v=4)](https://github.com/selviler "selviler (38 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (2 commits)")

---

Tags

apiapi-clientclientclient-servercovalenthqlaravellaravel-frameworklaravel9packagephplaravelmultichaincovalenthq

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/slvler-covalent/health.svg)

```
[![Health](https://phpackages.com/badges/slvler-covalent/health.svg)](https://phpackages.com/packages/slvler-covalent)
```

###  Alternatives

[dariusiii/tmdb-laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

1821.1k](/packages/dariusiii-tmdb-laravel)[madeitbelgium/wordpress-php-sdk

WordPress Laravel PHP SDK

4422.9k1](/packages/madeitbelgium-wordpress-php-sdk)[gufy/whmcs

WHMCS API for Laravel 5

211.7k](/packages/gufy-whmcs)

PHPackages © 2026

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