Download the PHP package cointokenhub/cmc-api-php without Composer
On this page you can find all versions of the php package cointokenhub/cmc-api-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cointokenhub/cmc-api-php
More information about cointokenhub/cmc-api-php
Files in cointokenhub/cmc-api-php
Package cmc-api-php
Short Description cmc-api-php is an API Wrapper for the coinmarketcap API
License MIT
Informations about the package cmc-api-php
CoinMarketCap API Wrapper
This php package is a wrapper for the coinmarketcap.com API. It supports three endpoints:
- The ticker endpoint "/ticker", which returns all crypto currencies, and their vital statistics like price, volume, market cap and percentage changes
- The currency ticker endpoint "/ticker/
", which returns all the data in the previous endpoint, except for only the specified coin. - The global data endpoint "/global", which returns some stats like the total market cap, active currencies, active markets and so on.
Install
composer require cointokenhub/cmc-api-php
Usage
In a PHP app:
In Laravel:
Add a route to routes/web.php
that looks like below:
Controller looks like below:
Configuring for Laravel
Laravel 5.5 and higher
You don't need to change or add any config as this package uses Package Auto Discovery.
Laravel 5.4 and lower
After installing, register the CoinTokenHub\CoinMarketCapApi\CoinMarketCapServiceProvider
service provider in your config/app.php
file.
Also add the facade to your aliases
array in the config/app.php
file in order to easily access this wrapper using the CoinMarketCap
alias
All versions of cmc-api-php with dependencies
guzzlehttp/guzzle Version ^6.3
illuminate/support Version ~5.4.0|~5.5.0|~5.6.0