Beispiel #1
0
    def test_trade_fee(self):
        trade_client = TradeClient(api_key=g_api_key,
                                   secret_key=g_secret_key,
                                   performance_test=True)

        # case get_feerate
        tc = TimeCost(function_name=trade_client.get_feerate.__name__)
        result, tc.server_req_cost, tc.server_api_cost = trade_client.get_feerate(
            symbols="htusdt,btcusdt,eosusdt," + trade_symbol)
        tc.run_status = RunStatus.SUCCESS if result and len(
            result) else RunStatus.FAILED
        tc.add_record()

        # case get_transact_feerate
        tc = TimeCost(function_name=trade_client.get_transact_feerate.__name__)
        result, tc.server_req_cost, tc.server_api_cost = trade_client.get_transact_feerate(
            symbols="htusdt,btcusdt,eosusdt," + trade_symbol)
        tc.run_status = RunStatus.SUCCESS if result and len(
            result) else RunStatus.FAILED
        tc.add_record()
from huobi.client.trade import TradeClient
from huobi.constant import *
from huobi.utils import *

trade_client = TradeClient(api_key=g_api_key, secret_key=g_secret_key)
list_obj = trade_client.get_transact_feerate(symbols="htusdt,btcusdt,eosusdt")
LogInfo.output_list(list_obj)