ndaxrs 0.1.0

Rust client library for the NDAX cryptocurrency exchange API
Documentation
// Copyright (C) 2026 ndaxrs Art Morozov
// SPDX-License-Identifier: GPL-3.0-only

//! # ndaxrs
//!
//! A Rust client library for the NDAX cryptocurrency exchange API.
//!
//! This crate provides a WebSocket-based client for interacting with the NDAX
//! exchange API, supporting both public and authenticated endpoints.
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use std::time::Duration;
//!
//! use ndaxrs::{NdaxConfig, NdaxCredentials, Result};
//!
//! fn example() -> Result<()> {
//!   // Load credentials from environment variables
//!   let creds = NdaxCredentials::from_env()?;
//!
//!   // Build config with builder pattern
//!   let config = NdaxConfig::builder()
//!     .credentials(creds)
//!     .timeout(Duration::from_secs(30))
//!     .build()?;
//!
//!   // Or use defaults (no auth, default timeout) for public endpoints
//!   let public_config = NdaxConfig::builder().build()?;
//!   Ok(())
//! }
//! ```

#![deny(missing_docs)]

mod error;
pub use error::{Error, Result};

mod config;
pub use config::{
  NdaxConfig,
  NdaxConfigBuilder,
  NdaxCredentials,
  DEFAULT_TIMEOUT,
  DEFAULT_WS_URL,
};

pub mod messages;
pub use messages::{
  ActionType,
  GenericResponse,
  NdaxFrame,
  NdaxMessageType,
  OrderState,
  OrderType,
  Side,
  TimeInForce,
};

pub mod ws;
pub use ws::{NdaxWsAPI, NdaxWsConfig};