PHPackages                             houseofapis/magento2-currencyapi-importer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. houseofapis/magento2-currencyapi-importer

ActiveMagento2-module[API Development](/categories/api)

houseofapis/magento2-currencyapi-importer
=========================================

Magento 2 Currency Exchange Rate Importer for CurrencyApi.net - Real-time currency rates with automatic updates

1.0.0(7mo ago)061MITPHPPHP ^8.1 || ^8.2

Since Oct 2Pushed 6mo agoCompare

[ Source](https://github.com/houseofapis/magento2-currencyapi-importer)[ Packagist](https://packagist.org/packages/houseofapis/magento2-currencyapi-importer)[ Docs](https://currencyapi.net)[ RSS](/packages/houseofapis-magento2-currencyapi-importer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Live Exchange Rates for Magento 2 using CurrencyApi.net
=======================================================

[](#live-exchange-rates-for-magento-2-using-currencyapinet)

A Magento 2 extension that integrates with [CurrencyApi.net](https://currencyapi.net) to provide real-time currency exchange rates. A great alternative to Fixer.io.

Features
--------

[](#features)

- Real-time currency exchange rates from CurrencyApi.net
- Easy configuration through Magento admin
- Support for all major currencies
- Automatic rate updates via cron
- Secure API key storage
- Error handling and retry logic
- Comprehensive unit test coverage
- Docker-based development environment

Installation
------------

[](#installation)

### Method 1: Composer from Packagist (Recommended)

[](#method-1-composer-from-packagist-recommended)

```
composer require houseofapis/magento2-currencyapi-importer
```

### Method 2: Composer from Magento Marketplace

[](#method-2-composer-from-magento-marketplace)

1. **Get your extension information**:

    - Log in to [Commerce Marketplace](https://marketplace.magento.com) with your account
    - Click **Your name** &gt; **My Profile**
    - Click **My Purchases**
    - Find the extension and note the component name and version
2. **Ensure your `composer.json` includes the Magento repository**:

    ```
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ]
    ```
3. **Install the extension with the specific version**:

    ```
    composer require houseofapis/magento2-currencyapi-importer:1.0.0
    ```
4. **Enter your authentication keys** when prompted (your public key is your username; your private key is your password)

### Method 3: Manual Installation

[](#method-3-manual-installation)

1. Download the extension files
2. Copy to `app/code/HouseOfApis/CurrencyApi/`

### Post-Installation Steps

[](#post-installation-steps)

After installing using any method above, run these commands:

```
# Enable the module
php bin/magento module:enable HouseOfApis_CurrencyApi

# Update the database schema
php bin/magento setup:upgrade

# Compile dependency injection
php bin/magento setup:di:compile

# Verify the module is enabled
php bin/magento module:status HouseOfApis_CurrencyApi

# Clean the cache
php bin/magento cache:clean
```

> **Note**: If you encounter any issues loading the storefront, run `php bin/magento cache:flush` to completely flush all caches.

API Key
-------

[](#api-key)

**You need an API key to use this extension.**

Get your API key by creating a free account at [CurrencyApi.net](https://currencyapi.net):

- Free plan: USD base currency only
- Paid plans: Required to change the base currency (for example to EUR, GBP, etc.)

Configuration
-------------

[](#configuration)

[![Add Magento Api Key](docs/screenshots/magento_api_key.png "Add Api Key")](docs/screenshots/magento_api_key.png)

1. Go to **Stores &gt; Configuration &gt; General &gt; Currency Setup**
2. Select **CurrencyApi.net**
3. Enter your API key from [CurrencyApi.net](https://currencyapi.net)
4. Configure connection timeout if needed
5. Save configuration

Importing Currency Rates
------------------------

[](#importing-currency-rates)

[![Select CurrencyApi.net import service](docs/screenshots/magento_import.png "Import")](docs/screenshots/magento_import.png)

1. Go to **Stores &gt; Currency Rates**
2. Click Import Service and select CurrencyApi.net
3. Click the Import button

[![Save Imported Currencies](docs/screenshots/magento_import_success.png "Save")](docs/screenshots/magento_import_success.png)

1. The new rates will now be imported
2. Click Save Currency Rates to apply

Requirements
------------

[](#requirements)

- Magento 2.4.0 or higher
- PHP 8.1 or higher
- Valid CurrencyApi.net API key
- cURL extension enabled

Magento Version Compatibility
-----------------------------

[](#magento-version-compatibility)

Magento VersionExtension VersionStatus2.4.0 - 2.4.71.0.0✅ Supported2.4.8+1.0.0✅ SupportedCurrency List
-------------

[](#currency-list)

We supply up to 152 fiat currencies, cryptos and precious metals.

By default, Magento does not support cryptos and precious metals and there maybe some old currencies that are available on Magento but not available from our API.

For a full list of the currencies we supply, head over to [our currency list](https://currencyapi.net/currency-list/) page.

Development
-----------

[](#development)

### Running Tests

[](#running-tests)

This extension includes comprehensive unit tests. You can run them using Docker:

```
# Run all tests
make test

# Run tests with verbose output
make test-verbose

# Run tests with coverage report
make test-coverage

# Run specific test file
make test-specific

# Clean up Docker resources
make clean
```

### Test Structure

[](#test-structure)

- `Test/Unit/` - Unit tests with mocked dependencies
- `Test/Fixtures/` - JSON fixtures for API responses
- `Test/Stubs/` - Magento interface stubs for testing
- Tests cover API integration, error handling, and configuration parsing

### Project Structure

[](#project-structure)

```
├── Model/Currency/Import/
│   └── CurrencyApi.php          # Main import service
├── Test/
│   ├── Unit/                    # Unit tests
│   ├── Fixtures/                # Test data
│   └── Stubs/                   # Magento stubs
├── composer.json                # Package definition
├── registration.php             # Magento module registration
└── README.md                    # This file

```

Troubleshooting
---------------

[](#troubleshooting)

### Common Issues

[](#common-issues)

**Currency rates not updating:**

- Verify your API key is correct
- Check if cron jobs are running
- Ensure your server can reach currencyapi.net

**"No API Key was specified" error:**

- Go to Stores &gt; Configuration &gt; Currency &gt; Currency Rates
- Select "CurrencyApi.net" as import service
- Enter your API key and save

**Test failures:**

- Run `make test` to verify all tests pass
- Check Docker is running if using containerized tests

Support
-------

[](#support)

For support and questions, please contact:

- Email:
- Website: [CurrencyApi.net](https://currencyapi.net)

License
-------

[](#license)

MIT License - see LICENSE file for details.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance65

Regular maintenance activity

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

222d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fe7508b09c42fb99ea38d757a3c1f4f2def03a5aca7e37cdecc997233f901e7?d=identicon)[houseofapis](/maintainers/houseofapis)

---

Top Contributors

[![oligirling](https://avatars.githubusercontent.com/u/42932986?v=4)](https://github.com/oligirling "oligirling (11 commits)")

---

Tags

currencymagentoecommerceexchange ratescurrency-converterforexmagento2currencyapicurrency-apireal-time-rates

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/houseofapis-magento2-currencyapi-importer/health.svg)

```
[![Health](https://phpackages.com/badges/houseofapis-magento2-currencyapi-importer/health.svg)](https://phpackages.com/packages/houseofapis-magento2-currencyapi-importer)
```

###  Alternatives

[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8044.5M33](/packages/smile-elasticsuite)[otherguy/php-currency-api

A PHP API Wrapper to offer a unified programming interface for popular Currency Rate APIs.

2526.2k](/packages/otherguy-php-currency-api)[tinify/magento2

Make your web shop faster by compressing your JPEG and PNG images. This plugin automatically optimizes your images by integrating with the popular image compression services TinyJPG and TinyPNG.

4345.8k](/packages/tinify-magento2)[sehrling/elasticsuite-ghost-cleaner

Magento 2 module to delete ghost indices automatically for the Smile Elasticsuite module

1789.0k](/packages/sehrling-elasticsuite-ghost-cleaner)[collab/module-speculation-rules

Magento 2 module which adds support for Speculation Rules API for instant page loads.

108.5k](/packages/collab-module-speculation-rules)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
