trd-utils 0.0.20__py3-none-any.whl → 0.0.21__py3-none-any.whl

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/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
 
2
- __version__ = "0.0.20"
2
+ __version__ = "0.0.21"
3
3
 
@@ -58,6 +58,17 @@ class PositionInfo(BaseModel):
58
58
  In any case, we will have to somehow fake it in order to be able to compare
59
59
  it with other positions...
60
60
  """
61
+ entry = self.entry_px
62
+ if entry > 100:
63
+ entry = round(entry, 1)
64
+ elif entry > 10:
65
+ entry = round(entry, 2)
66
+ elif entry > 1:
67
+ entry = round(entry, 3)
68
+ elif entry > 0.1:
69
+ entry = round(entry, 4)
70
+ elif entry > 0.01:
71
+ entry = round(entry, 5)
61
72
  return (
62
73
  f"{self.coin}-{self.leverage.value}{self.entry_px}"
63
74
  ).encode("utf-8").hex()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: trd_utils
3
- Version: 0.0.20
3
+ Version: 0.0.21
4
4
  Summary: Common Basic Utils for Python3. By ALiwoto.
5
5
  Keywords: utils,trd_utils,basic-utils,common-utils
6
6
  Author: ALiwoto
@@ -1,4 +1,4 @@
1
- trd_utils/__init__.py,sha256=zuFTqIXT51Hc1FEjtDNWqv0BXlPgdEGVKQ_5Z4W4oZs,25
1
+ trd_utils/__init__.py,sha256=r62Fv_DGYvHFfgJAxqrFgVjU3qpcGE07xhPPYI5rbp4,25
2
2
  trd_utils/cipher/__init__.py,sha256=V05KNuzQwCic-ihMVHlC8sENaJGc3I8MCb4pg4849X8,1765
3
3
  trd_utils/common_utils/float_utils.py,sha256=W-jv7nzjl88xwGB6gsEXmDDhF6DseOrrVT2qx7OvyCo,266
4
4
  trd_utils/common_utils/wallet_utils.py,sha256=OX9q2fymP0VfIWTRIRBP8W33cfyjLXimxMgPOsZe-3g,727
@@ -18,7 +18,7 @@ trd_utils/exchanges/exchange_base.py,sha256=ZY_9vL9LXtAbAmlWygdVyy0wC-QDla-JGWZ8
18
18
  trd_utils/exchanges/hyperliquid/README.md,sha256=-qaxmDt_9NTus2xRuzyFGkKgYDWgWk7ufHVTSkyn3t4,105
19
19
  trd_utils/exchanges/hyperliquid/__init__.py,sha256=QhwGRcneGFHREM-MMdYpbcx-aWdsWsu2WznHzx7LaUM,92
20
20
  trd_utils/exchanges/hyperliquid/hyperliquid_client.py,sha256=rqR5AG3aLV6vcho2lvYSgl8SCz-cFTNwag8dNLLDcn4,6852
21
- trd_utils/exchanges/hyperliquid/hyperliquid_types.py,sha256=ueL7Q4yOAK4orlUqeLVNRk6u1AG83pDeGJasTeT3774,2666
21
+ trd_utils/exchanges/hyperliquid/hyperliquid_types.py,sha256=TEyRBbSi_3CtDJC3bUTE5nZrZiiggvLGOqrU6mrHZCQ,3002
22
22
  trd_utils/html_utils/__init__.py,sha256=1WWs8C7JszRjTkmzIRLHpxWECHur_DrulTPGIeX88oM,426
23
23
  trd_utils/html_utils/html_formats.py,sha256=unKsvOiiDmYTTaM0DYZEUNLEUzWQKKrqASJXvY54kvU,2299
24
24
  trd_utils/tradingview/__init__.py,sha256=H0QYb-O5qvy7qC3yswtlcSWLmeBnaS6oJ3JtjvmaV_Y,154
@@ -26,7 +26,7 @@ trd_utils/tradingview/tradingview_client.py,sha256=g_eWYaCRQAL8Kvd-r6AnAdbH7Jha6
26
26
  trd_utils/tradingview/tradingview_types.py,sha256=z21MXPVdWHAduEl3gSeMIRhxtBN9yK-jPYHfZSMIbSA,6144
27
27
  trd_utils/types_helper/__init__.py,sha256=lLbUiW1jUV1gjzTMFLthwkvF0hwauH-F_J2JZq--1U0,67
28
28
  trd_utils/types_helper/base_model.py,sha256=zehCrDH-9OhWtdKVu05yfcKP52oBD303aMEhs_nytSg,10892
29
- trd_utils-0.0.20.dist-info/LICENSE,sha256=J1EP2xt87RjjmsTV1jTjHDQMLIM9FjdwEftTpw8hyv4,1067
30
- trd_utils-0.0.20.dist-info/METADATA,sha256=9p1L_6c3sR9uN8UR0_hBQ-aFNMvuD4dj9E1GiVGKbFY,1095
31
- trd_utils-0.0.20.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
- trd_utils-0.0.20.dist-info/RECORD,,
29
+ trd_utils-0.0.21.dist-info/LICENSE,sha256=J1EP2xt87RjjmsTV1jTjHDQMLIM9FjdwEftTpw8hyv4,1067
30
+ trd_utils-0.0.21.dist-info/METADATA,sha256=zTCrpDbhnB2c6UmUv2040qCz4-pQLsAixUymvW_oQJE,1095
31
+ trd_utils-0.0.21.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
+ trd_utils-0.0.21.dist-info/RECORD,,