drm-core
Core traits, models, and errors for the dr-manhattan prediction market SDK.
Overview
drm-core provides the foundational components for building prediction market integrations:
- Exchange trait: Unified async interface for all prediction market operations
- Models:
Market,Order,Position,Orderbook, and more - WebSocket trait: Real-time orderbook and trade streaming
- Strategy trait: Framework for building trading strategies
- Error types: Comprehensive error hierarchy (
DrmError)
Installation
[]
= "0.1"
Usage
This crate is typically used as a dependency by exchange implementations (drm-exchange-polymarket, drm-exchange-limitless, drm-exchange-opinion).
use ;
// The Exchange trait defines the unified API
Models
| 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 |
Features
- Async-first: Built on
tokiofor high-performance async operations - Type-safe: Leverage Rust's type system for compile-time safety
- Serde support: All models are serializable/deserializable
Part of dr-manhattan-rust
This crate is part of the dr-manhattan-rust project, a Rust port of guzus/dr-manhattan.
License
MIT