ccxt-core 0.1.0

Core types and traits for CCXT Rust
Documentation

CCXT Core Library

This is the core library for CCXT Rust implementation, providing fundamental data structures, error types, and traits for cryptocurrency exchange integration.

Features

  • Type Safety: Leverages Rust's type system for compile-time guarantees
  • Precision: Uses rust_decimal::Decimal for accurate financial calculations
  • Async/Await: Built on tokio for high-performance async operations
  • Error Handling: Comprehensive error types with thiserror

Example

use ccxt_core::prelude::*;

# async fn example() -> Result<()> {
// Create a market
let market = Market::new_spot(
    "btc/usdt".to_string(),
    "BTC/USDT".to_string(),
    "BTC".to_string(),
    "USDT".to_string(),
);

// Create an order
let order = Order::new(
    "12345".to_string(),
    "BTC/USDT".to_string(),
    OrderType::Limit,
    OrderSide::Buy,
    rust_decimal_macros::dec!(0.1),
    Some(rust_decimal_macros::dec!(50000.0)),
    OrderStatus::Open,
);
# Ok(())
# }