alpaca-fix

Crates.ioalpaca-fix
lib.rsalpaca-fix
version0.3.1
created_at2026-01-01 19:51:43.613774+00
updated_at2026-01-02 07:33:42.871527+00
descriptionFIX protocol client for Alpaca trading platform
homepagehttps://github.com/joaquinbejar/alpaca-rs
repositoryhttps://github.com/joaquinbejar/alpaca-rs
max_upload_size
id2017372
size155,919
Joaquin Bejar Garcia (joaquinbejar)

documentation

README

alpaca-rs

License Crates.io Downloads Documentation

alpaca-fix

FIX (Financial Information eXchange) protocol client for the Alpaca trading platform.

Overview

alpaca-fix provides a FIX protocol implementation for high-frequency trading applications with Alpaca. It supports FIX 4.2 and 4.4 versions for order routing and market data.

Features

  • FIX Session Management: Session initiation, heartbeat handling, sequence number management.
  • Order Routing: New Order Single, Cancel, Cancel/Replace requests.
  • Execution Reports: Real-time order status updates.
  • Market Data: Market data requests and snapshots.

Installation

Add to your Cargo.toml:

[dependencies]
alpaca-fix = "0.3.1"

Examples

Run examples with cargo run -p alpaca-fix --example <name>:

Session & Message Examples

Example Description
fix_session_setup Configure and set up a FIX session
fix_new_order_single Create New Order Single messages
fix_order_cancel Create Cancel and Cancel/Replace messages
fix_execution_report Execution Report message structure
fix_market_data_request Market Data Request messages

Connection & Trading Examples

Example Description
fix_connect Connect to FIX server
fix_disconnect Graceful disconnect
fix_market_order Send market order via FIX
fix_limit_order Send limit order via FIX
fix_cancel_order Cancel order via FIX
fix_execution_reports Process execution reports
fix_heartbeat Heartbeat handling
fix_message_loop Receive and process messages
# Session setup example
cargo run -p alpaca-fix --example fix_session_setup

# New Order Single example
cargo run -p alpaca-fix --example fix_new_order_single

Note: FIX protocol requires special access from Alpaca. Contact Alpaca support to enable FIX access for your account.

Contribution and Contact

We welcome contributions to this project! If you would like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and ensure that the project still builds and all tests pass.
  4. Commit your changes and push your branch to your forked repository.
  5. Submit a pull request to the main repository.

If you have any questions, issues, or would like to provide feedback, please feel free to contact the project maintainer:

Contact Information

We appreciate your interest and look forward to your contributions!

License: MIT

Disclaimer

This software is not officially associated with Alpaca Markets. Trading financial instruments carries risk, and this library is provided as-is without any guarantees. Always test thoroughly with a paper trading account before using in a live trading environment.

Commit count: 2

cargo fmt