Skip to content

Commit

Permalink
Merge pull request #245 from valory-xyz/feat/stop_trading_conditions_2
Browse files Browse the repository at this point in the history
Feat: stop trading conditions
  • Loading branch information
Adamantios authored Apr 12, 2024
2 parents 69af494 + c26a2d9 commit b8c1e0b
Show file tree
Hide file tree
Showing 27 changed files with 987 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/common_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ jobs:
wget https://github.com/zricethezav/gitleaks/releases/download/v8.10.1/gitleaks_8.10.1_linux_x64.tar.gz && \
tar -xzf gitleaks_8.10.1_linux_x64.tar.gz && \
sudo install gitleaks /usr/bin && \
gitleaks detect --report-format json --report-path leak_report
gitleaks detect --report-format json --report-path leak_report -v
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ packages/valory/protocols/tendermint
.env
.1env
keys.json
keys_json/
leak_report

agent/
Expand Down
6 changes: 6 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,9 @@ ed30ffbaaf3c10476dc642d388985c250afaeb8d:packages/valory/skills/market_manager_a
d004f2345bf31b27c343eb52c1bc5a2698e838d6:packages/valory/skills/market_manager_abci/graph_tooling/requests.py:generic-api-key:221
b2c15c1a44ba680dd747a6fbdda9f2e9aced39eb:packages/valory/contracts/service_staking_token/contract.yaml:generic-api-key:10
fc7d0697d1543849b07750430843e6b01426cc7a:packages/valory/services/trader_omen_gnosis/service.yaml:generic-api-key:64
63bb4c2347c3def7bd65d554c8d536b79325afb9:packages/valory/skills/trader_abci/skill.yaml:generic-api-key:154
809a4d8befaf483c8d5d775f3271e7d8601e2985:packages/valory/skills/decision_maker_abci/skill.yaml:generic-api-key:186
809a4d8befaf483c8d5d775f3271e7d8601e2985:packages/valory/skills/trader_abci/skill.yaml:generic-api-key:154
ae28aeb8ad56e1873bfb3996c5d5ad8367709cd1:packages/valory/skills/decision_maker_abci/skill.yaml:generic-api-key:186
ae28aeb8ad56e1873bfb3996c5d5ad8367709cd1:packages/valory/skills/trader_abci/skill.yaml:generic-api-key:154

