Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Supporting fiat currencies

List fiat currencies API docs

You can get the full details of supported fiat currencies, such as symbols and localized names:

Rust
let response = sdk.list_fiat_currencies().await?;
Swift
let response = try await sdk.listFiatCurrencies()
Kotlin
try {
    val response = sdk.listFiatCurrencies()
} catch (e: Exception) {
    // handle error
}
Javascript
const response = await sdk.listFiatCurrencies()
React Native
const response = await sdk.listFiatCurrencies()
Flutter
ListFiatCurrenciesResponse response = await sdk.listFiatCurrencies();
Python
try:
   response = await sdk.list_fiat_currencies()
except Exception as error:
   print(error)
   raise
Go
response, err := sdk.ListFiatCurrencies()

if sdkErr := err.(*breez_sdk_spark.SdkError); sdkErr != nil {
    return nil, err
}

Fetch fiat rates API docs

To get the current BTC rate in the various supported fiat currencies:

Rust
let response = sdk.list_fiat_rates().await?;
Swift
let response = try await sdk.listFiatRates()
Kotlin
try {
    val response = sdk.listFiatRates()
} catch (e: Exception) {
    // handle error
}
Javascript
const response = await sdk.listFiatRates()
React Native
const response = await sdk.listFiatRates()
Flutter
ListFiatRatesResponse response = await sdk.listFiatRates();
Python
try:
   response = await sdk.list_fiat_rates()
except Exception as error:
   print(error)
   raise
Go
response, err := sdk.ListFiatRates()

if sdkErr := err.(*breez_sdk_spark.SdkError); sdkErr != nil {
    return nil, err
}