Home
Softono

Alpha Vantage Api

Open source MIT PHP
60
Stars
24
Forks
1
Issues
10
Watchers
7 months
Last Commit

 About Alpha Vantage Api

Alpha Vantage PHP Client

Platforms

Web Self-hosted

Languages

PHP

Links

Need Help Installing Alpha Vantage Api?

We provide expert installation service for this software. Our team will install, configure, and secure Alpha Vantage Api on your server. plans start at just $30.

Alpha Vantage Api

View on GitHub

Alpha Vantage PHP Client

Build Status

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

Requirements:

Install

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

How to use it?

<?php

// Option
$option = new AlphaVantage\Options();
$option->setApiKey('YOUR_KEY');

// 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',
    ]
];