Skip to content

About

A bot that copy trades wallets on Hyperliquid using the Hyperliquid DEX

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Copy Trade Bot

A Next.js copy trading bot for Hyperliquid perpetual futures. It monitors configured copy wallets and can replicate trades proportionally from the dashboard-managed bot wallet configuration.

Disclaimer

This software trades real money with leverage. Use it at your own risk.

  • Perpetual futures are high risk. You can lose your entire deposit, and losses can exceed your initial margin. Nothing here is financial advice.
  • The bot holds a private key with full trading and withdrawal authority over the wallet you give it. It is encrypted at rest, but anyone who gains access to the host and ENCRYPTION_KEY controls those funds.
  • There is no authentication on the dashboard or API routes by default. Do not expose it to the public internet. See docs/SECURITY.md.
  • Copy trading replicates another wallet's positions. A profitable copy wallet does not make your results profitable — sizing, slippage, funding, and timing all differ.

Start on a throwaway wallet with an amount you are willing to lose entirely.

Local Debugging

Use Docker Compose for Postgres, then run the Next.js app locally with Bun so hot reload and breakpoints work normally.

Prerequisites

  • Bun
  • Docker Desktop or Docker Engine with Compose

First Run

bun install
cp .env.example .env

Generate an encryption key and set it in .env:

openssl rand -hex 32

Start Postgres:

docker compose up -d postgres

Apply migrations and run the seed script:

bunx prisma migrate dev
bunx prisma db seed

Start the app:

bun run dev

Open http://localhost:3000, then create a bot from /bots/new with a private key and copy wallet address. Private keys are encrypted before being stored in Postgres.

Day-to-Day Development

docker compose up -d postgres
bun run dev

Useful commands:

bun run lint
bun run test
bun run build
bunx prisma studio

To stop local services:

docker compose down

To remove the local database volume and start from a clean database:

docker compose down -v

Container Smoke Test

For a production-like container run, apply migrations first, then start the container profile:

docker compose up -d postgres
bunx prisma migrate dev
docker compose --profile container up --build app

The containerized app listens on http://localhost:3006.

Environment

The default .env.example DATABASE_URL points at the Compose Postgres service from the host:

DATABASE_URL=postgresql://copy_trade_bot:copy_trade_bot@localhost:5432/copy_trade_bot

Required values:

  • DATABASE_URL
  • ENCRYPTION_KEY

Optional values:

  • PORT
  • NEXT_MANUAL_SIG_HANDLE

Architecture

See ARCHITECTURE.md and the docs in docs/ for the runtime and product details.

License

MIT

About

A bot that copy trades wallets on Hyperliquid using the Hyperliquid DEX

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages