-
-
Save devbanana/29c7b98ac6a6cda2151a2a51b5b5ddf4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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