use dcex::exchanges::{
    bingx::BingxClient, bitget::BitgetClient, bitmart::BitmartClient, bitmex::BitmexClient,
    bybit::BybitClient, gateio::GateioClient, hyperliquid::HyperliquidClient, kraken::KrakenClient,
    lighter::LighterClient, mexc::MexcClient, okx::OkxClient,
};

macro_rules! assert_methods {
    ($client:ty: $($method:ident),* $(,)?) => {
        $(
            let _ = <$client>::$method;
        )*
    };
}

#[test]
fn rust_direct_clients_expose_python_method_names() {
    assert_methods!(
        BingxClient:
        asset_transfer,
        cancel_spot_batch_orders,
        cancel_spot_open_orders,
        cancel_spot_order,
        cancel_swap_all_orders,
        cancel_swap_batch_order,
        cancel_swap_order,
        change_margin_type,
        close_swap_all_positions,
        close_swap_position,
        get_account_balance,
        get_account_uid,
        get_all_account_balance,
        get_api_key_info,
        get_asset_transfer_records,
        get_fund_account_balance,
        get_fund_flow,
        get_kline,
        get_leverage,
        get_listen_key,
        get_margin_type,
        get_mark_price_kline,
        get_open_interest,
        get_open_orders,
        get_open_positions,
        get_order_detail,
        get_order_history,
        get_orderbook,
        get_position_mode,
        get_public_trades,
        get_spot_account_balance,
        get_spot_book_ticker,
        get_spot_commission_rate,
        get_spot_instrument_info,
        get_spot_kline,
        get_spot_kline_v2,
        get_spot_my_trades,
        get_spot_open_orders,
        get_spot_order,
        get_spot_order_history,
        get_spot_orderbook,
        get_spot_orderbook_v2,
        get_spot_price_ticker,
        get_spot_public_trades,
        get_spot_ticker,
        get_swap_account_balance,
        get_swap_instrument_info,
        get_ticker,
        get_transferable_coins,
        keep_alive_listen_key,
        place_spot_batch_order,
        place_spot_limit_buy_order,
        place_spot_limit_order,
        place_spot_limit_sell_order,
        place_spot_market_buy_order,
        place_spot_market_sell_order,
        place_spot_order,
        place_spot_post_only_buy_order,
        place_spot_post_only_order,
        place_spot_post_only_sell_order,
        place_swap_batch_order,
        place_swap_limit_buy_order,
        place_swap_limit_order,
        place_swap_limit_sell_order,
        place_swap_market_buy_order,
        place_swap_market_order,
        place_swap_market_sell_order,
        place_swap_order,
        place_swap_post_only_buy_order,
        place_swap_post_only_order,
        place_swap_post_only_sell_order,
        replace_swap_order,
        set_leverage,
        set_position_mode,
        test_swap_order,
    );

    assert_methods!(
        BybitClient:
        amend_batch_order,
        amend_order,
        cancel_all_orders,
        cancel_batch_orders,
        cancel_order,
        create_internal_transfer,
        get_account_info,
        get_adl_alert,
        get_borrow_history,
        get_borrow_quota,
        get_closed_pnl,
        get_coin_balance,
        get_coin_info,
        get_coins_balance,
        get_collateral,
        get_collateral_info,
        get_delivery_price,
        get_deposit_records,
        get_execution_list,
        get_fee_rates,
        get_funding_rate_history,
        get_historical_interest_rate,
        get_historical_volatility,
        get_instruments_info,
        get_insurance_pool,
        get_internal_deposit_records,
        get_internal_transfer_records,
        get_kline,
        get_long_short_ratio,
        get_master_deposit_address,
        get_open_interest,
        get_open_orders,
        get_order_history,
        get_order_price_limit,
        get_orderbook,
        get_positions,
        get_public_trade_history,
        get_risk_limit,
        get_spot_asset_info,
        get_status_and_leverage,
        get_sub_deposit_records,
        get_sub_uid,
        get_tickers,
        get_transaction_log,
        get_transferable_amount,
        get_transferable_coin,
        get_universal_transfer_records,
        get_vip_margin_data,
        get_wallet_balance,
        get_withdrawable_amount,
        place_batch_order,
        place_limit_buy_order,
        place_limit_order,
        place_limit_sell_order,
        place_market_buy_order,
        place_market_order,
        place_market_sell_order,
        place_order,
        place_post_only_limit_buy_order,
        place_post_only_limit_order,
        place_post_only_limit_sell_order,
        set_deposit_account,
        set_leverage,
        set_margin_mode,
        switch_position_mode,
        upgrade_to_unified_trading_account,
    );

    assert_methods!(
        OkxClient:
        amend_multiple_orders,
        amend_order,
        cancel_all_orders,
        cancel_batch_orders,
        cancel_order,
        close_positions,
        funds_transfer,
        get_account_balance,
        get_account_bills,
        get_account_bills_archive,
        get_account_bills_history_archive,
        get_account_config,
        get_account_instruments,
        get_account_rate_limit,
        get_adjust_leverage,
        get_asset_valuation,
        get_balances,
        get_bills,
        get_candles_ticks,
        get_contract_long_short_ratio,
        get_contract_open_interest_history,
        get_contract_taker_volume,
        get_contracts_open_interest_and_volume,
        get_convert_currencies,
        get_convert_history,
        get_currencies,
        get_deposit_address,
        get_deposit_history,
        get_deposit_withdraw_status,
        get_exchange_list,
        get_fee_rates,
        get_fills,
        get_fills_history,
        get_funding_rate,
        get_funding_rate_history,
        get_interest_accrued,
        get_interest_limits,
        get_interest_rate,
        get_leverage,
        get_long_short_ratio,
        get_max_avail_size,
        get_max_loan,
        get_max_order_size,
        get_max_withdrawal,
        get_monthly_statement,
        get_open_interest,
        get_order,
        get_order_list,
        get_orderbook,
        get_orders_history,
        get_orders_history_archive,
        get_position_risk,
        get_position_tiers,
        get_positions,
        get_positions_history,
        get_public_instruments,
        get_public_trades,
        get_taker_volume,
        get_tickers,
        get_top_trader_long_short_account_ratio,
        get_top_trader_long_short_position_ratio,
        get_trading_data_support_coin,
        get_transfer_state,
        place_batch_orders,
        place_limit_buy_order,
        place_limit_order,
        place_limit_sell_order,
        place_market_buy_order,
        place_market_order,
        place_market_sell_order,
        place_order,
        place_post_only_limit_buy_order,
        place_post_only_limit_order,
        place_post_only_limit_sell_order,
        post_account_bills_history_archive,
        post_monthly_statement,
        set_greeks,
        set_leverage,
        set_position_mode,
    );

    assert_methods!(
        BitgetClient:
        cancel_futures_batch_orders,
        cancel_futures_order,
        cancel_spot_batch_orders,
        cancel_spot_order,
        cancel_uta_batch_orders,
        cancel_uta_order,
        get_all_account_balance,
        get_deposit_records,
        get_funding_assets,
        get_futures_account,
        get_futures_account_bills,
        get_futures_accounts,
        get_futures_contracts,
        get_futures_current_funding_rate,
        get_futures_fills,
        get_futures_history_funding_rate,
        get_futures_history_kline,
        get_futures_history_orders,
        get_futures_kline,
        get_futures_open_interest,
        get_futures_open_orders,
        get_futures_order,
        get_futures_orderbook,
        get_futures_position,
        get_futures_positions,
        get_futures_recent_trades,
        get_futures_ticker,
        get_futures_tickers,
        get_spot_account_assets,
        get_spot_account_bills,
        get_spot_account_info,
        get_spot_coins,
        get_spot_fills,
        get_spot_history_kline,
        get_spot_history_orders,
        get_spot_kline,
        get_spot_market_trades,
        get_spot_open_orders,
        get_spot_order,
        get_spot_orderbook,
        get_spot_recent_trades,
        get_spot_symbols,
        get_spot_tickers,
        get_transfer_records,
        get_transferable_coins,
        get_uta_account_assets,
        get_uta_account_info,
        get_uta_fills,
        get_uta_history_orders,
        get_uta_open_orders,
        get_uta_order,
        get_uta_positions,
        place_futures_batch_orders,
        place_futures_limit_buy_order,
        place_futures_limit_order,
        place_futures_limit_sell_order,
        place_futures_market_buy_order,
        place_futures_market_order,
        place_futures_market_sell_order,
        place_futures_order,
        place_futures_post_only_limit_buy_order,
        place_futures_post_only_limit_order,
        place_futures_post_only_limit_sell_order,
        place_spot_batch_orders,
        place_spot_limit_buy_order,
        place_spot_limit_order,
        place_spot_limit_sell_order,
        place_spot_market_buy_order,
        place_spot_market_order,
        place_spot_market_sell_order,
        place_spot_order,
        place_spot_post_only_limit_buy_order,
        place_spot_post_only_limit_order,
        place_spot_post_only_limit_sell_order,
        place_uta_batch_orders,
        place_uta_order,
        set_futures_leverage,
        set_futures_margin_mode,
        set_futures_position_mode,
        set_uta_hold_mode,
        set_uta_leverage,
        transfer,
    );

    assert_methods!(
        KrakenClient:
        cancel_futures_all_orders,
        cancel_futures_order,
        cancel_spot_all_orders,
        cancel_spot_order,
        futures_wallet_transfer,
        get_futures_accounts,
        get_futures_fills,
        get_futures_instruments,
        get_futures_kline,
        get_futures_open_orders,
        get_futures_open_positions,
        get_futures_order_status,
        get_futures_orderbook,
        get_futures_public_trades,
        get_futures_tickers,
        get_server_time,
        get_spot_account_balance,
        get_spot_asset_pairs,
        get_spot_closed_orders,
        get_spot_kline,
        get_spot_ledgers,
        get_spot_open_orders,
        get_spot_open_positions,
        get_spot_orderbook,
        get_spot_orders,
        get_spot_public_trades,
        get_spot_ticker,
        get_spot_trade_balance,
        get_spot_trade_history,
        get_spot_trade_volume,
        place_futures_limit_buy_order,
        place_futures_limit_order,
        place_futures_limit_sell_order,
        place_futures_market_buy_order,
        place_futures_market_order,
        place_futures_market_sell_order,
        place_futures_order,
        place_futures_post_only_limit_buy_order,
        place_futures_post_only_limit_order,
        place_futures_post_only_limit_sell_order,
        place_spot_limit_buy_order,
        place_spot_limit_order,
        place_spot_limit_sell_order,
        place_spot_market_buy_order,
        place_spot_market_order,
        place_spot_market_sell_order,
        place_spot_order,
        place_spot_post_only_limit_buy_order,
        place_spot_post_only_limit_order,
        place_spot_post_only_limit_sell_order,
        wallet_transfer_to_futures,
        withdraw_futures_to_spot_wallet,
    );

    assert_methods!(
        MexcClient:
        cancel_all_contract_orders,
        cancel_contract_order,
        cancel_contract_order_with_external_id,
        cancel_contract_orders,
        cancel_spot_open_orders,
        cancel_spot_order,
        change_contract_leverage,
        change_contract_margin,
        change_contract_position_mode,
        get_contract_asset,
        get_contract_assets,
        get_contract_deals,
        get_contract_depth,
        get_contract_depth_commits,
        get_contract_details,
        get_contract_fair_price,
        get_contract_fair_price_kline,
        get_contract_funding_rate,
        get_contract_funding_rate_history,
        get_contract_funding_records,
        get_contract_history_orders,
        get_contract_history_positions,
        get_contract_index_price,
        get_contract_index_price_kline,
        get_contract_kline,
        get_contract_leverage,
        get_contract_open_orders,
        get_contract_open_positions,
        get_contract_order,
        get_contract_order_by_external_id,
        get_contract_order_deal_details,
        get_contract_order_deals,
        get_contract_orders,
        get_contract_plan_orders,
        get_contract_position_mode,
        get_contract_risk_limits,
        get_contract_risk_reverse,
        get_contract_risk_reverse_history,
        get_contract_stop_orders,
        get_contract_ticker,
        get_contract_time,
        get_contract_trading_fee_rate,
        get_contract_transfer_records,
        get_currency_info,
        get_deposit_address,
        get_deposit_history,
        get_internal_transfer_history,
        get_kyc_status,
        get_spot_account,
        get_spot_agg_trades,
        get_spot_all_orders,
        get_spot_avg_price,
        get_spot_book_ticker,
        get_spot_default_symbols,
        get_spot_exchange_info,
        get_spot_klines,
        get_spot_mx_deduct_status,
        get_spot_my_trades,
        get_spot_open_orders,
        get_spot_order,
        get_spot_orderbook,
        get_spot_recent_trades,
        get_spot_self_symbols,
        get_spot_symbol_commission,
        get_spot_ticker_24hr,
        get_spot_ticker_price,
        get_spot_time,
        get_user_universal_transfer_by_id,
        get_user_universal_transfer_history,
        get_withdraw_history,
        ping,
        place_contract_limit_buy_order,
        place_contract_limit_order,
        place_contract_limit_sell_order,
        place_contract_market_buy_order,
        place_contract_market_order,
        place_contract_market_sell_order,
        place_contract_order,
        place_contract_post_only_buy_order,
        place_contract_post_only_order,
        place_contract_post_only_sell_order,
        place_spot_batch_orders,
        place_spot_limit_buy_order,
        place_spot_limit_order,
        place_spot_limit_sell_order,
        place_spot_market_buy_order,
        place_spot_market_order,
        place_spot_market_sell_order,
        place_spot_order,
        place_spot_post_only_limit_buy_order,
        place_spot_post_only_limit_order,
        place_spot_post_only_limit_sell_order,
        set_spot_mx_deduct,
        test_spot_order,
        user_universal_transfer,
    );

    assert_methods!(
        BitmartClient:
        cancel_all_contract_order,
        cancel_contract_order,
        cancel_spot_all_order,
        cancel_spot_order,
        get_account_balance,
        get_account_currencies,
        get_contract_assets,
        get_contract_open_order,
        get_contract_order_detail,
        get_contract_order_history,
        get_contract_position,
        get_contract_trade,
        get_contract_transaction_history,
        get_contract_transfer_list,
        get_deposit_address,
        get_spot_account_orders,
        get_spot_account_trade_list,
        get_spot_open_orders,
        get_spot_order_by_order_client_id,
        get_spot_order_by_order_id,
        get_spot_order_trade_list,
        get_spot_wallet,
        modify_limit_order,
        place_contract_limit_order,
        place_contract_market_buy_order,
        place_contract_market_order,
        place_contract_market_sell_order,
        place_contract_order,
        place_contract_post_only_buy_order,
        place_contract_post_only_order,
        place_contract_post_only_sell_order,
        place_post_only_limit_sell_order,
        place_spot_limit_buy_order,
        place_spot_limit_order,
        place_spot_limit_sell_order,
        place_spot_market_buy_order,
        place_spot_market_order,
        place_spot_market_sell_order,
        place_spot_order,
        place_spot_post_only_limit_buy_order,
        place_spot_post_only_limit_order,
        place_spot_post_only_limit_sell_order,
        submit_leverage,
        transfer_contract,
    );

    assert_methods!(
        GateioClient:
        amend_futures_single_order,
        amend_spot_single_order,
        cancel_contract_all_order_matched,
        cancel_contract_single_order,
        cancel_spot_order,
        cancel_spot_single_order,
        future_dual_mode_switch,
        get_all_delivery_contracts,
        get_all_futures_contracts,
        get_a_single_futures_contract,
        get_contract_kline,
        get_contract_list_tickers,
        get_contract_order_book,
        get_contract_order_list,
        get_contract_single_order,
        get_contract_single_positions,
        get_delivery_account,
        get_delivery_account_book,
        get_delivery_all_positions,
        get_delivery_position_close_history,
        get_futures_account,
        get_futures_account_book,
        get_futures_all_positions,
        get_futures_auto_deleveraging_history,
        get_futures_contract_stats,
        get_futures_funding_rate_history,
        get_futures_position_close_history,
        get_spot_account,
        get_spot_account_book,
        get_spot_all_currency_pairs,
        get_spot_batch_fee,
        get_spot_fee,
        get_spot_kline,
        get_spot_list_tickers,
        get_spot_open_orders,
        get_spot_order_book,
        get_spot_order_list,
        get_spot_single_order,
        get_spot_trading_history,
        get_total_balance,
        get_trading_history,
        get_unified_accounts,
        place_contract_limit_buy_order,
        place_contract_limit_order,
        place_contract_limit_sell_order,
        place_contract_market_buy_order,
        place_contract_market_order,
        place_contract_market_sell_order,
        place_contract_order,
        place_contract_post_only_limit_buy_order,
        place_contract_post_only_limit_order,
        place_contract_post_only_limit_sell_order,
        place_futures_batch_order,
        place_spot_limit_buy_order,
        place_spot_limit_order,
        place_spot_limit_sell_order,
        place_spot_market_buy_order,
        place_spot_market_order,
        place_spot_market_sell_order,
        place_spot_order,
        place_spot_post_only_limit_buy_order,
        place_spot_post_only_limit_order,
        place_spot_post_only_limit_sell_order,
        update_delivery_positions_leverage,
        update_futures_positions_leverage,
    );

    assert_methods!(
        BitmexClient:
        amend_order,
        cancel_all_orders,
        cancel_order,
        get_executions,
        get_margin,
        get_margining_mode,
        get_order,
        get_positions,
        get_trade_history,
        get_trading_volume,
        get_wallet_summary,
        place_limit_buy_order,
        place_limit_order,
        place_limit_sell_order,
        place_market_buy_order,
        place_market_order,
        place_market_sell_order,
        place_order,
        place_post_only_buy_order,
        place_post_only_order,
        place_post_only_sell_order,
        set_leverage,
        set_margining_mode,
        switch_mode,
    );

    assert_methods!(
        HyperliquidClient:
        cancel_order,
        cancel_order_by_cloid,
        cancel_twap_order,
        clearinghouse_state,
        get_candle_snapshot,
        get_funding_rate_history,
        get_l2book,
        get_meta,
        get_meta_and_asset_ctxs,
        get_spot_meta,
        get_spot_meta_and_asset_ctxs,
        historical_orders,
        modify_batch_orders,
        modify_order,
        open_orders,
        order_status,
        place_future_limit_buy_order,
        place_future_limit_order,
        place_future_limit_sell_order,
        place_future_market_buy_order,
        place_future_market_order,
        place_future_market_sell_order,
        place_order,
        place_twap_order,
        portfolio,
        schedule_cancel,
        spot_clearinghouse_state,
        subaccounts,
        update_isolate_margin,
        update_leverage,
        user_fills,
        user_rate_limit,
        user_role,
        user_vault_equities,
    );

    assert_methods!(
        LighterClient:
        cancel_all_orders,
        cancel_order,
        check_client,
        create_auth_token,
        create_order,
        get_account,
        get_account_active_orders,
        get_account_inactive_orders,
        get_account_limits,
        get_account_metadata,
        get_accounts_by_l1_address,
        get_announcement,
        get_api_keys,
        get_asset_details,
        get_candles,
        get_deposit_history,
        get_deposit_networks,
        get_exchange_metrics,
        get_exchange_stats,
        get_execute_stats,
        get_export,
        get_fastbridge_info,
        get_fastwithdraw_info,
        get_funding_rates,
        get_fundings,
        get_info,
        get_l1_metadata,
        get_layer1_basic_info,
        get_lease_options,
        get_leases,
        get_liquidations,
        get_maker_only_api_keys,
        get_next_nonce,
        get_order_book_details,
        get_order_book_orders,
        get_order_books,
        get_partner_stats,
        get_pnl,
        get_position_funding,
        get_public_pools_metadata,
        get_recent_trades,
        get_referral_points,
        get_referral_user_referrals,
        get_status,
        get_system_config,
        get_token_list,
        get_tokens,
        get_trades,
        get_transfer_fee_info,
        get_transfer_history,
        get_withdraw_history,
        get_withdrawal_delay,
        modify_order,
        place_order,
        send_tx,
        send_tx_batch,
        sign_cancel_all_orders,
        sign_cancel_order,
        sign_create_order,
        sign_modify_order,
        sign_update_leverage,
        sign_update_margin,
        update_leverage,
        update_margin,
    );
}
