Basket Agent Backend API is the server-side component of the Basket Agent Telegram MiniApp. It handles all the trading logic, wallet management, and integration with various services to enable secure and efficient token trading.
- RESTful API Endpoints: Comprehensive set of endpoints for trading operations, wallet management, and user authentication
- Para Integration: Secure wallet management and user onboarding through Para's embedded wallet system
- Trading Engine: Backend logic for executing and optimizing token trades
- Market Data Processing: Real-time processing of market data for informed trading decisions
- Authentication & Authorization: Secure user authentication and request validation
- Transaction Management: Handling and logging of all trading transactions
- AI Agent Integration: Integration with AI agents to optimize trading strategies
- Node.js (v16 or higher)
- PostgresDB
- Redis
- Telegram Bot Token - Getting Telegram Bot Token
- OpenAI API Key - Getting OpenAI API Key
- OnceInch API Key - Getting OnceInch API Key
- Para API Key - Getting Para API Key
Required environment variables in .env:
DATABASE_URL: PostgreSQL database connection URLAUTH_SECRET: Secret key for authenticationTELEGRAM_BOT_TOKEN: Your Telegram bot tokenOPENAI_API_KEY: OpenAI API keyBINANCE_API_ENDPOINT: Binance API endpoint URLONEINCH_API_ENDPOINT: 1inch API endpoint URLONEINCH_API_KEY: Your 1inch API keyREDIS_HOST: Redis host addressREDIS_PORT: Redis port numberREDIS_PASSWORD: Redis passwordPARA_API_KEY: Your Para API keyCHAIN_ICON_TEMPLATE_URL: Template URL for chain iconsAVAILABLE_CHAIN_IDS: List of available blockchain network IDsDEFAULT_CHAIN_ID: Default blockchain network ID
- Install dependencies:
npm install - Start development server:
npm run start:dev - Access the server at
http://localhost:4000
