Skip to main content

alpaca-facade

alpaca-facade is the high-level convenience layer that composes the lower alpaca-rust crates into application-friendly adapters.

Main Types and Helpers

  • AlpacaData
  • AlpacaDataConfig
  • CacheStats
  • OptionPricingReference
  • ResolvedOptionStratPositions
  • AlpacaData::get_prices_for_iv_calculation(...)
  • map_snapshot(...)
  • map_snapshot_with_pricing_reference(...)
  • map_snapshots(...)
  • map_snapshots_with_pricing_references(...)
  • map_live_snapshots(...)
  • pricing_references_for_snapshots(...)
  • resolve_positions_from_optionstrat_url(...)

Typical Uses

  • Reuse alpaca-data::cache::CachedClient behind a richer option-aware facade
  • Enrich Alpaca option snapshots into alpaca-option core models
  • Repair missing or invalid provider IV and Greeks with a session-aware pricing reference
  • Resolve IV/Greeks model stock references through AlpacaData::get_prices_for_iv_calculation(...), using realtime stock snapshots during regular session and the last completed trading day's daily-bar close outside regular session
  • Keep application-specific singleton or scheduling logic outside the shared crate

For option chains, call alpaca-data directly through client.options().chain_all(...), then map snapshots with AlpacaData::map_live_snapshots(...) if enriched alpaca-option models are needed.

Not Included

  • environment bootstrapping
  • application singletons
  • application-level provider failover orchestration
  • strategy logic or order workflows