PHP Classes

Coin Layer PHP Cryptocurrency Exchange Rates API: Get the exchange rates for crypto currencies

Recommend this page to a friend!
  Info   View files Example   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 186 All time: 8,624 This week: 79Up
Version License PHP version Categories
coinlayer 1.0.0GNU General Publi...5PHP 5, Web services, Finances
Description 

Author

This class can get the exchange rates for crypto currencies.

It can send HTTP requests to the Coin Layer API to retrieve the value of a given amount converted from one base currency to a given crypto currency supported by this API like for instance Bitcoin.

The class supports retrieving the converted amount at a given past historical date.

Innovation Award
PHP Programming Innovation award nominee
August 2018
Number 7
Crypto-currencies are very popular nowadays. There are many of those currencies and their exchange rates vary a lot every day.

This class provides a solution to get the exchange rates of many crypto-currencies today or at a given date in the past.

Manuel Lemos
Picture of Dave Smith
  Performance   Level  
Name: Dave Smith is available for providing paid consulting. Contact Dave Smith .
Classes: 51 packages by
Country: United States United States
Age: 58
All time rank: 618 in United States United States
Week rank: 11 Up3 in United States United States Up
Innovation award
Innovation award
Nominee: 32x

Winner: 7x

Example

<?php
//instantiate the class
include('coinlayer.class.php');
$coin = new coinLayer();

$coin->setEndPoint('live');

//$fixer->setParam('base','USD');
$coin->setParam('symbols','BTC, TRUMP, 611');
//$coin->setParam('start_date','2018-04-01');
//$coin->setParam('end_date','2018-04-05');
//$coin->setParam('from','BTC');
//$coin->setParam('to','USD');
//$coin->setParam('amount','10');

$coin->getResponse();

echo
'<pre>';
var_dump($coin->response);
echo
'<pre>';
die;

//$newVal = $fixer->convertTo(100,'USD');

//echo 'Test: '.$newVal;

?>


  Files folder image Files  
File Role Description
Plain text file coinlayer.class.php Class Main Class
Accessible without login Plain text file license.txt Lic. License
Accessible without login Plain text file testing.php Example Example Source

 Version Control Unique User Downloads Download Rankings  
 0%
Total:186
This week:0
All time:8,624
This week:79Up