Skip to main content

Get Started in 5 Minutes

This guide will have you running NeuraTrade and viewing your first arbitrage opportunities in under 5 minutes.
1

Clone the Repository

Clone NeuraTrade from GitHub:
git clone https://github.com/irfndi/neuratrade.git
cd neuratrade
2

Configure Environment

Copy the example environment file and update it with your settings:
cp .env.example .env
Edit .env to set your home directory path:
.env
# Minimum required configuration
NEURATRADE_HOME=/home/youruser/.neuratrade
BACKEND_HOST_PORT=58080
DATABASE_DRIVER=sqlite
SQLITE_PATH=/home/youruser/.neuratrade/neuratrade.db
Replace /home/youruser with your actual home directory path. Use pwd to find your current path.
3

Build NeuraTrade

Build all binaries using the Makefile:
make build
This will:
  • Download Go dependencies
  • Install Telegram service dependencies (Bun)
  • Build neuratrade-server (Go backend)
  • Build neuratrade (CLI gateway)
  • Create service launcher scripts
Binaries are output to ./bin/:
ls -la bin/
# neuratrade-server  - Backend API server
# neuratrade         - Gateway CLI
# ccxt-service       - Exchange bridge stub
# telegram-service   - Telegram bot launcher
4

Start All Services

Start the NeuraTrade gateway (orchestrates all services):
./bin/neuratrade gateway start
This starts:
  • Backend API server (port 8080)
  • CCXT exchange service (port 3001)
  • Telegram bot service (port 3002)
The gateway runs services in the background. Logs are written to ~/.neuratrade/logs/
5

Check Health

Verify all services are running:
./bin/neuratrade gateway status
Expected response:
{
  "status": "ok",
  "timestamp": "2026-03-03T10:30:00Z",
  "version": "dev",
  "services": {
    "database": "up",
    "redis": "up"
  }
}
6

View Arbitrage Opportunities

Query for current arbitrage opportunities:
curl -s http://localhost:8080/api/v1/arbitrage/opportunities | jq
Example response:
{
  "opportunities": [
    {
      "symbol": "BTC/USDT",
      "buy_exchange": "binance",
      "sell_exchange": "okx",
      "buy_price": 43250.00,
      "sell_price": 43420.00,
      "profit_percentage": 0.39,
      "volume_24h": 1250000,
      "timestamp": "2026-03-03T10:30:15Z"
    }
  ]
}
Install jq for pretty-printed JSON: brew install jq (macOS) or apt install jq (Linux)

What’s Next?

Configure Exchanges

Add your exchange API keys to enable trading

Setup Telegram Bot

Configure Telegram for notifications and bot commands

Enable AI Agents

Setup autonomous trading with AI-powered agents

API Reference

Explore the complete API documentation

Common Commands

Here are the most frequently used commands:
./bin/neuratrade gateway start

Explore the API

Now that NeuraTrade is running, explore these endpoints:
EndpointDescription
/healthService health and status
/api/v1/market/pricesReal-time market prices
/api/v1/arbitrage/opportunitiesSpot arbitrage opportunities
/api/v1/futures-arbitrage/opportunitiesFunding rate arbitrage
/api/v1/analysis/signalsTrading signals and indicators
/api/v1/exchanges/supportedList of supported exchanges
curl -s http://localhost:8080/api/v1/market/prices | jq

Development Workflow

For active development, use these commands:
# Run tests
make test

# Run linter
make lint

# Type checking (TypeScript services)
make typecheck

# Code formatting
make fmt

# Coverage check
make coverage-check
Make sure to run make test and make lint before committing changes. The CI pipeline enforces these checks.

Troubleshooting

If port 8080 is already in use, change the SERVER_PORT in your .env file:
.env
SERVER_PORT=8081
BACKEND_HOST_PORT=58081
Then restart the gateway.
Ensure the NEURATRADE_HOME directory exists and the SQLite path is correct:
mkdir -p ~/.neuratrade
# Update SQLITE_PATH in .env to match
Check the gateway logs for errors:
tail -100 ~/.neuratrade/logs/gateway.log
Common issues:
  • Missing dependencies (run make build again)
  • Port conflicts (change ports in .env)
  • Permission issues (check file permissions)
This is normal if:
  • Market conditions don’t present profitable opportunities
  • Exchange workers are still collecting initial data (wait 30-60 seconds)
  • Exchanges are not configured (see Configuration guide)
Check worker status:
curl -s http://localhost:8080/api/v1/market/workers/status | jq

Next Steps

Detailed Installation Guide

Learn about prerequisites, directory structure, and advanced configuration options

Build docs developers (and LLMs) love