siglab-py 0.1.10__py3-none-any.whl → 0.1.11__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 siglab-py might be problematic. Click here for more details.

@@ -653,7 +653,8 @@ async def execute_one_position(
653
653
  balances = await exchange.fetch_balance() # type: ignore
654
654
  if param['default_type']!='spot':
655
655
  updated_position = await exchange.fetch_position(symbol=position.ticker) # type: ignore
656
- amount = updated_position['contracts'] * position.multiplier # in base ccy
656
+ # After position closed, 'updated_position' can be an empty dict. hyperliquid for example.
657
+ amount = (updated_position['contracts'] if updated_position else 0) * position.multiplier # in base ccy
657
658
  else:
658
659
  base_ccy : str = position.ticker.split("/")[0]
659
660
  amount = balances[base_ccy]['total']
@@ -78,11 +78,11 @@ if __name__ == '__main__':
78
78
  positions_2 : List[DivisiblePosition] = [
79
79
  DivisiblePosition(
80
80
  ticker = 'SUSHI/USDC:USDC',
81
- side = 'buy',
82
- amount = 60,
81
+ side = 'sell',
82
+ amount = 15,
83
83
  leg_room_bps = 5,
84
84
  order_type = 'limit',
85
- slices=2,
85
+ slices=1,
86
86
  wait_fill_threshold_ms=15000
87
87
  ),
88
88
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: siglab-py
3
- Version: 0.1.10
3
+ Version: 0.1.11
4
4
  Summary: Market data fetches, TA calculations and generic order gateway.
5
5
  Author: r0bbarh00d
6
6
  Author-email: r0bbarh00d <r0bbarh00d@gmail.com>
@@ -12,8 +12,8 @@ siglab_py/market_data_providers/test_provider.py,sha256=wBLCgcWjs7FGZJXWsNyn30lk
12
12
  siglab_py/ordergateway/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  siglab_py/ordergateway/client.py,sha256=1Y0g2AT_Sh7Y-2YdEpnrGHwu2Ml1iqKFmj8_LOoF8YU,8301
14
14
  siglab_py/ordergateway/encrypt_keys_util.py,sha256=-qi87db8To8Yf1WS1Q_Cp2Ya7ZqgWlRqSHfNXCM7wE4,1339
15
- siglab_py/ordergateway/gateway.py,sha256=5ZN_7gOOeJdADlbqpX_tDhZ4v9aw-GgLyYr9o544zJc,35317
16
- siglab_py/ordergateway/test_ordergateway.py,sha256=sCj25DSBmWAJPt-CTPqy12K_tOIAHygtEj0vHa1nbnY,3805
15
+ siglab_py/ordergateway/gateway.py,sha256=N0XrsQDsycSjRDMC9jnC5B1q9LAfz4er0vjlDaGOhYc,35446
16
+ siglab_py/ordergateway/test_ordergateway.py,sha256=vYdB6IypDI8-9Ts3-7g6F9CMKf4nUVG4qQalS4fUu-8,3806
17
17
  siglab_py/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
18
  siglab_py/tests/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
19
  siglab_py/tests/integration/market_data_util_tests.py,sha256=HFESIXEdQmrbDV3DvLiDLq0iE-4itysxSFur_Th4jjE,5207
@@ -24,7 +24,7 @@ siglab_py/util/analytic_util.py,sha256=QLabbEMqM4rKKH2PE_LqxIyo-BUdCRhkLybLATBIm
24
24
  siglab_py/util/aws_util.py,sha256=KGmjHrr1rpnnxr33nXHNzTul4tvyyxl9p6gpwNv0Ygc,2557
25
25
  siglab_py/util/market_data_util.py,sha256=3qTq71xGvQXj0ORKJV50IN5FP_mCBF_gvdmlPyhdyco,16439
26
26
  siglab_py/util/retry_util.py,sha256=mxYuRFZRZoaQQjENcwPmxhxixtd1TFvbxIdPx4RwfRc,743
27
- siglab_py-0.1.10.dist-info/METADATA,sha256=Gc_AY2ISZcBXIYCdMFuVfe3v1_zwAB64fyK-iFfuO4g,1097
28
- siglab_py-0.1.10.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
29
- siglab_py-0.1.10.dist-info/top_level.txt,sha256=AbD4VR9OqmMOGlMJLkAVPGQMtUPIQv0t1BF5xmcLJSk,10
30
- siglab_py-0.1.10.dist-info/RECORD,,
27
+ siglab_py-0.1.11.dist-info/METADATA,sha256=PLGWh1JwOPtp8Ai8kIZvCxgCMbpV0SkAvLB2Ey5Qj5g,1097
28
+ siglab_py-0.1.11.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
29
+ siglab_py-0.1.11.dist-info/top_level.txt,sha256=AbD4VR9OqmMOGlMJLkAVPGQMtUPIQv0t1BF5xmcLJSk,10
30
+ siglab_py-0.1.11.dist-info/RECORD,,