Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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::<exchange>`.
- `src/lib.rs` re-exports connector types for all active exchanges. Use `lotusx::exchanges::<exchange>` 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.
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
15 changes: 15 additions & 0 deletions tests/public_api.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use lotusx::core::kernel::ReqwestRest;

fn assert_connector_type<T>() {}

#[test]
fn root_reexports_active_connector_types() {
assert_connector_type::<lotusx::BackpackConnector<ReqwestRest>>();
assert_connector_type::<lotusx::BinanceConnector<ReqwestRest>>();
assert_connector_type::<lotusx::BinancePerpConnector<ReqwestRest>>();
assert_connector_type::<lotusx::BybitConnector<ReqwestRest>>();
assert_connector_type::<lotusx::BybitPerpConnector<ReqwestRest>>();
assert_connector_type::<lotusx::HyperliquidConnector<ReqwestRest>>();
assert_connector_type::<lotusx::OkxConnector<ReqwestRest>>();
assert_connector_type::<lotusx::ParadexConnector<ReqwestRest>>();
}
Loading