Trading App

Building a Crypto OTC Trading Desk with Fuze

This guide outlines how you can use Fuze's API infrastructure to build and operate a Crypto Over-The-Counter (OTC) Trading Desk. OTC desks serve clients, often institutions or high-net-worth individuals, looking to execute large block trades in cryptocurrencies and fiat. These trades typically require personalized service and pricing off public exchange order books.

Fuze provides backend capabilities for client onboarding, fund custody, trade execution (quote and order management), and settlement. This allows you to focus on your clients and trading strategies.

Core Components of Your Fuze-Powered OTC Desk:

  • Client Onboarding & Management: Utilize Fuze for Customer onboarding, including KYC/KYB verification.
  • Fund Custody: Leverage Fuze-hosted Internal Crypto Wallets and Internal Fiat Accounts to hold and segregate client funds and your operational capital.
  • Trade Lifecycle Management: Use Fuze's Trading APIs for generating quotes and executing client orders.
  • Settlement & Fund Movement: Employ Fuze's Transfer and Payment APIs for receiving client deposits and processing withdrawals to their external Counterparty accounts.

Typical OTC Trade Workflow using Fuze APIs

The following diagram and steps describe a conceptual workflow for an OTC trade facilitated by your platform using Fuze APIs:

graph TD
    A["Client Submits RFQ to OTC Desk\n(e.g., Buy 50 BTC with USD)"] --> B{OTC Desk Platform};
    B --> C["Platform Requests Quote via Fuze API\n(<code>POST /api/v1/ol/quote/create</code>)"];
    C --> D["Fuze API Responds with Quote\n(quoteId, rate, amounts, expiry)"];
    D --> B;
    B --> E["Platform Presents Quote to Client"];
    E --> F{Client Decision};
    F -- Accepts Quote (before expiry) --> G["Platform Creates Order via Fuze API\n(<code>POST /api/v1/ol/order/create</code> with quoteId)"];
    F -- Rejects or Quote Expires --> H["End Process / Re-quote"];
    G --> I["Fuze API Confirms Order\n(orderId, status, filled amounts)"];
    I --> J["Fuze Settles Trade Internally\n(Client's Fuze balances updated)"];
    J --> K["Platform Confirms Trade to Client"];

1. Client Onboarding and Initial Funding

  • Action: Onboard your new trading client (individual or institution) onto your platform.
  • Fuze API Interaction:
  • Client Action: The client deposits funds (e.g., USD, EUR, BTC, ETH, USDC) into their designated Fuze-hosted account/wallet provided by your platform. (This uses Fuze's deposit/pay-in capabilities).

2. Client Request for Quote (RFQ)

  • Action: Your client contacts your OTC desk (via your platform's interface) to request a quote for a trade, e.g., "Buy 50 BTC with USD."
  • Fuze API Interaction: Your platform requests a trade quote from Fuze.
  • API Call (Conceptual): POST /api/v1/ol/quote/create
  • Sample Request Body (Illustrative):
    • Specify customerId, the from currency (e.g., USD if buying BTC) or to currency, and amount.
    {
      "customerId": "otc_client_institution_A",
      "from": { // Client is selling USD
        "currency": "USD"
        // Amount of USD determined by Fuze based on 50 BTC
      },
      "to": {   // Client wants to buy BTC
        "currency": "BTC",
        "amount": 50
      }
    }
  • Sample Response Body (Illustrative):
    • Fuze returns a quoteId, amounts, conversionRate, and expiryTime.
    {
      "code": 200,
      "error": null,
      "data": {
        "quoteId": "q_btc_usd_12345",
        "from": { "currency": "USD", "amount": 1750000.00 }, // 50 BTC * 35000 USD/BTC
        "to": { "currency": "BTC", "amount": 50 },
        "conversionRate": 35000.00, // 1 BTC = 35000 USD
        "expiryTime": 1696148000,
        "createdAt": "2023-10-01T00:10:00Z",
        "updatedAt": "2023-10-01T00:10:00Z"
      }
    }

3. Quote Provision & Client Acceptance

  • Action: Your platform presents the quote (rate, total cost, expiry) to your client.
  • Client Action: The client accepts the quote within the expiryTime.
    🚧

    Quotes are Time-Sensitive

    Due to market volatility, quotes are valid for a short period. If a quote expires, a new one must be requested.

4. Trade Execution (Creating an Order)

  • Action: Upon client acceptance, your platform instructs Fuze to execute the trade.
  • Fuze API Interaction: Use the quoteId to create an order.
  • API Call (Conceptual): POST /api/v1/ol/order/create
  • Sample Request Body (Illustrative):
    {
      "customerId": "otc_client_institution_A",
      "quoteId": "q_btc_usd_12345"
    }
  • Sample Response Body (Illustrative):
    • Fuze confirms the order and provides an orderId and its status.
    {
      "code": 200,
      "error": null,
      "data": {
        "orderId": "ord_btc_usd_67890",
        "from": { "currency": "USD", "amount": 1750000.00 },
        "to": { "currency": "BTC", "amount": 50 },
        "conversionRate": 35000.00,
        "status": "COMPLETED",
        "filled": 50, // Amount of BTC filled
        "createdAt": "2023-10-01T00:10:30Z",
        "updatedAt": "2023-10-01T00:10:35Z"
      }
    }

5. Settlement & Confirmation

  • Fuze Action: Fuze's system executes the trade, debiting the client's Internal USD Account and crediting their Internal BTC Wallet on Fuze's internal ledgers.
  • Your Platform Action: Provide a trade confirmation to your client. You can use POST /api/v1/ol/order/get with the orderId to fetch final details if needed.

6. Withdrawal of Funds (Client Option)

  • Action: After the trade, the client may wish to withdraw their newly acquired assets or remaining fiat.
  • Fuze API Interaction: Your platform initiates a withdrawal (an outbound Transfer or Payment Payout).
  • Prerequisites: The client must have a verified External Crypto Wallet or External Fiat Account linked to their SELF type Counterparty record.
  • API Call (Conceptual - for BTC withdrawal): POST /transfers/create or similar payout API.
  • Sample Request Body (Illustrative for BTC withdrawal):
    {
      "customerId": "otc_client_institution_A",
      "counterpartyId": "self_btc_wallet_counterparty_id_789",
      "externalWalletId": "btc_wallet_uuid_abc",
      "amount": 50.00,
      "currency": "BTC",
      "description": "OTC Trade Settlement - BTC Withdrawal"
      // clientOrderId for idempotency recommended
    }
  • Sample Response Body (Illustrative):
    • Confirmation that the withdrawal is initiated.
    {
      "code": 200,
      "error": null,
      "data": {
        "transactionId": "payout_btc_def_456",
        "status": "PENDING",
        "message": "BTC withdrawal initiated successfully."
      }
    }
    • Your platform would monitor this withdrawal status, ideally via webhooks, until completion.

Key Fuze Features Leveraged

Benefits of Using Fuze for Your OTC Desk

  • Focus on Core Business: Concentrate on client relationships, liquidity, and trading strategies while Fuze handles backend financial infrastructure.
  • Security: Utilize Fuze's custody solutions for digital assets and fiat.
  • Efficiency: Automate trades, fund movements, and record-keeping through APIs.
  • Scalability: Build a scalable OTC desk with infrastructure designed for growth.

This use case guide provides a blueprint for building a Crypto OTC Trading Desk using Fuze. For specific API endpoint details, request/response schemas, and parameters, always consult the official Fuze API Reference.