2017 © Pedro Peláez
 

library coinmarketcap

Access Coinmarketcap.com via local database wrapper

image

vorapoap/coinmarketcap

Access Coinmarketcap.com via local database wrapper

  • Monday, December 11, 2017
  • by vorapoap
  • Repository
  • 1 Watchers
  • 0 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

coinmarketcap

Store and retreive Coinmarketcap's data from local database, (*1)

Install using composer

Create composer.json file, (*2)

{
    "name": "yourproject/yourproject",
    "type": "project",
    "require": {
        "vorapoap/coinmarketcap": "*"
    }
}

and run composer update or run this command in your command line: composer require voapoap/coinmarketcap, (*3)

1. Define options

  1. Use existing PDO connection sh $options['pdo'] = $existingPDOConnection;
  2. Use new connection sh $options['host'] = 'localhost'; $options['database'] = 'coinmarketcap'; $options['user'] = 'user'; $options['password'] = 'password';

2. Create object

$coin = new Coinmarketcap($options);

On object constructing, the table will be checked for existence. If the table doesn't exist, the required table coinmarketcap is created, you can also define $options['prefix'] to prefix the table., (*4)

Other options, (*5)

Name Description
prefix Table prefix, default is none
coinmarketcap-limit Default is 100 (See [https://coinmarketcap.com/api/])
coinmarketcap-update-interval Update interval, default is 60s

3. Usage

You can also do $coin->update(150) to override default coin limit, (*6)

$coin = new Coinmarketcap($options);
$coin->update(); 
$coin->getCoin("btc");
$coin->getCoin("bitcoin");

Automtically retrieve data from Coinmarketcap base on update interval., (*7)

$coin = new Coinmarketcap($options);
$coin->getCoin("btc"); 

4. Donation

If you like this work and like to donate:, (*8)

  • BTC: 13SsoAUNv1KobhnDSZytLo71NHAGu9XxUd
  • ETH: 0x1E0d07890Cb550F18eE6B80dC5739CFe776C72b5

The Versions

11/12 2017

dev-master

9999999-dev

Access Coinmarketcap.com via local database wrapper

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

11/12 2017

v1.0

1.0.0.0

Access Coinmarketcap.com via local database wrapper

  Sources   Download

MIT

The Requires

  • php >=5.3.0