Clone the repository:
git clone https://github.com/ziptalk/yucca-backend.git
cd yucca-backendInstall dependencies:
npm installCopy the example environment file and update the environment variables as needed:
cp .env.example .envTo start the application, run:
npm startThe application will be accessible at http://localhost:3000.
- Endpoint:
/api/botPerformanceSummary - Method: GET
- Description: Show performance summary of the bot.
- Response:
{ "pnlRate": 0.15, "pnlWinRate": 0.85, "subscribedCount": 1200, "apy": 0.10, "tvl": 500000.00, "mdd": 0.20 }
- Endpoint:
/api/botPerformanceChart - Method: GET
- Description: Show performance chart of the bot.
- Query Parameters:
timeframe(number): The timeframe for the performance chart, default value is 365.
- Response:
{ "timeframe": 365, "dailyPnlRate": 0.02, "data": [ { "createdAt": "2024-06-26T00:00:00.000Z", "pnlRate": 0.05 }, { "createdAt": "2024-06-27T00:00:00.000Z", "pnlRate": 0.03 }, { "createdAt": "2024-06-28T00:00:00.000Z", "pnlRate": 0.04 } ] }