Expand description
Prelude module for convenient imports
Re-exports§
pub use crate::binance::Binance;pub use crate::binance::BinanceBuilder;pub use crate::bitget::Bitget;pub use crate::bitget::BitgetBuilder;pub use crate::bybit::Bybit;pub use crate::bybit::BybitBuilder;pub use crate::hyperliquid::HyperLiquid;pub use crate::hyperliquid::HyperLiquidBuilder;pub use crate::okx::Okx;pub use crate::okx::OkxBuilder;
Structs§
- Amount
- Amount type (zero-cost wrapper).
- Backoff
Config - Exponential backoff configuration for reconnection.
- Backoff
Strategy - Calculates retry delay with exponential backoff and jitter.
- Balance
- Balance structure containing all currency balances
- Balance
Entry - Balance entry for a single currency
- Base
Exchange - Base exchange implementation
- Cancellation
Token - A token which can be used to signal a cancellation request to one or more tasks.
- Currency
- Currency structure representing a tradable asset
- Decimal
Decimalrepresents a 128 bit representation of a fixed-precision decimal number. The finite set of values of typeDecimalare of the form m / 10e, where m is an integer such that -296 < m < 296, and e is an integer between 0 and 28 inclusive.- Exchange
Capabilities - Exchange capabilities configuration
- Exchange
Config - Exchange configuration
- Exchange
Config Builder - Builder for
ExchangeConfig - Expiry
Date - Represents a futures contract expiry date in YYMMDD format
- Fee
- Fee information
- Http
Client - HTTP client with retry and rate limiting support
- Http
Config - HTTP request configuration
- LogConfig
- Log configuration.
- Market
- Market structure representing a trading pair
- Market
Cache - Market data cache structure
- Market
Limits - Market limits for order parameters
- Market
Precision - Market precision settings
- Multi
Tier Rate Limiter - Multi-tier rate limiter for exchanges with multiple rate limit tiers
- Ohlcv
- OHLCV (Open, High, Low, Close, Volume) candlestick data
- Order
- Order structure
- Order
Book - Complete order book structure
- Order
Book Entry - Order book entry (price level)
- Parsed
Symbol - Represents a parsed unified symbol with all components
- Price
- Price type (zero-cost wrapper).
- Rate
Limiter - Rate limiter using token bucket algorithm
- Rate
Limiter Config - Rate limiter configuration
- Retry
Config - Retry configuration.
- Retry
Strategy - Retry strategy.
- Subscription
- WebSocket subscription metadata.
- Subscription
Manager - Subscription manager with capacity limits.
- Symbol
Formatter - Symbol formatter for converting ParsedSymbol to unified symbol strings
- Symbol
Parser - Symbol parser for unified symbol strings
- Ticker
- Ticker data structure
- Ticker
Params - Strongly typed parameters accepted by ticker endpoints.
- Ticker
Params Builder - Convenience builder for
TickerParams. - Trade
- Trade data structure
- Trading
Limits - Trading limits for a market
- WsClient
- Async WebSocket client for exchange streaming APIs.
- WsConfig
- WebSocket connection configuration.
- WsError
- Extended WebSocket error with classification.
- WsStats
- WebSocket connection statistics (lock-free).
- WsStats
Snapshot - Immutable snapshot of WebSocket connection statistics.
Enums§
- Contract
Type - Contract settlement type for derivatives
- Counting
Mode - Precision counting mode.
- Default
SubType - Contract settlement type for derivatives
- Default
Type - Default market type for exchange operations
- Default
Type Error - Error type for DefaultType parsing
- Digest
Format - Output encoding format for cryptographic digests.
- Endpoint
Type - Endpoint type enum for distinguishing between public and private API endpoints.
- Error
- The primary error type for the
ccxt-rustlibrary. - Hash
Algorithm - Supported cryptographic hash algorithms.
- LogFormat
- Log format.
- LogLevel
- Log level.
- Market
Type - Market type enumeration
- Order
Side - Order side (buy or sell)
- Order
Status - Order status
- Order
Type - Order type
- Padding
Mode - Output padding mode.
- Precision
Mode - Precision mode for currency operations
- Retry
Strategy Type - Retry strategy type.
- Rounding
Mode - Rounding mode for precision calculations.
- Symbol
Error - Symbol-related errors
- Symbol
Market Type - Market type derived from symbol structure
- Taker
OrMaker - Whether a trade is maker or taker
- Timeframe
- Timeframe enum for OHLCV data
- WsConnection
State - WebSocket connection state.
- WsError
Kind - WebSocket error classification.
- WsEvent
- WebSocket connection event types.
- WsMessage
- WebSocket message types for exchange communication.
Constants§
- DEFAULT_
MAX_ SUBSCRIPTIONS - Default maximum number of subscriptions.
- DEFAULT_
SHUTDOWN_ TIMEOUT - Default shutdown timeout in milliseconds.
Traits§
- Context
Ext - Extension trait for ergonomic error context attachment.
- Deserialize
- A data structure that can be deserialized from any data format supported by Serde.
- Error
Context Deprecated - Helper trait for adding context to errors (legacy alias for ContextExt).
- Exchange
- Core Exchange trait - the unified interface for all exchanges
- Exchange
Ext - Extension trait providing access to modular sub-traits from Exchange.
- Full
Exchange - Combined trait for exchanges that support both REST and WebSocket
- Serialize
- A data structure that can be serialized into any data format supported by Serde.
- WsExchange
- WebSocket exchange trait for real-time data streaming
Functions§
- base64_
to_ base64url - Converts standard Base64 to Base64 URL format.
- base64url_
decode - Decodes a Base64 URL-encoded string.
- decimal_
to_ precision - Formats a decimal to a specific precision with configurable rounding and counting modes.
- eddsa_
sign - Generates an EdDSA signature using Ed25519.
- hash
- Computes a cryptographic hash (one-way, keyless).
- hmac_
sign - Generates an HMAC signature for a message.
- init_
logging - Initializes the logging system.
- iso8601
- Converts a timestamp in milliseconds to an ISO 8601 formatted string
- jwt_
sign - Generates a JWT (JSON Web Token).
- microseconds
- Returns the current time in microseconds since the Unix epoch
- milliseconds
- Returns the current time in milliseconds since the Unix epoch
- number_
to_ string - Converts a decimal number to string, handling scientific notation.
- parse_
date - Parses a date string and returns the timestamp in milliseconds since Unix epoch
- parse_
iso8601 - Parses an ISO 8601 date string and returns the timestamp in milliseconds
- precision_
from_ string - Extracts precision (number of decimal places) from a string representation.
- resolve_
market_ type - Resolves the effective market type for an API call
- seconds
- Returns the current time in seconds since the Unix epoch
- try_
init_ logging - Attempts to initialize the logging system, ignoring duplicate initialization errors.
- ymd
- Alias for
yyyymmddfunction - ymdhms
- Formats a timestamp as “yyyy-MM-dd HH:mm:ss”
- yymmdd
- Formats a timestamp as “yy-MM-dd”
- yyyymmdd
- Formats a timestamp as “yyyy-MM-dd”
Type Aliases§
- ArcExchange
- Type alias for an Arc-wrapped Exchange trait object
- Boxed
Exchange - Type alias for a boxed Exchange trait object
- Message
Stream - WebSocket message stream type
- Order
Book Side - Order book side (bids or asks)
- Result
- Result type alias for all CCXT operations.
- Symbol
- Type alias for trading symbols (e.g., “BTC/USDT”)
- Timestamp
- Type alias for timestamps (milliseconds since Unix epoch)