Skip to main content

Crate otc_rfq

Crate otc_rfq 

Source
Expand description

§OTC RFQ Engine

High-performance OTC Request-for-Quote engine supporting DeFi protocols (0x, 1inch, Uniswap, Hashflow) and TradFi venues via FIX 4.4.

§Architecture

This crate follows Domain-Driven Design with a layered architecture:

  • Domain Layer (domain): Core business logic, entities, value objects, and domain events
  • Application Layer (application): Use cases, services, and orchestration
  • Infrastructure Layer (infrastructure): External adapters, repositories, and integrations
  • API Layer (api): gRPC, REST, and WebSocket interfaces

§Example

use otc_rfq::application::use_cases::CreateRFQUseCase;
use otc_rfq::domain::value_objects::{Quantity, Symbol};

// Create an RFQ request
let rfq = CreateRFQUseCase::new(/* dependencies */)
    .execute(request)
    .await?;

Modules§

api
API Layer
application
Application Layer
domain
Domain Layer
infrastructure
Infrastructure Layer