PHPackages                             wisdom-diala/cryptocap-pkg - 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. wisdom-diala/cryptocap-pkg

ActiveLibrary

wisdom-diala/cryptocap-pkg
==========================

Package to fetch cryptocurrency price, market value, assets etc.

201.1k4[1 issues](https://github.com/wisdom-diala/cryptocap-pkg/issues)PHP

Since Aug 9Pushed 4y ago2 watchersCompare

[ Source](https://github.com/wisdom-diala/cryptocap-pkg)[ Packagist](https://packagist.org/packages/wisdom-diala/cryptocap-pkg)[ RSS](/packages/wisdom-diala-cryptocap-pkg/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

cryptocap-pkg
=============

[](#cryptocap-pkg)

Package to fetch cryptocurrency price, market value, assets etc. using coincap API endpoints. This package was developed to work with coincap api which has useful tool for real-time pricing and market activity for over 1,000 cryptocurrencies. By collecting exchange data from thousands of markets, it also offer transparent and accurate data on asset price and availability.

For all endpoints, a single page offers 100 responses by default and supports up to 2,000 responses per page upon requests.

With this package, you don't have to bother about connecting to the endpoints, it has already be taken care of by the package facades class. To get response from the enpoints, you have to just use the related facade class which will output the response in json format.

### Installation

[](#installation)

Run this composer command to install the package

```
composer require wisdom-diala/cryptocap-pkg

```

### After installing add the provider and the aliase on config/app.php

[](#after-installing-add-the-provider-and-the-aliase-on-configappphp)

```
// Provider
WisdomDiala\Cryptocap\Providers\CryptocapServiceProvider::class,
// Aliase
'Cryptocap' => WisdomDiala\Cryptocap\Facades\Cryptocap::class,
```

Below are the facades you can use to fetch the coresponding data you may need from the coincap api.

### Assets

[](#assets)

The asset price is a volume-weighted average calculated by collecting ticker data from exchanges. Each exchange contributes to this price in relation to their volume, meaning higher volume exchanges have more affect on this global price. All values are translated into USD (United States Dollar) and can be translated into other units of measurement through the /rates endpoint.

```
Cryptocap::getAssets();
```

#### Response

[](#response)

```
{
  "data": [
    {
      "id": "bitcoin",
      "rank": "1",
      "symbol": "BTC",
      "name": "Bitcoin",
      "supply": "17193925.0000000000000000",
      "maxSupply": "21000000.0000000000000000",
      "marketCapUsd": "119150835874.4699281625807300",
      "volumeUsd24Hr": "2927959461.1750323310959460",
      "priceUsd": "6929.8217756835584756",
      "changePercent24Hr": "-0.8101417214350335",
      "vwap24Hr": "7175.0663247679233209"
    },
    {
      "id": "ethereum",
      "rank": "2",
      "symbol": "ETH",
      "name": "Ethereum",
      "supply": "101160540.0000000000000000",
      "maxSupply": null,
      "marketCapUsd": "40967739219.6612727047843840",
      "volumeUsd24Hr": "1026669440.6451482672850841",
      "priceUsd": "404.9774667045200896",
      "changePercent24Hr": "-0.0999626159535347",
      "vwap24Hr": "415.3288028454417241"
    },
   ]
 }
```

### Response Data

[](#response-data)

KeyDescriptionidunique identifier for assetrankrank is in ascending order - this number is directly associated with the marketcap whereas the highest marketcap receives rank 1symbolmost common symbol used to identify this asset on an exchangenameproper name for assetsupplyavailable supply for tradingmaxSupplytotal quantity of asset issuedmarketCapUsdsupply x pricevolumeUsd24Hrquantity of trading volume represented in USD over the last 24 hourspriceUsdvolume-weighted price based on real-time market data, translated to USDchangePercent24Hrthe direction and value change in the last 24 hoursvwap24HrVolume Weighted Average Price in the last 24 hoursCoincap doc link for assets:

### Limit Assets

[](#limit-assets)

This allows you to limit the number of result you get per request.

```
Cryptocap::getAssetsWithLimit(5);
```

### Single Asset

[](#single-asset)

This allows you to fetch a single asset using the asset ID

```
Cryptocap::getSingleAsset('ethereum');
```

### Asset History

[](#asset-history)

```
Cryptocap::getAssetHistory('ethereum', 'h2');
```

The first parameter is the id of the cryptocurrency and the second parameter is point-in-time interval. minute and hour intervals represent price at that time, the day interval represents average of 24 hour periods (timezone: UTC) Coincap asset history link:

### Asset Markets

[](#asset-markets)

```
Cryptocap::getAssetMarket($id = 'ethereum', $limit = 5);
```

### Rates

[](#rates)

```
Cryptocap::getRates();
```

Coincap rates doc link:

### Single Rate

[](#single-rate)

```
Cryptocap::getSingleRate('bulgarian-lev');
```

### Exchanges

[](#exchanges)

```
Cryptocap::getExchanges();
```

Coincap exchanges doc link:

### Single Exchange

[](#single-exchange)

```
Cryptocap::getSingleExchanges('binance');
```

### Markets

[](#markets)

```
Cryptocap::getMarkets();
```

Coincap markets doc link:

### Market by exchange ID

[](#market-by-exchange-id)

```
Cryptocap::getMarketByExchangeId($exchangeId = 'poloniex');
```

### Market by quote symbol

[](#market-by-quote-symbol)

```
Cryptocap::getMarketByQuoteSymbol($quoteSymbol = 'ETH');
```

### Market by base ID

[](#market-by-base-id)

```
Cryptocap::getMarketByBaseId($baseId = 'bitcoin', $limit = 5);
```

### Market by quote ID

[](#market-by-quote-id)

```
Cryptocap::getMarketByQuoteId($quoteId = 'bitcoin', $limit = 5);
```

### Market by asset symbol

[](#market-by-asset-symbol)

```
Cryptocap::getMarketByAssetSymbol($assetSymbol = 'BTC', $limit = 5);
```

### Market by asset ID

[](#market-by-asset-id)

```
Cryptocap::getMarketByAssetId($assetId = 'bitcoin', $limit = 5);
```

### Candles

[](#candles)

```
Cryptocap::getCandles($exchange='poloniex', $interval='m1', $baseId='ethereum', $quoteId='bitcoin', $start=1528410925604, $end=1528411045607);
```

Coincap candles doc link:

You can get the full documentation and well detailed explanation of the parameters used on the facade on the link below.

Video on how to use the package:

### If you really find this useful please give us a star.

[](#if-you-really-find-this-useful-please-give-us-a-star)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity28

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/60fc15cbacd65eff41cef00e600aff3dfe17a3f40a2d8f34999ae6c71ee1eb09?d=identicon)[wisdom\_diala](/maintainers/wisdom_diala)

---

Top Contributors

[![wisdom-diala](https://avatars.githubusercontent.com/u/52057187?v=4)](https://github.com/wisdom-diala "wisdom-diala (18 commits)")

### Embed Badge

![Health badge](/badges/wisdom-diala-cryptocap-pkg/health.svg)

```
[![Health](https://phpackages.com/badges/wisdom-diala-cryptocap-pkg/health.svg)](https://phpackages.com/packages/wisdom-diala-cryptocap-pkg)
```

PHPackages © 2026

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