Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Dec 3, 2023
1 parent 9bbd41b commit 8ceb9b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions octobot/community/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import octobot_commons.enums as commons_enums
import octobot_commons.authentication as authentication
import octobot_commons.configuration as commons_configuration
import octobot_commons.profiles as commons_profiles
import octobot_trading.enums as trading_enums


Expand Down Expand Up @@ -109,6 +110,9 @@ async def get_strategies(self, reload=False) -> list[strategy_data.StrategyData]
await self.init_public_data(reset=reload)
return self.public_data.get_strategies()

async def get_strategy_profile_data(self, strategy_id: str) -> commons_profiles.ProfileData:
return await self.supabase_client.fetch_product_config(strategy_id)

def is_feed_connected(self):
return self._community_feed is not None and self._community_feed.is_connected_to_remote_feed()

Expand Down
4 changes: 4 additions & 0 deletions octobot/community/models/strategy_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# You should have received a copy of the GNU General Public
# License along with OctoBot. If not, see <https://www.gnu.org/licenses/>.
import dataclasses
import octobot.community.identifiers_provider as identifiers_provider
import octobot_commons.dataclasses as commons_dataclasses


Expand Down Expand Up @@ -48,3 +49,6 @@ class StrategyData(commons_dataclasses.FlexibleDataclass):
attributes: dict = dataclasses.field(default_factory=dict)
visibility: str = ""
metadata: str = ""

def get_url(self):
return f"{identifiers_provider.IdentifiersProvider.COMMUNITY_URL}/strategies/{self.slug}"

0 comments on commit 8ceb9b8

Please sign in to comment.