trd-utils 0.0.45__tar.gz → 0.0.46__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of trd-utils might be problematic. Click here for more details.
- {trd_utils-0.0.45 → trd_utils-0.0.46}/PKG-INFO +1 -1
- {trd_utils-0.0.45 → trd_utils-0.0.46}/pyproject.toml +1 -1
- trd_utils-0.0.46/trd_utils/__init__.py +3 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/blofin/blofin_client.py +0 -1
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/bx_ultra/bx_ultra_client.py +0 -17
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/exchange_base.py +0 -1
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/hyperliquid/hyperliquid_client.py +0 -1
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/okx/okx_client.py +0 -1
- trd_utils-0.0.45/trd_utils/__init__.py +0 -3
- {trd_utils-0.0.45 → trd_utils-0.0.46}/LICENSE +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/README.md +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/cipher/__init__.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/common_utils/float_utils.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/common_utils/wallet_utils.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/date_utils/__init__.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/date_utils/datetime_helpers.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/README.md +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/__init__.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/base_types.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/blofin/__init__.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/blofin/blofin_types.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/bx_ultra/__init__.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/bx_ultra/bx_types.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/bx_ultra/bx_utils.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/errors.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/hyperliquid/README.md +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/hyperliquid/__init__.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/hyperliquid/hyperliquid_types.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/okx/__init__.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/okx/okx_types.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/exchanges/price_fetcher.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/html_utils/__init__.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/html_utils/html_formats.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/tradingview/__init__.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/tradingview/tradingview_client.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/tradingview/tradingview_types.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/types_helper/__init__.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/types_helper/base_model.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/types_helper/decorators.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/types_helper/model_config.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/types_helper/ultra_list.py +0 -0
- {trd_utils-0.0.45 → trd_utils-0.0.46}/trd_utils/types_helper/utils.py +0 -0
|
@@ -77,8 +77,6 @@ logger = logging.getLogger(__name__)
|
|
|
77
77
|
# specific to the current session that is fetching them,
|
|
78
78
|
user_api_identity_cache: dict[int, int] = {}
|
|
79
79
|
|
|
80
|
-
_positions_hidden_warn_map: dict[str, bool] = {}
|
|
81
|
-
|
|
82
80
|
|
|
83
81
|
class BXUltraClient(ExchangeBase, IPriceFetcher):
|
|
84
82
|
###########################################################
|
|
@@ -921,7 +919,6 @@ class BXUltraClient(ExchangeBase, IPriceFetcher):
|
|
|
921
919
|
self,
|
|
922
920
|
uid: int | str,
|
|
923
921
|
api_identity: int | str | None = None,
|
|
924
|
-
no_warn: bool = False,
|
|
925
922
|
min_margin: Decimal = 0,
|
|
926
923
|
) -> UnifiedTraderPositions:
|
|
927
924
|
global _positions_hidden_warn_map
|
|
@@ -941,13 +938,6 @@ class BXUltraClient(ExchangeBase, IPriceFetcher):
|
|
|
941
938
|
err_str = f"{ex}"
|
|
942
939
|
if err_str.find("as the client has been closed") != -1:
|
|
943
940
|
raise ex
|
|
944
|
-
|
|
945
|
-
if not no_warn:
|
|
946
|
-
if err_str.find("positions hidden") != -1:
|
|
947
|
-
warn_key = f"perp_{uid}"
|
|
948
|
-
if not _positions_hidden_warn_map.get(warn_key, False):
|
|
949
|
-
_positions_hidden_warn_map[warn_key] = True
|
|
950
|
-
logger.warning(f"Failed to fetch perp positions of {uid}: {ex}")
|
|
951
941
|
perp_ex = ex
|
|
952
942
|
|
|
953
943
|
try:
|
|
@@ -960,13 +950,6 @@ class BXUltraClient(ExchangeBase, IPriceFetcher):
|
|
|
960
950
|
err_str = f"{ex}"
|
|
961
951
|
if err_str.find("as the client has been closed") != -1:
|
|
962
952
|
raise ex
|
|
963
|
-
|
|
964
|
-
if not no_warn:
|
|
965
|
-
if err_str.find("positions hidden") != -1:
|
|
966
|
-
warn_key = f"std_{uid}"
|
|
967
|
-
if not _positions_hidden_warn_map.get(warn_key, False):
|
|
968
|
-
_positions_hidden_warn_map[warn_key] = True
|
|
969
|
-
logger.warning(f"Failed to fetch std positions of {uid}: {ex}")
|
|
970
953
|
std_ex = ex
|
|
971
954
|
|
|
972
955
|
if not perp_positions and not std_positions:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|