19 changes: 10 additions & 9 deletions packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
"contract/valory/realitio_proxy/0.1.0": "bafybeidx37xzjjmapwacedgzhum6grfzhp5vhouz4zu3pvpgdy5pgb2fr4",
"contract/valory/conditional_tokens/0.1.0": "bafybeigucumqbsk74nj4rpm4p2cpiky4dj6uws7nfmgpimuviaxcamwqnu",
"contract/valory/agent_registry/0.1.0": "bafybeibedc7ehebk3ikr4cowjbvgpxqpu65nforgqmraxqxiq5jv6rboqe",
"contract/valory/service_staking_token/0.1.0": "bafybeibpe24zfvpipaut77tsutmednncjviqeoekxltsndovdz3ugek7bu",
"contract/valory/service_staking_token/0.1.0": "bafybeid44l7qekvkwkvmfl4kcqchnaktttacp7lbx464mzqqs5cnefj35e",
"contract/valory/transfer_nft_condition/0.1.0": "bafybeicgpoag2lymofz3vnen76q7gtig5hzimn32o57php4uerr6t25em4",
"skill/valory/market_manager_abci/0.1.0": "bafybeidygkw7mwhbk3ry3au5c5265vms5eti375v5jthd4be5dfnnoache",
"skill/valory/decision_maker_abci/0.1.0": "bafybeigyrxb6ycg243crte5mmmut2znfhlnc43rqn3mnp3sylvf563teki",
"skill/valory/trader_abci/0.1.0": "bafybeifupwnewnhskanrklryt2vxalc5jkqedr2ywt3ux6fpaugc6kuu6q",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeibl6b5negw35fumbvl6dvcu7dammqmac5x3htapu3p7yf7lkqr73a",
"skill/valory/staking_abci/0.1.0": "bafybeibf565rftitlrlovlvchoe45ng72ctec74fsvrmegp3o4uepu4q2e",
"agent/valory/trader/0.1.0": "bafybeicxc3v3ungi6qindlyayahmngk23xf6carthxilva3jmd3jdkn3mu",
"service/valory/trader/0.1.0": "bafybeibtstpn3x3shp5nujacgbwidmc5nwxdcz55p2qptwufkucnkhgr54"
"skill/valory/decision_maker_abci/0.1.0": "bafybeibvq365gs7ibi7bkzoqyiirdcbpros2q7z3zpsqxhbcfy5d77y7je",
"skill/valory/trader_abci/0.1.0": "bafybeibss6panq224ec5eecn2jh5lqzyvptahnlrtxcfz6gvej5mdtdqei",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeibcuvrm5fvmh7nuee4tmbof6debprdqzhvhdpzp2dbddtwva4wz3y",
"skill/valory/staking_abci/0.1.0": "bafybeicrp3dbvxcb2wa7kdgpkxu7aqji5fwq6icwcfw7anfcpqv26irsr4",
"skill/valory/check_stop_trading_abci/0.1.0": "bafybeiedpw6gudh7ddrcfpggnbxmbfaqn57a5geg645c2ymuzwy3rtckii",
"agent/valory/trader/0.1.0": "bafybeieqcfsz3bgh5kkw5fg3zb7laznfv57riclspqfe4eooi4wkq5ds2e",
"service/valory/trader/0.1.0": "bafybeieqm5hdfk22mnqtw4onc3oyqccu6yydop7hdrmuqsucja7vvv55bq"
},
"third_party": {
"protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi",
Expand All @@ -30,7 +31,7 @@
"protocol/valory/ipfs/0.1.0": "bafybeiftxi2qhreewgsc5wevogi7yc5g6hbcbo4uiuaibauhv3nhfcdtvm",
"contract/valory/gnosis_safe_proxy_factory/0.1.0": "bafybeib6podeifufgmawvicm3xyz3uaplbcrsptjzz4unpseh7qtcpar74",
"contract/valory/gnosis_safe/0.1.0": "bafybeibq77mgzhyb23blf2eqmia3kc6io5karedfzhntvpcebeqdzrgyqa",
"contract/valory/mech/0.1.0": "bafybeiejdn3rqqa7smbeiypajy63um7okteimvj6bsud3gezneycmdc6te",
"contract/valory/mech/0.1.0": "bafybeiejkna5d7hllaxm6avsnffxfs6n4nx2lncmjz6iodkt2xhcy3mbva",
"contract/valory/service_registry/0.1.0": "bafybeicbxmbzt757lbmyh6762lrkcrp3oeum6dk3z7pvosixasifsk6xlm",
"contract/valory/multisend/0.1.0": "bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y",
"contract/valory/erc20/0.1.0": "bafybeigvftdxjgnlsoemst5d57cor36idywk7bwcfj2bjqijxdxo3xpurq",
Expand All @@ -45,6 +46,6 @@
"skill/valory/abstract_round_abci/0.1.0": "bafybeih3enhagoql7kzpeyzzu2scpkif6y3ubakpralfnwxcvxexdyvy5i",
"skill/valory/transaction_settlement_abci/0.1.0": "bafybeigtzlk4uakmd54rxnznorcrstsr52kta474lgrnvx5ovr546vj7sq",
"skill/valory/termination_abci/0.1.0": "bafybeihq6qtbwt6i53ayqym63vhjexkcppy26gguzhhjqywfmiuqghvv44",
"skill/valory/mech_interact_abci/0.1.0": "bafybeig2kvyn52kskydyono5wmjsfwtzeq5pcsrtn7p72rfesjatzwgrnq"
"skill/valory/mech_interact_abci/0.1.0": "bafybeib3aytq2a5hk6vjsak3eznuilndx4p53utdylbyhcmt6ty7kk6euq"
}
}
22 changes: 13 additions & 9 deletions packages/valory/agents/trader/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ contracts:
- valory/gnosis_safe_proxy_factory:0.1.0:bafybeib6podeifufgmawvicm3xyz3uaplbcrsptjzz4unpseh7qtcpar74
- valory/service_registry:0.1.0:bafybeicbxmbzt757lbmyh6762lrkcrp3oeum6dk3z7pvosixasifsk6xlm
- valory/market_maker:0.1.0:bafybeihyi42hkmu2knrunfdbunjh6j3ibfrnwj7rmqw7mm7pmerzcwzfiq
- valory/erc20:0.1.0:bafybeigvftdxjgnlsoemst5d57cor36idywk7bwcfj2bjqijxdxo3xpurq
- valory/multisend:0.1.0:bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y
- valory/mech:0.1.0:bafybeiejdn3rqqa7smbeiypajy63um7okteimvj6bsud3gezneycmdc6te
- valory/mech:0.1.0:bafybeiejkna5d7hllaxm6avsnffxfs6n4nx2lncmjz6iodkt2xhcy3mbva
- valory/conditional_tokens:0.1.0:bafybeigucumqbsk74nj4rpm4p2cpiky4dj6uws7nfmgpimuviaxcamwqnu
- valory/realitio:0.1.0:bafybeic5ie4oodetj4krdogydvbfxg4qggc3matpiflocah626tpevpreq
- valory/realitio_proxy:0.1.0:bafybeidx37xzjjmapwacedgzhum6grfzhp5vhouz4zu3pvpgdy5pgb2fr4
- valory/agent_registry:0.1.0:bafybeibedc7ehebk3ikr4cowjbvgpxqpu65nforgqmraxqxiq5jv6rboqe
- valory/service_staking_token:0.1.0:bafybeibpe24zfvpipaut77tsutmednncjviqeoekxltsndovdz3ugek7bu
- valory/service_staking_token:0.1.0:bafybeid44l7qekvkwkvmfl4kcqchnaktttacp7lbx464mzqqs5cnefj35e
- valory/transfer_nft_condition:0.1.0:bafybeicgpoag2lymofz3vnen76q7gtig5hzimn32o57php4uerr6t25em4
protocols:
- open_aea/signing:1.0.0:bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi
Expand All @@ -44,12 +43,13 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeidw4mbx3os3hmv7ley7b3g3gja7ydpitr7mxbjpwzxin2mzyt5yam
- valory/termination_abci:0.1.0:bafybeihq6qtbwt6i53ayqym63vhjexkcppy26gguzhhjqywfmiuqghvv44
- valory/transaction_settlement_abci:0.1.0:bafybeigtzlk4uakmd54rxnznorcrstsr52kta474lgrnvx5ovr546vj7sq
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibl6b5negw35fumbvl6dvcu7dammqmac5x3htapu3p7yf7lkqr73a
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeibcuvrm5fvmh7nuee4tmbof6debprdqzhvhdpzp2dbddtwva4wz3y
- valory/market_manager_abci:0.1.0:bafybeidygkw7mwhbk3ry3au5c5265vms5eti375v5jthd4be5dfnnoache
- valory/decision_maker_abci:0.1.0:bafybeigyrxb6ycg243crte5mmmut2znfhlnc43rqn3mnp3sylvf563teki
- valory/trader_abci:0.1.0:bafybeifupwnewnhskanrklryt2vxalc5jkqedr2ywt3ux6fpaugc6kuu6q
- valory/staking_abci:0.1.0:bafybeibf565rftitlrlovlvchoe45ng72ctec74fsvrmegp3o4uepu4q2e
- valory/mech_interact_abci:0.1.0:bafybeig2kvyn52kskydyono5wmjsfwtzeq5pcsrtn7p72rfesjatzwgrnq
- valory/decision_maker_abci:0.1.0:bafybeibvq365gs7ibi7bkzoqyiirdcbpros2q7z3zpsqxhbcfy5d77y7je
- valory/trader_abci:0.1.0:bafybeibss6panq224ec5eecn2jh5lqzyvptahnlrtxcfz6gvej5mdtdqei
- valory/staking_abci:0.1.0:bafybeicrp3dbvxcb2wa7kdgpkxu7aqji5fwq6icwcfw7anfcpqv26irsr4
- valory/check_stop_trading_abci:0.1.0:bafybeiedpw6gudh7ddrcfpggnbxmbfaqn57a5geg645c2ymuzwy3rtckii
- valory/mech_interact_abci:0.1.0:bafybeib3aytq2a5hk6vjsak3eznuilndx4p53utdylbyhcmt6ty7kk6euq
customs:
- valory/mike_strat:0.1.0:bafybeihjiol7f4ch4piwfikurdtfwzsh6qydkbsztpbwbwb2yrqdqf726m
- valory/bet_amount_per_threshold:0.1.0:bafybeihufqu2ra7vud4h6g2nwahx7mvdido7ff6prwnib2tdlc4np7dw24
Expand Down Expand Up @@ -174,7 +174,9 @@ models:
average_block_time: ${int:5}
abt_error_mult: ${int:5}
mech_contract_address: ${str:0x77af31De935740567Cf4fF1986D04B2c964A786a}
request_price: ${int:null}
mech_request_price: ${int:null}
mech_chain_id: ${str:gnosis}
mech_wrapped_native_token_address: ${str:0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d}
sample_bets_closing_days: ${int:10}
trading_strategy: ${str:kelly_criterion}
use_fallback_strategy: ${bool:true}
Expand Down Expand Up @@ -213,6 +215,8 @@ models:
"0x0000000000000000000000000000000000000000"], ["order_address", "0xc7751eff5396a846e7bc83ac31d3cb7d37cb49e4"],
["price", "1000000000000000000"]]}
staking_contract_address: ${str:0x2Ef503950Be67a98746F484DA0bBAdA339DF3326}
disable_trading: ${bool:false}
stop_trading_if_staking_kpi_met: ${bool:true}
agent_balance_threshold: ${int:10000000000000000}
refill_check_interval: ${int:10}
tool_punishment_multiplier: ${int:1}
Expand Down
22 changes: 22 additions & 0 deletions packages/valory/contracts/service_staking_token/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,28 @@ def get_next_checkpoint_ts(
ts = contract.functions.getNextRewardCheckpointTimestamp().call()
return dict(data=ts)

@classmethod
def ts_checkpoint(
cls,
ledger_api: LedgerApi,
contract_address: str,
) -> JSONLike:
"""Retrieve the checkpoint's timestamp."""
contract = cls.get_instance(ledger_api, contract_address)
ts_checkpoint = contract.functions.tsCheckpoint().call()
return dict(data=ts_checkpoint)

@classmethod
def liveness_ratio(
cls,
ledger_api: LedgerApi,
contract_address: str,
) -> JSONLike:
"""Retrieve the liveness ratio."""
contract = cls.get_instance(ledger_api, contract_address)
liveness_ratio = contract.functions.livenessRatio().call()
return dict(data=liveness_ratio)

@classmethod
def get_liveness_period(
cls,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ aea_version: '>=1.0.0, <2.0.0'
fingerprint:
__init__.py: bafybeid3wfzglolebuo6jrrsopswzu4lk77bm76mvw3euizlsjtnt3wmgu
build/ServiceStakingToken.json: bafybeib6frfpqtr4dfyxuylehqmic2iawofydx7u24t7j5zbrsc4m4ijoi
contract.py: bafybeicxwbqmiohfmbikc76cxlt5sext6ly2wmvemysr53alnp5qjq6jmm
contract.py: bafybeihtnccnhtqyiwqomythtuey6vdbsj5swufxl5pcu3ptepmiaolxy4
fingerprint_ignore_patterns: []
contracts: []
class_name: ServiceStakingTokenContract
Expand Down
34 changes: 25 additions & 9 deletions packages/valory/services/trader/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq
fingerprint_ignore_patterns: []
agent: valory/trader:0.1.0:bafybeicxc3v3ungi6qindlyayahmngk23xf6carthxilva3jmd3jdkn3mu
agent: valory/trader:0.1.0:bafybeieqcfsz3bgh5kkw5fg3zb7laznfv57riclspqfe4eooi4wkq5ds2e
number_of_agents: 4
deployment: {}
---
Expand Down Expand Up @@ -79,8 +79,10 @@ type: skill
languages: ${LANGUAGES:list:["en_US"]}
average_block_time: ${ABT:int:5}
abt_error_mult: ${ABT_ERROR_MULT:int:5}
mech_contract_address: ${MECH_CONTRACT_ADDRESS:str:0x77af31de935740567cf4ff1986d04b2c964a786a}
request_price: ${REQUEST_PRICE:int:null}
mech_contract_address: ${MECH_CONTRACT_ADDRESS:str:0x77af31De935740567Cf4fF1986D04B2c964A786a}
mech_request_price: ${MECH_REQUEST_PRICE:int:null}
mech_chain_id: ${MECH_CHAIN_ID:str:gnosis}
mech_wrapped_native_token_address: ${MECH_WRAPPED_NATIVE_TOKEN_ADDRESS:str:0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d}
sample_bets_closing_days: ${SAMPLE_BETS_CLOSING_DAYS:int:10}
trading_strategy: ${TRADING_STRATEGY:str:kelly_criterion}
use_fallback_strategy: ${USE_FALLBACK_STRATEGY:bool:true}
Expand Down Expand Up @@ -108,6 +110,8 @@ type: skill
"stabilityai-stable-diffusion-xl-beta-v2-2-2", "stabilityai-stable-diffusion-512-v2-1",
"stabilityai-stable-diffusion-768-v2-1"]}
staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x2Ef503950Be67a98746F484DA0bBAdA339DF3326}
disable_trading: ${DISABLE_TRADING:bool:false}
stop_trading_if_staking_kpi_met: ${STOP_TRADING_IF_STAKING_KPI_MET:bool:true}
agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000}
refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10}
tool_punishment_multiplier: ${TOOL_PUNISHMENT_MULTIPLIER:int:1}
Expand Down Expand Up @@ -176,8 +180,10 @@ type: skill
languages: ${LANGUAGES:list:["en_US"]}
average_block_time: ${ABT:int:5}
abt_error_mult: ${ABT_ERROR_MULT:int:5}
mech_contract_address: ${MECH_CONTRACT_ADDRESS:str:0x77af31de935740567cf4ff1986d04b2c964a786a}
request_price: ${REQUEST_PRICE:int:null}
mech_contract_address: ${MECH_CONTRACT_ADDRESS:str:0x77af31De935740567Cf4fF1986D04B2c964A786a}
mech_request_price: ${MECH_REQUEST_PRICE:int:null}
mech_chain_id: ${MECH_CHAIN_ID:str:gnosis}
mech_wrapped_native_token_address: ${MECH_WRAPPED_NATIVE_TOKEN_ADDRESS:str:0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d}
sample_bets_closing_days: ${SAMPLE_BETS_CLOSING_DAYS:int:10}
trading_strategy: ${TRADING_STRATEGY:str:kelly_criterion}
use_fallback_strategy: ${USE_FALLBACK_STRATEGY:bool:true}
Expand Down Expand Up @@ -205,6 +211,8 @@ type: skill
"stabilityai-stable-diffusion-xl-beta-v2-2-2", "stabilityai-stable-diffusion-512-v2-1",
"stabilityai-stable-diffusion-768-v2-1"]}
staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x2Ef503950Be67a98746F484DA0bBAdA339DF3326}
disable_trading: ${DISABLE_TRADING:bool:false}
stop_trading_if_staking_kpi_met: ${STOP_TRADING_IF_STAKING_KPI_MET:bool:true}
agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000}
refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10}
tool_punishment_multiplier: ${TOOL_PUNISHMENT_MULTIPLIER:int:1}
Expand Down Expand Up @@ -271,8 +279,10 @@ type: skill
languages: ${LANGUAGES:list:["en_US"]}
average_block_time: ${ABT:int:5}
abt_error_mult: ${ABT_ERROR_MULT:int:5}
mech_contract_address: ${MECH_CONTRACT_ADDRESS:str:0x77af31de935740567cf4ff1986d04b2c964a786a}
request_price: ${REQUEST_PRICE:int:null}
mech_contract_address: ${MECH_CONTRACT_ADDRESS:str:0x77af31De935740567Cf4fF1986D04B2c964A786a}
mech_request_price: ${MECH_REQUEST_PRICE:int:null}
mech_chain_id: ${MECH_CHAIN_ID:str:gnosis}
mech_wrapped_native_token_address: ${MECH_WRAPPED_NATIVE_TOKEN_ADDRESS:str:0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d}
sample_bets_closing_days: ${SAMPLE_BETS_CLOSING_DAYS:int:10}
trading_strategy: ${TRADING_STRATEGY:str:kelly_criterion}
use_fallback_strategy: ${USE_FALLBACK_STRATEGY:bool:true}
Expand Down Expand Up @@ -300,6 +310,8 @@ type: skill
"stabilityai-stable-diffusion-xl-beta-v2-2-2", "stabilityai-stable-diffusion-512-v2-1",
"stabilityai-stable-diffusion-768-v2-1"]}
staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x2Ef503950Be67a98746F484DA0bBAdA339DF3326}
disable_trading: ${DISABLE_TRADING:bool:false}
stop_trading_if_staking_kpi_met: ${STOP_TRADING_IF_STAKING_KPI_MET:bool:true}
agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000}
refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10}
tool_punishment_multiplier: ${TOOL_PUNISHMENT_MULTIPLIER:int:1}
Expand Down Expand Up @@ -366,8 +378,10 @@ type: skill
languages: ${LANGUAGES:list:["en_US"]}
average_block_time: ${ABT:int:5}
abt_error_mult: ${ABT_ERROR_MULT:int:5}
mech_contract_address: ${MECH_CONTRACT_ADDRESS:str:0x77af31de935740567cf4ff1986d04b2c964a786a}
request_price: ${REQUEST_PRICE:int:null}
mech_contract_address: ${MECH_CONTRACT_ADDRESS:str:0x77af31De935740567Cf4fF1986D04B2c964A786a}
mech_request_price: ${MECH_REQUEST_PRICE:int:null}
mech_chain_id: ${MECH_CHAIN_ID:str:gnosis}
mech_wrapped_native_token_address: ${MECH_WRAPPED_NATIVE_TOKEN_ADDRESS:str:0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d}
sample_bets_closing_days: ${SAMPLE_BETS_CLOSING_DAYS:int:10}
trading_strategy: ${TRADING_STRATEGY:str:kelly_criterion}
use_fallback_strategy: ${USE_FALLBACK_STRATEGY:bool:true}
Expand Down Expand Up @@ -395,6 +409,8 @@ type: skill
"stabilityai-stable-diffusion-xl-beta-v2-2-2", "stabilityai-stable-diffusion-512-v2-1",
"stabilityai-stable-diffusion-768-v2-1"]}
staking_contract_address: ${STAKING_CONTRACT_ADDRESS:str:0x2Ef503950Be67a98746F484DA0bBAdA339DF3326}
disable_trading: ${DISABLE_TRADING:bool:false}
stop_trading_if_staking_kpi_met: ${STOP_TRADING_IF_STAKING_KPI_MET:bool:true}
agent_balance_threshold: ${AGENT_BALANCE_THRESHOLD:int:10000000000000000}
refill_check_interval: ${REFILL_CHECK_INTERVAL:int:10}
tool_punishment_multiplier: ${TOOL_PUNISHMENT_MULTIPLIER:int:1}
Expand Down
5 changes: 5 additions & 0 deletions packages/valory/skills/check_stop_trading_abci/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Check stop trading abci

## Description

This package contains the check stop trading skill for an AEA.
25 changes: 25 additions & 0 deletions packages/valory/skills/check_stop_trading_abci/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2024 Valory AG
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ------------------------------------------------------------------------------

"""This module contains the check stop trading skill for an AEA."""

from aea.configurations.base import PublicId


PUBLIC_ID = PublicId.from_str("valory/check_stop_trading_abci:0.1.0")
Loading

0 comments on commit b8c1e0b

Please sign in to comment.