trd-utils 0.0.17__tar.gz → 0.0.18__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.17 → trd_utils-0.0.18}/PKG-INFO +1 -1
- {trd_utils-0.0.17 → trd_utils-0.0.18}/pyproject.toml +1 -1
- trd_utils-0.0.18/trd_utils/__init__.py +3 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/bx_ultra/bx_ultra_client.py +5 -5
- trd_utils-0.0.17/trd_utils/__init__.py +0 -3
- {trd_utils-0.0.17 → trd_utils-0.0.18}/LICENSE +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/README.md +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/cipher/__init__.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/common_utils/float_utils.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/date_utils/__init__.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/date_utils/datetime_helpers.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/README.md +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/__init__.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/base_types.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/blofin/__init__.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/blofin/blofin_client.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/blofin/blofin_types.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/bx_ultra/__init__.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/bx_ultra/bx_types.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/bx_ultra/bx_utils.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/exchange_base.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/hyperliquid/README.md +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/hyperliquid/__init__.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/hyperliquid/hyperliquid_client.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/exchanges/hyperliquid/hyperliquid_types.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/html_utils/__init__.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/html_utils/html_formats.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/tradingview/__init__.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/tradingview/tradingview_client.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/tradingview/tradingview_types.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/types_helper/__init__.py +0 -0
- {trd_utils-0.0.17 → trd_utils-0.0.18}/trd_utils/types_helper/base_model.py +0 -0
|
@@ -656,7 +656,7 @@ class BXUltraClient(ExchangeBase):
|
|
|
656
656
|
api_identity=api_identity,
|
|
657
657
|
page_size=50, # TODO: make this dynamic I guess...
|
|
658
658
|
)
|
|
659
|
-
if result.data.hide:
|
|
659
|
+
if result.data.hide == 0 and not result.data.positions:
|
|
660
660
|
# TODO: do proper exceptions here...
|
|
661
661
|
raise ValueError("The trader has made their positions hidden")
|
|
662
662
|
unified_result = UnifiedTraderPositions()
|
|
@@ -668,12 +668,12 @@ class BXUltraClient(ExchangeBase):
|
|
|
668
668
|
unified_pos.position_side = position.position_side
|
|
669
669
|
unified_pos.margin_mode = "isolated" # TODO: fix this
|
|
670
670
|
unified_pos.position_leverage = position.leverage
|
|
671
|
-
unified_pos.position_pair = (
|
|
672
|
-
position.symbol
|
|
673
|
-
) # TODO: make sure correct format
|
|
671
|
+
unified_pos.position_pair = position.symbol.replace("-", "/")
|
|
674
672
|
unified_pos.open_time = None # TODO: do something for this?
|
|
675
673
|
unified_pos.open_price = position.avg_price
|
|
676
|
-
unified_pos.open_price_unit =
|
|
674
|
+
unified_pos.open_price_unit = (
|
|
675
|
+
position.valuation_coin_name or position.symbol.split("-")[-1]
|
|
676
|
+
) # TODO
|
|
677
677
|
unified_result.positions.append(unified_pos)
|
|
678
678
|
|
|
679
679
|
return unified_result
|
|
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
|