Skip to content

Official Swift SDK for OpenExchangeAPI — easy access to FX rates and currency info in iOS, macOS, and Swift-based apps.

License

Notifications You must be signed in to change notification settings

OpenExchangeAPI/sdk-swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

OpenExchangeAPI Swift SDK

Minimal, idiomatic Swift client for OpenExchangeAPI

  • All endpoints supported
  • API key is optional
  • Async/await and strong types

Installation

Add OpenExchangeApiClient.swift to your Xcode project or Swift package.

Usage

let client = OpenExchangeApiClient(apiKey: "YOUR_API_KEY") // API key optional
let latest = try await client.getLatest(base: "EUR")
print(latest.rates["USD"] ?? 0)

let precise = try await client.getLatestPrecise(base: "EUR")
print(precise.rates["USD"] ?? "0")

API Reference

  • getLatest(base: String?)
  • getLatestPrecise(base: String?)
  • getHistorical(date: String, base: String?)
  • getHistoricalPrecise(date: String, base: String?)
  • convert(from: String, to: String, amount: Double)
  • convertPrecise(from: String, to: String, amount: String)
  • listCurrencies(type: String?)
  • getCurrency(code: String)

All methods throw on error.

License

MIT

About

Official Swift SDK for OpenExchangeAPI — easy access to FX rates and currency info in iOS, macOS, and Swift-based apps.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages