import { BaseAPI } from './base_api';
import { MarketTradeInfo, LoopringMap, GetAccountRequest, GetCandlestickRequest, GetDepthRequest, GetTickerRequest, GetMarketTradesRequest, GetFiatPriceRequest, GetTokenBalancesRequest, GetAllowancesRequest, MarketInfo, ExchangeInfo, TickerData, DepthData, Candlestick, TokenRelatedInfo, ABInfo, GetEthBalancesRequest, GetEthNonceRequest, GetWithdrawalAgentsRequest, GetAccountServicesRequest, VipFeeRateInfoMap, AccountInfo, TokenAddress, GetALLTokenBalancesRequest, TOKENMAPLIST, DatacenterTokenInfo, GetDatacenterTokenInfoRequest, GetDatacenterTokenQuoteTrend, GetDatacenterTokenQuoteTrendRequest, DatacenterTokenInfoSimple, GetDatacenterTokenOhlcvQuoteTrendRequest, GetCmcTokenRelationsRequest, getLatestTokenPricesRequest, GetUserTradeAmount } from '../defs';
import BigNumber from 'bignumber.js';
export declare function getMidPrice({ _asks, askReverse, _bids, bidReverse, }: {
    _asks: any;
    askReverse?: boolean;
    _bids: any;
    bidReverse?: boolean;
}): {
    bids: {
        ab_arr: ABInfo[];
        ab_prices: number[];
        amtTotal: BigNumber;
        volTotal: BigNumber;
        ab_amtTotals: string[];
        ab_volTotals: string[];
        best: number;
    };
    asks: {
        ab_arr: ABInfo[];
        ab_prices: number[];
        amtTotal: BigNumber;
        volTotal: BigNumber;
        ab_amtTotals: string[];
        ab_volTotals: string[];
        best: number;
    };
    mid_price: number;
};
export declare function getBtradeMidPrice({ _asks, _bids }: {
    _asks: any[];
    _bids: any[];
}): {
    bids: {
        ab_arr: ABInfo[];
        ab_prices: number[];
        amtTotal: BigNumber;
        volTotal: BigNumber;
        ab_amtTotals: string[];
        ab_volTotals: string[];
        best: number;
    };
    asks: {
        ab_arr: ABInfo[];
        ab_prices: number[];
        amtTotal: BigNumber;
        volTotal: BigNumber;
        ab_amtTotals: string[];
        ab_volTotals: string[];
        best: number;
    };
    mid_price: number;
};
export declare class ExchangeAPI extends BaseAPI {
    getRelayerCurrentTime<R>(): Promise<{
        raw_data: R;
    } & R>;
    getProtocolPortrait<R>(): Promise<{
        raw_data: R;
    } & R>;
    getExchangeFeeInfo<R>(): Promise<{
        raw_data: R;
        orderbookTradingFeesStablecoin: VipFeeRateInfoMap;
        orderbookTradingFees: VipFeeRateInfoMap;
        ammTradingFees: VipFeeRateInfoMap;
        otherFees: {
            [key: string]: string;
        };
    }>;
    getWithdrawalAgents<R>(request: GetWithdrawalAgentsRequest): Promise<{
        raw_data: R;
        supportTokenMap: {
            [key: string]: any;
        };
    }>;
    getRecommendedMarkets<R>(): Promise<{
        raw_data: R;
        recommended: string[];
    }>;
    getMarkets<R>(url?: string): Promise<{
        markets: LoopringMap<MarketInfo>;
        pairs: LoopringMap<TokenRelatedInfo>;
        tokenArr: string[];
        tokenArrStr: string;
        marketArr: string[];
        marketArrStr: string;
        raw_data: R;
    }>;
    getMixMarkets<R>(): Promise<{
        markets: LoopringMap<MarketInfo>;
        pairs: LoopringMap<TokenRelatedInfo>;
        tokenArr: string[];
        tokenArrStr: string;
        marketArr: string[];
        marketArrStr: string;
        raw_data: R;
    }>;
    getTokens<R>(): Promise<TOKENMAPLIST & {
        raw_data: R;
    }>;
    getEthBalances<R>(request: GetEthBalancesRequest): Promise<{
        raw_data: R;
        ethBalance: string;
    }>;
    getTokenBalances<R, T = TokenAddress>(request: GetTokenBalancesRequest): Promise<{
        tokenBalances: Map<T, string>;
        raw_data: R;
    }>;
    getAllTokenBalances<R, T = TokenAddress>(request: GetALLTokenBalancesRequest): Promise<{
        tokenBalances: LoopringMap<string>;
        raw_data: R;
    }>;
    getAllowances<R, T = TokenAddress>(request: GetAllowancesRequest): Promise<{
        raw_data: R;
        tokenAllowances: Map<T, string>;
    }>;
    getExchangeInfo<R>(): Promise<{
        exchangeInfo: ExchangeInfo;
        raw_data: R;
    }>;
    getMixDepth<R>(request: GetDepthRequest): Promise<{
        depth: DepthData;
        raw_data: R;
    }>;
    getDepth<R>(request: GetDepthRequest, url?: string): Promise<{
        depth: DepthData;
        raw_data: R;
    }>;
    getMixTicker<R>(request: GetTickerRequest): Promise<{
        tickMap: LoopringMap<TickerData>;
        tickList: TickerData[];
        raw_data: R;
    }>;
    getTicker<R>(request: GetTickerRequest, url?: string): Promise<{
        tickMap: LoopringMap<TickerData>;
        tickList: TickerData[];
        raw_data: R;
    }>;
    getAllMixTickers(markets?: string | undefined): Promise<{
        markets: LoopringMap<MarketInfo>;
        pairs: LoopringMap<TokenRelatedInfo>;
        tokenArr: string[];
        tokenArrStr: string;
        marketArr: string[];
        marketArrStr: string;
        raw_data: unknown;
    } | {
        tickMap: LoopringMap<TickerData>;
        tickList: TickerData[];
        raw_data: unknown;
    }>;
    getAllTickers(markets?: string | undefined): Promise<{
        markets: LoopringMap<MarketInfo>;
        pairs: LoopringMap<TokenRelatedInfo>;
        tokenArr: string[];
        tokenArrStr: string;
        marketArr: string[];
        marketArrStr: string;
        raw_data: unknown;
    } | {
        tickMap: LoopringMap<TickerData>;
        tickList: TickerData[];
        raw_data: unknown;
    }>;
    getMixCandlestick<R>(request: GetCandlestickRequest): Promise<{
        candlesticks: Candlestick[];
        raw_data: R;
    }>;
    getCandlestick<R>(request: GetCandlestickRequest, url?: string): Promise<{
        candlesticks: Candlestick[];
        raw_data: R;
    }>;
    getFiatPrice<R>(request: GetFiatPriceRequest): Promise<any>;
    disableWithdrawTokenList<R>(): Promise<{
        raw_data: R;
        disableWithdrawTokenList: any[];
    }>;
    getMarketTrades<R>(request: GetMarketTradesRequest): Promise<{
        totalNum: number;
        marketTrades: MarketTradeInfo[];
        raw_data: R;
    }>;
    getAccount<R>(request: GetAccountRequest): Promise<{
        accInfo: AccountInfo;
        raw_data: R;
    }>;
    getEthNonce<R>(request: GetEthNonceRequest): Promise<{
        nonce: number;
        raw_data: R;
    }>;
    getGasPrice<R>(): Promise<{
        gasPrice: number;
        raw_data: R;
    }>;
    getGasPriceRange<R>(): Promise<{
        gasPriceRanges: any;
        raw_data: R;
    }>;
    getAccountServices<R>(request: GetAccountServicesRequest): Promise<{
        register: any;
        order: any;
        joinAmm: any;
        dAppTrade: any;
        legal: any;
        raw_data: R;
    }>;
    getTokenInfo<R = DatacenterTokenInfo>(request: {
        token: string;
        currency: 'USD';
    }, url?: string): Promise<any>;
    getSupportTokens<R = DatacenterTokenInfoSimple[]>(request: GetDatacenterTokenInfoRequest, url?: string): Promise<{
        raw_data: R;
        list: R;
    }>;
    getQuoteTokenInfo<R = [][], _X = GetDatacenterTokenQuoteTrend>(request: GetDatacenterTokenQuoteTrendRequest, url?: string): Promise<{
        list: R;
        raw_data: R;
    }>;
    getQuoteTokenOhlcv<R = [][], _X = GetDatacenterTokenOhlcvQuoteTrendRequest>(request: GetDatacenterTokenQuoteTrendRequest, url?: string): Promise<{
        list: R;
        raw_data: R;
    }>;
    getCmcTokenRelations<R = {
        cmcTokenId: number;
        tokenAddress: string;
        symbol: string;
    }[]>(request: GetCmcTokenRelationsRequest, url?: string): Promise<{
        list: R;
        raw_data: R;
    }>;
    getLatestTokenPrices(request?: getLatestTokenPricesRequest): Promise<any>;
    getUserTradeAmount(request: GetUserTradeAmount): Promise<any>;
}
//# sourceMappingURL=exchange_api.d.ts.map