| Crates.io | drm-core |
| lib.rs | drm-core |
| version | 0.1.3 |
| created_at | 2025-12-25 17:06:39.626328+00 |
| updated_at | 2025-12-28 08:41:41.184397+00 |
| description | Core traits, models, and errors for dr-manhattan prediction market SDK |
| homepage | |
| repository | https://github.com/gtg7784/dr-manhattan-rust |
| max_upload_size | |
| id | 2004751 |
| size | 69,412 |
Core traits, models, and errors for the dr-manhattan prediction market SDK.
drm-core provides the foundational components for building prediction market integrations:
Market, Order, Position, Orderbook, and moreDrmError)[dependencies]
drm-core = "0.1"
This crate is typically used as a dependency by exchange implementations (drm-exchange-polymarket, drm-exchange-limitless, drm-exchange-opinion).
use drm_core::{Exchange, Market, Order, OrderSide, DrmError};
// The Exchange trait defines the unified API
#[async_trait]
pub trait Exchange: Send + Sync {
fn id(&self) -> &'static str;
fn name(&self) -> &'static str;
async fn fetch_markets(&self, params: Option<FetchMarketsParams>) -> Result<Vec<Market>, DrmError>;
async fn fetch_market(&self, market_id: &str) -> Result<Market, DrmError>;
async fn create_order(&self, ...) -> Result<Order, DrmError>;
// ... more methods
}
| Model | Description |
|---|---|
Market |
Prediction market with question, outcomes, prices, volume |
Order |
Order with price, size, status, timestamps |
Position |
Position with size, average price, current price |
Orderbook |
Orderbook with bids and asks |
Trade |
Executed trade information |
tokio for high-performance async operationsThis crate is part of the dr-manhattan-rust project, a Rust port of guzus/dr-manhattan.
MIT