musheabdulhakim / coingecko
CoinGecko API client for PHP and Laravel Applications.
Fund package maintenance!
musheabdulhakim
Patreon
paystack.com/pay/musheabdulhakim
Requires
- php: ^8.2|^8.3
- illuminate/config: ^11.34
- php-http/discovery: ^1.20
- php-http/multipart-stream-builder: ^1.4
- psr/http-client: ^1.0
- psr/http-client-implementation: *
- psr/http-factory-implementation: *
- psr/http-message: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.65
- guzzlehttp/guzzle: ^7.9
- guzzlehttp/psr7: ^2.7
- pestphp/pest: ^3.5
- pestphp/pest-plugin-type-coverage: ^3.1
- phpstan/phpstan: ^1.12
- rector/rector: ^1.2
- symfony/var-dumper: ^6.4.0|^7.2.0
This package is auto-updated.
Last update: 2025-01-04 01:56:13 UTC
README
This package provides a wonderful PHP API client that allows you to interact with CoinGecko Api
This SDK is a PHP & Laravel Package, (Designed to help working with coingecko api easier and faster).
Requirement
Installation
composer require musheabdulhakim/coingecko
Basic usage
$coingecko = \MusheAbdulHakim\CoinGecko\CoinGecko::client('your-api-key'); //or $coingecko = \MusheAbdulHakim\CoinGecko\CoinGecko::client('your-api-key','https://api.coingecko.com/api', 'v3');
Example
$coingecko = \MusheAbdulHakim\CoinGecko\CoinGecko::client('your-api-key'); $ping = $coingecko->ping(); $pingTest = $ping->ping(); //or $coingecko->pingServer();
Configuration
Update api version, base url and api key
'COINGECKO_API_VERSION' => 'v3', 'COINGECKO_BASE_URI' => 'https://api.coingecko.com/api', 'COINGECKO_API_KEY' => 'xxxxxxxxxxxxxxxxxxxxxx',
Ping
ping
Check API server status
$ping = $coingecko->ping();
License
musheabdulhakim/coingecko
is released under the MIT License. See the bundled LICENSE for details.
Contribution
๐งน Keep a modern codebase with php-cs-fixer:
composer lint
๐ Run the entire test suite:
composer test
Report all your issues Here
All your pull requests are welcome :).