quantplay 2.0.135__tar.gz → 2.0.136__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.135 → quantplay-2.0.136}/PKG-INFO +1 -1
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/icici_direct.py +15 -9
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay.egg-info/PKG-INFO +1 -1
- {quantplay-2.0.135 → quantplay-2.0.136}/setup.py +1 -1
- {quantplay-2.0.135 → quantplay-2.0.136}/README.md +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/pyproject.toml +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/aliceblue.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/angelone.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/auto_login/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/auto_login/aliceblue.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/broker_factory.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/dhan.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/finvasia_utils/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/finvasia_utils/fa_noren.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/five_paisa.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/flattrade.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/ft_utils/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/ft_utils/flattrade_utils.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/ft_utils/ft_noren.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/generics/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/generics/broker.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/iifl_xts.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/jainam_xts.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/kite_utils.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/kotak.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/motilal.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/noren.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/shoonya.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/uplink/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/uplink/uplink_utils.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/upstox.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/xts.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/xts_utils/Connect.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/xts_utils/Exception.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/xts_utils/InteractiveSocketClient.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/xts_utils/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/zerodha.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/exception/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/exception/exceptions.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/model/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/model/broker.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/model/broker_response.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/model/generics.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/model/instrument_data.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/model/order_event.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/py.typed +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/utils/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/utils/caching.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/utils/constant.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/utils/exchange.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/utils/number_utils.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/utils/pickle_utils.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/utils/selenium_utils.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/wrapper/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay/wrapper/aws/s3.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay.egg-info/SOURCES.txt +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay.egg-info/dependency_links.txt +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay.egg-info/requires.txt +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/quantplay.egg-info/top_level.txt +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/setup.cfg +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/tests/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/tests/conftest.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/tests/wrapper/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/tests/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.135 → quantplay-2.0.136}/tests/wrapper/aws/s3_test.py +0 -0
|
@@ -238,6 +238,12 @@ class ICICI(Broker):
|
|
|
238
238
|
.when(pl.col("right") == "Put")
|
|
239
239
|
.then(pl.lit("PE"))
|
|
240
240
|
.alias("instrument_type"),
|
|
241
|
+
(
|
|
242
|
+
pl.col("unrealized_profit").cast(pl.Float32)
|
|
243
|
+
+ pl.col("realized_profit").cast(pl.Float32)
|
|
244
|
+
).alias("pnl"),
|
|
245
|
+
pl.col("quantity").cast(pl.Int32).alias("quantity"),
|
|
246
|
+
pl.col("average_price").cast(pl.Float32).alias("average_price")
|
|
241
247
|
)
|
|
242
248
|
|
|
243
249
|
positions_df = positions_df.with_columns(
|
|
@@ -264,17 +270,17 @@ class ICICI(Broker):
|
|
|
264
270
|
)
|
|
265
271
|
|
|
266
272
|
positions_df = positions_df.with_columns(
|
|
267
|
-
pl.
|
|
268
|
-
pl.lit(0).alias("
|
|
273
|
+
pl.when(pl.col("quantity") < 0)
|
|
274
|
+
.then(pl.col("quantity").abs()*pl.col("average_price")).otherwise(pl.lit(0)).alias("sell_value"),
|
|
275
|
+
pl.when(pl.col("quantity") > 0)
|
|
276
|
+
.then(pl.col("quantity").abs() * pl.col("average_price")).otherwise(pl.lit(0)).alias("buy_value"),
|
|
269
277
|
pl.lit(0).alias("ltp"),
|
|
270
|
-
pl.
|
|
278
|
+
pl.when(pl.col("quantity") < 0)
|
|
279
|
+
.then(pl.col("quantity").abs()).otherwise(pl.lit(0)).alias("sell_quantity"),
|
|
280
|
+
pl.when(pl.col("quantity") > 0)
|
|
281
|
+
.then(pl.col("quantity").abs()).otherwise(pl.lit(0)).alias("buy_quantity"),
|
|
271
282
|
pl.lit("NRML").alias("product"),
|
|
272
|
-
pl.lit(0).alias("buy_quantity"),
|
|
273
283
|
pl.col("instrument_type").alias("option_type"),
|
|
274
|
-
(
|
|
275
|
-
pl.col("unrealized_profit").cast(pl.Float32)
|
|
276
|
-
+ pl.col("realized_profit").cast(pl.Float32)
|
|
277
|
-
).alias("pnl"),
|
|
278
284
|
)
|
|
279
285
|
return positions_df[list(self.positions_schema.keys())].cast(
|
|
280
286
|
self.positions_schema
|
|
@@ -382,7 +388,7 @@ class ICICI(Broker):
|
|
|
382
388
|
}
|
|
383
389
|
|
|
384
390
|
def get_exchange(self, exchange: ExchangeType) -> ...:
|
|
385
|
-
return
|
|
391
|
+
return exchange
|
|
386
392
|
|
|
387
393
|
def get_product(self, product: ProductType) -> ...:
|
|
388
394
|
return
|
|
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
|
{quantplay-2.0.135 → quantplay-2.0.136}/quantplay/broker/xts_utils/InteractiveSocketClient.py
RENAMED
|
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
|