siglab-py 0.1.38__py3-none-any.whl → 0.1.50__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.

@@ -21,7 +21,7 @@ def timestamp_to_datetime_cols(pd_candles : pd.DataFrame):
21
21
  pd_candles['timestamp_ms'] = pd_candles['timestamp_ms'].apply(
22
22
  lambda x: int(x.timestamp()) if isinstance(x, pd.Timestamp) else (int(x) if len(str(int(x)))==13 else int(x*1000))
23
23
  )
24
- pd_candles['datetime'] = pd_candles['timestamp_ms'].apply(lambda x: datetime.fromtimestamp(int(x)))
24
+ pd_candles['datetime'] = pd_candles['timestamp_ms'].apply(lambda x: datetime.fromtimestamp(int(x/1000)))
25
25
  pd_candles['datetime'] = pd.to_datetime(pd_candles['datetime'])
26
26
  pd_candles['datetime'] = pd_candles['datetime'].dt.tz_localize(None)
27
27
  pd_candles['datetime_utc'] = pd_candles['timestamp_ms'].apply(
@@ -37,17 +37,17 @@ def timestamp_to_datetime_cols(pd_candles : pd.DataFrame):
37
37
  pd_candles['dayofweek'] = pd_candles['datetime'].dt.dayofweek # dayofweek: Monday is 0 and Sunday is 6
38
38
 
39
39
  pd_candles['week_of_month'] = pd_candles['timestamp_ms'].apply(
40
- lambda x: timestamp_to_week_of_month(x)
40
+ lambda x: timestamp_to_week_of_month(int(x/1000))
41
41
  )
42
42
 
43
43
  pd_candles['apac_trading_hr'] = pd_candles['timestamp_ms'].apply(
44
- lambda x: "APAC" in timestamp_to_active_trading_regions(x)
44
+ lambda x: "APAC" in timestamp_to_active_trading_regions(int(x/1000))
45
45
  )
46
46
  pd_candles['emea_trading_hr'] = pd_candles['timestamp_ms'].apply(
47
- lambda x: "EMEA" in timestamp_to_active_trading_regions(x)
47
+ lambda x: "EMEA" in timestamp_to_active_trading_regions(int(x/1000))
48
48
  )
49
49
  pd_candles['amer_trading_hr'] = pd_candles['timestamp_ms'].apply(
50
- lambda x: "AMER" in timestamp_to_active_trading_regions(x)
50
+ lambda x: "AMER" in timestamp_to_active_trading_regions(int(x/1000))
51
51
  )
52
52
 
53
53
  def timestamp_to_active_trading_regions(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: siglab-py
3
- Version: 0.1.38
3
+ Version: 0.1.50
4
4
  Summary: Market data fetches, TA calculations and generic order gateway.
5
5
  Author: r0bbarh00d
6
6
  Author-email: r0bbarh00d <r0bbarh00d@gmail.com>
@@ -26,9 +26,9 @@ siglab_py/tests/unit/market_data_util_tests.py,sha256=A1y83itISmMJdn6wLpfwcr4tGo
26
26
  siglab_py/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  siglab_py/util/analytic_util.py,sha256=xo9gD1ELQt_1v84yu9d4NgxtOIXthePZGipvDrjZAQ8,43834
28
28
  siglab_py/util/aws_util.py,sha256=KGmjHrr1rpnnxr33nXHNzTul4tvyyxl9p6gpwNv0Ygc,2557
29
- siglab_py/util/market_data_util.py,sha256=RZ-N8UerEC3svMkJ74ab4eKocWvROCHaOykd9oog85w,19441
29
+ siglab_py/util/market_data_util.py,sha256=QJGYIO-ixzjbOm3pY1koiDd_UV5-_QS7JrwuaCn7kug,19486
30
30
  siglab_py/util/retry_util.py,sha256=mxYuRFZRZoaQQjENcwPmxhxixtd1TFvbxIdPx4RwfRc,743
31
- siglab_py-0.1.38.dist-info/METADATA,sha256=B-M6RDjMYbWaYSFPNvQ5fkVovEZXI6B1mlQDhKG_Qvw,980
32
- siglab_py-0.1.38.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
33
- siglab_py-0.1.38.dist-info/top_level.txt,sha256=AbD4VR9OqmMOGlMJLkAVPGQMtUPIQv0t1BF5xmcLJSk,10
34
- siglab_py-0.1.38.dist-info/RECORD,,
31
+ siglab_py-0.1.50.dist-info/METADATA,sha256=CwwOG2YxROyAEKGuyNh1mMJzIr_qO5E_m8tRkmXGfLo,980
32
+ siglab_py-0.1.50.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
33
+ siglab_py-0.1.50.dist-info/top_level.txt,sha256=AbD4VR9OqmMOGlMJLkAVPGQMtUPIQv0t1BF5xmcLJSk,10
34
+ siglab_py-0.1.50.dist-info/RECORD,,