atepam / laravel-alphavantage-client
AlphaVantage Client for Laravel
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/atepam/laravel-alphavantage-client
Requires
- php: ^8.1
- illuminate/console: ^11.16.0
- illuminate/support: ^11.16
Requires (Dev)
- laravel/pint: ^1.16
- mockery/mockery: ^1.6
- orchestra/testbench: ^9.2
- pestphp/pest: ^2.34
- phpstan/phpstan: ^1.11
README
Installation
composer require atepam/laravel-alphavantage-client
Configuration
php artisan vendor:publish --provider="Atepam\AlphavantageClient\Providers\LatestPriceClientProvider" --tag="config"
Services
Latest Price
https://www.alphavantage.co/documentation/#latestprice
Usage
Via facade
$data = AVLatestPrice::getLatestPrice('IBM');
Or via DI container
<?php namespace App; use Atepam\AlphavantageClient\Services\LatestPrice; class ThisIsTheClass { public function __construct( public readonly LatestPrice $avLatestPrice, ) { // } public function getLatestPrice(string $symbol): array { return $this->avLatestPrice->getLatestPrice($symbol); } }
Or instantiate
use Atepam\AlphavantageClient\Services\LatestPrice; $client = app(LatestPrice::class); $data = $client->getLatestPrice('IBM');