{"id":28801360,"url":"https://github.com/soqa-io/soqa-sdk","last_synced_at":"2025-08-25T06:34:57.014Z","repository":{"id":299123752,"uuid":"1002124141","full_name":"soqa-io/soqa-sdk","owner":"soqa-io","description":"Open-source Rust-based tool designed to empower algo-traders and HFT teams by aggregating and normalizing market data from multiple exchanges. Our mission is to simplify access to clean, low-latency data, enabling traders to build high-performance strategies without the hassle of inconsistent APIs.","archived":false,"fork":false,"pushed_at":"2025-06-14T19:35:35.000Z","size":211,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-13T08:17:18.484Z","etag":null,"topics":["exchange","hft","hft-data","hft-trading","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soqa-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-06-14T19:07:54.000Z","updated_at":"2025-06-22T01:10:54.000Z","dependencies_parsed_at":"2025-06-14T20:38:11.548Z","dependency_job_id":"c6d9bf0f-5508-4d6e-ae26-690a37c5ba3e","html_url":"https://github.com/soqa-io/soqa-sdk","commit_stats":null,"previous_names":["knqzx/soqa-sdk","soqa-io/soqa-sdk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/soqa-io/soqa-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soqa-io%2Fsoqa-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soqa-io%2Fsoqa-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soqa-io%2Fsoqa-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soqa-io%2Fsoqa-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soqa-io","download_url":"https://codeload.github.com/soqa-io/soqa-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soqa-io%2Fsoqa-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272013593,"owners_count":24858481,"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-25T02:00:12.092Z","response_time":1107,"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":["exchange","hft","hft-data","hft-trading","rust"],"created_at":"2025-06-18T07:09:17.330Z","updated_at":"2025-08-25T06:34:56.723Z","avatar_url":"https://github.com/soqa-io.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# soqa-sdk\n\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eUltra-fast, unified market data for HFT \u0026 algo-traders — powered by Rust ⚡\u003c/b\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.linkedin.com/company/soqaio\"\u003e\u003cimg src=\"https://img.shields.io/badge/LinkedIn-SOQA-blue?logo=linkedin\" alt=\"LinkedIn\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Rust-stable-orange?logo=rust\" alt=\"Rust Stable\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"PRs Welcome\"\u003e\n\u003c/p\u003e\n\n---\n\n**soqa-sdk** is an open-source Rust-based tool designed to empower algo-traders and HFT teams by aggregating and normalizing market data from multiple exchanges. Our mission is to simplify access to clean, low-latency data, enabling traders to build high-performance strategies without the hassle of inconsistent APIs.\n\n[Follow us on LinkedIn](https://www.linkedin.com/company/soqaio)\n\n---\n\n## ✨ Features\n- 🚀 **Ultra-low latency**: Real-time L1 orderbook data from top crypto exchanges\n- 🦀 **Rust-powered**: Safe, fast, and reliable\n- 🔗 **Unified API**: One interface for all supported exchanges\n- 🛠️ **Easy to extend**: Add new exchanges in minutes\n- 📦 **Async \u0026 modern**: Built on Tokio, reqwest, and tungstenite\n- 🧩 **Open-source**: MIT licensed, PRs welcome!\n\n## 🌍 Supported Exchanges\n- **Binance**\n- **Bybit**\n- **OKX**\n- **Kraken**\n- **KuCoin**\n\n## 🚀 Quick Start\n\n### Requirements\n- Rust (latest stable recommended)\n- [Tokio](https://tokio.rs/) (async runtime)\n- [reqwest](https://docs.rs/reqwest/) (HTTP client)\n- [tokio-tungstenite](https://docs.rs/tokio-tungstenite/) (WebSocket)\n- [serde/serde_json](https://serde.rs/) (JSON parsing)\n\n### Build\n```bash\ncargo build --release\n```\n\n### Run\n\nExample: Get ETHUSDT data from KuCoin:\n```bash\ncargo run --release -- start --exchange kucoin --symbol ETHUSDT\n```\n\nParameters:\n- `--exchange` — exchange name (binance, bybit, okx, kraken, kucoin)\n- `--symbol` — trading pair (e.g., BTCUSDT, ETHUSDT)\n\n## 📊 Example Output\n\nThe console prints `OrderBookL1` objects:\n```rust\nOrderBookL1 {\n    exchange: \"bybit\",\n    symbol: \"ETHUSDT\",\n    bid: 2498.57,\n    bid_volume: 0.38006,\n    ask: 2498.58,\n    ask_volume: 7.90089,\n    timestamp: SystemTime { tv_sec: 1749926167, tv_nsec: 147185000 }\n}\n```\n\n## 🗂️ Project Structure\n```\nsoqa-sdk/\n├── src/\n│   ├── exchanges/\n│   │   ├── binance.rs\n│   │   ├── bybit.rs\n│   │   ├── okx.rs\n│   │   ├── kraken.rs\n│   │   ├── kucoin.rs\n│   │   └── mod.rs\n│   ├── models.rs\n│   ├── error.rs\n│   └── main.rs\n├── Cargo.toml\n└── README.md\n```\n\n## 🛠️ How It Works\n- Each exchange has a dedicated client that connects to its WebSocket API.\n- After connecting, a subscription message is sent for the selected trading pair.\n- Incoming messages are parsed, and L1 orderbook data (bid/ask) is extracted and passed to a callback.\n- For KuCoin and some other exchanges, a REST API token is required before connecting to WebSocket.\n\n## 💡 Example Usage in Code\n```rust\nlet client = KuCoinClient::new(config);\nclient.subscribe_l1(|orderbook| {\n    println!(\"{:?}\", orderbook);\n}).await?;\n```\n\n## 🏁 Example Commands for Each Exchange\n\n- **Binance**\n  ```bash\n  cargo run --release -- start --exchange binance --symbol BTCUSDT\n  ```\n- **Bybit**\n  ```bash\n  cargo run --release -- start --exchange bybit --symbol ETHUSDT\n  ```\n- **OKX**\n  ```bash\n  cargo run --release -- start --exchange okx --symbol BTC-USDT\n  ```\n- **Kraken**\n  ```bash\n  cargo run --release -- start --exchange kraken --symbol XBT/USD\n  ```\n- **KuCoin**\n  ```bash\n  cargo run --release -- start --exchange kucoin --symbol ETHUSDT\n  ```\n\n## 🤔 FAQ\n**Q:** Why am I not receiving data from KuCoin?\n- Check the symbol format (e.g., ETH-USDT).\n- Make sure you are subscribing to the correct topic (`/market/ticker:SYMBOL`).\n- Check logs — sometimes the exchange does not send data if there is no activity.\n\n**Q:** How do I add my own exchange?\n- Implement a client structure and subscription method similar to the existing ones.\n- Register the new module in `mod.rs` and add handling in the main match statement.\n\n**Q:** What data can I get?\n- Only L1 orderbook (bid/ask) for the selected trading pair.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eContact \u0026 Support:\u003c/b\u003e\u003cbr\u003e\n  Issues and suggestions — via GitHub Issues\u003cbr\u003e\n  Pull Requests are welcome!\u003cbr\u003e\n  \u003ca href=\"https://www.linkedin.com/company/soqaio\"\u003eLinkedIn: SOQA\u003c/a\u003e\n\u003c/p\u003e ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoqa-io%2Fsoqa-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoqa-io%2Fsoqa-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoqa-io%2Fsoqa-sdk/lists"}