Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Exchanger Laravel Package

florianv/exchanger

Exchange rate provider layer for PHP: 30+ rate services behind one ExchangeRateService interface. Supports historical rates, chain fallback between providers, and PSR-16 caching. Use when you need more control than higher-level libraries.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. Buy: Buy – Avoid reinventing the wheel for currency conversion logic, API integrations, and fallback mechanisms. This package eliminates the need to build and maintain custom exchange rate services, reducing technical debt and accelerating time-to-market.
  • Feature Expansion: Enable real-time and historical currency conversion across 30+ providers (e.g., fastFOREX, European Central Bank, national banks) with a unified interface. Supports multi-provider fallback chains for reliability.
  • Roadmap Priorities:
    • Globalization: Add support for cryptocurrencies (e.g., via CoinLayer) or niche markets (e.g., national banks like the Bulgarian National Bank) to expand product reach.
    • Cost Optimization: Leverage free tiers (e.g., European Central Bank for EUR-based conversions) while scaling with paid providers (e.g., fastFOREX) as demand grows.
    • Performance: Implement PSR-16 caching to reduce API calls and latency for high-frequency conversions (e.g., e-commerce carts, financial dashboards).
  • Use Cases:
    • E-commerce: Dynamic pricing in multiple currencies with fallback to free providers if primary APIs fail.
    • Financial Apps: Historical rate analysis for reporting or compliance (e.g., "Show EUR/USD rates from 2020").
    • Internal Tools: Build a currency conversion microservice for other teams (e.g., "Convert $X to Y for all orders").
    • Framework Integrations: Extend Laravel/Symfony apps with Swap (higher-level API) or use Exchanger directly for custom logic (e.g., signed requests, mTLS).

When to Consider This Package

  • Adopt if:

    • You need >1 currency pair or historical rates (not just static values).
    • Your app requires high reliability (e.g., fallback chains for API failures).
    • You’re using Laravel/Symfony and want to integrate with Swap (higher-level API) or need fine-grained control over providers/caching.
    • You’re building a scalable system (e.g., caching reduces API costs; chaining improves uptime).
    • You need 30+ providers without writing custom integrations (e.g., for global markets).
  • Look elsewhere if:

    • You only need 1 static rate (e.g., "USD to EUR = 0.92"). Use a hardcoded value or a simpler API.
    • Your stack isn’t PHP 8.2+ (minimum requirement).
    • You need blockchain-specific rates (consider dedicated crypto APIs like CoinGecko).
    • You’re not using PSR-16 caching (though the package supports it, it’s optional).
    • You want real-time WebSocket updates (this is a REST-focused library).

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us eliminate custom currency conversion code while supporting 30+ global providers—from free public APIs (e.g., European Central Bank) to premium services (e.g., fastFOREX). It’s like having a Swiss Army knife for FX rates:

  • Reliability: If one API fails (e.g., due to rate limits), it automatically falls back to another.
  • Cost Efficiency: Use free tiers for EUR-based conversions; scale to paid providers for broader coverage.
  • Speed: Built-in caching reduces API calls, cutting latency and costs.
  • Future-Proof: Easy to add new providers or swap them out as needs change. For e-commerce, financial tools, or global apps, this saves months of dev work and ensures we’re not locked into a single provider."

For Engineering:

*"Exchanger is the provider layer behind Swap—use it when you need:

  • Custom provider chains (e.g., fastFOREX → ECB → National Bank of Ukraine).
  • PSR-16 caching (e.g., Redis) to avoid hitting API limits.
  • Historical rates (e.g., for audits or analytics).
  • Fine-grained control over HTTP clients (e.g., add middleware for retries or observability). If you just need a simple conversion, use Swap. For everything else, this is the low-level toolkit to build it right. Key tradeoffs:
  • Pros: 30+ providers, fallback logic, caching, and PHP 8.2+ performance.
  • Cons: Requires PHP 8.2+; not a drop-in for real-time WebSocket data. Pair with Laravel Swap or Symfony Swap for framework integrations."
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata