Skip to content

Instantly share code, notes, and snippets.

@devbanana
Last active February 2, 2020 18:56
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/29c7b98ac6a6cda2151a2a51b5b5ddf4 to your computer and use it in GitHub Desktop.
Save devbanana/29c7b98ac6a6cda2151a2a51b5b5ddf4 to your computer and use it in GitHub Desktop.
<?php
require_once 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'https://cloud.iexapis.com/stable/',
]);
$response = $client->get('stock/AAPL/quote/latestPrice', [
'query' => [
'token' => $_ENV['IEXKEY'],
],
]);
var_dump((string)$response->getBody());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment