ballerinax/exchangerates Ballerina library

1.5.1

Overview

This is a generated connector from ExchangeRates-API v6 OpenAPI Specification.

With over 15 exchange rate data sources, the Exchangerates API is delivering exchanging rates data for more than 170 world currencies. The endpoints include functionalities like receiving the latest exchange rates information for a specific currency; conversion from one to another currency; receiving data Time-series for multiple or for one currency, and preserving the API daily for the fluctuation data.. More about the ExchangeRate-API can be find at ExchangeRates-API

This module supports ExchangeRates API version v6.

Prerequisites

Before using this connector in your Ballerina application, complete the following:

Quickstart

To use the ExchangeRates connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

First, import the ballerinax/exchangerates module into the Ballerina project.

Copy
import ballerinax/exchangerates;

Step 2: Create a new connector instance

You can now initialize the client.

Copy
exchangerates:Client baseClient = check new(serviceUrl = "https://v6.exchangerate-api.com/v6/");

Step 3: Invoke an operation

  1. Now you can use the operations available within the connector. Following code demonstrate how to obtain exchange rates for USD
Copy
exchangerates:CurrencyExchangeInfomation response = check baseClient->getExchangeRateFor("<API-Key>", "usd");
  1. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/exchangerates;Copy

Metadata

Released date: 10 months ago

Version: 1.5.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 

Current verison: 54


Weekly downloads


Source repository


Keywords

Finance/Accounting
Cost/Freemium

Contributors

Other versions

See more...