pub use crate::shared::config::WebSocketClientConfig;
pub(crate) mod rest;
mod websocket;
#[allow(deprecated)]
pub use rest::{
RestClient,
config::RestClientConfig,
repositories::{FuturesRepository, UserRepository},
};
#[allow(deprecated)]
pub use websocket::{
WebSocketClient, WebSocketConnection,
models::{WebSocketChannel, WebSocketUpdate},
repositories::WebSocketRepository,
state::WsConnectionStatus,
};
pub mod error {
pub use crate::shared::{
models::error::{
LeverageValidationError, MarginValidationError, PercentageCappedValidationError,
PercentageValidationError, PriceValidationError, QuantityValidationError,
TradeValidationError,
},
rest::error::RestApiError,
};
pub use super::{
rest::{
error::RestApiV2Error,
models::error::{FuturesTradeRequestValidationError, ValidationError},
},
websocket::{
error::{WebSocketApiError, WebSocketConnectionError},
models::{JsonRpcResponse, LnmJsonRpcRequest},
},
};
}
pub mod models {
pub use uuid::Uuid;
pub use crate::shared::models::{
SATS_PER_BTC,
leverage::Leverage,
margin::Margin,
price::{Percentage, PercentageCapped, Price},
quantity::Quantity,
trade::{
TradeExecution, TradeExecutionType, TradeSide, TradeSize, TradeStatus,
util as trade_util,
},
};
pub use super::{
rest::models::{
price_history::PriceEntry,
ticker::Ticker,
trade::Trade,
user::{User, UserRole},
},
websocket::models::{LastTickDirection, PriceIndex, PriceTick},
};
}