Skip to main content

Module error

Module error 

Source
Expand description

Binance-specific error types.

This module provides module-specific error types for Binance operations. These errors can be converted to the core Error type while preserving structured information for downcast capability.

§Error Types

§Example

use ccxt_exchanges::binance::error::{BinanceApiError, BinanceWsError};
use ccxt_core::error::Error as CoreError;

// Create a Binance API error
let api_err = BinanceApiError::new(-1121, "Invalid symbol.");
let core_err: CoreError = api_err.into();

// Create a Binance WebSocket error
let ws_err = BinanceWsError::subscription_failed("btcusdt@ticker", "Invalid stream");
let core_err: CoreError = ws_err.into();

Structs§

BinanceApiError
Binance REST API error.

Enums§

BinanceWsError
Binance WebSocket specific errors.