DEX Trade Performance Analyzer
The DEX Trade Performance Analyzer evaluates a crypto wallet's trading performance using Syve's DEX Price Data & Wallet Tracking APIs. It tracks overall wallet performance, including total P&L and win rate, and provides token-specific insights with detailed trading metrics for each asset.
Introduction
This application is designed to analyze the trading performance of a crypto wallet, leveraging the capabilities of Syve's DEX Price Data & Wallet Tracking APIs. The primary focus of this application is to provide users with detailed insights into wallet trading activities, including profit and loss metrics for each traded token.
For an in-depth guide on how to fetch data and develop further functionalities, refer to our comprehensive guide on QuickNode.
Tech Stack
- Frontend Framework/Library: React
- Language: TypeScript
- Build Tool/Development Server: Vite
- Styling: Tailwind CSS
Features
- Overall Wallet Performance: Displays total profit and loss, win rate, and other key metrics using Syve's Wallet Tracking API.
- Token-Specific Performance: Provides detailed trading metrics for each token held in the wallet.
Getting Started
Prerequisites
To run this app, you'll need:
- Node.js installed on your system.
- A QuickNode account with the DEX Price Data & Wallet Tracking APIs enabled.
- A code editor or an IDE (e.g., VS Code)
- TypeScript and ts-node
Run the commands below to install TypeScript and ts-node
globally to have TypeScript available across all projects.
npm install -g typescript ts-node
Installation Dependencies
- Clone the repository to your local machine:
git clone https://github.com/quiknode-labs/qn-guide-examples.git
- Navigate to the project directory:
cd sample-dapps/ethereum-dex-trade-performance-analyzer
- Install the necessary dependencies:
npm install
Setting Environment Variables
Rename .env.example
to .env
and replace the YOUR_QUICKNODE_ENDPOINT_URL
placeholder with your QuickNode Ethereum Node Endpoint. Make sure that the DEX Price Data & Wallet Tracking APIs are enabled.
VITE_QUICKNODE_ENDPOINT="YOUR_QUICKNODE_ENDPOINT_URL"
Please note that while we utilize
dotenv
for environment variable management, sensitive information like endpoints can still be visible on the frontend. This configuration is not recommended for production environments as-is.
Running the Application
Run the development server:
npm run dev
Open http://localhost:5173/ with your browser to see the application.
Using the App
- Input a wallet address.
- Press Analyze Wallet.
- View the overall and token-specific trading performance.
The Wallet Performance Analyzer will fetch the data using Syve's Wallet Tracking APIs, and display the results.
Overall Performance | Token Specific Performance |
---|---|
Conclusion
Syve's DEX Price Data & Wallet Tracking APIs provide developers with powerful tools for analyzing wallet trading activities. By leveraging these APIs, developers can create applications that deliver valuable insights into crypto trading performance.
QuickNode offers many different marketplace add-ons, providing developers with the resources needed to create robust and feature-rich crypto applications. To learn more about how these APIs and other QuickNode add-ons can benefit your projects, please contact us; we're eager to assist you!
- Fork the repository
- Create a feature branch:git checkout -b feature/amazing-feature
- Commit your changes:git commit -m "Add amazing feature"
- Push your branch:git push origin feature/amazing-feature
- Open a Pull Request.