Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: stop trading conditions #245

Merged
merged 22 commits into from
Apr 12, 2024
Merged

Conversation

jmoreira-valory
Copy link
Collaborator

@jmoreira-valory jmoreira-valory commented Apr 10, 2024

Check for stop trading conditions.

The trader will stop trading and transit to RedeemRound if any of these conditions occur:

  • The parameter/env variable DISABLE_TRADING is set to true.
  • The KPI fot the staking contract has been met.

This PR requires to reactor the staking_abci Skill to extract common functionality to be used in the check_stop_trading_abci.
This PR contains a small hack to solve an issue with non-initialized data. Namely, it always requires that the trader don't skip going to the "trading path" on the first period. See detailed comment.

packages/valory/skills/check_stop_trading_abci/README.md Outdated Show resolved Hide resolved
packages/valory/skills/check_stop_trading_abci/models.py Outdated Show resolved Hide resolved
packages/valory/skills/check_stop_trading_abci/rounds.py Outdated Show resolved Hide resolved
packages/valory/skills/check_stop_trading_abci/rounds.py Outdated Show resolved Hide resolved
packages/valory/skills/check_stop_trading_abci/rounds.py Outdated Show resolved Hide resolved
@Adamantios Adamantios merged commit b8c1e0b into main Apr 12, 2024
6 checks passed
@Adamantios Adamantios deleted the feat/stop_trading_conditions_2 branch April 12, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants