Download the PHP package qbil-software/openexchangerates without Composer

On this page you can find all versions of the php package qbil-software/openexchangerates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package openexchangerates

OpenExchangeRates

PHP client for fetching foreign exchange (fx rate) from openexchangerates.com

Installation 1) Add qbil-software/openexchangerates to composer.json file and run composer update

OR

1) Run composer require qbil-software/openexchangerates to install and add this package to composer.json file.

2) require_once 'vendor/autoload.php' in your php file and create an instance of Qbil\OpenExchangeRates\Exchange class.e.g. $exchange = new Qbil\OpenExchangeRates\Exchange($appId, $baseCurrency); where $appId is your app id and $baseCurrency is base currency.

(See https://docs.openexchangerates.org/docs/authentication for more info about app_id and https://docs.openexchangerates.org/docs/set-base-currency for more info about base currency). Default base currency is USD. If you dont wish to change base currency, don't pass second parameter.

3) You are ready to use the client now.

Methods

The client provides five public methods latest, historical, between, convert and currencies.

All methods except currencies (which accepts different arguments) can accept an associative array as argument with following keys

1) symbols or currencies - Get foreign exchange rates of only give currencies (in comma separated format).

For example
$exchange->latest(['symbols' => 'USD,EUR,GBP']) will return an array of latest foreign exchange rates of currencies USD, EUR and GBP 2) base - Even if you passed base currency as second argument to constructor, you can override it in each request adding base key to arguments array

For example
$exchange->latest(['base' => 'GBP']) will return an array of latest foreign exchange rates with respect to base currency GBP

Methods explained 1) latest - This method fetches latest foreign exchange rates. e.g. $exchange->latest() will return an array of latest exchange rates.

2) historical - This method fetches foreign exchange rates of a particular date. It has a required argument key date (yyyy-mm-dd format), i.e. the date of which foreign exchange rates you want to fetch .e.g. $exchange->historical(['date' => '2017-10-01']) will return an array of exchange rates of date 2017-10-01.

3) between - This method fetches foreign exchange rates between particular dates specified by arguments key start and end (both in yyyy-mm-dd format) .e.g. $exchange->between(['start' => '2017-10-01', 'end' => '2017-11-05']) will return an array of exchange rates of between 2017-10-01 and 2017-11-05.

4) convert - This method is used to convert any money value from one currency to another at the latest foreign exchange rates. It has three required argument keys amount, from and to. from and to are currency codes (3 letters) and amount is the amount you want to convert. e.g. $exchange->between(['amount' => '15678800', 'from' => 'USD', 'to' => 'EUR']) will return equivalent amount in EUR (as string)

5) currencies - This method returns array of all supported currencies with symbol as their key and currency as their value.

Note: Some of the above methods are only available in enterprise or ultimate edition. Please visit https://openexchangerates.com for more info


All versions of openexchangerates with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package qbil-software/openexchangerates contains the following files

Loading the files please wait ....