pub(crate) mod rest;

pub use rest::{
    RestClient,
    config::RestClientConfig,
    repositories::{
        AccountRepository, FuturesCrossRepository, FuturesDataRepository,
        FuturesIsolatedRepository, OracleRepository, UtilitiesRepository,
    },
};

pub mod error {
    pub use crate::shared::{
        models::error::{
            LeverageValidationError, MarginValidationError, PercentageCappedValidationError,
            PercentageValidationError, PriceValidationError, QuantityValidationError,
            TradeValidationError,
        },
        rest::error::RestApiError,
    };

    pub use super::rest::{
        error::RestApiV3Error,
        models::error::{ClientIdValidationError, FuturesIsolatedTradeRequestValidationError},
    };
}

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::{
        account::Account,
        client_id::ClientId,
        cross_leverage::CrossLeverage,
        funding::{CrossFunding, FundingSettlement, IsolatedFunding},
        ohlc_candle::{OhlcCandle, OhlcRange},
        oracle::{Index, LastPrice},
        page::Page,
        ticker::{Ticker, TickerPrice},
        trade::{CrossOrder, CrossPosition, Trade},
        transfer::CrossTransfer,
    };
}
