Skip to content

Instantly share code, notes, and snippets.

@devbanana
Last active February 3, 2020 03:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devbanana/a7e0a936691e763fd912a98086ddc763 to your computer and use it in GitHub Desktop.
Save devbanana/a7e0a936691e763fd912a98086ddc763 to your computer and use it in GitHub Desktop.
Get company data from IEX
<?php
require_once 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://cloud.iexapis.com/stable/',
]);
$response = $client->get('stock/AAPL/company', [
'query' => [
'token' => $_ENV['IEXKEY'],
],
]);
echo $response->getBody() . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment