-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding new strategy configuration system
- Loading branch information
Showing
4 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Executor configurations (legacy) | ||
|
||
**These are legacy configuration files. See [env folder](../env/) for recent files. | ||
|
||
This folder contains configuration scripts for different trading strategy executions. | ||
These are incomplete configuration files that need to be processed | ||
by `create-docker-env-secrets.sh.` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# This is a configuration file for pancake-eth-usdc-sma.py strategy | ||
# | ||
# This is only partial configuration. | ||
# To createa full .env configuration file for Docker container, which also contains secrets, | ||
# you need to run create-docker-env-with-secrets.sh having this file as an input. | ||
# | ||
|
||
# Metadata | ||
|
||
EXECUTOR_ID=pancake-eth-usd-sma | ||
NAME="Quickswap momentum" | ||
DOMAIN_NAME="pancake-eth-usd-sma.tradingstrategy.ai" | ||
SHORT_DESCRIPTION="A data collection test that trades on Polygon MATIC/USDC pairs." | ||
LONG_DESCRIPTION="This strategy is a test strategy that does not aim to generated profit. The strategy trades on MATIC/USDC pairs on QuickSwap. The strategy rebalances every 16 hours to generate maximum amount of data. Based on 4h candles, the strategy calculates the momentum and picks highest gainers. The portfolio can hold 6 positions at once." | ||
ICON_URL="https://i0.wp.com/bloody-disgusting.com/wp-content/uploads/2022/01/watch-robocop-the-series.png?w=1270" | ||
|
||
# 12 hours | ||
export MAX_DATA_DELAY_MINUTES=720 | ||
|
||
# Blockchain transaction broadcasting parameters | ||
GAS_PRICE_METHOD="london" | ||
EXECUTION_TYPE="uniswap_v2_hot_wallet" | ||
APPROVAL_TYPE="unchecked" | ||
|
||
# Webhook server configuration for Docker. | ||
# Always static. | ||
# This is mapped to the host in docker-compose.yml | ||
HTTP_PORT=3456 | ||
HTTP_HOST=0.0.0.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Creates .env file for a trade-executor Docker container | ||
# | ||
# - Reads public .env configuration variables | ||
# - Reads secret environment variables | ||
# - Generates some file locations based on the strategy id | ||
# - Validates environment variables | ||
# - Writes the output to a single file | ||
# | ||
# Usage: | ||
# | ||
# # Load your non-committed secrets from the server root | ||
# source ~/my-secrets.env | ||
# | ||
# # Combine the env configuration file with the secrets | ||
# scripts/create-docker-env-with-secrets.sh env/pancake-eth-usd-sma.env > ~/pancake-eth-usd-sma-final.env | ||
# | ||
|
||
|
||
|
||
# | ||
# Generated environment variables. | ||
# These maps to the physical paths on the server, | ||
# also mapped in docker-compose.yml | ||
# | ||
export CACHE_PATH="cache/${EXECUTOR_ID}" | ||
export STRATEGY_FILE="strategies/${EXECUTOR_ID}.py" |