THE OPEN-SOURCE ROUTE

From repo
to running.

Bring a strategy, a testnet account and a machine that can stay online. Docker handles the runtime. You handle the rules.

Choose the behaviour first

The bot directory explains the six supported bots. Grid trades levels within a range. DCA repeats fixed quantities. Martingale stages entries and a take-profit exit. OTO links order groups. TradingView acts on authenticated alerts. Binance grid manages Spot inventory.

Prepare your machine and exchange

Install Git and Docker with Compose. Docker Desktop is suitable for a local trial; Docker Engine and the Compose plugin work on a Linux server. The dYdX images include native dependencies; building can take longer than starting a prebuilt container.

dYdX Chain

Create and fund a Chain testnet wallet. You need its mnemonic, matching Chain address and a collateralised cross-margin subaccount from 0 to 127. Old v3 API keys and STARK keys do not work. Use a dedicated wallet and separate subaccounts for strategies.

The strategy example sets the network, indexer, websocket and TLS gRPC node to testnet. All endpoints must belong to the same network. The node is a host and port without an HTTP scheme. Refer to the official dYdX documentation for current network and testnet funding information.

Binance Spot

Create Spot Test Network API credentials and use the matching testnet REST endpoint. Configure only the permissions needed for the bot, and leave withdrawals disabled. Review the selected symbol and exchange filters. See the Binance grid guide for the environment variables.

Clone and configure

This example uses Grid. Substitute the repository named on the guide for your chosen bot.

git clone https://github.com/akilibots/akili-grid.git
cd akili-grid
cp .env.example .env

Edit .env. For dYdX, set DYDX_MNEMONIC in quotes. Then edit data/strategy.json: enter the matching address, network and subaccount, and review the market, quantities and all strategy settings.

Keep .env, wallet mnemonics, API secrets and runtime state out of Git. Telegram notifications are optional. Set TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID if needed.

Run and inspect

docker compose up --build -d
docker compose logs -f

Inspect the logs and verify the actual orders and fills on the testnet exchange. Quantities are base-asset units, not dollar budgets. Check collateral, market step sizes, fees and potential position exposure.

Run one process per data directory. Keep data/state.json and data/exchange.json together. TradingView also needs its SQLite queue and journals. Do not remove state to work around an execution error.

Stop the process

docker compose down

Stopping a process does not cancel exchange orders or close positions. Inspect and cancel orders on the exchange separately when required.

Make the next step deliberate

Read the complete bot-specific guide and operations guide before using live funds. Changing to mainnet means changing the network, every endpoint, the wallet and collateral consistently. Reconcile existing orders before changing an active strategy.

Tests use simulated exchange responses. They check code paths and recovery, not live execution or profitability. Perpetual positions can be liquidated. Read the trading-risk notes.