adrifkat / cryptopanic
PHP unofficial client to cryptopanic.com API
1.0.0
2021-08-24 22:18 UTC
Requires
- php: ^7.4|^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.2
- netresearch/jsonmapper: ^4.0
This package is auto-updated.
Last update: 2024-11-08 19:22:03 UTC
README
CryptoPanic.com is a news aggregator platform indicating impact on price and market for traders and cryptocurrency enthusiasts. Users can vote to mark important, bullish or bearish price signals.
Install
composer require adrifkat/cryptopanic
Usage
Get your <AUTH_TOKEN> from the cryptopanic API page.
$client = new \Adrifkat\Cryptopanic\Client('<AUTH_TOKEN>'); $postsResponse = $client->getPostsRequest() ->setCurrencies(['BTC', 'XRP']) ->setFilter('bearish') ->send(); $portfolioResponse = $client->send();
Posts Request Methods
setFilter(string $value)
: You can use any of UI filters using filter. Available values: rising|hot|bullish|bearish|important|saved|lolsetCurrencies(array $currencies)
: Filter by currencies. Example: ['CURRENCY_CODE1', 'CURRENCY_CODE2']setRegions(array $regions)
: Filter by region. Available regions: en (English), de (Deutsch), nl (Dutch), es (Español), fr (Français), it (Italiano), pt (Português), ru (Русский). Example: ['en', 'nl']setKind(string $value)
: Filter by kind. Available values: news|mediasetFollowing(bool $following)
: Filter only "Following" feed - based on currencies you followsetPublic(bool $public))
: Enable public API
License
MIT