Appearance
Currencies
Load supported deposit currencies for an Exchange Pay provider.
When to use
After the user picks a provider. Use the list to build token + network + amount UI. Each row’s minAmountFiat is the minimum for the amount field.
Methods
| Method | Purpose |
|---|---|
getSupportedCurrencies({ provider }) | Promise<ExchangePaySupportedCurrency[]> for that provider |
isExchangePayProvider(provider) | Type guard — whether a payment-method provider is Exchange Pay |
Unavailable currencies are filtered out. Mins are SDK-resolved (ceiled to cents, floored at the client default of $1).
Example
ts
import {
IntegrationProvider,
Network,
TokenSymbol,
} from '@swapped/connect-sdk';
if (!client.exchangePay.isExchangePayProvider(IntegrationProvider.Binance)) {
throw new Error('Not an Exchange Pay provider');
}
const currencies = await client.exchangePay.getSupportedCurrencies({
provider: IntegrationProvider.Binance,
});
const usdt = currencies.find(
currency =>
currency.symbol === TokenSymbol.USDT &&
currency.blockchain === Network.Ethereum,
);
if (!usdt) {
throw new Error('USDT on Ethereum is not available for this session');
}
console.log(usdt.minAmountFiat, usdt.minAmountCrypto, usdt.name);
// Use usdt.symbol + usdt.blockchain when calling createOrderSame pattern for Kucoin, Gate, Bybit, KrakPay, Okx.
Currency fields
| Field | Use for |
|---|---|
symbol / blockchain | createOrder({ token, blockchain }) |
minAmountFiat | Minimum fiat amount in the form (currently USD) |
minAmountCrypto | Optional crypto-side display |
name, image, blockchainImage | UI labels / icons |
exchangeRateFiat | May be omitted by some providers (e.g. OKX) |
Errors
| Code | When | What to do |
|---|---|---|
SESSION_REQUIRED | Session not loaded | Call loadSession() first |
CLIENT_DESTROYED | Client torn down | Create a new client |
API_ERROR | Network / server failure | Retry |
See Errors.