Download the PHP package houseofapis/currencyapi without Composer

On this page you can find all versions of the php package houseofapis/currencyapi. 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 currencyapi

CurrencyApi PHP wrapper

Latest Stable Version License Build Status Coverage Status

CurrencyApi.net provides live currency rates via a REST API. A live currency feed for over 152 currencies, including physical (USD, GBP, EUR + more) and cryptos (Bitcoin, Litecoin, Ethereum + more). A JSON and XML currency api updated every 60 seconds.

Features:

Signup for a free or paid account here.

This package is a:

PHP wrapper for CurrencyApi.net endpoints.

Developer Guide

For an easy to following developer guide, check out our PHP Developer Guide.

Alternatively keep reading below.

Prerequisites

Test Coverage

Installation

Using composer:

then include the package with:

Without composer:

Usage

Live rates:

Example with all available methods:

Available methods for rates endpoint

Methods Description
setBase() The base currency you wish you receive the currency conversions for. This will output all currency conversions for that currency. Default: USD.
setOutput() Response output in either JSON or XML. Default: JSON.
setLimit() Limit which currency conversions are returned using the limit param. Comma separated (no space) values. Optional


List of available currencies:

Example with all available methods:

Available methods for currencies endpoint

Methods Description
setOutput() Response output in either JSON or XML. Default: JSON.


Convert:

Available methods for convert endpoint

Methods Description
setAmount() The value of the currency you want to convert from. This should be a number and can contain a decimal place. Required.
setFrom() The currency you want to convert. This will be a three letter ISO 4217 currency code from one of the currencies we have rates for. Required.
setTo() The currency you want to convert the amount 'to'. Again this will be a three letter currency code from the ones we offer. Required.
setOutput() Response output in either JSON or XML. Default: JSON.


Historical:

Example with all available methods:

Available methods for historical endpoint

Methods Description
setDate() The historical date you wish to receive the currency conversions for. This should be formatted as YYYY-MM-DD. Required.
setBase() The base currency you wish you receive the currency conversions for. This will output all currency conversions for that currency. Default: USD.
setOutput() Response output in either JSON or XML. Default: JSON.
setLimit() Limit which currency conversions are returned using the limit param. Comma separated (no space) values. Optional


Timeframe:

Example with all available methods:

Available methods for timeframe endpoint

Methods Description
setStartDate() The historical date you wish to receive the currency conversions from. This should be formatted as YYYY-MM-DD. Required.
setEndDate() The historical date you wish to receive the currency conversions until. This should be formatted as YYYY-MM-DD. Required.
setBase() The base currency you wish you receive the currency conversions for. This will output all currency conversions for that currency. Default: USD.
setOutput() Response output in either JSON or XML. Default: JSON.
setLimit() Limit which currency conversions are returned using the limit param. Comma separated (no space) values. Optional

All versions of currencyapi with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0|^8
ext-curl Version *
ext-json Version *
ext-simplexml Version *
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 houseofapis/currencyapi contains the following files

Loading the files please wait ....