finterion-investing-algorithm-framework 0.14.1__py3-none-any.whl → 0.14.3__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 finterion-investing-algorithm-framework might be problematic. Click here for more details.

@@ -2,7 +2,7 @@ import logging
2
2
 
3
3
  from finterion import Finterion
4
4
  from investing_algorithm_framework import create_app as framework_create_app, \
5
- Task, TimeUnit, App, MarketCredential
5
+ Task, TimeUnit, App, MarketCredential, AppHook, Algorithm
6
6
 
7
7
  from finterion_investing_algorithm_framework.market_service import \
8
8
  FinterionMarketService
@@ -58,5 +58,11 @@ def create_app(
58
58
  logger.debug("Pinging Finterion platform")
59
59
  client.ping()
60
60
 
61
- app.add_task(PingTask)
61
+ class PingAppHook(AppHook):
62
+
63
+ def on_run(self, app, algorithm: Algorithm):
64
+ algorithm.add_task(PingTask)
65
+
66
+ # Register the ping task to the algorithm
67
+ app.after_initialize(PingAppHook())
62
68
  return app
@@ -9,7 +9,9 @@ from finterion_investing_algorithm_framework.exceptions import \
9
9
 
10
10
 
11
11
  class FinterionMarketService(CCXTMarketService):
12
-
12
+ """
13
+ Finterion market service implementation.
14
+ """
13
15
  def cancel_order(self, order, market):
14
16
  pass
15
17
 
@@ -87,14 +89,14 @@ class FinterionMarketService(CCXTMarketService):
87
89
  return [self._convert_order(order) for order in orders]
88
90
 
89
91
  def get_balance(self, market):
92
+ """
93
+ Finterion implementation of get_balance.
94
+ """
90
95
  positions = self._finterion.get_positions()
91
- entries = {"free": {}}
96
+ entries = {}
92
97
 
93
98
  for position in positions:
94
- entries[position["symbol"]] = {
95
- "free": position["amount"],
96
- }
97
- entries["free"][position["symbol"]] = float(position["amount"])
99
+ entries[position["symbol"]] = float(position["amount"])
98
100
 
99
101
  return entries
100
102
 
@@ -176,3 +178,6 @@ class FinterionMarketService(CCXTMarketService):
176
178
  order.updated_at = parser.parse(finterion_order.get("updated_at"))
177
179
 
178
180
  return order
181
+
182
+ def get_symbols(self, market):
183
+ return self._finterion.get_supported_symbols()
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: finterion-investing-algorithm-framework
3
- Version: 0.14.1
4
- Summary: This is the official plugin for the investing algorithm framework open source project.
5
- Author: marcvanduyn
3
+ Version: 0.14.3
4
+ Summary: This is the official finterion plugin for the investing algorithm framework open source project.
5
+ Author: Marc van Duyn
6
6
  Author-email: marc@finterion.com
7
7
  Requires-Python: >=3.8.1,<4.0.0
8
8
  Classifier: Programming Language :: Python :: 3
@@ -10,8 +10,8 @@ Classifier: Programming Language :: Python :: 3.9
10
10
  Classifier: Programming Language :: Python :: 3.10
11
11
  Classifier: Programming Language :: Python :: 3.11
12
12
  Classifier: Programming Language :: Python :: 3.12
13
- Requires-Dist: finterion (==0.8.6)
14
- Requires-Dist: investing-algorithm-framework (>=2.4,<3.0)
13
+ Requires-Dist: finterion (>=0.8.8,<0.9.0)
14
+ Requires-Dist: investing-algorithm-framework (>=3.3.1,<4.0.0)
15
15
  Description-Content-Type: text/markdown
16
16
 
17
17
  # Finterion Investing Algorithm Framework Plugin
@@ -1,13 +1,13 @@
1
1
  finterion_investing_algorithm_framework/__init__.py,sha256=u-srn87VlLUPUJHWR5hgMAHqw2BWtb1v0eH0tQ8M16w,107
2
2
  finterion_investing_algorithm_framework/configuration/__init__.py,sha256=yz9TVm7RoGgF3EJ95-iLJrMup7eYoRvTXY1TyfEiGf4,42
3
3
  finterion_investing_algorithm_framework/configuration/constants.py,sha256=bhabsdZ8omPvAZlQmdPGM70vHQHS2pcJm2olpkSEciU,93
4
- finterion_investing_algorithm_framework/create_app.py,sha256=3lCtf0V1_Gb5JT5YENYqlUs_IPI_T_-KxV8jmT-nKp0,1884
4
+ finterion_investing_algorithm_framework/create_app.py,sha256=mVEp4ya4r-kccsKIUBjHkjhuL1KwYYv1TdTdk-wjTbY,2091
5
5
  finterion_investing_algorithm_framework/exceptions.py,sha256=KOaDjHQC7vNpKwYYNxJ2nuaJYceMmvExW3BLSzPSWJk,197
6
- finterion_investing_algorithm_framework/market_service.py,sha256=w0_iHmnmHOs01IPDmhjD58uQnSqp06ergGUVVKdijAI,5789
6
+ finterion_investing_algorithm_framework/market_service.py,sha256=4dAdbB2M_Wpxd7NFefL2Jprv-BBw_QnD05McCj3WMQk,5893
7
7
  finterion_investing_algorithm_framework/models/__init__.py,sha256=k67BzFduaA1pF6Qp7o4J4Powl8yewD4oL-LldkjtphE,175
8
8
  finterion_investing_algorithm_framework/models/portfolio_configuration.py,sha256=ahRMjEWaymBn_z9ROBeU9jYmNANonqiXyqQf8hoYNEU,774
9
9
  finterion_investing_algorithm_framework/validation.py,sha256=U7UDN7pkchQSRCotk33hIbYJUsnjnz_4zKK0fdUGdNc,506
10
- finterion_investing_algorithm_framework-0.14.1.dist-info/LICENSE,sha256=wbVEDvoZiMPHufRY3sLEffvAr7GH5hOIngHF8y4HFQg,11343
11
- finterion_investing_algorithm_framework-0.14.1.dist-info/METADATA,sha256=ZUMRZrGSWGwx9cwcyePB2Ykn1kmlyHq4y9I9QD-cIvA,1803
12
- finterion_investing_algorithm_framework-0.14.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
13
- finterion_investing_algorithm_framework-0.14.1.dist-info/RECORD,,
10
+ finterion_investing_algorithm_framework-0.14.3.dist-info/LICENSE,sha256=wbVEDvoZiMPHufRY3sLEffvAr7GH5hOIngHF8y4HFQg,11343
11
+ finterion_investing_algorithm_framework-0.14.3.dist-info/METADATA,sha256=r6d5nwmeoW6vNzSwY6MtMdhaTry_Za8SDACeG3q53Wk,1826
12
+ finterion_investing_algorithm_framework-0.14.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
13
+ finterion_investing_algorithm_framework-0.14.3.dist-info/RECORD,,