PHP code example of elvismdev / intrinio

1. Go to this page and download the library: Download elvismdev/intrinio 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/ */

    

elvismdev / intrinio example snippets



lvismdev\Intrinio\Intrinio;

$intrinio = new Intrinio(
	'INTRINIO_API_USERNAME',
	'INTRINIO_API_PASSWORD'
	);

// All companies covered by Intrinio.
$companies = $intrinio->request('companies');
print_r($companies);

// Single company information
$params = [
'identifier'	=> 'AAPL'
];
$company = $intrinio->request(
	'companies',
	$params
	);
print_r($company);

// Historical data for single company.
$params = [
'identifier'	=> 'AAPL'
];
$historical_data = $intrinio->request(
	'historical_data',
	$params
	);
print_r($historical_data);

// Total current assets data for single company, in a quaterly period.
$params = [
'identifier'	=> 'AAPL',
'item'		=> 'totalcurrentassets',
'type'		=> 'QTR'
];
$totalcurrentassets = $intrinio->request(
	'historical_data',
	$params
	);
print_r($totalcurrentassets);