@@ -427,9 +427,11 @@ async def get_positions(self, symbols=None, **kwargs: dict) -> list:
427
427
]
428
428
429
429
async def get_position (self , symbol : str , ** kwargs : dict ) -> dict :
430
- return self .adapter .adapt_position (
431
- await self .client .fetch_position (symbol = symbol , params = kwargs )
432
- )
430
+ if self .client .has .get ("fetchPosition" ):
431
+ return self .adapter .adapt_position (
432
+ await self .client .fetch_position (symbol = symbol , params = kwargs )
433
+ )
434
+ raise NotImplementedError ("get_position is not implemented" )
433
435
434
436
async def get_funding_rate (self , symbol : str , ** kwargs : dict ) -> dict :
435
437
return self .adapter .adapt_funding_rate (
@@ -449,7 +451,7 @@ async def set_symbol_margin_type(self, symbol: str, isolated: bool):
449
451
marginType = self .CCXT_ISOLATED if isolated else self .CCXT_CROSSED )
450
452
451
453
async def set_symbol_position_mode (self , symbol : str , one_way : bool ):
452
- return await self .client .set_position_mode (self , hedged = not one_way , symbol = symbol )
454
+ return await self .client .set_position_mode (hedged = not one_way , symbol = symbol )
453
455
454
456
async def set_symbol_partial_take_profit_stop_loss (self , symbol : str , inverse : bool ,
455
457
tp_sl_mode : enums .TakeProfitStopLossMode ):
0 commit comments