coinrequest / blockchair-php-api
PHP API client for BlockChair
Installs: 1 156
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 5
Open Issues: 4
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
- ext-openssl: *
- composer/ca-bundle: ^1.1
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpunit/phpunit: ^8.2
- symfony/var-dumper: ^4.3
This package is auto-updated.
Last update: 2025-03-29 00:32:37 UTC
README
PHP package for the BlockChair API.
Getting Started
Run the following command to install this package into your project.
composer require coinrequest/blockchair-php-api
Prerequisites
You will need Composer to install this package.
Installing
After installing this package with composer, create a new BlockChair instance.
Something like this
$blockChair = new BlockChair();
And call the desired endpoint
$blockChair->bitcoin->stats();
Chains:
- Bitcoin
- Ethereum
- BitcoinCash
- BitcoinSv
- Litecoin
- Dogecoin
- Dash
- Groestlcoin
The current implemented endpoints are:
- {chain}/stats
- {chain}/dashboards/block/{blockId}
- {chain}/dashboards/transaction/{txId}
- {chain}/dashboards/address/{address}
- ethereum/dashboards/uncle/{txId}
Running the tests
Run the tests in the Tests directory with PHPUnit.
Built With
- BlockChair - For the Blockchain data :)
- PHPUnit - Test Framework
- Guzzle - For HTTP Requests
Contributing
Please help us to develop this package. Every input and/or feedback is really appreciated!
License
This project is licensed under the MIT License.