Research · TRUEFIX LABS

Rust로 멀티 브로커 트레이딩 시스템 구축하기

Provider 어댑터, 표준 금융 상품, 주문 수명 주기, 조정, 리스크와 결정적 실행을 다루는 운영 중심 가이드입니다.

요약. 멀티 브로커 시스템은 Provider API를 어댑터 뒤에 격리하고 표준 금융 상품, 시장 데이터, 주문, 포지션과 기능 모델을 제공해야 합니다.

Recommended architecture

Use a layered design: provider clients at the edge, a normalization boundary for instruments and events, an order management system, a risk engine, an execution kernel, and durable audit storage. Provider selection belongs to a capability and entitlement layer, not to business logic that guesses from a broker name.

Provider API → Adapter → Canonical contracts → OMS → Risk → Execution → Reconciliation

Rust design choices

Use typed enums for order states, environments, sides, order types, and failure classes. Keep provider I/O asynchronous, but make the decision and risk path deterministic. Use cancellation-safe tasks, bounded channels, monotonic event sequence checks, and durable identifiers for every outbound request.

Failure modes to design first

  • Timeout after the provider accepted an order.
  • WebSocket disconnect or sequence gaps.
  • Symbol ambiguity across venues.
  • Partial fills and fee currency differences.
  • Position drift between local state and an account snapshot.

Production checklist

Persist the original provider, client instance, account, environment, native symbol, client order ID, request revision, and evidence used for the decision. If an execution result is unknown, query the original identity and reconcile before considering any retry.

Sources

Last verified: 2026-09-28. Provider capabilities can change by region, account, product, environment, and entitlement; verify the linked official documentation before production use.

최종 업데이트: 2026-09-28