| Crates.io | trading-sdk |
| lib.rs | trading-sdk |
| version | 0.1.0 |
| created_at | 2025-07-15 12:30:57.61823+00 |
| updated_at | 2025-07-15 12:30:57.61823+00 |
| description | Abstract Crypto Trading SDK |
| homepage | |
| repository | https://github.com/tribulnation/sdk |
| max_upload_size | |
| id | 1753199 |
| size | 16,302 |
Abstract Crypto Trading SDK for Automated Exchange Integrations (Rust)
trading-sdk provides a set of abstract traits for building automated trading systems and bots in Rust. It defines unified, type-safe protocols for trading, market data, and wallet operations, allowing you to implement these traits for any crypto exchange. This enables code reuse and rapid development of automation tools across multiple platforms.
Add to your Cargo.toml:
[dependencies]
trading-sdk = "0.1.0"
Implement the provided traits (Trading, MarketData, Wallet) for your target exchange:
use trading_sdk::{Trading, MarketData, Wallet};
use trading_sdk::trading::{Order, PlaceOrderResponse};
use trading_sdk::errors::AuthedError;
struct MyExchange;
#[async_trait::async_trait]
impl Trading for MyExchange {
async fn place_order(&self, symbol: &str, order: Order) -> Result<PlaceOrderResponse, AuthedError> {
// Implement order placement logic
todo!()
}
// Implement other required methods...
}
See the source code for full trait definitions and type details.
LimitOrder, MarketOrder, Order enumOrderStatus (New, PartiallyFilled, Filled, Canceled)NetworkFailure, InvalidParams, InvalidResponse, InvalidAuthUnauthedError, AuthedError enumsSide (Buy/Sell)TimeInForce (GTC/IOC/FOK)Contributions are welcome! Please open issues or pull requests on GitHub.
MIT