forex 0.1.0

Dart native
Flutter Android iOS

A multi-platform API to retrieve currency exchange prices.

A Dart plugin for retrieving currency exchange rates.

pub package Build Status

This package provides a set of high-level functions and classes that make it easy to retrieve currency exchange rates. It's platform-independent, supports iOS and Android.

Using #

The easiest way to use this library is via the top-level functions. They allow you to make currency exchange rate requests with minimal hassle:

  Map<String, num> quotes = await Forex.fx(
      quoteProvider: QuoteProvider.yahoo,
      base: 'USD',
      quotes: <String>['EUR']);

  print('Number of quotes retrieved: ${quotes.keys.length}.');
  print('Exchange rate USDEUR: ${quotes['USDEUR']}.');

If you're making multiple quote requests to the same server, you can request all of them in a single function call:

  quotes = await Forex.fx(
      quoteProvider: QuoteProvider.ecb,
      base: 'JPY',
      quotes: <String>['EUR', 'USD']);

  print('Number of quotes retrieved: ${quotes.keys.length}.');
  print('Exchange rate JPYEUR: ${quotes['JPYEUR']}.');
  print('Exchange rate JPYUSD: ${quotes['JPYUSD']}.');

Supported providers #

  • European Central Bank (ECB)
  • Yahoo

TERMS & CONDITIONS #

Quote information fetched through this module is bound by the quote providers terms and conditions.

2
likes
80
pub points
61%
popularity

A multi-platform API to retrieve currency exchange prices.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

ingenieroporelmundo@gmail.com

License

BSD (LICENSE)

Dependencies

finance_quote, http, logger, meta, xml

More

Packages that depend on forex