@@ -8,27 +8,38 @@ pip install finterion-investing-algorithm-framework
88```
99
1010## Usage
11- In order to use the plugin you must use the 'create_app' function provided
12- by the plugin. This function will return an instance of the investing
13- algorithm framework configured with the finterion platform.
11+ In order to use the plugin you must register the following components in your investing algorithm framework application:
12+ - ** FinterionOrderExecutor** : This component is responsible for executing orders on the finterion platform.
13+ - ** FinterionPortfolioProvider** : This component is responsible for connecting the portfolio and syncing positions.
14+ - ** FinterionPingHook** : This component is responsible for pinging the finterion platform.
1415
1516> ** Note:** You must provide the API key of your algorithm in order to use
1617> the plugin. You can find your API keys in the developer dashboard of
1718> your algorithm on the finterion platform.
1819
20+ ## Example
1921``` python
20- from finterion_investing_algorithm_framework import create_app
22+ import logging.config
23+ from dotenv import load_dotenv
2124
22- app = create_app( api_key = " <YOUR_TRADING_BOT_FINTERION_API_KEY> " )
25+ from investing_algorithm_framework import create_app, DEFAULT_LOGGING_CONFIG
2326
24- # Add your investing algorithm framework market data sources
25- # .....
27+ from finterion_investing_algorithm_framework import \
28+ FinterionPortfolioProvider, FinterionOrderExecutor, FinterionPingAction
2629
27- # Add your investing algorithm framework trading strategies
28- # ....
2930
30- if __name__ == " __main__" :
31- app.run()
31+ load_dotenv()
32+ logging.config.dictConfig(DEFAULT_LOGGING_CONFIG )
33+
34+ app = create_app()
35+ app.on_strategy_run(FinterionPingAction)
36+ app.add_order_executor(FinterionOrderExecutor)
37+ app.add_portfolio_provider(FinterionPortfolioProvider)
38+ app.add_market(
39+ market = " Finterion" ,
40+ api_key = " <FINTERION_API_KEY>" , # Or set the environment variable FINTERION_API_KEY
41+ trading_symbol = " EUR" ,
42+ )
3243```
3344
3445## Documentation
0 commit comments