Skip to content

Swap Service

The Swap Service enables seamless exchange between various cryptocurrencies, providing a unified API for cross-asset trading with competitive rates and robust transaction management.

Overview

The FSCO Swap Service is designed to be a comprehensive solution for cryptocurrency exchanges, allowing applications to offer currency conversion capabilities without developing complex swap infrastructure. The service is built to be future-proof, with plans to integrate various liquidity sources including internal pools, external DEXs, and treasury reserves.

Key Features

Cross-Currency Swaps

Exchange between any supported cryptocurrency pairs with competitive rates.

Flexible Liquidity Sources

Intelligently routes trades through internal and external sources for optimal execution.

Real-Time Rate Quotes

Fetch current exchange rates between any supported currency pairs.

Transaction Management

Track swap transactions from initiation to completion with detailed status updates.

Currency Discovery

Query supported currencies with detailed information about each asset.

Organizational Controls

Filter and manage swaps at both wallet and organization levels.

Advantages

  • Simplified Integration - Single API for all cryptocurrency swaps regardless of blockchain or token type
  • Best Execution - Smart routing to find the most efficient path for each swap
  • Transparent Pricing - Clear exchange rates and transaction details for every swap
  • Future-Proof Design - Architecture designed to accommodate new swap mechanisms and liquidity sources
  • Comprehensive Reporting - Detailed transaction history and status tracking

Common Use Cases

Foreign Exchange Operations

For Banking & Financial Services

Extend your foreign exchange capabilities to include digital assets, enabling customers to seamlessly move between traditional and digital currencies. Maintain compliance while offering competitive exchange rates.

Integration Points

  • GET /swap/rate/{sourceCurrency}/{destinationCurrency} - Obtain real-time exchange rates
  • POST /swap/initiate - Execute regulated currency conversions
  • GET /swap/transaction/{transactionId} - Provide transaction confirmations and status updates

Corporate Treasury Management

For Treasury Departments

Streamline treasury operations by automating the conversion of incoming digital assets into your preferred reserve currency. Ensure predictable financial reporting while maintaining regulatory compliance.

Integration Points

  • GET /swap/supported-currencies - Verify supported currencies for treasury operations
  • POST /swap/initiate - Automate currency normalization processes
  • GET /swap/transactions - Generate detailed transaction records for audit and compliance

Institutional Lending Services

For Lending Institutions

Enhance lending platforms with multi-currency capabilities, allowing clients to interact with loans in their preferred digital currency without disrupting your back-office operations.

Integration Points

  • GET /swap/rate/{sourceCurrency}/{destinationCurrency} - Calculate accurate loan values in multiple currencies
  • POST /swap/initiate - Facilitate client repayments in various digital currencies
  • GET /swap/transaction/{transactionId} - Track and report on currency conversion activities

Getting Started

To start using the Swap Service:

  1. Review the API Reference to understand available endpoints
  2. Follow the Currency Swaps guide
  3. Set up your integration with appropriate authentication

API Specifications

For detailed API specifications, see the OpenAPI schema.

Service Architecture

The Swap Service follows a modular architecture with the following components:

  • Rate Engine - Calculates and provides exchange rates between currency pairs
  • Routing Service - Determines the optimal path for executing swaps
  • Execution Engine - Manages the actual currency exchange process
  • Transaction Manager - Tracks and reports on the status of all swap transactions
  • Currency Registry - Maintains information about supported currencies

Future Enhancements

The Swap Service is designed to be extensible, with plans to add:

  • Multi-hop Swaps - Execute complex swaps through multiple intermediary currencies for optimal rates
  • Cross-chain Swaps - Perform swaps between assets on different blockchains
  • Smart Order Routing - Split large swaps across multiple liquidity sources for better execution
  • Advanced Rate Controls - Set minimum acceptable rates and dynamic slippage tolerance
  • Scheduled Swaps - Configure swaps to execute based on specific triggers or schedules

Best Practices

  • Always check the latest exchange rate before initiating a swap
  • Monitor transaction status to confirm successful completion
  • Consider transaction size when planning swaps as large amounts may affect execution
  • Use organizational filtering to track swaps across multiple wallets
  • Verify supported currencies before attempting new swap pairs

Security Considerations

  • All API endpoints require proper authentication
  • Sensitive operations are protected with appropriate authorization controls
  • Transaction history is maintained for audit and compliance purposes
  • All swap operations are validated and sanitized to prevent malicious inputs
  • Rate information is frequently updated to ensure fair execution