1. Go to this page and download the library: Download kevinrider/laravel-etrade 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/ */
kevinrider / laravel-etrade example snippets
use KevinRider\LaravelEtrade\EtradeApiClient;
use KevinRider\LaravelEtrade\Dtos\Request\GetQuotesRequestDTO;
$client = app(EtradeApiClient::class);
$authUrl = $client->getAuthorizationUrl();
// Direct the user to $authUrl->authorizationUrl and collect the verifier
$client->requestAccessTokenAndStore($verifierCode);
$quotes = $client->getQuotes(new GetQuotesRequestDTO([
'symbols' => ['AAPL', 'MSFT'],
]));