24 releases
Uses new Rust 2024
new 0.1.24 | May 15, 2025 |
---|---|
0.1.23 | May 12, 2025 |
0.1.4 | Apr 30, 2025 |
#342 in Development tools
2,278 downloads per month
75KB
1.5K
SLoC
Clear Street Rust SDK
Rust library providing an API interface to the public endpoints offered by Clear Street.
NOTE
This is a very rough work in progress. It is incomplete, mising features with shortcuts taken. Feel free to open a PR. The sqlx mappings to work with orms should be behind a feature, enum mappings and safety added and all that.
Features
- Fully asynchronous Rust client based on
reqwest
. - Typed models for Clear Street public API requests and responses.
- Ready-to-integrate into trading systems, research tools, or financial applications.
- Minimal external dependencies for high performance.
Installation
Add the SDK to your Cargo.toml
:
[dependencies]
clearstreet_sdk = { git = "https://github.com/YOUR_USERNAME/clearstreet-rust-sdk.git", branch = "main" }
use clearstreet_sdk::ClearStreetClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize the client
let client = ClearStreetClient::new();
// Fetch market data for a symbol
let market_data = client.get_market_data("AAPL").await?;
println!("{:?}", market_data);
Ok(())
}
Roadmap
-
Implement authenticated/private endpoints
-
Add support for WebSocket streaming (if provided by Clear Street)
-
Improve error handling and expose structured API errors
-
Full test coverage
-
Publish as an open-source crate
Contributing
Contributions are welcome!
Please open an issue to discuss any major changes before submitting a pull request.
Code should pass cargo fmt and cargo clippy.
All pull requests must include relevant tests where applicable.
License
This project is licensed under a modified GNU Affero General Public License v3 (AGPLv3) with additional restrictions:
You are allowed to use, modify, and integrate this software for commercial purposes.
However, you are prohibited from selling the software itself, or modified versions thereof, as a standalone product or as part of any product offering.
For full license terms, see LICENSE.
Dependencies
~21–35MB
~616K SLoC