From fa8dbe915ba18fa173f8d22362c3251977270f50 Mon Sep 17 00:00:00 2001 From: Lethale <175728510+lethaale@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:38:43 +0100 Subject: [PATCH] Update parameter types according to API docs --- examples/01_create_limit_order.py | 2 +- x10/perpetual/trading_client/account_module.py | 6 +++--- x10/perpetual/trading_client/markets_information_module.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/01_create_limit_order.py b/examples/01_create_limit_order.py index 4a3a196..5110d88 100644 --- a/examples/01_create_limit_order.py +++ b/examples/01_create_limit_order.py @@ -12,7 +12,7 @@ LOGGER = logging.getLogger() MARKET_NAME = ETH_USD_MARKET -ENDPOINT_CONFIG = MAINNET_CONFIG +ENDPOINT_CONFIG = MAINNET_CONFIG # replace with TESTNET_CONFIG for testnet async def run_example(): diff --git a/x10/perpetual/trading_client/account_module.py b/x10/perpetual/trading_client/account_module.py index 93d8bfa..78a698a 100644 --- a/x10/perpetual/trading_client/account_module.py +++ b/x10/perpetual/trading_client/account_module.py @@ -127,7 +127,7 @@ async def get_order_by_external_id(self, external_id: str) -> WrappedApiResponse async def get_trades( self, - market_names: List[str], + market_names: Optional[List[str]] = None, trade_side: Optional[OrderSide] = None, trade_type: Optional[TradeType] = None, cursor: Optional[int] = None, @@ -147,7 +147,7 @@ async def get_trades( ) async def get_fees( - self, *, market_names: List[str], builder_id: Optional[int] = None + self, *, market_names: Optional[List[str]] = None, builder_id: Optional[int] = None ) -> WrappedApiResponse[List[TradingFeeModel]]: """ https://api.docs.extended.exchange/#get-fees @@ -162,7 +162,7 @@ async def get_fees( ) return await send_get_request(await self.get_session(), url, List[TradingFeeModel], api_key=self._get_api_key()) - async def get_leverage(self, market_names: List[str]) -> WrappedApiResponse[List[AccountLeverage]]: + async def get_leverage(self, market_names: Optional[List[str]] = None) -> WrappedApiResponse[List[AccountLeverage]]: """ https://api.docs.extended.exchange/#get-current-leverage """ diff --git a/x10/perpetual/trading_client/markets_information_module.py b/x10/perpetual/trading_client/markets_information_module.py index 5946ef9..85ed277 100644 --- a/x10/perpetual/trading_client/markets_information_module.py +++ b/x10/perpetual/trading_client/markets_information_module.py @@ -37,7 +37,7 @@ async def get_candles_history( market_name: str, candle_type: CandleType, interval: CandleInterval, - limit: Optional[int] = None, + limit: int, end_time: Optional[datetime] = None, ): """