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:
[]
= "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
# New Order Single example
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:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and ensure that the project still builds and all tests pass.
- Commit your changes and push your branch to your forked repository.
- 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
- Author: Joaquín Béjar García
- Email: jb@taunais.com
- Telegram: @joaquin_bejar
- Repository: https://github.com/joaquinbejar/alpaca-rs
- Documentation: https://docs.rs/alpaca-fix
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.