Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 684 Bytes

File metadata and controls

28 lines (22 loc) · 684 Bytes

Currencyapi (CocoaPods)

Installation

pod 'Currencyapi', :git => 'https://github.com/martechdev/currencyapi-ios.git', :tag => '0.1.0'

Usage

import Currencyapi
let client = CurrencyApiClient(configuration: .init(apiKey: "YOUR_API_KEY"))
let latest = try await client.latest(["base_currency": "USD", "currencies": "EUR,GBP"]) 

Examples

Convert amount

let convert = try await client.latest(["base_currency": "USD", "currencies": "EUR"]) // then compute amount * rate

Historical range

// You can call other endpoints (add helpers as needed)