diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index e897a7a..5199ea1 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -103,7 +103,7 @@ Risks and debt: - WebSocket support exists in the kernel and several modules, but default builders are not uniformly WebSocket-enabled. Call the explicit WebSocket builder when a module exposes one. - `ExchangeConnector` is not the best documentation surface today; prefer the smaller capability traits when writing examples or new code. -- `src/lib.rs` re-exports only part of the exchange surface. The reliable public namespace is still `lotusx::exchanges::`. +- `src/lib.rs` re-exports connector types for all active exchanges. Use `lotusx::exchanges::` for builders and exchange-specific API details. - Some legacy compatibility constructors keep old names or parameters while delegating to the new builders. Prefer the direct `build_connector*` functions in new code. - `ExchangeFactory` is for latency tests and demos. It now delegates Bybit and OKX creation through the exchange builders, but production code should still prefer exchange-specific builders when credentials, passphrases, or custom behavior matter. - `RestClientConfig::max_retries` applies to retryable GET and DELETE failures. POST requests are not automatically retried to avoid repeating order-style side effects. diff --git a/src/lib.rs b/src/lib.rs index 84579b9..16bd866 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,11 @@ pub mod exchanges; pub mod utils; pub use core::{errors::ExchangeError, traits::ExchangeConnector, types::*}; +pub use exchanges::backpack::BackpackConnector; pub use exchanges::binance::BinanceConnector; +pub use exchanges::binance_perp::BinancePerpConnector; pub use exchanges::bybit::BybitConnector; pub use exchanges::bybit_perp::BybitPerpConnector; +pub use exchanges::hyperliquid::HyperliquidConnector; +pub use exchanges::okx::OkxConnector; +pub use exchanges::paradex::ParadexConnector; diff --git a/tests/public_api.rs b/tests/public_api.rs new file mode 100644 index 0000000..7b28b3e --- /dev/null +++ b/tests/public_api.rs @@ -0,0 +1,15 @@ +use lotusx::core::kernel::ReqwestRest; + +fn assert_connector_type() {} + +#[test] +fn root_reexports_active_connector_types() { + assert_connector_type::>(); + assert_connector_type::>(); + assert_connector_type::>(); + assert_connector_type::>(); + assert_connector_type::>(); + assert_connector_type::>(); + assert_connector_type::>(); + assert_connector_type::>(); +}