quantplay 2.0.23__tar.gz → 2.0.24__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.23 → quantplay-2.0.24}/PKG-INFO +1 -1
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/noren.py +6 -1
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/upstox.py +13 -8
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay.egg-info/PKG-INFO +1 -1
- {quantplay-2.0.23 → quantplay-2.0.24}/setup.py +1 -1
- {quantplay-2.0.23 → quantplay-2.0.24}/README.md +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/pyproject.toml +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/aliceblue.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/angelone.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/auto_login/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/auto_login/aliceblue.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/finvasia_utils/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/finvasia_utils/fa_noren.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/five_paisa.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/flattrade.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/ft_utils/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/ft_utils/flattrade_utils.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/ft_utils/ft_noren.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/generics/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/generics/broker.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/iifl_xts.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/kite_utils.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/motilal.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/shoonya.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/uplink/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/uplink/uplink_utils.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/xts.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/xts_utils/Connect.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/xts_utils/Exception.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/xts_utils/InteractiveSocketClient.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/xts_utils/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/broker/zerodha.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/exception/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/exception/exceptions.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/model/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/model/broker.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/model/generics.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/model/order_event.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/py.typed +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/equities/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/equities/intraday/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/equities/overnight/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/futures/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/futures/overnight/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/options/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/options/intraday/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/options/intraday/ladder.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/options/intraday/musk.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/options/intraday/short_straddle.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/utils/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/utils/constant.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/utils/exchange.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/utils/number_utils.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/utils/pickle_utils.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/utils/selenium_utils.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/wrapper/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay/wrapper/aws/s3.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay.egg-info/SOURCES.txt +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay.egg-info/dependency_links.txt +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay.egg-info/requires.txt +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/quantplay.egg-info/top_level.txt +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/setup.cfg +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/tests/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/tests/conftest.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/tests/wrapper/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/tests/wrapper/aws/__init__.py +0 -0
- {quantplay-2.0.23 → quantplay-2.0.24}/tests/wrapper/aws/s3_test.py +0 -0
|
@@ -505,7 +505,6 @@ class Noren(Broker):
|
|
|
505
505
|
"norenordno": "order_id",
|
|
506
506
|
"uid": "user_id",
|
|
507
507
|
"exch": "exchange",
|
|
508
|
-
"avgprc": "average_price",
|
|
509
508
|
"prd": "product",
|
|
510
509
|
"trantype": "transaction_type",
|
|
511
510
|
"qty": "quantity",
|
|
@@ -542,6 +541,12 @@ class Noren(Broker):
|
|
|
542
541
|
orders_df = orders_df.with_columns(
|
|
543
542
|
pl.col("trgprc").cast(pl.Float64).alias("trigger_price")
|
|
544
543
|
)
|
|
544
|
+
if "avgprc" not in orders_df.columns:
|
|
545
|
+
orders_df = orders_df.with_columns(pl.lit(None).alias("average_price"))
|
|
546
|
+
else:
|
|
547
|
+
orders_df = orders_df.with_columns(
|
|
548
|
+
pl.col("avgprc").cast(pl.Float64).alias("average_price")
|
|
549
|
+
)
|
|
545
550
|
if "remarks" not in orders_df.columns:
|
|
546
551
|
orders_df = orders_df.with_columns(pl.lit(None).alias("tag"))
|
|
547
552
|
else:
|
|
@@ -354,7 +354,8 @@ class Upstox(Broker):
|
|
|
354
354
|
# Get Positions
|
|
355
355
|
api_response = api_instance.get_positions(self.api_version)
|
|
356
356
|
positions = [
|
|
357
|
-
position.to_dict()
|
|
357
|
+
position.to_dict()
|
|
358
|
+
for position in api_response.data # type:ignore
|
|
358
359
|
]
|
|
359
360
|
positions_df = pl.DataFrame(positions)
|
|
360
361
|
except ApiException as e:
|
|
@@ -484,13 +485,6 @@ class Upstox(Broker):
|
|
|
484
485
|
if tag:
|
|
485
486
|
orders_df = orders_df.filter(pl.col("tag") == tag)
|
|
486
487
|
|
|
487
|
-
orders_df = orders_df.with_columns(
|
|
488
|
-
pl.col("instrument_token")
|
|
489
|
-
.str.split_exact("|", 1)
|
|
490
|
-
.struct.rename_fields(["upstox_exchange", "token"])
|
|
491
|
-
.alias("fields")
|
|
492
|
-
).unnest("fields")
|
|
493
|
-
|
|
494
488
|
orders_df = orders_df.with_columns(
|
|
495
489
|
pl.when(pl.col("exchange") == "NSE")
|
|
496
490
|
.then(pl.col("tradingsymbol").str.replace("-EQ", ""))
|
|
@@ -498,6 +492,17 @@ class Upstox(Broker):
|
|
|
498
492
|
.alias("tradingsymbol")
|
|
499
493
|
)
|
|
500
494
|
|
|
495
|
+
orders_df = orders_df.with_columns(
|
|
496
|
+
pl.struct(["exchange", "tradingsymbol"])
|
|
497
|
+
.map_elements(
|
|
498
|
+
lambda x: int(
|
|
499
|
+
self.symbol_attribute(x["exchange"], x["tradingsymbol"], "token")
|
|
500
|
+
),
|
|
501
|
+
return_dtype=pl.Int64,
|
|
502
|
+
)
|
|
503
|
+
.alias("token")
|
|
504
|
+
)
|
|
505
|
+
|
|
501
506
|
orders_df = orders_df.with_columns(
|
|
502
507
|
pl.col("order_timestamp")
|
|
503
508
|
.str.strptime(pl.Datetime, "%Y-%m-%d %H:%M:%S")
|
|
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
|
{quantplay-2.0.23 → quantplay-2.0.24}/quantplay/strategies/options/intraday/short_straddle.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
|