{"id":30214454,"url":"https://github.com/joaquinbejar/deribit-fix","last_synced_at":"2025-09-25T16:32:57.144Z","repository":{"id":305669275,"uuid":"1023587774","full_name":"joaquinbejar/deribit-fix","owner":"joaquinbejar","description":"ALPHA VERSION!: A comprehensive FIX protocol client framework for Deribit cryptocurrency exchange. This library provides a reusable foundation for building trading applications that connect to Deribit using the FIX protocol.","archived":false,"fork":false,"pushed_at":"2025-08-10T04:41:23.000Z","size":826,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T06:19:55.344Z","etag":null,"topics":["deribit","deribit-api","deribit-api-v2","deribit-exchange","deribit-testnet","trading"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joaquinbejar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-21T11:41:45.000Z","updated_at":"2025-08-10T04:41:27.000Z","dependencies_parsed_at":"2025-07-21T12:31:26.129Z","dependency_job_id":"d7d7ebb6-63f3-49a0-a60c-bb8ff6518900","html_url":"https://github.com/joaquinbejar/deribit-fix","commit_stats":null,"previous_names":["joaquinbejar/deribit-fix"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/joaquinbejar/deribit-fix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaquinbejar%2Fderibit-fix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaquinbejar%2Fderibit-fix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaquinbejar%2Fderibit-fix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaquinbejar%2Fderibit-fix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joaquinbejar","download_url":"https://codeload.github.com/joaquinbejar/deribit-fix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaquinbejar%2Fderibit-fix/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270342209,"owners_count":24567642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deribit","deribit-api","deribit-api-v2","deribit-exchange","deribit-testnet","trading"],"created_at":"2025-08-14T00:39:30.613Z","updated_at":"2025-09-25T16:32:57.139Z","avatar_url":"https://github.com/joaquinbejar.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"text-align: center;\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/joaquinbejar/deribit-fix/refs/heads/main/doc/images/logo.png\" alt=\"deribit-fix\" style=\"width: 80%; height: 80%;\"\u003e\n\u003c/div\u003e\n\n[![Dual License](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)\n[![Crates.io](https://img.shields.io/crates/v/deribit-fix.svg)](https://crates.io/crates/deribit-fix)\n[![Downloads](https://img.shields.io/crates/d/deribit-fix.svg)](https://crates.io/crates/deribit-fix)\n[![Stars](https://img.shields.io/github/stars/joaquinbejar/deribit-fix.svg)](https://github.com/joaquinbejar/deribit-fix/stargazers)\n[![Issues](https://img.shields.io/github/issues/joaquinbejar/deribit-fix.svg)](https://github.com/joaquinbejar/deribit-fix/issues)\n[![PRs](https://img.shields.io/github/issues-pr/joaquinbejar/deribit-fix.svg)](https://github.com/joaquinbejar/deribit-fix/pulls)\n[![Build Status](https://img.shields.io/github/workflow/status/joaquinbejar/deribit-fix/CI)](https://github.com/joaquinbejar/deribit-fix/actions)\n[![Coverage](https://img.shields.io/codecov/c/github/joaquinbejar/deribit-fix)](https://codecov.io/gh/joaquinbejar/deribit-fix)\n[![Dependencies](https://img.shields.io/librariesio/github/joaquinbejar/deribit-fix)](https://libraries.io/github/joaquinbejar/deribit-fix)\n[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://docs.rs/deribit-fix)\n[![Wiki](https://img.shields.io/badge/wiki-latest-blue.svg)](https://deepwiki.com/joaquinbejar/deribit-fix)\n\n## Deribit FIX Framework\n\n[![Dual License](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)\n[![Crates.io](https://img.shields.io/crates/v/deribit-fix.svg)](https://crates.io/crates/deribit-fix)\n[![Downloads](https://img.shields.io/crates/d/deribit-fix.svg)](https://crates.io/crates/deribit-fix)\n[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://docs.rs/deribit-fix)\n\n**Version:** 0.2.1 | **Status:** Production Ready | **Repository:** \u003chttps://github.com/joaquinbejar/deribit-fix\u003e\n\nA comprehensive, production-ready FIX protocol client framework for Deribit cryptocurrency exchange.\nThis library provides a complete, type-safe, and async foundation for building sophisticated trading applications\nthat connect to Deribit using the FIX 4.4 protocol with custom extensions.\n\n### 🏗️ Project Status\n\n**Current Version: 0.2.1** - Feature Complete \u0026 Production Ready\n\nThis release represents a complete implementation of the Deribit FIX specification with:\n- ✅ Full FIX 4.4 protocol support with Deribit extensions\n- ✅ Complete trading operations (orders, positions, mass operations)\n- ✅ Real-time market data streaming and snapshots\n- ✅ Comprehensive session management and error handling\n- ✅ Production-grade connection management with SSL support\n- ✅ Extensive test suite with 90%+ coverage\n- ✅ Rich examples and documentation\n\n### 🚀 Quick Start\n\nAdd to your `Cargo.toml`:\n```toml\n[dependencies]\nderibit-fix = \"0.2.1\"\n```\n\nBasic usage:\n```rust\nuse deribit_fix::prelude::*;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c()\u003e {\n    let config = DeribitFixConfig::default()\n        .with_credentials(\"your_key\".to_string(), \"your_secret\".to_string())\n        .with_heartbeat_interval(30);\n\n    let mut client = DeribitFixClient::new(\u0026config).await?;\n    client.connect().await?;\n\n    // Start trading!\n    let positions = client.get_positions().await?;\n    println!(\"Current positions: {}\", positions.len());\n\n    client.disconnect().await?;\n    Ok(())\n}\n```\n\n### 🌐 Supported Environments\n\n| Environment | Raw TCP | SSL |\n|-------------|---------|-----|\n| **Production** | `www.deribit.com:9880` | `www.deribit.com:9883` |\n| **Test** | `test.deribit.com:9881` | `test.deribit.com:9883` |\n\n### 🎯 Core Features\n\n#### 📡 Session Management\n- **Logon/Logout (A/5)**: Secure authentication with SHA256 + nonce\n- **Heartbeat (0)**: Configurable keep-alive mechanism\n- **Test Request (1)**: Connection health monitoring\n- **Resend Request (2)**: Message recovery and gap filling\n- **Sequence Reset (4)**: Sequence number management\n- **Reject (3)**: Comprehensive error handling with detailed codes\n\n#### 📈 Trading Operations\n- **Order Management**:\n  - New Order Single (D) - Place orders with full parameter support\n  - Order Cancel Request (F) - Cancel individual orders\n  - Order Cancel/Replace Request (G) - Modify existing orders\n- **Mass Operations**:\n  - Order Mass Cancel Request (q) - Cancel multiple orders\n  - Order Mass Status Request (AF) - Bulk order status queries\n- **Execution Reports**: Real-time order status updates and fill notifications\n- **Position Management**:\n  - Request For Positions (AN) - Query current positions\n  - Position Report (AP) - Real-time position updates\n\n#### 📊 Market Data\n- **Real-time Streaming**:\n  - Market Data Request (V) - Subscribe to live data feeds\n  - Market Data Snapshot/Full Refresh (W) - Complete market snapshots\n  - Market Data Incremental Refresh (X) - Efficient incremental updates\n- **Security Information**:\n  - Security List Request (x) - Available instruments\n  - Security Definition Request (c) - Detailed instrument specifications\n  - Security Status Request (e) / Security Status (f) - Instrument status updates\n\n#### 💼 Advanced Trading Features\n- **Market Making**:\n  - Mass Quote (i) - Bulk quote submission\n  - Quote Request (R) - Request for quotes\n  - Quote Cancel (Z) - Quote cancellation\n- **RFQ (Request for Quote) System**:\n  - RFQ Request (AH) - Submit RFQ requests\n  - Quote Status Report (AI) - Quote status updates\n- **Risk Management**:\n  - MMProtection Limits (MM) - Market maker protection\n  - MMProtection Reset (MZ) - Reset protection limits\n- **Trade Reporting**:\n  - TradeCaptureReportRequest (AD) - Request trade reports\n  - TradeCaptureReport (AE) - Trade execution reports\n\n#### 🔐 Security \u0026 Authentication\n- **SHA256 Authentication**: Secure credential-based authentication\n- **Application Registration**: Support for registered apps with DeribitAppSig\n- **Cancel on Disconnect**: Automatic order cancellation on connection loss\n- **User Management**: User Request (BE) / User Response (BF)\n- **SSL/TLS Support**: Encrypted connections for production environments\n\n### ⚡ Technical Architecture\n\n#### 🏗️ Built on Modern Rust\n- **Rust 2024 Edition**: Latest language features and performance\n- **Async/Await**: Full async support with Tokio runtime\n- **Type Safety**: Zero-cost abstractions with compile-time guarantees\n- **Memory Safety**: No segfaults, buffer overflows, or memory leaks\n\n#### 🔌 Connection Management\n- **Automatic Reconnection**: Configurable backoff strategies\n- **Connection Pooling**: Efficient resource utilization\n- **Timeout Handling**: Robust timeout management\n- **SSL/TLS Support**: Production-grade encrypted connections\n\n#### 🎯 Message Processing\n- **FIX Protocol Compliance**: Full FIX 4.4 with Deribit extensions\n- **Message Validation**: Comprehensive parsing and validation\n- **Sequence Management**: Automatic sequence number handling\n- **Gap Detection**: Automatic message gap detection and recovery\n\n#### 🛡️ Error Handling\n- **Detailed Error Types**: Comprehensive error classification\n- **Context Preservation**: Rich error context for debugging\n- **Recovery Strategies**: Automatic recovery from transient errors\n- **Logging Integration**: Structured logging with tracing support\n\n### 📚 Examples \u0026 Documentation\n\nThe framework includes comprehensive examples covering all major use cases:\n\n#### 🔧 Basic Examples\n- **Basic Client** (`examples/basic/`): Simple client setup and connection\n- **Login Test** (`examples/session/login_test.rs`): Authentication examples\n- **Heartbeat** (`examples/session/heartbeat_example.rs`): Keep-alive handling\n\n#### 📊 Trading Examples\n- **Order Management** (`examples/order_management/`): Complete order lifecycle\n- **Position Management** (`examples/position_management/`): Position tracking\n- **Market Data** (`examples/market_data/`): Real-time data streaming\n\n#### 🚨 Advanced Examples\n- **Error Handling** (`examples/error_handling/`): Comprehensive error scenarios\n- **Session Management** (`examples/session/session_management.rs`): Advanced session handling\n- **Test Requests** (`examples/session/test_request_example.rs`): Connection monitoring\n- **Resend Requests** (`examples/session/resend_request_example.rs`): Message recovery\n\n### 🧪 Testing \u0026 Quality\n\n#### 🔬 Comprehensive Test Suite\n- **Unit Tests**: 100+ unit tests covering all modules\n- **Integration Tests**: End-to-end scenarios with mock servers\n- **Coverage**: 90%+ code coverage with detailed reports\n- **Continuous Integration**: Automated testing on multiple platforms\n\n#### 📊 Quality Assurance\n- **Clippy Linting**: Strict code quality enforcement\n- **Rustfmt**: Consistent code formatting\n- **Documentation**: 100% public API documentation\n- **Benchmarks**: Performance regression testing\n\n### 📦 Installation \u0026 Setup\n\n#### Prerequisites\n- Rust 1.75+ (specified in `rust-toolchain.toml`)\n- Tokio async runtime\n- Valid Deribit API credentials\n\n#### Build Commands\n```bash\n# Standard build\ncargo build\n\n# Release build (recommended for production)\ncargo build --release\n\n# Run tests\ncargo test\n\n# Run examples\ncargo run --example basic_client\n```\n\n### 🚀 Performance\n\n- **Low Latency**: Optimized for high-frequency trading\n- **Memory Efficient**: Zero-copy message parsing where possible\n- **Async I/O**: Non-blocking network operations\n- **Connection Pooling**: Efficient resource utilization\n\n### 🛠️ Development Tools\n\nThe project includes comprehensive development tooling:\n```bash\n# Format code\nmake fmt\n\n# Lint code\nmake lint\n\n# Run tests\nmake test\n\n# Generate documentation\nmake doc\n\n# Run benchmarks\nmake bench\n```\n\n### ⚠️ Important Notes\n\n- **Testing Required**: Always test with demo account before live trading\n- **Risk Management**: Implement proper risk controls in your application\n- **Rate Limits**: Respect Deribit's API rate limits\n- **Error Handling**: Implement robust error handling for production use\n\n### 📄 License \u0026 Disclaimer\n\nLicensed under MIT License. This software is not officially associated with Deribit.\nTrading financial instruments carries risk - use at your own discretion.\n\n\n## Contribution and Contact\n\nWe welcome contributions to this project! If you would like to contribute, please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bug fix.\n3. Make your changes and ensure that the project still builds and all tests pass.\n4. Commit your changes and push your branch to your forked repository.\n5. Submit a pull request to the main repository.\n\nIf you have any questions, issues, or would like to provide feedback, please feel free to contact the project maintainer:\n\n**Joaquin Bejar Garcia**\n- Email: jb@taunais.com\n- GitHub: [joaquinbejar](https://github.com/joaquinbejar)\n\nWe appreciate your interest and look forward to your contributions!\n\n## ✍️ License\n\nLicensed under MIT license\n\n## Disclaimer\n\nThis software is not officially associated with Deribit. Trading financial instruments carries risk, and this library is provided as-is without any guarantees. Always test thoroughly with a demo account before using in a live trading environment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaquinbejar%2Fderibit-fix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaquinbejar%2Fderibit-fix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaquinbejar%2Fderibit-fix/lists"}