Skip to content

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

MethodPurpose
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 createOrder

Same pattern for Kucoin, Gate, Bybit, KrakPay, Okx.

Currency fields

FieldUse for
symbol / blockchaincreateOrder({ token, blockchain })
minAmountFiatMinimum fiat amount in the form (currently USD)
minAmountCryptoOptional crypto-side display
name, image, blockchainImageUI labels / icons
exchangeRateFiatMay be omitted by some providers (e.g. OKX)

Errors

CodeWhenWhat to do
SESSION_REQUIREDSession not loadedCall loadSession() first
CLIENT_DESTROYEDClient torn downCreate a new client
API_ERRORNetwork / server failureRetry

See Errors.