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 / maxAmountFiat are the amount-field bounds.

Methods ​

MethodPurpose
getSupportedCurrencies({ provider })Promise<ExchangePaySupportedCurrency[]> for that provider
getMaxAmountFiat(provider)Fiat maximum for that provider (config override, else default)
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). Max is $1,000,000 by default, or a per-method override from remote paymentMethods (KuCoin Pay $45,000, Bybit Pay $40,000).

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.maxAmountFiat, 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)
maxAmountFiatMaximum 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.