Alpha Vantage API client

0.11 2021-08-16 20:35 UTC

This package is auto-updated.

Last update: 2024-06-20 14:55:34 UTC


Alpha Vantage PHP Client

Build Status

The PHP-Client is a lightweight wrapper for the Alpha Vantage.



php composer.phar require kokspflanze/alpha-vantage-api

How to use it?


// Option
$option = new AlphaVantage\Options();

// Client
$client = new AlphaVantage\Client($option);
var_dump($client->foreignExchange()->currencyExchangeRate('BTC', 'CNY'));

Factory for PSR-11 Container

You can also use it with containers, using the PSR-11 standard for easy integration in a project.

You need require the suggest psr/container package:

php composer.phar require psr/container

Register the Alpha Vantage Factory:

return [
    'dependencies' => [
        'factories' => [
            'alphavantage' => \AlphaVantage\Factory\AlphaVantageFactory::class,

with the following configuration:

return [
    'alpha_vantage' => [
        'api_key' => 'APIKEY',