These endpoints provide information about supported cryptocurrencies, fiat currencies, payment methods, and regional availability.

Get Supported Cryptocurrencies

GET /v1/currencies/crypto-currencies

Returns all supported cryptocurrencies with their contract addresses and network information.

Request Headers

X-API-Key: your_api_key_here

Response

{
    "currencies": [
        {
            "symbol": "USDC",
            "name": "USD Coin",
            "networks": [
                {
                    "name": "base",
                    "chainId": 8453,
                    "contractAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                    "decimals": 6
                },
                // ...
            ]
        },
        // ...
    ]
}

Get Supported Fiat Currencies

GET /v1/currencies/fiat-currencies

Returns supported fiat currencies with payment options and limits.

Request Headers

X-API-Key: your_api_key_here

Response

{
    "currencies": [
        {
            "symbol": "EUR",
            "supportingCountries": [
                "US",
                // ...
            ],
            "logoSymbol": "EUR",
            "name": "Euro",
            "paymentOptions": [
                {
                    "name": "Credit/Debit Card",
                    "id": "card",
                    "minAmount": "10",
                    "maxAmount": "5000",
                    "supportedCountries": [
                        "US",
                        // ...
                    ]
                },
                {
                    "name": "Bank Transfer",
                    "id": "bank_transfer",
                    "minAmount": "50",
                    "maxAmount": "10000",
                    "supportedCountries": [
                        "AT",
                        // ...
                    ]
                }
            ],
            "isPopular": true,
            "isAllowed": true,
            "roundOff": 2
        },
        // ...
    ]
}

Get Supported Countries

GET /v1/currencies/supported-countries

Returns list of supported countries.

Request Headers

X-API-Key: your_api_key_here

Response

{
    "supportedCountries": [
        {
            "code": "US",
            "name": "United States",
            "region": "North America"
        },
        // ...
    ],
    "blockedCountries": [
        {
            "code": "AF",
            "name": "Afghanistan",
            "reason": "Regulatory restrictions"
        },
        // ...
    ]
}

Integration Examples

Get All Configuration Data

class CurrencyConfig {
  constructor(apiKey) {
    this.apiKey = apiKey;
    this.baseUrl = 'https://api-ramp.kryptonim.dev/v1'; // Testnet URL
  }

  async getCryptoCurrencies() {
    const response = await fetch(`${this.baseUrl}/v1/currencies/crypto-currencies`, {
      headers: { 'X-API-Key': this.apiKey }
    });
    return response.json();
  }

  async getFiatCurrencies() {
    const response = await fetch(`${this.baseUrl}/v1/currencies/fiat-currencies`, {
      headers: { 'X-API-Key': this.apiKey }
    });
    return response.json();
  }

  async getSupportedCountries() {
    const response = await fetch(`${this.baseUrl}/v1/currencies/supported-countries`, {
      headers: { 'X-API-Key': this.apiKey }
    });
    return response.json();
  }

  async getAllConfig() {
    const [crypto, fiat, countries] = await Promise.all([
      this.getCryptoCurrencies(),
      this.getFiatCurrencies(),
      this.getSupportedCountries()
    ]);

    return { crypto, fiat, countries };
  }
}

// Usage
const config = new CurrencyConfig('your_api_key_here');
const allConfig = await config.getAllConfig();

Build Dynamic Currency Selector

// Build crypto currency selector
async function buildCryptoSelector() {
  // Using testnet API
  const data = await fetch('https://api-ramp.kryptonim.dev/v1/currencies/crypto-currencies', {
    headers: { 'X-API-Key': API_KEY }
  }).then(res => res.json());

  const select = document.getElementById('crypto-select');

  data.currencies.forEach(currency => {
    const option = document.createElement('option');
    option.value = currency.symbol; // was currency.code
    option.textContent = `${currency.name} (${currency.symbol})`;
    select.appendChild(option);
  });
}

// Build fiat currency selector
async function buildFiatCurrencySelector() {
  const data = await fetch('https://api-ramp.kryptonim.dev/v1/currencies/fiat-currencies', {
    headers: { 'X-API-Key': API_KEY }
  }).then(res => res.json());

  const select = document.getElementById('fiat-currency-select');

  data.currencies.forEach(currency => {
    const option = document.createElement('option');
    option.value = currency.symbol; // was currency.code
    option.textContent = `${currency.name} (${currency.symbol})`;
    select.appendChild(option);
  });
}

Country Validation

async function validateUserCountry(countryCode) {
  // Using testnet API
  const data = await fetch('https://api-ramp.kryptonim.dev/v1/currencies/supported-countries', {
    headers: { 'X-API-Key': API_KEY }
  }).then(res => res.json());

  const isSupported = data.supportedCountries.some(c => c.code === countryCode);
  if (!isSupported) {
    // Optionally check if it’s explicitly blocked and include the reason
    const blocked = data.blockedCountries.find(c => c.code === countryCode);
    return { valid: false, reason: blocked?.reason || 'Country not supported' };
  }

  return { valid: true };
}

Caching Recommendations

Currency configuration data changes infrequently. We recommend caching these responses:
  • Crypto currencies: Cache for 1 hour
  • Fiat currencies: Cache for 24 hours
  • Supported countries: Cache for 24 hours
Example caching implementation:
const cache = new Map();

async function getCachedData(endpoint, ttl) {
  const cacheKey = endpoint;
  const cached = cache.get(cacheKey);
  
  if (cached && cached.expires > Date.now()) {
    return cached.data;
  }
  
  const response = await fetch(`${baseUrl}${endpoint}`, {
    headers: { 'X-API-Key': API_KEY }
  });
  
  const data = await response.json();
  
  cache.set(cacheKey, {
    data,
    expires: Date.now() + ttl
  });
  
  return data;
}

// Usage
const cryptoCurrencies = await getCachedData(
  '/v1/currencies/crypto-currencies',
  60 * 60 * 1000 // 1 hour
);
These configuration endpoints have higher rate limits than transactional endpoints. You can safely call them multiple times during initialization.
This is a testnet environment. All data returned is for testing purposes only. Do not use this data in production applications.
Always validate user input against the supported currencies and countries before creating quotes or sessions. This prevents errors and improves user experience.