#[macro_use]
mod macros;
mod amount;
mod auth;
mod batch;
mod cancel_all;
mod client;
mod clock;
mod compat_futures_ids;
mod error;
mod limiter;
mod live_balances;
mod models_gen;
mod operations_gen;
mod orderbook;
mod pagination;
mod services;
mod signing;
mod tls;
mod transport;
mod ws;
mod ws_futures;
pub use amount::{Amount, BookLevel, levels};
pub use auth::{ApiKeyAuthenticator, AuthRequest, Authenticator};
pub use batch::{
BatchCancelResult, BatchOrderInput, BatchOrderOutcome, BatchPlaceResult, CancelEntryOutcome,
CancelOutcome, MAX_BATCH_ORDERS, MAX_CANCEL_ENTRIES, PlaceOutcome, new_client_order_id,
};
pub use cancel_all::{CancelAllOptions, CancelAllStop, CancelAllSummary, CancelAllTarget};
pub use client::{
AuthScheme, CallOptions, Client, ClientOptions, DEFAULT_BASE_URL, DEFAULT_RPM_ANONYMOUS,
DEFAULT_RPM_WITH_KEY, OnRetry, is_local_host,
};
#[allow(deprecated)]
pub use compat_futures_ids::{
CandlesParams, FillsParams, FundingParams, OrderbookParams, TradesParams,
};
pub use error::{
ApiError, ConnectionError, Error, ErrorBody, ErrorCategory, MAX_SERVER_WAIT,
PAGING_CURSOR_REPEATED, PAGING_STALLED, Result, WsError,
};
pub use limiter::RateLimitState;
pub use live_balances::{
BalanceSnapshotFn, BalancesEvent, LiveBalances, LiveBalancesOptions, OwnerIdFn,
};
pub use models_gen::*;
pub use operations_gen::*;
pub use orderbook::{BookSnapshot, LiveOrderBook, WS_BOOK_DEPTH};
pub use pagination::{ItemStream, Page};
pub use services::{
Account, Assets, DEFAULT_MAX_BUSY_RETRIES, Exports, Fees, Futures, Markets, Networks,
PlaceOrderResult, Pools, Trading, Wallet,
};
pub use signing::{HmacAuthenticator, MAX_CLOCK_OFFSET, SIGNING_SCHEME};
pub use transport::RetryInfo;
pub use ws::{
AuthChange, AuthChangeReason, AuthResult, BookEvent, CloseInfo, DEFAULT_WEBSOCKET_URL,
MAX_PING_INTERVAL, OrderBookUpdate, PRIVATE_CHANNELS, ResyncReason, SUPPORTED_PROTOCOL_VERSION,
SequenceGap, SessionRevoked, SubscribeResult, WebSocket, Welcome, WsClock, WsEvent, WsEvents,
WsFrame, WsOptions, WsTimer,
};
pub use ws_futures::{
FUTURES_ACCOUNT_CHANNEL, FUTURES_INTERVALS, FuturesBookUpdate, FuturesCandleUpdate,
FuturesChannel, FuturesMids, FuturesOrdersUpdate, FuturesPositionsUpdate, FuturesStatus,
FuturesTradesUpdate,
};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
pub const USER_AGENT: &str = concat!("cexy-rust/", env!("CARGO_PKG_VERSION"));
#[cfg(test)]
mod tests;
#[cfg(doctest)]
#[doc = include_str!("../README.md")]
struct ReadmeDoctests;