Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A simple PHP wrapper class for the CoinMarketCap Public API

License

rbrotherton/CoinWrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoinWrapper

A simple PHP wrapper class for the CoinMarketCap Public API.

Usage

Simple

require "CoinWrapper.php";
$cw   = new \CoinWrapper\CoinWrapper();
$data = $cw->getTickerData("BTC");

Simple Static

require "CoinWrapper.php";
$data = \CoinWrapper\CoinWrapper::getTickerDataStatic("BTC");

Advanced

// Init
require "CoinWrapper.php";
$cw   = new \CoinWrapper\CoinWrapper();

// Return JSON instead of PHP objects
$data = $cw->getTickerData("Etherium", true);

// Get latest data for top 10 tickers
$data = $cw->getAllTickersData(10);

// Pagination
$page1 = $cw->getAllTickersData(10, 0);
$page2 = $cw->getAllTickersData(10, 10);

// Currency Conversion
$data = $cw->setCurrency("EUR")->getTickerData("Etherium");

// Debug Mode
$data = $cw->setDebug(true)->getTickerData("LTC");

// Latest Ripple quote, debug mode enabled, GBP currency, return data as JSON
$data = $cw->setDebug(true)->setCurrency("GBP")->getTickerData("XRP", true);

// Refresh ticker repository and fetch a list of all possible tickers
$cw->updateTickerRepo()->getTickers();

// Get Global data (market cap, volume, active currencies number, etc)
$cw->getGlobalData();

About

A simple PHP wrapper class for the CoinMarketCap Public API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages