A Discord bot for managing cryptocurrency wallets and performing DeFi operations using the Okto API and Li.Fi protocol integration.
- Wallet Management (Create, View, List)
- Portfolio Tracking
- Token Transfers
- Cross-chain Token Swaps
- NFT Transfers
- Transaction History
- Portfolio Activity Monitoring
- Node.js 18 or higher
- Discord Bot Token
- Okto API credentials
- Upstash Redis account
Create a .env
file in the root directory with the following variables:
# Server Configuration
PORT=3000 # Server port (defaults to 3000)
BASE_URL=localhost # Base URL for your application
# Discord Configuration
DISCORD_BOT_TOKEN=your_discord_token
DISCORD_CLIENT_ID=your_client_id
# Okto API Configuration
OKTO_APP_ID=your_okto_app_id
OKTO_API_KEY=your_okto_api_key
OKTO_CLIENT_API_KEY=your_okto_client_api_key
# Redis Configuration (Upstash)
REDIS_URL=your_upstash_redis_url
-
Clone the repository:
git clone https://github.com/yourusername/OktoDeFiBot.git cd OktoDeFiBot
-
Install dependencies:
npm install
-
Set up your environment variables in
.env
file (see Environment Variables section) -
Start the bot:
npm start
-
Clone the repository:
git clone https://github.com/yourusername/OktoDeFiBot.git cd OktoDeFiBot
-
Create a
.env
file with your environment variables (see Environment Variables section) -
Build and run using Docker Compose:
docker-compose up -d
-
Check container logs:
docker-compose logs -f
The application includes a built-in health check endpoint that Docker uses to monitor the service status. You can manually check it at:
curl http://localhost:3000/
-
If the container fails to start, check the logs:
docker-compose logs
-
To restart the container:
docker-compose restart
/login
- Authenticate with Okto/wallets
- View your wallets/create-wallet
- Create a new wallet/portfolio
- View your portfolio/portfolio-activity
- View recent portfolio activity/transfer
- Transfer tokens/transfer-nft
- Transfer NFTs/swap
- Perform cross-chain token swaps/networks
- List supported networks/tokens
- List supported tokens/orders
- View order history/help
- Display help information
- Rate limiting
- Helmet security middleware
- Redis session management
- Environment variable configuration
- HTTPS enforcement in production
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.