Download the PHP package adimiuprix/coinmarketcap without Composer

On this page you can find all versions of the php package adimiuprix/coinmarketcap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package coinmarketcap

CoinMarketCap API Client/SDK for Laravel & PHP

CoinMarketCap PHP Laravel SDK

Latest Version on Packagist PHP Version License CI Tests Coverage CodeQL Codecov

A small PHP client for the CoinMarketCap API. It works on its own or with Laravel through auto-discovery, a facade, and dependency injection.

Responses are returned as decoded associative arrays, preserving the API response shape and allowing every documented query parameter to be passed through without waiting for model updates.

Requirements

Install

Laravel discovers the service provider automatically. To publish the configuration file:

Configuration

Set the API key in .env:

COINMARKETCAP_SANDBOX_URL may be set when a custom sandbox endpoint is required. Timeout is measured in seconds; 0 disables Guzzle's timeout.

For a standalone client:

Use ->useSandbox() with a sandbox API key when testing.

Quick start

Laravel facade:

For production lookups, CoinMarketCap recommends stable cryptocurrency IDs. Use cryptocurrency()->map() to obtain them.

Every API method accepts an array of query parameters. Refer to the official API documentation for valid parameters, plan availability, credit usage, and the precise response format.

Supported endpoints

Service Methods
cryptocurrency() listingsLatest, listingsHistorical, listingsNew, quotesLatest, quotesHistorical, info, map, ohlcvLatest, ohlcvHistorical, categories, category, marketPairsLatest, pricePerformanceStatsLatest, simplePrice, airdrops, airdrop, trendingLatest, trendingGainersLosers, trendingMostVisited
exchange() listingsLatest, quotesLatest, quotesHistorical, info, map, marketPairsLatest, assets
globalMetrics() quotesLatest, quotesHistorical, fearAndGreedLatest, fearAndGreedHistorical, altcoinSeasonIndexLatest, altcoinSeasonIndexHistorical
tools() priceConversion

For example, fetch the first ten cryptocurrencies by market cap:

Errors

All API and transport errors extend ApiException. Specific response status codes map to these types:

Exception HTTP status
AuthenticationException 401
InvalidRequestException 400
NotFoundException 404
RateLimitException 429
ApiException Other API, transport, or malformed-response errors

ApiException exposes statusCode and getResponse(). RateLimitException also provides getRetryAfter(), populated from CoinMarketCap's response or the standard Retry-After header when present.

Sandbox

V3 migration

cryptocurrency()->listingsLatest(), quotesLatest(), and quotesHistorical() use CoinMarketCap's current V3 endpoints. V3 responses can differ from their V1/V2 predecessors; notably, latest quotes return data as an array of asset records rather than a symbol-keyed map. Update consumers before adopting this release and publish it as a new major version.

Testing

The test suite verifies builder validation, Laravel registration, HTTP encoding and error handling, and the endpoint paths exposed by every service method.

GitHub Actions runs the test suite on PHP 8.1–8.4, static analysis, code style checks, and PCOV coverage. The coverage workflow uploads coverage.xml to Codecov when the CODECOV_TOKEN repository secret is configured.

License

MIT


All versions of coinmarketcap with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
guzzlehttp/guzzle Version ^8.2.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
psr/http-client Version ^1.0.3
psr/http-factory Version ^1.1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package adimiuprix/coinmarketcap contains the following files

Loading the files please wait ...