• Homepage •
Supported protocols •
Chainstack blog •
Blockchain API reference •
• Start for free •
Educational project with optimization opportunities. Multiple RPC calls per signal introduce latency between source order and bot execution.
Copy trading bot for Kuru DEX on Monad blockchain. Monitors specified wallets and Kuru DEX markets and mirrors their limit orders via direct smart contract interaction (Kuru margin account, Kuru markets).
Please feel free to submit your feedback and requests to issues.
The bot listens to OrderCreated, Trade and OrdersCanceled events and mirrors an action (places and cancels orders). Trade event is used to log activity for statistics.
Market orders are not supported.
git clone https://github.com/chainstacklabs/kuru-copy-trading-bot
cd kuru-copy-trading-bot
uv syncThe bot trades using your Kuru margin account balance, not wallet balance. Before running, deposit tokens to your margin account. See margin account management for instructions and helper scripts.
Copy .env.example to .env and configure:
- RPC endpoint (WebSocket)
- Source wallet addresses
- Market addresses
- Copy ratio and risk limits
# Run bot
uv run python -m src.kuru_copytr_bot.main
# Custom config
uv run python -m src.kuru_copytr_bot.main --env-file .env.prod
# Debug logging
uv run python -m src.kuru_copytr_bot.main --log-level DEBUG
# JSON logs
uv run python -m src.kuru_copytr_bot.main --json-logsStop with Ctrl+C.
Install dev dependencies:
uv sync --extra devLint and format:
uvx ruff check --fix .
uvx ruff format .
uvx mypy src/Run tests:
uv run pytest
uv run pytest --covInstall pre-commit hooks:
uv run pre-commit install- Python 3.10+
- uv package manager
- Monad RPC access (WebSocket endpoint)
- Private key with MON for gas
Kuru DEX uses margin accounts for trading. The bot checks your margin balance (not wallet balance) when placing orders. Before starting, deposit tokens from your wallet to your margin account. Each market requires a specific quote asset - verify which token your target markets use.
Orders are skipped if margin balance is insufficient. The bot continues monitoring and resumes placing orders when balance is available.
Three scripts in scripts/ directory manage margin accounts:
- check_margin_balance.py - view margin balances
- deposit_margin.py - transfer tokens from wallet to margin account
- withdraw_margin.py - transfer tokens from margin account to wallet
