Skip to main content
Back to Sample Apps

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.

Frontend Framework/Library:
React
Language:
TypeScript
Build Tool/Development Server:
Vite

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:


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


  1. Clone the repository to your local machine:
git clone https://github.com/quiknode-labs/qn-guide-examples.git

  1. Navigate to the project directory:
cd sample-dapps/ethereum-dex-trade-performance-analyzer

  1. 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


  1. Input a wallet address.
  2. Press Analyze Wallet.
  3. 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 PerformanceToken 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!


Contributions & Feedback
We'd love to hear your feedback and welcome any contributions to this sample app!
To report issues or share feedback, open a GitHub issue in the qn-guide-examples repository.
To contribute, follow these steps:
  1. Fork the repository
  2. Create a feature branch:
    git checkout -b feature/amazing-feature
  3. Commit your changes:
    git commit -m "Add amazing feature"
  4. Push your branch:
    git push origin feature/amazing-feature
  5. Open a Pull Request.