import time from decimal import Decimal from typing import Any, Dict, Optional, Tuple from pydantic import Field, SecretStr from hummingbot.client.config.config_data_types import BaseConnectorConfigMap, ClientFieldData from hummingbot.core.api_throttler.async_throttler import AsyncThrottler from hummingbot.core.data_type.trade_fee import TradeFeeSchema from hummingbot.core.web_assistant.auth import AuthBase from hummingbot.core.web_assistant.connections.data_types import RESTRequest from hummingbot.core.web_assistant.rest_pre_processors import RESTPreProcessorBase from hummingbot.core.web_assistant.web_assistants_factory import WebAssistantsFactory DEFAULT_FEES = TradeFeeSchema( maker_percent_fee_decimal=Decimal("0.001"), taker_percent_fee_decimal=Decimal("0.001"), ) CENTRALIZED = True EXAMPLE_PAIR = "BTC-USDT" HBOT_BROKER_ID = "HMBot" class AscendExRESTPreProcessor(RESTPreProcessorBase): async def pre_process(self, request: RESTRequest) -> RESTRequest: if request.headers is None: request.headers = {} # Generates generic headers required by AscendEx headers_generic = {}