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
getPreferredCurrencyToReceive()Session default receive token, or null
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 usdc = currencies.find(
  currency =>
    currency.symbol === TokenSymbol.USDC &&
    currency.blockchain === Network.Solana,
);

if (!usdc) {
  throw new Error('USDC on Solana is not available for this session');
}

console.log(usdc.minAmountFiat, usdc.minAmountCrypto, usdc.name);
// Use usdc.symbol + usdc.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.