PHP code example of codenix-sv / messari-api

1. Go to this page and download the library: Download codenix-sv/messari-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

codenix-sv / messari-api example snippets


use Codenixsv\MessariApi\MessariClient;

$client = new MessariClient();

$data = $client->assets()->getAll();

$data = $client->assets()->getAll();

$data = $client->assets()->get('btc');

$data = $client->assets()->getProfile('btc');

$data = $client->assets()->getMetrics('btc');

$data = $client->assets()->getMarketData('btc');

$data = $client->assets()->getTimeseries('btc', 'price', ['start' => '2020-01-01', 'end' => '2020-01-07', 'interval' => '1d']);

$data = $client->markets()->getAll();

$data = $client->markets()->getTimeseries('binance-btc-usdt', 'price', ['start' => '2020-01-01', 'end' => '2020-01-07', 'interval' => '1d']);

$data = $client->news()->getAll();

$data = $client->news()->getForAsset('btc');