forex 0.1.0 copy "forex: ^0.1.0" to clipboard
forex: ^0.1.0 copied to clipboard

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.

9
likes
30
pub points
17%
popularity

Publisher

unverified uploader

A multi-platform API to retrieve currency exchange prices.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

finance_quote, http, logger, meta, xml

More

Packages that depend on forex