dev-master
9999999-devAccess Coinmarketcap.com via local database wrapper
MIT
The Requires
- php >=5.3.0
v1.0
1.0.0.0Access Coinmarketcap.com via local database wrapper
MIT
The Requires
- php >=5.3.0
Access Coinmarketcap.com via local database wrapper
Store and retreive Coinmarketcap's data from local database, (*1)
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)
sh
$options['pdo'] = $existingPDOConnection;
sh
$options['host'] = 'localhost';
$options['database'] = 'coinmarketcap';
$options['user'] = 'user';
$options['password'] = 'password';
$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 |
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");
If you like this work and like to donate:, (*8)
Access Coinmarketcap.com via local database wrapper
MIT
Access Coinmarketcap.com via local database wrapper
MIT