quantplay 2.0.4__tar.gz → 2.0.6__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.
- {quantplay-2.0.4 → quantplay-2.0.6}/PKG-INFO +1 -1
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/angelone.py +6 -1
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/motilal.py +6 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/xts.py +10 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/zerodha.py +5 -2
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay.egg-info/PKG-INFO +1 -1
- {quantplay-2.0.4 → quantplay-2.0.6}/setup.py +1 -1
- {quantplay-2.0.4 → quantplay-2.0.6}/README.md +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/pyproject.toml +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/aliceblue.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/auto_login/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/auto_login/aliceblue.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/finvasia_utils/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/finvasia_utils/fa_noren.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/five_paisa.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/flattrade.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/ft_utils/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/ft_utils/flattrade_utils.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/ft_utils/ft_noren.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/generics/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/generics/broker.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/iifl_xts.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/kite_utils.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/noren.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/shoonya.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/uplink/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/uplink/uplink_utils.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/upstox.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/xts_utils/Connect.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/xts_utils/Exception.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/xts_utils/InteractiveSocketClient.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/broker/xts_utils/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/exception/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/exception/exceptions.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/model/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/model/broker/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/model/broker/generics.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/py.typed +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/strategies/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/strategies/equities/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/strategies/equities/intraday/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/strategies/equities/overnight/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/strategies/futures/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/strategies/futures/overnight/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/strategies/options/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/strategies/options/intraday/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/strategies/options/intraday/ladder.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/strategies/options/intraday/musk.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/strategies/options/intraday/short_straddle.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/utils/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/utils/constant.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/utils/exchange.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/utils/number_utils.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/utils/pickle_utils.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/utils/selenium_utils.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/wrapper/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay/wrapper/aws/s3.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay.egg-info/SOURCES.txt +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay.egg-info/dependency_links.txt +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay.egg-info/requires.txt +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/quantplay.egg-info/top_level.txt +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/setup.cfg +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/tests/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/tests/conftest.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/tests/wrapper/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/tests/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.4 → quantplay-2.0.6}/tests/wrapper/aws/s3_test.py +0 -0
|
@@ -425,7 +425,12 @@ class AngelOne(Broker):
|
|
|
425
425
|
/ pl.col("quantity").cast(pl.Int32)
|
|
426
426
|
).alias("average_price")
|
|
427
427
|
)
|
|
428
|
-
|
|
428
|
+
positions_df = positions_df.with_columns(
|
|
429
|
+
pl.when(pl.col("quantity") == 0)
|
|
430
|
+
.then(pl.lit(0))
|
|
431
|
+
.otherwise(pl.col("average_price"))
|
|
432
|
+
.alias("average_price")
|
|
433
|
+
)
|
|
429
434
|
return positions_df[list(self.positions_schema.keys())].cast(
|
|
430
435
|
self.positions_schema
|
|
431
436
|
)
|
|
@@ -677,6 +677,12 @@ class Motilal(Broker):
|
|
|
677
677
|
"average_price"
|
|
678
678
|
)
|
|
679
679
|
)
|
|
680
|
+
positions_df = positions_df.with_columns(
|
|
681
|
+
pl.when(pl.col("quantity") == 0)
|
|
682
|
+
.then(0)
|
|
683
|
+
.otherwise(pl.col("average_price"))
|
|
684
|
+
.alias("average_price")
|
|
685
|
+
)
|
|
680
686
|
|
|
681
687
|
return positions_df[list(self.positions_schema.keys())].cast(
|
|
682
688
|
self.positions_schema
|
|
@@ -386,6 +386,10 @@ class XTS(Broker):
|
|
|
386
386
|
.then(pl.lit("NSE"))
|
|
387
387
|
.when(pl.col("exchange") == "NSEFO")
|
|
388
388
|
.then(pl.lit("NFO"))
|
|
389
|
+
.when(pl.col("exchange") == "BSECM")
|
|
390
|
+
.then(pl.lit("BSE"))
|
|
391
|
+
.when(pl.col("exchange") == "BSEFO")
|
|
392
|
+
.then(pl.lit("BFO"))
|
|
389
393
|
.otherwise(pl.col("exchange"))
|
|
390
394
|
.alias("exchange")
|
|
391
395
|
)
|
|
@@ -450,6 +454,12 @@ class XTS(Broker):
|
|
|
450
454
|
"average_price"
|
|
451
455
|
)
|
|
452
456
|
)
|
|
457
|
+
positions_df = positions_df.with_columns(
|
|
458
|
+
pl.when(pl.col("quantity") == 0)
|
|
459
|
+
.then(pl.lit(0))
|
|
460
|
+
.otherwise(pl.col("average_price"))
|
|
461
|
+
.alias("average_price")
|
|
462
|
+
)
|
|
453
463
|
|
|
454
464
|
return positions_df
|
|
455
465
|
|
|
@@ -427,7 +427,10 @@ class Zerodha(Broker):
|
|
|
427
427
|
ltp_map[exchange_symbol] = symbol_ltps[exchange_symbol]["last_price"]
|
|
428
428
|
|
|
429
429
|
positions_df = positions_df.with_columns(
|
|
430
|
-
pl.col("exchange_symbol")
|
|
430
|
+
pl.col("exchange_symbol")
|
|
431
|
+
.replace_strict(ltp_map, default=0.0)
|
|
432
|
+
.cast(pl.Float64)
|
|
433
|
+
.alias("ltp")
|
|
431
434
|
)
|
|
432
435
|
|
|
433
436
|
positions_df = positions_df.with_columns(
|
|
@@ -472,7 +475,7 @@ class Zerodha(Broker):
|
|
|
472
475
|
|
|
473
476
|
@timeit(MetricName="Zerodha:orders")
|
|
474
477
|
def orders(self, tag=None, add_ltp=True) -> pl.DataFrame:
|
|
475
|
-
orders = self.kite_list_response(self.
|
|
478
|
+
orders = self.kite_list_response(self.wrapper.orders)
|
|
476
479
|
for order in orders:
|
|
477
480
|
order["user_id"] = order.pop("placed_by")
|
|
478
481
|
orders_df = pl.DataFrame(orders, schema=self.orders_schema)
|
|
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
|
|
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
|