{"id":21157578,"url":"https://github.com/tradingstrategy-ai/dex-live-algorithmic-trading-example","last_synced_at":"2026-01-27T07:35:23.952Z","repository":{"id":247545786,"uuid":"823336264","full_name":"tradingstrategy-ai/dex-live-algorithmic-trading-example","owner":"tradingstrategy-ai","description":"An example repository how to set up a TradingStrategy.ai trade-executor with a live trading strategy","archived":false,"fork":false,"pushed_at":"2024-08-19T06:48:04.000Z","size":7154,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-25T12:53:36.023Z","etag":null,"topics":["decentralized-exchange","docker","ethereum","python","trading-bot","trading-strategies"],"latest_commit_sha":null,"homepage":"https://tradingstrategy.ai","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tradingstrategy-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-02T21:03:48.000Z","updated_at":"2025-02-25T19:37:50.000Z","dependencies_parsed_at":"2024-11-20T12:14:38.918Z","dependency_job_id":null,"html_url":"https://github.com/tradingstrategy-ai/dex-live-algorithmic-trading-example","commit_stats":null,"previous_names":["tradingstrategy-ai/dex-live-algorithmic-trading-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tradingstrategy-ai/dex-live-algorithmic-trading-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradingstrategy-ai%2Fdex-live-algorithmic-trading-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradingstrategy-ai%2Fdex-live-algorithmic-trading-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradingstrategy-ai%2Fdex-live-algorithmic-trading-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradingstrategy-ai%2Fdex-live-algorithmic-trading-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tradingstrategy-ai","download_url":"https://codeload.github.com/tradingstrategy-ai/dex-live-algorithmic-trading-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tradingstrategy-ai%2Fdex-live-algorithmic-trading-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28808100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:14:39.408Z","status":"ssl_error","status_checked_at":"2026-01-27T07:14:39.098Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decentralized-exchange","docker","ethereum","python","trading-bot","trading-strategies"],"created_at":"2024-11-20T12:02:27.804Z","updated_at":"2026-01-27T07:35:23.935Z","avatar_url":"https://github.com/tradingstrategy-ai.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEX live trading strategy deployment example\n\nThis is an example repository for setting up a `docker-compose.yml` for a minimal live [trade-executor](https://github.com/tradingstrategy-ai/trade-executor/).\n\n- This repository comes with a preconfigured strategy `hotwallet-polygon-eth-usdc-breakout`\n- This allows you to start a live trade execution on your computer using Docker\n- It is a limited preproduction environment with devops and web frontend missing\n- We use the Polygon blockchain as it is an easy and cost-friendly way to do some test trades\n- The folder structure is set up in a manner you can run several trade executors under the same `docker-compose.yml` configuration\n\n* [Step 1: Develop a trading strategy](#step-1-develop-a-trading-strategy)\n* [Step 2: Give the strategy id](#step-2-give-the-strategy-id)\n* [Step 3: Extract strategy as a Python module](#step-3-extract-strategy-as-a-python-module)\n* [Step 4: Set up docker-compose.yml entry](#step-4-set-up-docker-composeyml-entry)\n* [Step 5: Set up an environment file](#step-5-set-up-an-environment-file)\n* [Step 6: Launching Docker for the first time](#step-6-launching-docker-for-the-first-time)\n   * [Step 6a: Set Github container registry access](#step-6a-set-github-container-registry-access)\n   * [Step 6b: Test Docker container start](#step-6b-test-docker-container-start)\n* [Step 7: Run backtest for the strategy module](#step-7-run-backtest-for-the-strategy-module)\n* [Step 8: Set up a hot wallet](#step-8-set-up-a-hot-wallet)\n   * [Step 8a: Generate a private key](#step-8a-generate-a-private-key)\n   * [Step 8b: Add the private key environment variable file](#step-8b-add-the-private-key-environment-variable-file)\n   * [Step 8c Check the wallet](#step-8c-check-the-wallet)\n   * [Step 8d: Fund the account](#step-8d-fund-the-account)\n   * [Step 8e: Check the wallet again](#step-8e-check-the-wallet-again)\n* [Step 9: Check the trading universe](#step-9-check-the-trading-universe)\n* [Step 10: Init the strategy](#step-10-init-the-strategy)\n* [Step 11: Perform test trade](#step-11-perform-test-trade)\n* [Step 12: Launch the live trading strategy](#step-12-launch-the-live-trading-strategy)\n* [Step 13: Configure additional RPC providers (optional)](#step-13-configure-additional-rpc-providers-optional)\n* [Step 14: Set up Discord logging (optional)](#step-14-set-up-discord-logging-optional)\n* [Support and social media](#support-and-social-media)\n\n# Preface\n\nThis is an example repository to do partial deployment for live trading strategies.\n\nYou need\n- Basic experience in UNIX system administration \n- Linux / macOS laptop \n  - On Windows, use Windows Subsystem for Linux (WSL)\n- Docker installation \n\nThis preproduction set up can be more straightforward than the actual production deployment, as we shortcut a few things here:\n- Security like managing the access to the private keys\n- Web frontend\n- Devops and diagnostics output: Only output is Docker process stdout\n\n# Step 1: Develop a trading strategy\n\nSee [Getting started](https://github.com/tradingstrategy-ai/getting-started) if you do not have a trading strategy yet.\n\nThe usual deliverables of developing a trading strategy include: \n\n1. Initial backtest notebook\n2. Optimiser that crunches through multiple parameters\n2. Final backtest notebook with fixed parameters you are prepared to take to the live trading\n\nThis repository comes with a simple example ETH-USDC strategy. \n\nFor this example we have \n\n1. Initial backtest - somewhere in [Getting started repo](https://github.com/tradingstrategy-ai/getting-started)\n2. Optimiser notebook. [See here](./notebooks/eth-breakout-optimiser.ipynb)\n3. Final backtest. [See here](./notebooks/eth-breakout-dex-final.ipynb)\n\n**Note**: Github does not view notebooks fully - you need to open them locally.\n\n**Note**: This strategy might be too simple and overfit for real-world trading.\n\n# Step 2: Give the strategy id\n\nYou are going to have a lot of strategies. You need to have a systematic way to keep track of them.\n\nThis example uses id `hotwallet-polygon-eth-usdc-breakout`. It's a mouthful, but self-explanatory.\n- Asset management mode (hot wallet)\n- The target chain (Polygon)\n- Pairs to be traded (ETH/USDC)\n- Type of strategy (breakout)\n\nThis id is used in\n\n- URLs\n- State file\n- Log files \n- etc.\n\n# Step 3: Extract strategy as a Python module\n\nWe convert the final backtest notebook to a Python module. We use (3) from the step above as the starting point.\n\nRules to convert\n\n- Create a Python file\n- Copy-paste the strategy from the notebook \n  - `Parameteters` class\n  - `decide_trades`\n  - `create_indicators`\n  - `create_strategy_universe`\n- Autocomplete the imports for the Python file\n  - Usually a good editor like Visual Studio Code or PyCharm can do this for you with a keypress or two\n- Modify `create_strategy_universe` to cater to both the backtesting and live trading\n  - Different options are available if you want to show DEX backtesting data (usually too short period)\n- Add the following Python module variables \n\n```python\ntrading_strategy_engine_version = \"0.5\"\nname = \"ETH-BTC-USDC momentum\"  # Optional: Frontend metadata\ntags = {StrategyTag.beta, StrategyTag.live}  # Optional: Frontend metadata\nicon = \"\"  # Optional: Frontend metadata\nshort_description = \"\"  # Optional: Frontend metadata\nlong_description = \"\"  # Optional: Frontend metadata\n```\n\nWe also edit the strategy to dynamically decide which trading universe to use\n- Binance for backtesting (longer history)\n- DEX for live trading\n\nExample modification here:\n\n```python\ndef get_strategy_trading_pairs(execution_mode: ExecutionMode) -\u003e list[HumanReadableTradingPairDescription]:\n    if execution_mode.is_backtesting():\n        # Need longer history\n        trading_pairs = [\n            (ChainId.centralised_exchange, \"binance\", \"ETH\", \"USDT\"),\n        ]\n\n    else:\n        # For live trading we do Uniswap v3 on Polygon\n        trading_pairs = [\n            (ChainId.polygon, \"uniswap-v3\", \"WETH\", \"USDC\", 0.0005),\n        ]\n    return trading_pairs\n\n\ndef create_trading_universe(\n    timestamp: datetime.datetime,\n    client: Client,\n    execution_context: ExecutionContext,\n    universe_options: UniverseOptions,\n) -\u003e TradingStrategyUniverse:\n    \"\"\"Create the trading universe.\"\"\"\n    trading_pairs = get_strategy_trading_pairs(execution_context.mode)\n\n    if execution_context.mode.is_backtesting():\n        # Backtesting - load Binance data to get longer history\n        strategy_universe = create_binance_universe(\n            [f\"{p[2]}{p[3]}\" for p in trading_pairs],\n            candle_time_bucket=Parameters.candle_time_bucket,\n            stop_loss_time_bucket=Parameters.stop_loss_time_bucket,\n            start_at=universe_options.start_at,\n            end_at=universe_options.end_at,\n            forward_fill=True,\n        )        \n\n    else:\n        # How many bars of live trading data needed\n        required_history_period = Parameters.required_history_period\n\n        dataset = load_partial_data(\n            client=client,\n            time_bucket=Parameters.candle_time_bucket,\n            pairs=trading_pairs,\n            execution_context=execution_context,\n            universe_options=universe_options,\n            liquidity=False,\n            stop_loss_time_bucket=Parameters.stop_loss_time_bucket,\n            required_history_period=required_history_period,\n        )\n        # Construct a trading universe from the loaded data,\n        # and apply any data preprocessing needed before giving it\n        # to the strategy and indicators\n        strategy_universe = TradingStrategyUniverse.create_from_dataset(\n            dataset,\n            reserve_asset=\"USDC\",\n            forward_fill=True,\n        )\n\n    return strategy_universe\n```\n\n- [See the full resulting Python file here](./strategies/hotwallet-polygon-eth-usdc-breakout.py) \n\n# Step 4: Set up docker-compose.yml entry\n\n- [See docker-compose.yml](./docker-compose.yml)\n\n**Note**: We use new style `docker compose` commands in this README, instead of `docker-compose` legacy command (with dash). Make sure you have the latest version.\n\n# Step 5: Set up an environment file\n\nEach trade executor docker is configured using environment variable files using the normal Docker conventions.\n\n**Note**: For the production deployment it is recommend against putting any highly sensitive material like private keys\ndirectly to these files/\n\n- See [hotwallet-polygon-eth-usdc-breakout.env](./env/hotwallet-polygon-eth-usdc-breakout.env)\n\nThe file comes with\n\n- No hot wallet set up\n- No Trading Strategy API key set up \n- Public low quality Polygon RPC endpoint (do not use for production - likely just keeps crashing)\n\n# Step 6: Launching Docker for the first time\n\n## Step 6a: Set Github container registry access\n\nDocker images are distributed on [Github Container Registry ghcr.io](https://github.com/features/packages).\nThe access is public, but you need to have an access token through your Github account.\n\nTo enable docker login to Github see [how to set up Github access token to download Docker images from GHCR](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry\u003e).\n\n- [Create a personal access tokens in Developer settings of your Github account](https://github.com/settings/tokens) - classic token\n \n- You need an access token to publish, install, and delete private, internal, and public packages:\n  `repo:*` and `read:packages`.\n\nWhen you find your token you can do:\n\n```shell\nGITHUB_USERNAME=miohtama\n# Your Personal Access Token (classic)\nCR_PAT=ghp_mmc...\n# This will save a config file locally with your GHCR access key\necho $CR_PAT | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin\n```\n\nDocker login should reply:\n\n```\nLogin Succeeded\n```\n\n## Step 6b: Test Docker container start\n\nWe try to run and verify our Docker Compose launches.\n\nFirst we need to choose the trade-executor release. The trade executor is under active development\nand may see multiple releases per day. [You can find releases on Github](https://github.com/tradingstrategy-ai/trade-executor/pkgs/container/trade-executor)\n\n```shell\n# Get the latest trade-executor version tag from Github to environment variable\nsource scripts/export-latest-trade-executor-version.sh\n\n# Launch to show the command line help\ndocker compose run hotwallet-polygon-eth-usdc-breakout --help\n```\n\nYou should see the command line help for [trade-executor command](https://tradingstrategy.ai/docs/deployment/trade-executor.html):\n\n```\nUsage: trade-executor [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  --install-completion [bash|zsh|fish|powershell|pwsh]\n                                  Install completion for the specified shell.\n  --show-completion [bash|zsh|fish|powershell|pwsh]\n                                  Show completion for the specified shell, to copy it or customize the installation.\n  --help                          Show this message and exit.\n...\n```\n\n# Step 7: Run backtest for the strategy module\n\nThis will run the strategy backtest using `docker compose` command.\n\n- This command will execute the same backtest as you would have run earlier in the final notebook\n- Python errors when running this command will catch any mistakes made during the strategy module creation\n- Backtest artifacts like HTML backtest report are written under `state/` folder\n- The same artifacts will be served in the web frontend for the users who want to see the backtest results\n\nYou need to add your [Trading Strategy API key](https://tradingstrategy.ai/trading-view/api) in [./env/hotwallet-polygon-eth-usdc-breakout.env](./env/hotwallet-polygon-eth-usdc-breakout.env):\n\nNow run the backtest:\n\n```shell\ndocker compose run hotwallet-polygon-eth-usdc-breakout backtest\n```\n\n**Note**: Currently macOS and Apple Silicon run Intel architecture Docker images, slowing down the execution 5x - 10x. [Github Actions do not support building macOS Docker images yet](https://stackoverflow.com/a/78202969/315168). When you run this command on macOS prepare to wait for ~20 minutes.\n\nYou are likely to encounter several Python bugs in this step, so keep fixing your Python strategy module.\n\nThe end of the output should look like:\n\n```\nWriting backtest data the state file: /usr/src/trade-executor/state/hotwallet-polygon-eth-usdc-breakout-backtest.json\nExporting report, notebook: state/hotwallet-polygon-eth-usdc-breakout-backtest.ipynb, HTML: state/hotwallet-polygon-eth-usdc-breakout-backtest.html\n```\n\nAfter the backtest is complete, you can view the HTML report:\n\n```shell\n# macOS way to open a HTML file from the command line\nopen state/hotwallet-polygon-eth-usdc-breakout-backtest.html\n```\n\nYou should see the backtest results, as captured from the default backtest notebook template:\n\n![](./docs/backtest.png)\n\n# Step 8: Set up a hot wallet\n\nYou need a hot wallet\n\n- It costs ETH/MATIC/etc. to broadcast the transactions for your trades\n- A hot wallet is just an EVM account with the associated private key \n\n## Step 8a: Generate a private key\n\nTo create a hot wallet for the executor you can [do it from the command line](https://ethereum.stackexchange.com/questions/82926/how-to-generate-a-new-ethereum-address-and-private-key-from-a-command-line):\n\n```shell\nhead -c 32 /dev/urandom|xxd -ps -c 32\n```\n\nThis will give you a private key (example - do not use this private key):\n\n```\n68f4e1be83e2bd242d1a5a668574dd3b6b76a29f254b4ae662eba5381d1fc3a6\n```\n\nThen\n\n- Store the private key safely in your backup storage (password manager, or something stronger depending on the security level)\n\n**Note**: Hot wallets cannot be shared across different `trade-executor` instances, because this will mess up accounting.\n\n## Step 8b: Add the private key environment variable file\n\nPrivate key will be needed in the trade execution configuration file\n\n- Edit `hotwallet-polygon-eth-usdc-breakout.env`.\n- Add `0x` prefix to the raw hex output from the step above\n- Fill in `PRIVATE_KEY`.\n\nExample:\n\n```shell\n# Do not use this private key \nPRIVATE_KEY=0x68f4e1be83e2bd242d1a5a668574dd3b6b76a29f254b4ae662eba5381d1fc3a6\n```\n\n## Step 8c Check the wallet\n\n`trade-executor` provides the subcommand `check-wallet` to check the hot wallet status.\n\nThis checks\n\n- You are connected to the right blockchain\n\n- Your hot wallet private key has been correctly set up\n\n- You have native token for gas fees\n\n- You have trading capital\n\n- The last block number of the blockchain\n\n- We know how to route trades for our strategy, using the current wallet\n\n\n```shell\ndocker compose run hotwallet-polygon-eth-usdc-breakout check-wallet\n```\n    \nOutput:\n\n```\nAssertionError: At least 0.1 native currency need, our wallet 0xABF10A4027B3e5D29c21292955DcC4ECCe05747A has 0.00000000\n```\n\nThis gives you the address for your private key.\n\n## Step 8d: Fund the account\n\nWe need to fund the account on Polygon\n\n- MATIC to cover the gas fees: get 25 MATIC.\n- [USDC.e](https://tradingstrategy.ai/trading-view/polygon/tokens/0x2791bca1f2de4661ed88a30c99a7a9449aa84174), also known USD Coin PoS: get 25 USDC.e.\n\nYou can use a service like [Transak](https://transak.com/) to get MATIC with a debit card. KYC needed.\nYou can get MATIC swapped to USDC.e e.g. on [KyberSwap](https://kyberswap.com/swap/polygon).\n\nSend MATIC and USDC.e to the address you saw above.\n\n**Note**: Due to historical reasons we use USDC.e (bridged variant) over native USDC on Polygon,\nbecause it has better liquidity. These two tokens are not fungible as the writing of this.\n\n## Step 8e: Check the wallet again\n\nNow you should have some MATIC and USDC.e in your hot wallet.\n\n\n```shell\ndocker compose run hotwallet-polygon-eth-usdc-breakout check-wallet\n```\n    \nWe see the account is funded now:\n\n```\nBalance details\n  Hot wallet is 0xABF10A4027B3e5D29c21292955DcC4ECCe05747A\n  We have 10.000000 tokens left for gas\n  The gas error limit is 0.100000 tokens\n  Reserve asset: USDC \nReading token balances for 1 tokens at block 59193849, last \n  Balance of USD Coin (PoS) (0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174): 1.988353 USDC\n```\n\n# Step 9: Check the trading universe\n\n`trade-executor` provides the subcommand `check-universe` to ensure the market data feeds work correctly.\n\n- This confirms your Trading Strategy oracle API keys are correctly set up\n  and your strategy can receive data.\n\n- The market data feed is up-to-date\n\nYou can run this with configured `docker-compose` as:\n\n```shell\ndocker compose run hotwallet-polygon-eth-usdc-breakout check-universe\n```\n\nThis will print out the last available candle, based on the the strategy `Parameters.candle_time_bucket`:\n\n```\nLatest OHCLV candle is at: 2024-07-10 15:00:00, 0:19:41.794234 ago\n```\n\n# Step 10: Init the strategy\n\nThis will write the initial state file for your trading strategy:\n\n```shell\ndocker compose run hotwallet-polygon-eth-usdc-breakout init\n```\n\nIt should output something like:\n\n```\nSaved state to state/hotwallet-polygon-eth-usdc-breakout.json, total 1,108 chars\nAll done: State deployment info is \u003cDeployment chain:polygon address:0xABF10A4027B3e5D29c21292955DcC4ECCe05747A name:None token:None\u003e\n```\n\n# Step 11: Perform test trade\n\nAfter you are sure that trading data and hot wallet are fine,\nyou can perform a test trade from the command line.\n\n- This will ensure trade routing and execution gas fee methods\n  are working by executing a live trade against live blockchain.\n\n- The test trade will buy and sell the \"default\" asset of the strategy\n  worth 1 USD. For a single pair strategies the asset is the default\n  base token.\n\n- This will open a position using the strategy's exchange and trade\n  pair routing.\n\n- The position and the trade will have notes field filled in that\n  this was a test trade.\n\n- Broadcasting a transaction through your JSON-RPC connection\n  works.\n\nExample:\n\n```shell\ndocker compose run hotwallet-polygon-eth-usdc-breakout perform-test-trade\n```\n\nThis will print something like:\n\n```\nTest trade report\n  Gas spent: 0.016125835459386936\n  Trades done currently: 2\n  Reserves currently: 1.986876 USDC\n  Reserve currency spent: 0.0014769999999999506 USDC\n  Buy trade price, expected: 3113.8176546091504, actual: 3111.\n  Sell trade price, expected: 3108.3790383082533, actual: 3110.0700549742683 (WETH-USDC)\n```\n\n# Step 12: Launch the live trading strategy\n\nNow you are ready to start the strategy.\n\nWe first suggest start on the foreground.\n\n```shell\ndocker compose up hotwallet-polygon-eth-usdc-breakout\n```\n\nAfter the boot up dance you will see:\n\n```\napscheduler.scheduler                              INFO     Scheduler started\n```\n\nThis means the trade-executor is now running, with its scheduled tasks (decide trades, check stop losses, revalue the portfolio, etc.). Leave it running.\n\nThere is a lot of output (noisy). In some point you should catch the message about `decide_trades`:\n\n```\n 2024-07-11 08:08:27 tradeexecutor.strategy.runner                      INFO     No open \n 2024-07-11 08:08:27 tradeexecutor.strategy.runner                      INFO     No frozen \n 2024-07-11 08:08:27 tradeexecutor.strategy.runner                      TRADE    Portfolio \n \n Total equity: $1.99, in cash: $1.99\n Life-time positions: 1, trades: 2\n …\n Reserves:\n \n     1.99 USDC\n \n 2024-07-11 08:08:27 tradeexecutor.utils.timer                          INFO     Starting task decide_trades at 2024-07-11 08:08:27.183694, context is {}\n```\n\nThe given strategy rebalances every 1h. So you should see something working or not working within 1h. The rebalance does not happen exactly at 00 minutes, but a bit past, as the candle data needs to be properly formed first.\n\nFor the long-term running, use daemon option:\n\n```shell\ndocker compose up -d hotwallet-polygon-eth-usdc-breakout\n```\n\n# Step 13: Configure additional RPC providers (optional)\n\n- The configuration line `JSON_RPC_POLYGON` accepts multiple space separared provided URLs.\n- The same feature can be used to add MEV protected RPC endpoints for your trade executor\n\n[See the multi-RPC configuration documentation here](https://web3-ethereum-defi.readthedocs.io/tutorials/multi-rpc-configuration.html).\n\n# Step 14: Set up Discord logging (optional)\n\nIn this example, we only output trades in the docker console.\n\nThe trade-executor supports output to different team chat mediums. like Discord.\n\nTo configure Discord logging\n\n- Create a private Discord channel\n- In the channel settings, go to *Integrations*\n- Press *Create Webhook*\n- Add the webhook URL in the environment variable file as `DISCORD_WEBHOOK_URL`\n\n```\nDISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/12...\n```\nNow all trade-related logging messages will be displayed at the Discord channel as well.\n\n# Support and social media\n\nGot any questions? Pop into our Discord.\n\n- [Trading Strategy community Discord server](https://tradingstrategy.ai/community#discord)\n- [Trading Strategy website](https://tradingstrategy.ai)\n- [Blog](https://tradingstrategy.ai/blog)\n- [Twitter](https://twitter.com/TradingProtocol)\n- [Telegram channel](https://t.me/trading_protocol)\n- [Newsletter](https://tradingstrategy.ai/newsletter)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftradingstrategy-ai%2Fdex-live-algorithmic-trading-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftradingstrategy-ai%2Fdex-live-algorithmic-trading-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftradingstrategy-ai%2Fdex-live-algorithmic-trading-example/lists"}